ruby-fs-stack 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. data/.document +5 -0
  2. data/.gitignore +7 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +26 -0
  5. data/Rakefile +51 -0
  6. data/VERSION +1 -0
  7. data/examples/familytree_example.rb +26 -0
  8. data/examples/login_example.rb +11 -0
  9. data/lib/ruby-fs-stack/assets/entrust-ca.crt +104 -0
  10. data/lib/ruby-fs-stack/enunciate/LICENSE +15 -0
  11. data/lib/ruby-fs-stack/enunciate/README +6 -0
  12. data/lib/ruby-fs-stack/enunciate/familytree.rb +12608 -0
  13. data/lib/ruby-fs-stack/enunciate/identity.rb +964 -0
  14. data/lib/ruby-fs-stack/familytree.rb +827 -0
  15. data/lib/ruby-fs-stack/fs_communicator.rb +109 -0
  16. data/lib/ruby-fs-stack/fs_utils.rb +27 -0
  17. data/lib/ruby-fs-stack/identity.rb +45 -0
  18. data/lib/ruby-fs-stack/warning_suppressor.rb +18 -0
  19. data/lib/ruby-fs-stack.rb +2 -0
  20. data/spec/communicator_spec.rb +214 -0
  21. data/spec/familytree_v2/familytree_communicator_spec.rb +309 -0
  22. data/spec/familytree_v2/json/match_KW3B-NNM.js +1 -0
  23. data/spec/familytree_v2/json/person/KJ86-3VD_all.js +1 -0
  24. data/spec/familytree_v2/json/person/KJ86-3VD_version.js +1 -0
  25. data/spec/familytree_v2/json/person/post_response.js +1 -0
  26. data/spec/familytree_v2/json/person/relationship_not_found.js +1 -0
  27. data/spec/familytree_v2/json/person/relationship_read.js +1 -0
  28. data/spec/familytree_v2/json/person/relationship_update.js +1 -0
  29. data/spec/familytree_v2/json/search.js +1 -0
  30. data/spec/familytree_v2/person_spec.rb +563 -0
  31. data/spec/familytree_v2/search_results_spec.rb +131 -0
  32. data/spec/fs_utils_spec.rb +33 -0
  33. data/spec/identity_v1/identity_spec.rb +50 -0
  34. data/spec/identity_v1/json/login.js +1 -0
  35. data/spec/ruby-fs-stack_spec.rb +6 -0
  36. data/spec/spec_helper.rb +27 -0
  37. metadata +119 -0
