summaryrefslogtreecommitdiff
path: root/src/saml2/ws/wstrust.py
blob: eb8c944ca2094d2fc59091a2d2d6eb1d10b1cb39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
#!/usr/bin/env python

#
# Generated Sun Jun 14 13:41:29 2015 by parse_xsd.py version 0.5.
#

import saml2
from saml2 import SamlBase

from saml2.ws import wsaddr as wsa
from saml2.ws import wssec as wsse
from saml2.ws import wsutil as wsu
from saml2.ws import wspol as wsp

NAMESPACE = 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/'

class RequestSecurityTokenType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenType element """

    c_tag = 'RequestSecurityTokenType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['Context'] = ('context', 'anyURI', False)

    def __init__(self,
            context=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.context=context

def request_security_token_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenType_, xml_string)


class TokenType(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:TokenType element """

    c_tag = 'TokenType'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def token_type_from_string(xml_string):
    return saml2.create_class_from_xml_string(TokenType, xml_string)


class RequestTypeOpenEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestTypeOpenEnum element """

    c_tag = 'RequestTypeOpenEnum'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def request_type_open_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestTypeOpenEnum_, xml_string)


class RequestTypeEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestTypeEnum element """

    c_tag = 'RequestTypeEnum'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Renew', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Cancel', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/STSCancel', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Validate']}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def request_type_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestTypeEnum_, xml_string)


class RequestSecurityTokenResponseType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponseType element """

    c_tag = 'RequestSecurityTokenResponseType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['Context'] = ('context', 'anyURI', False)

    def __init__(self,
            context=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.context=context

def request_security_token_response_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenResponseType_, xml_string)


class RequestedSecurityTokenType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedSecurityTokenType element """

    c_tag = 'RequestedSecurityTokenType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def requested_security_token_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedSecurityTokenType_, xml_string)


class BinarySecretTypeEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecretTypeEnum element """

    c_tag = 'BinarySecretTypeEnum'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/AsymmetricKey', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/Nonce']}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def binary_secret_type_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(BinarySecretTypeEnum_, xml_string)


class BinarySecretTypeOpenEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecretTypeOpenEnum element """

    c_tag = 'BinarySecretTypeOpenEnum'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def binary_secret_type_open_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(BinarySecretTypeOpenEnum_, xml_string)


class ClaimsType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ClaimsType element """

    c_tag = 'ClaimsType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['Dialect'] = ('dialect', 'anyURI', False)

    def __init__(self,
            dialect=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.dialect=dialect

def claims_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(ClaimsType_, xml_string)


class EntropyType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EntropyType element """

    c_tag = 'EntropyType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def entropy_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(EntropyType_, xml_string)


class LifetimeType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:LifetimeType element """

    c_tag = 'LifetimeType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Created'] = ('created', wsu.Created)
    c_cardinality['created'] = {"min":0, "max":1}
    c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Expires'] = ('expires', wsu.Expires)
    c_cardinality['expires'] = {"min":0, "max":1}
    c_child_order.extend(['created', 'expires'])

    def __init__(self,
            created=None,
            expires=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.created=created
        self.expires=expires

def lifetime_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(LifetimeType_, xml_string)


class RequestSecurityTokenCollectionType_RequestSecurityToken(RequestSecurityTokenType_):

    c_tag = 'RequestSecurityToken'
    c_namespace = NAMESPACE
    c_children = RequestSecurityTokenType_.c_children.copy()
    c_attributes = RequestSecurityTokenType_.c_attributes.copy()
    c_child_order = RequestSecurityTokenType_.c_child_order[:]
    c_cardinality = RequestSecurityTokenType_.c_cardinality.copy()

def request_security_token_collection_type__request_security_token_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenCollectionType_RequestSecurityToken, xml_string)


class RequestSecurityTokenCollectionType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenCollectionType element """

    c_tag = 'RequestSecurityTokenCollectionType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}RequestSecurityToken'] = ('request_security_token', [RequestSecurityTokenCollectionType_RequestSecurityToken])
    c_cardinality['request_security_token'] = {"min":2}
    c_child_order.extend(['request_security_token'])

    def __init__(self,
            request_security_token=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.request_security_token=request_security_token or []

def request_security_token_collection_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenCollectionType_, xml_string)


class ComputedKeyEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKeyEnum element """

    c_tag = 'ComputedKeyEnum'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/CK/PSHA1', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/CK/HASH']}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def computed_key_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(ComputedKeyEnum_, xml_string)


class ComputedKeyOpenEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKeyOpenEnum element """

    c_tag = 'ComputedKeyOpenEnum'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def computed_key_open_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(ComputedKeyOpenEnum_, xml_string)


class RequestedReferenceType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedReferenceType element """

    c_tag = 'RequestedReferenceType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}SecurityTokenReference'] = ('security_token_reference', wsse.SecurityTokenReference)
    c_child_order.extend(['security_token_reference'])

    def __init__(self,
            security_token_reference=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.security_token_reference=security_token_reference

def requested_reference_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedReferenceType_, xml_string)


class RequestedProofTokenType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedProofTokenType element """

    c_tag = 'RequestedProofTokenType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def requested_proof_token_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedProofTokenType_, xml_string)


class RenewTargetType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RenewTargetType element """

    c_tag = 'RenewTargetType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def renew_target_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RenewTargetType_, xml_string)


class AllowPostdatingType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AllowPostdatingType element """

    c_tag = 'AllowPostdatingType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def allow_postdating_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(AllowPostdatingType_, xml_string)


class RenewingType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RenewingType element """

    c_tag = 'RenewingType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['Allow'] = ('allow', 'boolean', False)
    c_attributes['OK'] = ('ok', 'boolean', False)

    def __init__(self,
            allow=None,
            ok=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.allow=allow
        self.ok=ok

def renewing_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RenewingType_, xml_string)


class CancelTargetType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CancelTargetType element """

    c_tag = 'CancelTargetType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def cancel_target_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(CancelTargetType_, xml_string)