@@ -0,0 +1,964 @@
1
+ #
2
+ # This code was generated by Enunciate.
3
+ # http://enunciate.codehaus.org/
4
+ #
5
+ require 'json'
6
+
7
+ # adding necessary json serialization methods to standard classes.
8
+ class Object
9
+ def to_jaxb_json_hash
10
+ return self
11
+ end
12
+ def self.from_json o
13
+ return o
14
+ end
15
+ end
16
+
17
+ class String
18
+ def self.from_json o
19
+ return o
20
+ end
21
+ end
22
+
23
+ class Boolean
24
+ def self.from_json o
25
+ return o
26
+ end
27
+ end
28
+
29
+ class Numeric
30
+ def self.from_json o
31
+ return o
32
+ end
33
+ end
34
+
35
+ class Time
36
+ #json time is represented as number of milliseconds since epoch
37
+ def to_jaxb_json_hash
38
+ return (to_i * 1000) + (usec / 1000)
39
+ end
40
+ def self.from_json o
41
+ if o.nil?
42
+ return nil
43
+ else
44
+ return Time.at(o / 1000, (o % 1000) * 1000)
45
+ end
46
+ end
47
+ end
48
+
49
+ class Array
50
+ def to_jaxb_json_hash
51
+ a = Array.new
52
+ each { | _item | a.push _item.to_jaxb_json_hash }
53
+ return a
54
+ end
55
+ end
56
+
57
+
58
+ module Org
59
+
60
+ module Familysearch
61
+
62
+ module Ws
63
+
64
+ module Identity
65
+
66
+ module V2a
67
+
68
+ module Schema
69
+
70
+ #
71
+ class Session
72
+
73
+ # session id.
74
+ attr_accessor :id
75
+ # session values.
76
+ attr_accessor :values
77
+
78
+ # the json hash for this Session
79
+ def to_jaxb_json_hash
80
+ _h = {}
81
+ _h['id'] = id.to_jaxb_json_hash unless id.nil?
82
+ if !values.nil?
83
+ _ha = Array.new
84
+ values.each { | _item | _ha.push _item.to_jaxb_json_hash }
85
+ _h['values'] = _ha
86
+ end
87
+ return _h
88
+ end
89
+
90
+ # the json (string form) for this Session
91
+ def to_json
92
+ to_jaxb_json_hash.to_json
93
+ end
94
+
95
+ #initializes this Session with a json hash
96
+ def init_jaxb_json_hash(_o)
97
+ @id = String.from_json(_o['id']) unless _o['id'].nil?
98
+ if !_o['values'].nil?
99
+ @values = Array.new
100
+ _oa = _o['values']
101
+ _oa.each { | _item | @values.push Org::Familysearch::Ws::Identity::V2a::Schema::SessionValue.from_json(_item) }
102
+ end
103
+ end
104
+
105
+ # constructs a Session from a (parsed) JSON hash
106
+ def self.from_json(o)
107
+ if o.nil?
108
+ return nil
109
+ else
110
+ inst = new
111
+ inst.init_jaxb_json_hash o
112
+ return inst
113
+ end
114
+ end
115
+ end
116
+
117
+ end
118
+
119
+ end
120
+
121
+ end
122
+
123
+ end
124
+
125
+ end
126
+
127
+ end
128
+
129
+ module Org
130
+
131
+ module Familysearch
132
+
133
+ module Ws
134
+
135
+ module Identity
136
+
137
+ module V2a
138
+
139
+ module Schema
140
+
141
+ #
142
+ class Authentication
143
+
144
+ # authentication status.
145
+ attr_accessor :status
146
+ # authentication resolution URI.
147
+ attr_accessor :resolutionUri
148
+
149
+ # the json hash for this Authentication
150
+ def to_jaxb_json_hash
151
+ _h = {}
152
+ _h['status'] = status.to_jaxb_json_hash unless status.nil?
153
+ _h['resolutionUri'] = resolutionUri.to_jaxb_json_hash unless resolutionUri.nil?
154
+ return _h
155
+ end
156
+
157
+ # the json (string form) for this Authentication
158
+ def to_json
159
+ to_jaxb_json_hash.to_json
160
+ end
161
+
162
+ #initializes this Authentication with a json hash
163
+ def init_jaxb_json_hash(_o)
164
+ @status = String.from_json(_o['status']) unless _o['status'].nil?
165
+ @resolutionUri = String.from_json(_o['resolutionUri']) unless _o['resolutionUri'].nil?
166
+ end
167
+
168
+ # constructs a Authentication from a (parsed) JSON hash
169
+ def self.from_json(o)
170
+ if o.nil?
171
+ return nil
172
+ else
173
+ inst = new
174
+ inst.init_jaxb_json_hash o
175
+ return inst
176
+ end
177
+ end
178
+ end
179
+
180
+ end
181
+
182
+ end
183
+
184
+ end
185
+
186
+ end
187
+
188
+ end
189
+
190
+ end
191
+
192
+ module Org
193
+
194
+ module Familysearch
195
+
196
+ module Ws
197
+
198
+ module Identity
199
+
200
+ module V2a
201
+
202
+ module Schema
203
+
204
+ #
205
+ class User
206
+
207
+ # (no documentation provided)
208
+ attr_accessor :id
209
+ # (no documentation provided)
210
+ attr_accessor :displayName
211
+ # (no documentation provided)
212
+ attr_accessor :email
213
+
214
+ # the json hash for this User
215
+ def to_jaxb_json_hash
216
+ _h = {}
217
+ _h['id'] = id.to_jaxb_json_hash unless id.nil?
218
+ _h['displayName'] = displayName.to_jaxb_json_hash unless displayName.nil?
219
+ _h['email'] = email.to_jaxb_json_hash unless email.nil?
220
+ return _h
221
+ end
222
+
223
+ # the json (string form) for this User
224
+ def to_json
225
+ to_jaxb_json_hash.to_json
226
+ end
227
+
228
+ #initializes this User with a json hash
229
+ def init_jaxb_json_hash(_o)
230
+ @id = String.from_json(_o['id']) unless _o['id'].nil?
231
+ @displayName = String.from_json(_o['displayName']) unless _o['displayName'].nil?
232
+ @email = String.from_json(_o['email']) unless _o['email'].nil?
233
+ end
234
+
235
+ # constructs a User from a (parsed) JSON hash
236
+ def self.from_json(o)
237
+ if o.nil?
238
+ return nil
239
+ else
240
+ inst = new
241
+ inst.init_jaxb_json_hash o
242
+ return inst
243
+ end
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end
250
+
251
+ end
252
+
253
+ end
254
+
255
+ end
256
+
257
+ end
258
+
259
+ module Org
260
+
261
+ module Familysearch
262
+
263
+ module Ws
264
+
265
+ module Identity
266
+
267
+ module V2a
268
+
269
+ module Schema
270
+
271
+ #
272
+ class SessionValue
273
+
274
+ # session value name.
275
+ attr_accessor :name
276
+ # session value value.
277
+ attr_accessor :value
278
+
279
+ # the json hash for this SessionValue
280
+ def to_jaxb_json_hash
281
+ _h = {}
282
+ _h['name'] = name.to_jaxb_json_hash unless name.nil?
283
+ _h['value'] = value.to_jaxb_json_hash unless value.nil?
284
+ return _h
285
+ end
286
+
287
+ # the json (string form) for this SessionValue
288
+ def to_json
289
+ to_jaxb_json_hash.to_json
290
+ end
291
+
292
+ #initializes this SessionValue with a json hash
293
+ def init_jaxb_json_hash(_o)
294
+ @name = String.from_json(_o['name']) unless _o['name'].nil?
295
+ @value = String.from_json(_o['value']) unless _o['value'].nil?
296
+ end
297
+
298
+ # constructs a SessionValue from a (parsed) JSON hash
299
+ def self.from_json(o)
300
+ if o.nil?
301
+ return nil
302
+ else
303
+ inst = new
304
+ inst.init_jaxb_json_hash o
305
+ return inst
306
+ end
307
+ end
308
+ end
309
+
310
+ end
311
+
312
+ end
313
+
314
+ end
315
+
316
+ end
317
+
318
+ end
319
+
320
+ end
321
+
322
+ module Org
323
+
324
+ module Familysearch
325
+
326
+ module Ws
327
+
328
+ module Identity
329
+
330
+ module V1
331
+
332
+ module Schema
333
+
334
+ # A identity session.
335
+ class Session
336
+
337
+ # The id of the session.
338
+ attr_accessor :id
339
+
340
+ # the json hash for this Session
341
+ def to_jaxb_json_hash
342
+ _h = {}
343
+ _h['id'] = id.to_jaxb_json_hash unless id.nil?
344
+ return _h
345
+ end
346
+
347
+ # the json (string form) for this Session
348
+ def to_json
349
+ to_jaxb_json_hash.to_json
350
+ end
351
+
352
+ #initializes this Session with a json hash
353
+ def init_jaxb_json_hash(_o)
354
+ @id = String.from_json(_o['id']) unless _o['id'].nil?
355
+ end
356
+
357
+ # constructs a Session from a (parsed) JSON hash
358
+ def self.from_json(o)
359
+ if o.nil?
360
+ return nil
361
+ else
362
+ inst = new
363
+ inst.init_jaxb_json_hash o
364
+ return inst
365
+ end
366
+ end
367
+ end
368
+
369
+ end
370
+
371
+ end
372
+
373
+ end
374
+
375
+ end
376
+
377
+ end
378
+
379
+ end
380
+
381
+ module Org
382
+
383
+ module Familysearch
384
+
385
+ module Ws
386
+
387
+ module V1
388
+
389
+ #
390
+ class BasicProperty
391
+
392
+ # (no documentation provided)
393
+ attr_accessor :name
394
+ # (no documentation provided)
395
+ attr_accessor :value
396
+
397
+ # the json hash for this BasicProperty
398
+ def to_jaxb_json_hash
399
+ _h = {}
400
+ _h['name'] = name.to_jaxb_json_hash unless name.nil?
401
+ _h['value'] = value.to_jaxb_json_hash unless value.nil?
402
+ return _h
403
+ end
404
+
405
+ # the json (string form) for this BasicProperty
406
+ def to_json
407
+ to_jaxb_json_hash.to_json
408
+ end
409
+
410
+ #initializes this BasicProperty with a json hash
411
+ def init_jaxb_json_hash(_o)
412
+ @name = String.from_json(_o['name']) unless _o['name'].nil?
413
+ @value = String.from_json(_o['value']) unless _o['value'].nil?
414
+ end
415
+
416
+ # constructs a BasicProperty from a (parsed) JSON hash
417
+ def self.from_json(o)
418
+ if o.nil?
419
+ return nil
420
+ else
421
+ inst = new
422
+ inst.init_jaxb_json_hash o
423
+ return inst
424
+ end
425
+ end
426
+ end
427
+
428
+ end
429
+
430
+ end
431
+
432
+ end
433
+
434
+ end
435
+
436
+ module Org
437
+
438
+ module Familysearch
439
+
440
+ module Ws
441
+
442
+ module Identity
443
+
444
+ module V2a
445
+
446
+ module Schema
447
+
448
+ #
449
+ class AuthenticationStatus
450
+
451
+ # (no documentation provided)
452
+ Success = "Success"
453
+
454
+ # (no documentation provided)
455
+ Failure = "Failure"
456
+
457
+ # (no documentation provided)
458
+ Resolution_Required = "Resolution_Required"
459
+
460
+ # (no documentation provided)
461
+ Invalid_Key = "Invalid_Key"
462
+
463
+ # (no documentation provided)
464
+ Other = "Other"
465
+ end
466
+
467
+ end
468
+
469
+ end
470
+
471
+ end
472
+
473
+ end
474
+
475
+ end
476
+
477
+ end
478
+
479
+ module Org
480
+
481
+ module Familysearch
482
+
483
+ module Ws
484
+
485
+ module V1
486
+
487
+ #
488
+ class ErrorLevel
489
+
490
+ # (no documentation provided)
491
+ Info = "Info"
492
+
493
+ # (no documentation provided)
494
+ Warn = "Warn"
495
+
496
+ # (no documentation provided)
497
+ Error = "Error"
498
+ end
499
+
500
+ end
501
+
502
+ end
503
+
504
+ end
505
+
506
+ end
507
+
508
+ module Org
509
+
510
+ module Familysearch
511
+
512
+ module Ws
513
+
514
+ module V1
515
+
516
+ #
517
+ class BasicError
518
+
519
+ # (no documentation provided)
520
+ attr_accessor :level
521
+ # (no documentation provided)
522
+ attr_accessor :subcode
523
+ # (no documentation provided)
524
+ attr_accessor :code
525
+ # (no documentation provided)
526
+ attr_accessor :message
527
+ # (no documentation provided)
528
+ attr_accessor :details
529
+
530
+ # the json hash for this BasicError
531
+ def to_jaxb_json_hash
532
+ _h = {}
533
+ _h['level'] = level.to_jaxb_json_hash unless level.nil?
534
+ _h['subcode'] = subcode.to_jaxb_json_hash unless subcode.nil?
535
+ _h['code'] = code.to_jaxb_json_hash unless code.nil?
536
+ _h['message'] = message.to_jaxb_json_hash unless message.nil?
537
+ _h['details'] = details.to_jaxb_json_hash unless details.nil?
538
+ return _h
539
+ end
540
+
541
+ # the json (string form) for this BasicError
542
+ def to_json
543
+ to_jaxb_json_hash.to_json
544
+ end
545
+
546
+ #initializes this BasicError with a json hash
547
+ def init_jaxb_json_hash(_o)
548
+ @level = String.from_json(_o['level']) unless _o['level'].nil?
549
+ @subcode = Fixnum.from_json(_o['subcode']) unless _o['subcode'].nil?
550
+ @code = Fixnum.from_json(_o['code']) unless _o['code'].nil?
551
+ @message = String.from_json(_o['message']) unless _o['message'].nil?
552
+ @details = String.from_json(_o['details']) unless _o['details'].nil?
553
+ end
554
+
555
+ # constructs a BasicError from a (parsed) JSON hash
556
+ def self.from_json(o)
557
+ if o.nil?
558
+ return nil
559
+ else
560
+ inst = new
561
+ inst.init_jaxb_json_hash o
562
+ return inst
563
+ end
564
+ end
565
+ end
566
+
567
+ end
568
+
569
+ end
570
+
571
+ end
572
+
573
+ end
574
+
575
+ module Org
576
+
577
+ module Familysearch
578
+
579
+ module Ws
580
+
581
+ module V1
582
+
583
+ #
584
+ class BasicElement
585
+
586
+ # (no documentation provided)
587
+ attr_accessor :statusCode
588
+ # (no documentation provided)
589
+ attr_accessor :deprecated
590
+ # (no documentation provided)
591
+ attr_accessor :statusMessage
592
+ # (no documentation provided)
593
+ attr_accessor :version
594
+ # (no documentation provided)
595
+ attr_accessor :properties
596
+ # (no documentation provided)
597
+ attr_accessor :errors
598
+
599
+ # the json hash for this BasicElement
600
+ def to_jaxb_json_hash
601
+ _h = {}
602
+ _h['statusCode'] = statusCode.to_jaxb_json_hash unless statusCode.nil?
603
+ _h['deprecated'] = deprecated.to_jaxb_json_hash unless deprecated.nil?
604
+ _h['statusMessage'] = statusMessage.to_jaxb_json_hash unless statusMessage.nil?
605
+ _h['version'] = version.to_jaxb_json_hash unless version.nil?
606
+ if !properties.nil?
607
+ _ha = Array.new
608
+ properties.each { | _item | _ha.push _item.to_jaxb_json_hash }
609
+ _h['properties'] = _ha
610
+ end
611
+ if !errors.nil?
612
+ _ha = Array.new
613
+ errors.each { | _item | _ha.push _item.to_jaxb_json_hash }
614
+ _h['errors'] = _ha
615
+ end
616
+ return _h
617
+ end
618
+
619
+ # the json (string form) for this BasicElement
620
+ def to_json
621
+ to_jaxb_json_hash.to_json
622
+ end
623
+
624
+ #initializes this BasicElement with a json hash
625
+ def init_jaxb_json_hash(_o)
626
+ @statusCode = Fixnum.from_json(_o['statusCode']) unless _o['statusCode'].nil?
627
+ @deprecated = Boolean.from_json(_o['deprecated']) unless _o['deprecated'].nil?
628
+ @statusMessage = String.from_json(_o['statusMessage']) unless _o['statusMessage'].nil?
629
+ @version = String.from_json(_o['version']) unless _o['version'].nil?
630
+ if !_o['properties'].nil?
631
+ @properties = Array.new
632
+ _oa = _o['properties']
633
+ _oa.each { | _item | @properties.push Org::Familysearch::Ws::V1::BasicProperty.from_json(_item) }
634
+ end
635
+ if !_o['errors'].nil?
636
+ @errors = Array.new
637
+ _oa = _o['errors']
638
+ _oa.each { | _item | @errors.push Org::Familysearch::Ws::V1::BasicError.from_json(_item) }
639
+ end
640
+ end
641
+
642
+ # constructs a BasicElement from a (parsed) JSON hash
643
+ def self.from_json(o)
644
+ if o.nil?
645
+ return nil
646
+ else
647
+ inst = new
648
+ inst.init_jaxb_json_hash o
649
+ return inst
650
+ end
651
+ end
652
+ end
653
+
654
+ end
655
+
656
+ end
657
+
658
+ end
659
+
660
+ end
661
+
662
+ module Org
663
+
664
+ module Familysearch
665
+
666
+ module Ws
667
+
668
+ module Identity
669
+
670
+ module V2a
671
+
672
+ module Schema
673
+
674
+ #
675
+ class IdentityStatus
676
+
677
+ # (no documentation provided)
678
+ attr_accessor :code
679
+ # (no documentation provided)
680
+ attr_accessor :subcode
681
+ # (no documentation provided)
682
+ attr_accessor :message
683
+ # (no documentation provided)
684
+ attr_accessor :details
685
+
686
+ # the json hash for this IdentityStatus
687
+ def to_jaxb_json_hash
688
+ _h = {}
689
+ _h['code'] = code.to_jaxb_json_hash unless code.nil?
690
+ _h['subcode'] = subcode.to_jaxb_json_hash unless subcode.nil?
691
+ _h['message'] = message.to_jaxb_json_hash unless message.nil?
692
+ _h['details'] = details.to_jaxb_json_hash unless details.nil?
693
+ return _h
694
+ end
695
+
696
+ # the json (string form) for this IdentityStatus
697
+ def to_json
698
+ to_jaxb_json_hash.to_json
699
+ end
700
+
701
+ #initializes this IdentityStatus with a json hash
702
+ def init_jaxb_json_hash(_o)
703
+ @code = Fixnum.from_json(_o['code']) unless _o['code'].nil?
704
+ @subcode = Fixnum.from_json(_o['subcode']) unless _o['subcode'].nil?
705
+ @message = String.from_json(_o['message']) unless _o['message'].nil?
706
+ @details = String.from_json(_o['details']) unless _o['details'].nil?
707
+ end
708
+
709
+ # constructs a IdentityStatus from a (parsed) JSON hash
710
+ def self.from_json(o)
711
+ if o.nil?
712
+ return nil
713
+ else
714
+ inst = new
715
+ inst.init_jaxb_json_hash o
716
+ return inst
717
+ end
718
+ end
719
+ end
720
+
721
+ end
722
+
723
+ end
724
+
725
+ end
726
+
727
+ end
728
+
729
+ end
730
+
731
+ end
732
+
733
+ module Org
734
+
735
+ module Familysearch
736
+
737
+ module Ws
738
+
739
+ module Identity
740
+
741
+ module V2a
742
+
743
+ module Schema
744
+
745
+ #
746
+ class IdentityProperty
747
+
748
+ # (no documentation provided)
749
+ attr_accessor :name
750
+ # (no documentation provided)
751
+ attr_accessor :value
752
+
753
+ # the json hash for this IdentityProperty
754
+ def to_jaxb_json_hash
755
+ _h = {}
756
+ _h['name'] = name.to_jaxb_json_hash unless name.nil?
757
+ _h['value'] = value.to_jaxb_json_hash unless value.nil?
758
+ return _h
759
+ end
760
+
761
+ # the json (string form) for this IdentityProperty
762
+ def to_json
763
+ to_jaxb_json_hash.to_json
764
+ end
765
+
766
+ #initializes this IdentityProperty with a json hash
767
+ def init_jaxb_json_hash(_o)
768
+ @name = String.from_json(_o['name']) unless _o['name'].nil?
769
+ @value = String.from_json(_o['value']) unless _o['value'].nil?
770
+ end
771
+
772
+ # constructs a IdentityProperty from a (parsed) JSON hash
773
+ def self.from_json(o)
774
+ if o.nil?
775
+ return nil
776
+ else
777
+ inst = new
778
+ inst.init_jaxb_json_hash o
779
+ return inst
780
+ end
781
+ end
782
+ end
783
+
784
+ end
785
+
786
+ end
787
+
788
+ end
789
+
790
+ end
791
+
792
+ end
793
+
794
+ end
795
+
796
+ module Org
797
+
798
+ module Familysearch
799
+
800
+ module Ws
801
+
802
+ module Identity
803
+
804
+ module V1
805
+
806
+ module Schema
807
+
808
+ #
809
+ class Identity < Org::Familysearch::Ws::V1::BasicElement
810
+
811
+ # The session associated with the identity.
812
+ attr_accessor :session
813
+
814
+ # the json hash for this Identity
815
+ def to_jaxb_json_hash
816
+ _h = super
817
+ _h['session'] = session.to_jaxb_json_hash unless session.nil?
818
+ return _h
819
+ end
820
+
821
+ #initializes this Identity with a json hash
822
+ def init_jaxb_json_hash(_o)
823
+ super _o
824
+ @session = Org::Familysearch::Ws::Identity::V1::Schema::Session.from_json(_o['session']) unless _o['session'].nil?
825
+ end
826
+
827
+ # constructs a Identity from a (parsed) JSON hash
828
+ def self.from_json(o)
829
+ if o.nil?
830
+ return nil
831
+ else
832
+ inst = new
833
+ inst.init_jaxb_json_hash o
834
+ return inst
835
+ end
836
+ end
837
+ end
838
+
839
+ end
840
+
841
+ end
842
+
843
+ end
844
+
845
+ end
846
+
847
+ end
848
+
849
+ end
850
+
851
+ module Org
852
+
853
+ module Familysearch
854
+
855
+ module Ws
856
+
857
+ module Identity
858
+
859
+ module V2a
860
+
861
+ module Schema
862
+
863
+ #
864
+ class Identity
865
+
866
+ # (no documentation provided)
867
+ attr_accessor :statusCode
868
+ # (no documentation provided)
869
+ attr_accessor :deprecated
870
+ # (no documentation provided)
871
+ attr_accessor :statusMessage
872
+ # (no documentation provided)
873
+ attr_accessor :version
874
+ # authentication information.
875
+ attr_accessor :authentication
876
+ # session information.
877
+ attr_accessor :session
878
+ # The status list.
879
+ attr_accessor :status
880
+ # users.
881
+ attr_accessor :users
882
+ # The properties.
883
+ attr_accessor :properties
884
+
885
+ # the json hash for this Identity
886
+ def to_jaxb_json_hash
887
+ _h = {}
888
+ _h['statusCode'] = statusCode.to_jaxb_json_hash unless statusCode.nil?
889
+ _h['deprecated'] = deprecated.to_jaxb_json_hash unless deprecated.nil?
890
+ _h['statusMessage'] = statusMessage.to_jaxb_json_hash unless statusMessage.nil?
891
+ _h['version'] = version.to_jaxb_json_hash unless version.nil?
892
+ _h['authentication'] = authentication.to_jaxb_json_hash unless authentication.nil?
893
+ _h['session'] = session.to_jaxb_json_hash unless session.nil?
894
+ if !status.nil?
895
+ _ha = Array.new
896
+ status.each { | _item | _ha.push _item.to_jaxb_json_hash }
897
+ _h['status'] = _ha
898
+ end
899
+ if !users.nil?
900
+ _ha = Array.new
901
+ users.each { | _item | _ha.push _item.to_jaxb_json_hash }
902
+ _h['users'] = _ha
903
+ end
904
+ if !properties.nil?
905
+ _ha = Array.new
906
+ properties.each { | _item | _ha.push _item.to_jaxb_json_hash }
907
+ _h['properties'] = _ha
908
+ end
909
+ return _h
910
+ end
911
+
912
+ # the json (string form) for this Identity
913
+ def to_json
914
+ to_jaxb_json_hash.to_json
915
+ end
916
+
917
+ #initializes this Identity with a json hash
918
+ def init_jaxb_json_hash(_o)
919
+ @statusCode = Fixnum.from_json(_o['statusCode']) unless _o['statusCode'].nil?
920
+ @deprecated = Boolean.from_json(_o['deprecated']) unless _o['deprecated'].nil?
921
+ @statusMessage = String.from_json(_o['statusMessage']) unless _o['statusMessage'].nil?
922
+ @version = String.from_json(_o['version']) unless _o['version'].nil?
923
+ @authentication = Org::Familysearch::Ws::Identity::V2a::Schema::Authentication.from_json(_o['authentication']) unless _o['authentication'].nil?
924
+ @session = Org::Familysearch::Ws::Identity::V2a::Schema::Session.from_json(_o['session']) unless _o['session'].nil?
925
+ if !_o['status'].nil?
926
+ @status = Array.new
927
+ _oa = _o['status']
928
+ _oa.each { | _item | @status.push Org::Familysearch::Ws::Identity::V2a::Schema::IdentityStatus.from_json(_item) }
929
+ end
930
+ if !_o['users'].nil?
931
+ @users = Array.new
932
+ _oa = _o['users']
933
+ _oa.each { | _item | @users.push Org::Familysearch::Ws::Identity::V2a::Schema::User.from_json(_item) }
934
+ end
935
+ if !_o['properties'].nil?
936
+ @properties = Array.new
937
+ _oa = _o['properties']
938
+ _oa.each { | _item | @properties.push Org::Familysearch::Ws::Identity::V2a::Schema::IdentityProperty.from_json(_item) }
939
+ end
940
+ end
941
+
942
+ # constructs a Identity from a (parsed) JSON hash
943
+ def self.from_json(o)
944
+ if o.nil?
945
+ return nil
946
+ else
947
+ inst = new
948
+ inst.init_jaxb_json_hash o
949
+ return inst
950
+ end
951
+ end
952
+ end
953
+
954
+ end
955
+
956
+ end
957
+
958
+ end
959
+
960
+ end
961
+
962
+ end
963
+
964
+ end