class RequestedTokenCancelledType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedTokenCancelledType element """

    c_tag = 'RequestedTokenCancelledType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def requested_token_cancelled_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedTokenCancelledType_, xml_string)


class ValidateTargetType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ValidateTargetType element """

    c_tag = 'ValidateTargetType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def validate_target_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(ValidateTargetType_, xml_string)


class StatusCodeEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:StatusCodeEnum element """

    c_tag = 'StatusCodeEnum'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/status/valid', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/status/invalid']}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def status_code_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(StatusCodeEnum_, xml_string)


class StatusCodeOpenEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:StatusCodeOpenEnum element """

    c_tag = 'StatusCodeOpenEnum'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def status_code_open_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(StatusCodeOpenEnum_, xml_string)


class Challenge(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Challenge element """

    c_tag = 'Challenge'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'string'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def challenge_from_string(xml_string):
    return saml2.create_class_from_xml_string(Challenge, xml_string)


class BinaryExchangeType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinaryExchangeType element """

    c_tag = 'BinaryExchangeType'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'string'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['ValueType'] = ('value_type', 'anyURI', True)
    c_attributes['EncodingType'] = ('encoding_type', 'anyURI', True)

    def __init__(self,
            value_type=None,
            encoding_type=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.value_type=value_type
        self.encoding_type=encoding_type

def binary_exchange_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(BinaryExchangeType_, xml_string)


class RequestKETType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestKETType element """

    c_tag = 'RequestKETType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def request_ket_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestKETType_, xml_string)


class KeyExchangeTokenType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyExchangeTokenType element """

    c_tag = 'KeyExchangeTokenType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def key_exchange_token_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(KeyExchangeTokenType_, xml_string)


class CombinedHash(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CombinedHash element """

    c_tag = 'CombinedHash'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'base64Binary'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def combined_hash_from_string(xml_string):
    return saml2.create_class_from_xml_string(CombinedHash, xml_string)


class OnBehalfOfType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:OnBehalfOfType element """

    c_tag = 'OnBehalfOfType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def on_behalf_of_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(OnBehalfOfType_, xml_string)


class Issuer(wsa.EndpointReferenceType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Issuer element """

    c_tag = 'Issuer'
    c_namespace = NAMESPACE
    c_children = wsa.EndpointReferenceType_.c_children.copy()
    c_attributes = wsa.EndpointReferenceType_.c_attributes.copy()
    c_child_order = wsa.EndpointReferenceType_.c_child_order[:]
    c_cardinality = wsa.EndpointReferenceType_.c_cardinality.copy()

def issuer_from_string(xml_string):
    return saml2.create_class_from_xml_string(Issuer, xml_string)


class AuthenticationType(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AuthenticationType element """

    c_tag = 'AuthenticationType'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def authentication_type_from_string(xml_string):
    return saml2.create_class_from_xml_string(AuthenticationType, xml_string)


class KeyTypeEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyTypeEnum element """

    c_tag = 'KeyTypeEnum'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'xs:anyURI', 'enumeration': ['http://docs.oasis-open.org/ws-sx/ws-trust/200512/PublicKey', 'http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey', 'http://docs.oasis-open.org/wssx/wstrust/200512/Bearer']}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def key_type_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(KeyTypeEnum_, xml_string)


class KeyTypeOpenEnum_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyTypeOpenEnum element """

    c_tag = 'KeyTypeOpenEnum'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def key_type_open_enum__from_string(xml_string):
    return saml2.create_class_from_xml_string(KeyTypeOpenEnum_, xml_string)


class KeySize(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeySize element """

    c_tag = 'KeySize'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'unsignedInt'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def key_size_from_string(xml_string):
    return saml2.create_class_from_xml_string(KeySize, xml_string)


class SignatureAlgorithm(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignatureAlgorithm element """

    c_tag = 'SignatureAlgorithm'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def signature_algorithm_from_string(xml_string):
    return saml2.create_class_from_xml_string(SignatureAlgorithm, xml_string)


class EncryptionAlgorithm(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EncryptionAlgorithm element """

    c_tag = 'EncryptionAlgorithm'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def encryption_algorithm_from_string(xml_string):
    return saml2.create_class_from_xml_string(EncryptionAlgorithm, xml_string)


class CanonicalizationAlgorithm(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CanonicalizationAlgorithm element """

    c_tag = 'CanonicalizationAlgorithm'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def canonicalization_algorithm_from_string(xml_string):
    return saml2.create_class_from_xml_string(CanonicalizationAlgorithm, xml_string)


class ComputedKeyAlgorithm(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKeyAlgorithm element """

    c_tag = 'ComputedKeyAlgorithm'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def computed_key_algorithm_from_string(xml_string):
    return saml2.create_class_from_xml_string(ComputedKeyAlgorithm, xml_string)


class EncryptionType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EncryptionType element """

    c_tag = 'EncryptionType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def encryption_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(EncryptionType_, xml_string)


class ProofEncryptionType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ProofEncryptionType element """

    c_tag = 'ProofEncryptionType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def proof_encryption_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(ProofEncryptionType_, xml_string)


class UseKeyType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:UseKeyType element """

    c_tag = 'UseKeyType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['Sig'] = ('sig', 'anyURI', False)

    def __init__(self,
            sig=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.sig=sig

def use_key_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(UseKeyType_, xml_string)


class KeyWrapAlgorithm(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyWrapAlgorithm element """

    c_tag = 'KeyWrapAlgorithm'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def key_wrap_algorithm_from_string(xml_string):
    return saml2.create_class_from_xml_string(KeyWrapAlgorithm, xml_string)


class SignWith(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignWith element """

    c_tag = 'SignWith'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def sign_with_from_string(xml_string):
    return saml2.create_class_from_xml_string(SignWith, xml_string)


class EncryptWith(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:EncryptWith element """

    c_tag = 'EncryptWith'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'anyURI'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def encrypt_with_from_string(xml_string):
    return saml2.create_class_from_xml_string(EncryptWith, xml_string)


class DelegateToType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:DelegateToType element """

    c_tag = 'DelegateToType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def delegate_to_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(DelegateToType_, xml_string)


class Forwardable(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Forwardable element """

    c_tag = 'Forwardable'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'boolean'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def forwardable_from_string(xml_string):
    return saml2.create_class_from_xml_string(Forwardable, xml_string)


class Delegatable(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Delegatable element """

    c_tag = 'Delegatable'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'boolean'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def delegatable_from_string(xml_string):
    return saml2.create_class_from_xml_string(Delegatable, xml_string)


class ParticipantType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ParticipantType element """

    c_tag = 'ParticipantType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def participant_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(ParticipantType_, xml_string)


class RequestSecurityToken(RequestSecurityTokenType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityToken element """

    c_tag = 'RequestSecurityToken'
    c_namespace = NAMESPACE
    c_children = RequestSecurityTokenType_.c_children.copy()
    c_attributes = RequestSecurityTokenType_.c_attributes.copy()
    c_child_order = RequestSecurityTokenType_.c_child_order[:]
    c_cardinality = RequestSecurityTokenType_.c_cardinality.copy()

def request_security_token_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityToken, xml_string)


class RequestType(RequestTypeOpenEnum_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestType element """

    c_tag = 'RequestType'
    c_namespace = NAMESPACE
    c_children = RequestTypeOpenEnum_.c_children.copy()
    c_attributes = RequestTypeOpenEnum_.c_attributes.copy()
    c_child_order = RequestTypeOpenEnum_.c_child_order[:]
    c_cardinality = RequestTypeOpenEnum_.c_cardinality.copy()

def request_type_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestType, xml_string)


class RequestSecurityTokenResponse(RequestSecurityTokenResponseType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponse element """

    c_tag = 'RequestSecurityTokenResponse'
    c_namespace = NAMESPACE
    c_children = RequestSecurityTokenResponseType_.c_children.copy()
    c_attributes = RequestSecurityTokenResponseType_.c_attributes.copy()
    c_child_order = RequestSecurityTokenResponseType_.c_child_order[:]
    c_cardinality = RequestSecurityTokenResponseType_.c_cardinality.copy()

def request_security_token_response_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenResponse, xml_string)


class RequestedSecurityToken(RequestedSecurityTokenType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedSecurityToken element """

    c_tag = 'RequestedSecurityToken'
    c_namespace = NAMESPACE
    c_children = RequestedSecurityTokenType_.c_children.copy()
    c_attributes = RequestedSecurityTokenType_.c_attributes.copy()
    c_child_order = RequestedSecurityTokenType_.c_child_order[:]
    c_cardinality = RequestedSecurityTokenType_.c_cardinality.copy()

def requested_security_token_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedSecurityToken, xml_string)


class BinarySecretType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecretType element """

    c_tag = 'BinarySecretType'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'base64Binary'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_attributes['Type'] = ('type', BinarySecretTypeOpenEnum_, False)

    def __init__(self,
            type=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.type=type

def binary_secret_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(BinarySecretType_, xml_string)


class Claims(ClaimsType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Claims element """

    c_tag = 'Claims'
    c_namespace = NAMESPACE
    c_children = ClaimsType_.c_children.copy()
    c_attributes = ClaimsType_.c_attributes.copy()
    c_child_order = ClaimsType_.c_child_order[:]
    c_cardinality = ClaimsType_.c_cardinality.copy()

def claims_from_string(xml_string):
    return saml2.create_class_from_xml_string(Claims, xml_string)


class Entropy(EntropyType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Entropy element """

    c_tag = 'Entropy'
    c_namespace = NAMESPACE
    c_children = EntropyType_.c_children.copy()
    c_attributes = EntropyType_.c_attributes.copy()
    c_child_order = EntropyType_.c_child_order[:]
    c_cardinality = EntropyType_.c_cardinality.copy()

def entropy_from_string(xml_string):
    return saml2.create_class_from_xml_string(Entropy, xml_string)


class Lifetime(LifetimeType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Lifetime element """

    c_tag = 'Lifetime'
    c_namespace = NAMESPACE
    c_children = LifetimeType_.c_children.copy()
    c_attributes = LifetimeType_.c_attributes.copy()
    c_child_order = LifetimeType_.c_child_order[:]
    c_cardinality = LifetimeType_.c_cardinality.copy()

def lifetime_from_string(xml_string):
    return saml2.create_class_from_xml_string(Lifetime, xml_string)


class RequestSecurityTokenCollection(RequestSecurityTokenCollectionType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenCollection element """

    c_tag = 'RequestSecurityTokenCollection'
    c_namespace = NAMESPACE
    c_children = RequestSecurityTokenCollectionType_.c_children.copy()
    c_attributes = RequestSecurityTokenCollectionType_.c_attributes.copy()
    c_child_order = RequestSecurityTokenCollectionType_.c_child_order[:]
    c_cardinality = RequestSecurityTokenCollectionType_.c_cardinality.copy()

def request_security_token_collection_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenCollection, xml_string)


class RequestSecurityTokenResponseCollectionType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponseCollectionType element """

    c_tag = 'RequestSecurityTokenResponseCollectionType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}RequestSecurityTokenResponse'] = ('request_security_token_response', [RequestSecurityTokenResponse])
    c_cardinality['request_security_token_response'] = {"min":1}
    c_child_order.extend(['request_security_token_response'])

    def __init__(self,
            request_security_token_response=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.request_security_token_response=request_security_token_response or []

def request_security_token_response_collection_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenResponseCollectionType_, xml_string)


class ComputedKey(ComputedKeyOpenEnum_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ComputedKey element """

    c_tag = 'ComputedKey'
    c_namespace = NAMESPACE
    c_children = ComputedKeyOpenEnum_.c_children.copy()
    c_attributes = ComputedKeyOpenEnum_.c_attributes.copy()
    c_child_order = ComputedKeyOpenEnum_.c_child_order[:]
    c_cardinality = ComputedKeyOpenEnum_.c_cardinality.copy()

def computed_key_from_string(xml_string):
    return saml2.create_class_from_xml_string(ComputedKey, xml_string)


class RequestedAttachedReference(RequestedReferenceType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedAttachedReference element """

    c_tag = 'RequestedAttachedReference'
    c_namespace = NAMESPACE
    c_children = RequestedReferenceType_.c_children.copy()
    c_attributes = RequestedReferenceType_.c_attributes.copy()
    c_child_order = RequestedReferenceType_.c_child_order[:]
    c_cardinality = RequestedReferenceType_.c_cardinality.copy()

def requested_attached_reference_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedAttachedReference, xml_string)


class RequestedUnattachedReference(RequestedReferenceType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedUnattachedReference element """

    c_tag = 'RequestedUnattachedReference'
    c_namespace = NAMESPACE
    c_children = RequestedReferenceType_.c_children.copy()
    c_attributes = RequestedReferenceType_.c_attributes.copy()
    c_child_order = RequestedReferenceType_.c_child_order[:]
    c_cardinality = RequestedReferenceType_.c_cardinality.copy()

def requested_unattached_reference_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedUnattachedReference, xml_string)


class RequestedProofToken(RequestedProofTokenType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedProofToken element """

    c_tag = 'RequestedProofToken'
    c_namespace = NAMESPACE
    c_children = RequestedProofTokenType_.c_children.copy()
    c_attributes = RequestedProofTokenType_.c_attributes.copy()
    c_child_order = RequestedProofTokenType_.c_child_order[:]
    c_cardinality = RequestedProofTokenType_.c_cardinality.copy()

def requested_proof_token_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedProofToken, xml_string)


class IssuedTokens(RequestSecurityTokenResponseCollectionType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:IssuedTokens element """

    c_tag = 'IssuedTokens'
    c_namespace = NAMESPACE
    c_children = RequestSecurityTokenResponseCollectionType_.c_children.copy()
    c_attributes = RequestSecurityTokenResponseCollectionType_.c_attributes.copy()
    c_child_order = RequestSecurityTokenResponseCollectionType_.c_child_order[:]
    c_cardinality = RequestSecurityTokenResponseCollectionType_.c_cardinality.copy()

def issued_tokens_from_string(xml_string):
    return saml2.create_class_from_xml_string(IssuedTokens, xml_string)


class RenewTarget(RenewTargetType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RenewTarget element """

    c_tag = 'RenewTarget'
    c_namespace = NAMESPACE
    c_children = RenewTargetType_.c_children.copy()
    c_attributes = RenewTargetType_.c_attributes.copy()
    c_child_order = RenewTargetType_.c_child_order[:]
    c_cardinality = RenewTargetType_.c_cardinality.copy()

def renew_target_from_string(xml_string):
    return saml2.create_class_from_xml_string(RenewTarget, xml_string)


class AllowPostdating(AllowPostdatingType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AllowPostdating element """

    c_tag = 'AllowPostdating'
    c_namespace = NAMESPACE
    c_children = AllowPostdatingType_.c_children.copy()
    c_attributes = AllowPostdatingType_.c_attributes.copy()
    c_child_order = AllowPostdatingType_.c_child_order[:]
    c_cardinality = AllowPostdatingType_.c_cardinality.copy()

def allow_postdating_from_string(xml_string):
    return saml2.create_class_from_xml_string(AllowPostdating, xml_string)


class Renewing(RenewingType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Renewing element """

    c_tag = 'Renewing'
    c_namespace = NAMESPACE
    c_children = RenewingType_.c_children.copy()
    c_attributes = RenewingType_.c_attributes.copy()
    c_child_order = RenewingType_.c_child_order[:]
    c_cardinality = RenewingType_.c_cardinality.copy()

def renewing_from_string(xml_string):
    return saml2.create_class_from_xml_string(Renewing, xml_string)


class CancelTarget(CancelTargetType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:CancelTarget element """

    c_tag = 'CancelTarget'
    c_namespace = NAMESPACE
    c_children = CancelTargetType_.c_children.copy()
    c_attributes = CancelTargetType_.c_attributes.copy()
    c_child_order = CancelTargetType_.c_child_order[:]
    c_cardinality = CancelTargetType_.c_cardinality.copy()

def cancel_target_from_string(xml_string):
    return saml2.create_class_from_xml_string(CancelTarget, xml_string)


class RequestedTokenCancelled(RequestedTokenCancelledType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestedTokenCancelled element """

    c_tag = 'RequestedTokenCancelled'
    c_namespace = NAMESPACE
    c_children = RequestedTokenCancelledType_.c_children.copy()
    c_attributes = RequestedTokenCancelledType_.c_attributes.copy()
    c_child_order = RequestedTokenCancelledType_.c_child_order[:]
    c_cardinality = RequestedTokenCancelledType_.c_cardinality.copy()

def requested_token_cancelled_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestedTokenCancelled, xml_string)


class ValidateTarget(ValidateTargetType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ValidateTarget element """

    c_tag = 'ValidateTarget'
    c_namespace = NAMESPACE
    c_children = ValidateTargetType_.c_children.copy()
    c_attributes = ValidateTargetType_.c_attributes.copy()
    c_child_order = ValidateTargetType_.c_child_order[:]
    c_cardinality = ValidateTargetType_.c_cardinality.copy()

def validate_target_from_string(xml_string):
    return saml2.create_class_from_xml_string(ValidateTarget, xml_string)


class StatusType_Code(StatusCodeOpenEnum_):

    c_tag = 'Code'
    c_namespace = NAMESPACE
    c_children = StatusCodeOpenEnum_.c_children.copy()
    c_attributes = StatusCodeOpenEnum_.c_attributes.copy()
    c_child_order = StatusCodeOpenEnum_.c_child_order[:]
    c_cardinality = StatusCodeOpenEnum_.c_cardinality.copy()

def status_type__code_from_string(xml_string):
    return saml2.create_class_from_xml_string(StatusType_Code, xml_string)


class StatusType_Reason(SamlBase):

    c_tag = 'Reason'
    c_namespace = NAMESPACE
    c_value_type = {'base': 'string'}
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()

def status_type__reason_from_string(xml_string):
    return saml2.create_class_from_xml_string(StatusType_Reason, xml_string)


class StatusType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:StatusType element """

    c_tag = 'StatusType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Code'] = ('code', StatusType_Code)
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Reason'] = ('reason', StatusType_Reason)
    c_cardinality['reason'] = {"min":0, "max":1}
    c_child_order.extend(['code', 'reason'])

    def __init__(self,
            code=None,
            reason=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.code=code
        self.reason=reason

def status_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(StatusType_, xml_string)


class SignChallengeType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignChallengeType element """

    c_tag = 'SignChallengeType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Challenge'] = ('challenge', Challenge)
    c_child_order.extend(['challenge'])

    def __init__(self,
            challenge=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.challenge=challenge

def sign_challenge_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(SignChallengeType_, xml_string)


class BinaryExchange(BinaryExchangeType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinaryExchange element """

    c_tag = 'BinaryExchange'
    c_namespace = NAMESPACE
    c_children = BinaryExchangeType_.c_children.copy()
    c_attributes = BinaryExchangeType_.c_attributes.copy()
    c_child_order = BinaryExchangeType_.c_child_order[:]
    c_cardinality = BinaryExchangeType_.c_cardinality.copy()

def binary_exchange_from_string(xml_string):
    return saml2.create_class_from_xml_string(BinaryExchange, xml_string)


class RequestKET(RequestKETType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestKET element """

    c_tag = 'RequestKET'
    c_namespace = NAMESPACE
    c_children = RequestKETType_.c_children.copy()
    c_attributes = RequestKETType_.c_attributes.copy()
    c_child_order = RequestKETType_.c_child_order[:]
    c_cardinality = RequestKETType_.c_cardinality.copy()

def request_ket_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestKET, xml_string)


class KeyExchangeToken(KeyExchangeTokenType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyExchangeToken element """

    c_tag = 'KeyExchangeToken'
    c_namespace = NAMESPACE
    c_children = KeyExchangeTokenType_.c_children.copy()
    c_attributes = KeyExchangeTokenType_.c_attributes.copy()
    c_child_order = KeyExchangeTokenType_.c_child_order[:]
    c_cardinality = KeyExchangeTokenType_.c_cardinality.copy()

def key_exchange_token_from_string(xml_string):
    return saml2.create_class_from_xml_string(KeyExchangeToken, xml_string)


class AuthenticatorType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:AuthenticatorType element """

    c_tag = 'AuthenticatorType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}CombinedHash'] = ('combined_hash', CombinedHash)
    c_cardinality['combined_hash'] = {"min":0, "max":1}
    c_child_order.extend(['combined_hash'])

    def __init__(self,
            combined_hash=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.combined_hash=combined_hash

def authenticator_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(AuthenticatorType_, xml_string)


class OnBehalfOf(OnBehalfOfType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:OnBehalfOf element """

    c_tag = 'OnBehalfOf'
    c_namespace = NAMESPACE
    c_children = OnBehalfOfType_.c_children.copy()
    c_attributes = OnBehalfOfType_.c_attributes.copy()
    c_child_order = OnBehalfOfType_.c_child_order[:]
    c_cardinality = OnBehalfOfType_.c_cardinality.copy()

def on_behalf_of_from_string(xml_string):
    return saml2.create_class_from_xml_string(OnBehalfOf, xml_string)


class KeyType(KeyTypeOpenEnum_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:KeyType element """

    c_tag = 'KeyType'
    c_namespace = NAMESPACE
    c_children = KeyTypeOpenEnum_.c_children.copy()
    c_attributes = KeyTypeOpenEnum_.c_attributes.copy()
    c_child_order = KeyTypeOpenEnum_.c_child_order[:]
    c_cardinality = KeyTypeOpenEnum_.c_cardinality.copy()

def key_type_from_string(xml_string):
    return saml2.create_class_from_xml_string(KeyType, xml_string)


class Encryption(EncryptionType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Encryption element """

    c_tag = 'Encryption'
    c_namespace = NAMESPACE
    c_children = EncryptionType_.c_children.copy()
    c_attributes = EncryptionType_.c_attributes.copy()
    c_child_order = EncryptionType_.c_child_order[:]
    c_cardinality = EncryptionType_.c_cardinality.copy()

def encryption_from_string(xml_string):
    return saml2.create_class_from_xml_string(Encryption, xml_string)


class ProofEncryption(ProofEncryptionType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ProofEncryption element """

    c_tag = 'ProofEncryption'
    c_namespace = NAMESPACE
    c_children = ProofEncryptionType_.c_children.copy()
    c_attributes = ProofEncryptionType_.c_attributes.copy()
    c_child_order = ProofEncryptionType_.c_child_order[:]
    c_cardinality = ProofEncryptionType_.c_cardinality.copy()

def proof_encryption_from_string(xml_string):
    return saml2.create_class_from_xml_string(ProofEncryption, xml_string)


class UseKey(UseKeyType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:UseKey element """

    c_tag = 'UseKey'
    c_namespace = NAMESPACE
    c_children = UseKeyType_.c_children.copy()
    c_attributes = UseKeyType_.c_attributes.copy()
    c_child_order = UseKeyType_.c_child_order[:]
    c_cardinality = UseKeyType_.c_cardinality.copy()

def use_key_from_string(xml_string):
    return saml2.create_class_from_xml_string(UseKey, xml_string)


class DelegateTo(DelegateToType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:DelegateTo element """

    c_tag = 'DelegateTo'
    c_namespace = NAMESPACE
    c_children = DelegateToType_.c_children.copy()
    c_attributes = DelegateToType_.c_attributes.copy()
    c_child_order = DelegateToType_.c_child_order[:]
    c_cardinality = DelegateToType_.c_cardinality.copy()

def delegate_to_from_string(xml_string):
    return saml2.create_class_from_xml_string(DelegateTo, xml_string)


class ParticipantsType_Primary(ParticipantType_):

    c_tag = 'Primary'
    c_namespace = NAMESPACE
    c_children = ParticipantType_.c_children.copy()
    c_attributes = ParticipantType_.c_attributes.copy()
    c_child_order = ParticipantType_.c_child_order[:]
    c_cardinality = ParticipantType_.c_cardinality.copy()

def participants_type__primary_from_string(xml_string):
    return saml2.create_class_from_xml_string(ParticipantsType_Primary, xml_string)


class ParticipantsType_Participant(ParticipantType_):

    c_tag = 'Participant'
    c_namespace = NAMESPACE
    c_children = ParticipantType_.c_children.copy()
    c_attributes = ParticipantType_.c_attributes.copy()
    c_child_order = ParticipantType_.c_child_order[:]
    c_cardinality = ParticipantType_.c_cardinality.copy()

def participants_type__participant_from_string(xml_string):
    return saml2.create_class_from_xml_string(ParticipantsType_Participant, xml_string)


class ParticipantsType_(SamlBase):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:ParticipantsType element """

    c_tag = 'ParticipantsType'
    c_namespace = NAMESPACE
    c_children = SamlBase.c_children.copy()
    c_attributes = SamlBase.c_attributes.copy()
    c_child_order = SamlBase.c_child_order[:]
    c_cardinality = SamlBase.c_cardinality.copy()
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Primary'] = ('primary', ParticipantsType_Primary)
    c_cardinality['primary'] = {"min":0, "max":1}
    c_children['{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Participant'] = ('participant', [ParticipantsType_Participant])
    c_cardinality['participant'] = {"min":0}
    c_child_order.extend(['primary', 'participant'])

    def __init__(self,
            primary=None,
            participant=None,
            text=None,
            extension_elements=None,
            extension_attributes=None,
        ):
        SamlBase.__init__(self, 
                text=text,
                extension_elements=extension_elements,
                extension_attributes=extension_attributes,
                )
        self.primary=primary
        self.participant=participant or []

def participants_type__from_string(xml_string):
    return saml2.create_class_from_xml_string(ParticipantsType_, xml_string)


class BinarySecret(BinarySecretType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:BinarySecret element """

    c_tag = 'BinarySecret'
    c_namespace = NAMESPACE
    c_children = BinarySecretType_.c_children.copy()
    c_attributes = BinarySecretType_.c_attributes.copy()
    c_child_order = BinarySecretType_.c_child_order[:]
    c_cardinality = BinarySecretType_.c_cardinality.copy()

def binary_secret_from_string(xml_string):
    return saml2.create_class_from_xml_string(BinarySecret, xml_string)


class RequestSecurityTokenResponseCollection(RequestSecurityTokenResponseCollectionType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:RequestSecurityTokenResponseCollection element """

    c_tag = 'RequestSecurityTokenResponseCollection'
    c_namespace = NAMESPACE
    c_children = RequestSecurityTokenResponseCollectionType_.c_children.copy()
    c_attributes = RequestSecurityTokenResponseCollectionType_.c_attributes.copy()
    c_child_order = RequestSecurityTokenResponseCollectionType_.c_child_order[:]
    c_cardinality = RequestSecurityTokenResponseCollectionType_.c_cardinality.copy()

def request_security_token_response_collection_from_string(xml_string):
    return saml2.create_class_from_xml_string(RequestSecurityTokenResponseCollection, xml_string)


class Status(StatusType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Status element """

    c_tag = 'Status'
    c_namespace = NAMESPACE
    c_children = StatusType_.c_children.copy()
    c_attributes = StatusType_.c_attributes.copy()
    c_child_order = StatusType_.c_child_order[:]
    c_cardinality = StatusType_.c_cardinality.copy()

def status_from_string(xml_string):
    return saml2.create_class_from_xml_string(Status, xml_string)


class SignChallenge(SignChallengeType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignChallenge element """

    c_tag = 'SignChallenge'
    c_namespace = NAMESPACE
    c_children = SignChallengeType_.c_children.copy()
    c_attributes = SignChallengeType_.c_attributes.copy()
    c_child_order = SignChallengeType_.c_child_order[:]
    c_cardinality = SignChallengeType_.c_cardinality.copy()

def sign_challenge_from_string(xml_string):
    return saml2.create_class_from_xml_string(SignChallenge, xml_string)


class SignChallengeResponse(SignChallengeType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:SignChallengeResponse element """

    c_tag = 'SignChallengeResponse'
    c_namespace = NAMESPACE
    c_children = SignChallengeType_.c_children.copy()
    c_attributes = SignChallengeType_.c_attributes.copy()
    c_child_order = SignChallengeType_.c_child_order[:]
    c_cardinality = SignChallengeType_.c_cardinality.copy()

def sign_challenge_response_from_string(xml_string):
    return saml2.create_class_from_xml_string(SignChallengeResponse, xml_string)


class Authenticator(AuthenticatorType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Authenticator element """

    c_tag = 'Authenticator'
    c_namespace = NAMESPACE
    c_children = AuthenticatorType_.c_children.copy()
    c_attributes = AuthenticatorType_.c_attributes.copy()
    c_child_order = AuthenticatorType_.c_child_order[:]
    c_cardinality = AuthenticatorType_.c_cardinality.copy()

def authenticator_from_string(xml_string):
    return saml2.create_class_from_xml_string(Authenticator, xml_string)


class Participants(ParticipantsType_):
    """The http://docs.oasis-open.org/ws-sx/ws-trust/200512/:Participants element """

    c_tag = 'Participants'
    c_namespace = NAMESPACE
    c_children = ParticipantsType_.c_children.copy()
    c_attributes = ParticipantsType_.c_attributes.copy()
    c_child_order = ParticipantsType_.c_child_order[:]
    c_cardinality = ParticipantsType_.c_cardinality.copy()

def participants_from_string(xml_string):
    return saml2.create_class_from_xml_string(Participants, xml_string)


ELEMENT_FROM_STRING = {
    RequestSecurityToken.c_tag: request_security_token_from_string,
    RequestSecurityTokenType_.c_tag: request_security_token_type__from_string,
    TokenType.c_tag: token_type_from_string,
    RequestType.c_tag: request_type_from_string,
    RequestTypeOpenEnum_.c_tag: request_type_open_enum__from_string,
    RequestTypeEnum_.c_tag: request_type_enum__from_string,
    RequestSecurityTokenResponse.c_tag: request_security_token_response_from_string,
    RequestSecurityTokenResponseType_.c_tag: request_security_token_response_type__from_string,
    RequestedSecurityToken.c_tag: requested_security_token_from_string,
    RequestedSecurityTokenType_.c_tag: requested_security_token_type__from_string,
    BinarySecret.c_tag: binary_secret_from_string,
    BinarySecretType_.c_tag: binary_secret_type__from_string,
    BinarySecretTypeEnum_.c_tag: binary_secret_type_enum__from_string,
    BinarySecretTypeOpenEnum_.c_tag: binary_secret_type_open_enum__from_string,
    Claims.c_tag: claims_from_string,
    ClaimsType_.c_tag: claims_type__from_string,
    Entropy.c_tag: entropy_from_string,
    EntropyType_.c_tag: entropy_type__from_string,
    Lifetime.c_tag: lifetime_from_string,
    LifetimeType_.c_tag: lifetime_type__from_string,
    RequestSecurityTokenCollection.c_tag: request_security_token_collection_from_string,
    RequestSecurityTokenCollectionType_.c_tag: request_security_token_collection_type__from_string,
    RequestSecurityTokenResponseCollection.c_tag: request_security_token_response_collection_from_string,
    RequestSecurityTokenResponseCollectionType_.c_tag: request_security_token_response_collection_type__from_string,
    ComputedKey.c_tag: computed_key_from_string,
    ComputedKeyEnum_.c_tag: computed_key_enum__from_string,
    ComputedKeyOpenEnum_.c_tag: computed_key_open_enum__from_string,
    RequestedAttachedReference.c_tag: requested_attached_reference_from_string,
    RequestedUnattachedReference.c_tag: requested_unattached_reference_from_string,
    RequestedReferenceType_.c_tag: requested_reference_type__from_string,
    RequestedProofToken.c_tag: requested_proof_token_from_string,
    RequestedProofTokenType_.c_tag: requested_proof_token_type__from_string,
    IssuedTokens.c_tag: issued_tokens_from_string,
    RenewTarget.c_tag: renew_target_from_string,
    RenewTargetType_.c_tag: renew_target_type__from_string,
    AllowPostdating.c_tag: allow_postdating_from_string,
    AllowPostdatingType_.c_tag: allow_postdating_type__from_string,
    Renewing.c_tag: renewing_from_string,
    RenewingType_.c_tag: renewing_type__from_string,
    CancelTarget.c_tag: cancel_target_from_string,
    CancelTargetType_.c_tag: cancel_target_type__from_string,
    RequestedTokenCancelled.c_tag: requested_token_cancelled_from_string,
    RequestedTokenCancelledType_.c_tag: requested_token_cancelled_type__from_string,
    ValidateTarget.c_tag: validate_target_from_string,
    ValidateTargetType_.c_tag: validate_target_type__from_string,
    Status.c_tag: status_from_string,
    StatusType_.c_tag: status_type__from_string,
    StatusCodeEnum_.c_tag: status_code_enum__from_string,
    StatusCodeOpenEnum_.c_tag: status_code_open_enum__from_string,
    SignChallenge.c_tag: sign_challenge_from_string,
    SignChallengeResponse.c_tag: sign_challenge_response_from_string,
    SignChallengeType_.c_tag: sign_challenge_type__from_string,
    Challenge.c_tag: challenge_from_string,
    BinaryExchange.c_tag: binary_exchange_from_string,
    BinaryExchangeType_.c_tag: binary_exchange_type__from_string,
    RequestKET.c_tag: request_ket_from_string,
    RequestKETType_.c_tag: request_ket_type__from_string,
    KeyExchangeToken.c_tag: key_exchange_token_from_string,
    KeyExchangeTokenType_.c_tag: key_exchange_token_type__from_string,
    Authenticator.c_tag: authenticator_from_string,
    AuthenticatorType_.c_tag: authenticator_type__from_string,
    CombinedHash.c_tag: combined_hash_from_string,
    OnBehalfOf.c_tag: on_behalf_of_from_string,
    OnBehalfOfType_.c_tag: on_behalf_of_type__from_string,
    Issuer.c_tag: issuer_from_string,
    AuthenticationType.c_tag: authentication_type_from_string,
    KeyType.c_tag: key_type_from_string,
    KeyTypeEnum_.c_tag: key_type_enum__from_string,
    KeyTypeOpenEnum_.c_tag: key_type_open_enum__from_string,
    KeySize.c_tag: key_size_from_string,
    SignatureAlgorithm.c_tag: signature_algorithm_from_string,
    EncryptionAlgorithm.c_tag: encryption_algorithm_from_string,
    CanonicalizationAlgorithm.c_tag: canonicalization_algorithm_from_string,
    ComputedKeyAlgorithm.c_tag: computed_key_algorithm_from_string,
    Encryption.c_tag: encryption_from_string,
    EncryptionType_.c_tag: encryption_type__from_string,
    ProofEncryption.c_tag: proof_encryption_from_string,
    ProofEncryptionType_.c_tag: proof_encryption_type__from_string,
    UseKey.c_tag: use_key_from_string,
    UseKeyType_.c_tag: use_key_type__from_string,
    KeyWrapAlgorithm.c_tag: key_wrap_algorithm_from_string,
    SignWith.c_tag: sign_with_from_string,
    EncryptWith.c_tag: encrypt_with_from_string,
    DelegateTo.c_tag: delegate_to_from_string,
    DelegateToType_.c_tag: delegate_to_type__from_string,
    Forwardable.c_tag: forwardable_from_string,
    Delegatable.c_tag: delegatable_from_string,
    Participants.c_tag: participants_from_string,
    ParticipantsType_.c_tag: participants_type__from_string,
    ParticipantType_.c_tag: participant_type__from_string,
    StatusType_Code.c_tag: status_type__code_from_string,
    StatusType_Reason.c_tag: status_type__reason_from_string,
    ParticipantsType_Primary.c_tag: participants_type__primary_from_string,
    ParticipantsType_Participant.c_tag: participants_type__participant_from_string,
}

ELEMENT_BY_TAG = {
    'RequestSecurityToken': RequestSecurityToken,
    'RequestSecurityTokenType': RequestSecurityTokenType_,
    'TokenType': TokenType,
    'RequestType': RequestType,
    'RequestTypeOpenEnum': RequestTypeOpenEnum_,
    'RequestTypeEnum': RequestTypeEnum_,
    'RequestSecurityTokenResponse': RequestSecurityTokenResponse,
    'RequestSecurityTokenResponseType': RequestSecurityTokenResponseType_,
    'RequestedSecurityToken': RequestedSecurityToken,
    'RequestedSecurityTokenType': RequestedSecurityTokenType_,
    'BinarySecret': BinarySecret,
    'BinarySecretType': BinarySecretType_,
    'BinarySecretTypeEnum': BinarySecretTypeEnum_,
    'BinarySecretTypeOpenEnum': BinarySecretTypeOpenEnum_,
    'Claims': Claims,
    'ClaimsType': ClaimsType_,
    'Entropy': Entropy,
    'EntropyType': EntropyType_,
    'Lifetime': Lifetime,
    'LifetimeType': LifetimeType_,
    'RequestSecurityTokenCollection': RequestSecurityTokenCollection,
    'RequestSecurityTokenCollectionType': RequestSecurityTokenCollectionType_,
    'RequestSecurityTokenResponseCollection': RequestSecurityTokenResponseCollection,
    'RequestSecurityTokenResponseCollectionType': RequestSecurityTokenResponseCollectionType_,
    'ComputedKey': ComputedKey,
    'ComputedKeyEnum': ComputedKeyEnum_,
    'ComputedKeyOpenEnum': ComputedKeyOpenEnum_,
    'RequestedAttachedReference': RequestedAttachedReference,
    'RequestedUnattachedReference': RequestedUnattachedReference,
    'RequestedReferenceType': RequestedReferenceType_,
    'RequestedProofToken': RequestedProofToken,
    'RequestedProofTokenType': RequestedProofTokenType_,
    'IssuedTokens': IssuedTokens,
    'RenewTarget': RenewTarget,
    'RenewTargetType': RenewTargetType_,
    'AllowPostdating': AllowPostdating,
    'AllowPostdatingType': AllowPostdatingType_,
    'Renewing': Renewing,
    'RenewingType': RenewingType_,
    'CancelTarget': CancelTarget,
    'CancelTargetType': CancelTargetType_,
    'RequestedTokenCancelled': RequestedTokenCancelled,
    'RequestedTokenCancelledType': RequestedTokenCancelledType_,
    'ValidateTarget': ValidateTarget,
    'ValidateTargetType': ValidateTargetType_,
    'Status': Status,
    'StatusType': StatusType_,
    'StatusCodeEnum': StatusCodeEnum_,
    'StatusCodeOpenEnum': StatusCodeOpenEnum_,
    'SignChallenge': SignChallenge,
    'SignChallengeResponse': SignChallengeResponse,
    'SignChallengeType': SignChallengeType_,
    'Challenge': Challenge,
    'BinaryExchange': BinaryExchange,
    'BinaryExchangeType': BinaryExchangeType_,
    'RequestKET': RequestKET,
    'RequestKETType': RequestKETType_,
    'KeyExchangeToken': KeyExchangeToken,
    'KeyExchangeTokenType': KeyExchangeTokenType_,
    'Authenticator': Authenticator,
    'AuthenticatorType': AuthenticatorType_,
    'CombinedHash': CombinedHash,
    'OnBehalfOf': OnBehalfOf,
    'OnBehalfOfType': OnBehalfOfType_,
    'Issuer': Issuer,
    'AuthenticationType': AuthenticationType,
    'KeyType': KeyType,
    'KeyTypeEnum': KeyTypeEnum_,
    'KeyTypeOpenEnum': KeyTypeOpenEnum_,
    'KeySize': KeySize,
    'SignatureAlgorithm': SignatureAlgorithm,
    'EncryptionAlgorithm': EncryptionAlgorithm,
    'CanonicalizationAlgorithm': CanonicalizationAlgorithm,
    'ComputedKeyAlgorithm': ComputedKeyAlgorithm,
    'Encryption': Encryption,
    'EncryptionType': EncryptionType_,
    'ProofEncryption': ProofEncryption,
    'ProofEncryptionType': ProofEncryptionType_,
    'UseKey': UseKey,
    'UseKeyType': UseKeyType_,
    'KeyWrapAlgorithm': KeyWrapAlgorithm,
    'SignWith': SignWith,
    'EncryptWith': EncryptWith,
    'DelegateTo': DelegateTo,
    'DelegateToType': DelegateToType_,
    'Forwardable': Forwardable,
    'Delegatable': Delegatable,
    'Participants': Participants,
    'ParticipantsType': ParticipantsType_,
    'ParticipantType': ParticipantType_,
    'Code': StatusType_Code,
    'Reason': StatusType_Reason,
    'Primary': ParticipantsType_Primary,
    'Participant': ParticipantsType_Participant,
}


def factory(tag, **kwargs):
    return ELEMENT_BY_TAG[tag](**kwargs)