]> Cypherpunks.ru repositories - pyderasn.git/blob - pyderasn.pyi
Full rich comparison operators
[pyderasn.git] / pyderasn.pyi
1 from datetime import datetime
2 from typing import Any as TAny
3 from typing import Dict
4 from typing import NamedTuple
5 from typing import Optional
6 from typing import Sequence as TSequence
7 from typing import Tuple
8 from typing import Type
9 from typing import Union
10
11
12 TagClassUniversal = ...  # type: int
13 TagClassApplication = ...  # type: int
14 TagClassContext = ...  # type: int
15 TagClassPrivate = ...  # type: int
16 TagFormPrimitive = ...  # type: int
17 TagFormConstructed = ...  # type: int
18 TagClassReprs = ...  # type: Dict[int, str]
19
20
21 class DecodeError(Exception):
22     msg = ...  # type: str
23     klass = ...  # type: Type
24     decode_path = ...  # type: Tuple[str, ...]
25     offset = ...  # type: int
26
27     def __init__(
28             self,
29             msg: str=...,
30             klass: Optional[TAny]=...,
31             decode_path: TAny=...,
32             offset: int=...,
33     ) -> None: ...
34
35 class NotEnoughData(DecodeError): ...
36
37 class TagMismatch(DecodeError): ...
38
39 class InvalidLength(DecodeError): ...
40
41 class InvalidOID(DecodeError): ...
42
43 class ObjUnknown(ValueError):
44     name = ...  # type: str
45
46     def __init__(self, name: str) -> None: ...
47
48 class ObjNotReady(ValueError):
49     name = ...  # type: str
50
51     def __init__(self, str) -> None: ...
52
53 class InvalidValueType(ValueError):
54     expected_types = ...  # type: Tuple[Type, ...]
55
56     def __init__(self, expected_types: Tuple[Type, ...]) -> None: ...
57
58 class BoundsError(ValueError):
59     bound_min = ...  # type: int
60     value = ...  # type: int
61     bound_max = ...  # type: int
62
63     def __init__(self, bound_min: int, value: int, bound_max: int) -> None: ...
64
65 def hexdec(data: str) -> bytes: ...
66
67 def hexenc(data: bytes) -> str: ...
68
69 def int_bytes_len(num: int, byte_len: int=...) -> int: ...
70
71 def zero_ended_encode(num: int) -> bytes: ...
72
73 def tag_encode(num: int, klass: int=..., form: int=...) -> bytes: ...
74
75 def tag_decode(tag: bytes) -> Tuple[int, int, int]: ...
76
77 def tag_ctxp(num: int) -> bytes: ...
78
79 def tag_ctxc(num: int) -> bytes: ...
80
81 def tag_strip(data: memoryview) -> Tuple[memoryview, int, memoryview]: ...
82
83 def len_encode(l: int) -> bytes: ...
84
85 def len_decode(data: memoryview) -> Tuple[int, int, memoryview]: ...
86
87 class Obj:
88     tag = ...  # type: bytes
89     optional = ...  # type: bool
90
91     def __init__(
92             self,
93             impl: Optional[bytes]=...,
94             expl: Optional[bytes]=...,
95             default: Optional[TAny]=...,
96             optional: bool=...,
97     ) -> None: ...
98
99     @property
100     def ready(self) -> bool: ...
101
102     @property
103     def decoded(self) -> bool: ...
104
105     def copy(self) -> "Obj": ...
106
107     @property
108     def tlen(self) -> int: ...
109
110     @property
111     def tlvlen(self) -> int: ...
112
113     def encode(self) -> bytes: ...
114
115     def decode(
116             self,
117             data: bytes,
118             offset: int=...,
119             leavemm: bool=...,
120             decode_path: Tuple[str, ...]=...,
121     ) -> Tuple[Obj, bytes]: ...
122
123     @property
124     def expled(self) -> bool: ...
125
126     @property
127     def expl_tag(self) -> bytes: ...
128
129     @property
130     def expl_tlen(self) -> int: ...
131
132     @property
133     def expl_llen(self) -> int: ...
134
135     @property
136     def expl_offset(self) -> int: ...
137
138     @property
139     def expl_vlen(self) -> int: ...
140
141     @property
142     def expl_tlvlen(self) -> int: ...
143
144
145 PP = NamedTuple("PP", (
146     ("asn1_type_name", str),
147     ("obj_name", str),
148     ("decode_path", Tuple[str, ...]),
149     ("value", Optional[str]),
150     ("blob", Optional[Union[bytes, Tuple[str, ...]]]),
151     ("optional", bool),
152     ("default", bool),
153     ("impl", Optional[Tuple[int, int, int]]),
154     ("expl", Optional[Tuple[int, int, int]]),
155     ("offset", int),
156     ("tlen", int),
157     ("llen", int),
158     ("vlen", int),
159     ("expl_offset", int),
160     ("expl_tlen", int),
161     ("expl_llen", int),
162     ("expl_vlen", int),
163 ))
164
165
166 def pp_console_row(
167         pp: PP,
168         oids: Optional[Dict[str, str]]=...,
169         with_offsets: bool=...,
170         with_blob: bool=...,
171 ): ...
172
173 def pp_console_blob(pp: PP) -> TSequence[str]: ...
174
175 def pprint(
176         obj: Obj,
177         oids: Optional[Dict[str, str]]=...,
178         big_blobs: bool=...,
179 ): ...
180
181
182 class Boolean(Obj):
183     tag_default = ...  # type: bytes
184     asn1_type_name = ...  # type: str
185     default = ...  # type: "Boolean"
186     optional = ...  # type: bool
187
188     def __init__(
189             self,
190             value: Optional[Union["Boolean", bool]]=...,
191             impl: Optional[bytes]=...,
192             expl: Optional[bytes]=...,
193             default: Optional[Union["Boolean", bool]]=...,
194             optional: bool=...,
195     ) -> None: ...
196
197     @property
198     def ready(self) -> bool: ...
199
200     def copy(self) -> "Boolean": ...
201
202     def __call__(
203             self,
204             value: Optional[Union["Boolean", bool]]=...,
205             impl: Optional[bytes]=...,
206             expl: Optional[bytes]=...,
207             default: Optional[Union["Boolean", bool]]=...,
208             optional: Optional[bool]=...,
209     ) -> "Boolean": ...
210
211     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
212
213
214 class Integer(Obj):
215     tag_default = ...  # type: bytes
216     asn1_type_name = ...  # type: str
217     specs = ...  # type: Dict[str, int]
218     default = ...  # type: "Integer"
219     optional = ...  # type: bool
220
221     def __init__(
222             self,
223             value: Optional[Union["Integer", int, str]]=...,
224             bounds: Optional[Tuple[int, int]]=...,
225             impl: Optional[bytes]=...,
226             expl: Optional[bytes]=...,
227             default: Optional[Union["Integer", int, str]]=...,
228             optional: bool=...,
229     ) -> None: ...
230
231     @property
232     def ready(self) -> bool: ...
233
234     def copy(self) -> "Integer": ...
235
236     @property
237     def named(self) -> Optional[str]: ...
238
239     def __call__(
240             self,
241             value: Optional[Union["Integer", int, str]]=...,
242             bounds: Optional[Tuple[int, int]]=...,
243             impl: Optional[bytes]=...,
244             expl: Optional[bytes]=...,
245             default: Optional[Union["Integer", int, str]]=...,
246             optional: Optional[bool]=...,
247     ) -> "Integer": ...
248
249     def __int__(self) -> int: ...
250
251     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
252
253
254 class BitString(Obj):
255     tag_default = ...  # type: bytes
256     asn1_type_name = ...  # type: str
257     specs = ...  # type: Dict[str, int]
258     default = ...  # type: "BitString"
259     optional = ...  # type: bool
260
261     def __init__(
262             self,
263             value: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
264             impl: Optional[bytes]=...,
265             expl: Optional[bytes]=...,
266             default: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
267             optional: bool=...,
268     ) -> None: ...
269
270     @property
271     def ready(self) -> bool: ...
272
273     def copy(self) -> "BitString": ...
274
275     @property
276     def bit_len(self) -> int: ...
277
278     @property
279     def named(self) -> TSequence[str]: ...
280
281     def __call__(
282             self,
283             value: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
284             impl: Optional[bytes]=...,
285             expl: Optional[bytes]=...,
286             default: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
287             optional: Optional[bool]=...,
288     ) -> "BitString": ...
289
290     def __bytes__(self) -> bytes: ...
291
292     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
293
294
295 class OctetString(Obj):
296     tag_default = ...  # type: bytes
297     asn1_type_name = ...  # type: str
298     default = ...  # type: "OctetString"
299     optional = ...  # type: bool
300
301     def __init__(
302             self,
303             value: Optional[Union["OctetString", bytes]]=...,
304             bounds: Optional[Tuple[int, int]]=...,
305             impl: Optional[bytes]=...,
306             expl: Optional[bytes]=...,
307             default: Optional[Union["OctetString", bytes]]=...,
308             optional: bool=...,
309     ) -> None: ...
310
311     @property
312     def ready(self) -> bool: ...
313
314     def copy(self) -> "OctetString": ...
315
316     def __call__(
317             self,
318             value: Optional[Union["OctetString", bytes]]=...,
319             bounds: Optional[Tuple[int, int]]=...,
320             impl: Optional[bytes]=...,
321             expl: Optional[bytes]=...,
322             default: Optional[Union["OctetString", bytes]]=...,
323             optional: Optional[bool]=...,
324     ) -> "OctetString": ...
325
326     def __bytes__(self) -> bytes: ...
327
328     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
329
330
331 class Null(Obj):
332     tag_default = ...  # type: bytes
333     asn1_type_name = ...  # type: str
334     default = ...  # type: "Null"
335     optional = ...  # type: bool
336
337     def __init__(
338             self,
339             impl: Optional[bytes]=...,
340             expl: Optional[bytes]=...,
341             optional: bool=...,
342     ) -> None: ...
343
344     @property
345     def ready(self) -> bool: ...
346
347     def copy(self) -> "Null": ...
348
349     def __call__(
350             self,
351             impl: Optional[bytes]=...,
352             expl: Optional[bytes]=...,
353             optional: Optional[bool]=...,
354     ) -> "Null": ...
355
356     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
357
358
359 class ObjectIdentifier(Obj):
360     tag_default = ...  # type: bytes
361     asn1_type_name = ...  # type: str
362     default = ...  # type: "ObjectIdentifier"
363     optional = ...  # type: bool
364
365     def __init__(
366             self,
367             value: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
368             impl: Optional[bytes]=...,
369             expl: Optional[bytes]=...,
370             default: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
371             optional: bool=...,
372     ) -> None: ...
373
374     @property
375     def ready(self) -> bool: ...
376
377     def copy(self) -> "ObjectIdentifier": ...
378
379     def __call__(
380             self,
381             value: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
382             impl: Optional[bytes]=...,
383             expl: Optional[bytes]=...,
384             default: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
385             optional: Optional[bool]=...,
386     ) -> "ObjectIdentifier": ...
387
388     def __add__(
389             self,
390             their: Union["ObjectIdentifier", Tuple[int, ...]],
391     ) -> "ObjectIdentifier": ...
392
393     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
394
395
396 class Enumerated(Integer):
397     tag_default = ...  # type: bytes
398     asn1_type_name = ...  # type: str
399     default = ...  # type: "Enumerated"
400     optional = ...  # type: bool
401
402     def __init__(
403             self,
404             value: Optional[Union["Enumerated", str, int]]=...,
405             impl: Optional[bytes]=...,
406             expl: Optional[bytes]=...,
407             default: Optional[Union["Enumerated", str, int]]=...,
408             optional: bool=...,
409     ) -> None: ...
410
411     def copy(self) -> "Enumerated": ...
412
413     def __call__(  # type: ignore
414             self,
415             value: Optional[Union["Enumerated", str, int]]=...,
416             impl: Optional[bytes]=...,
417             expl: Optional[bytes]=...,
418             default: Optional[Union["Enumerated", str, int]]=...,
419             optional: Optional[bool]=...,
420     ) -> "Enumerated": ...
421
422
423 class CommonString(OctetString):
424     def pps(
425             self,
426             decode_path: Tuple[str, ...]=...,
427             no_unicode: bool=...,
428     ) -> TSequence[PP]: ...
429
430
431 class UTF8String(CommonString):
432     tag_default = ...  # type: bytes
433     encoding = ...  # type: str
434     asn1_type_name = ...  # type: str
435     default = ...  # type: "UTF8String"
436     optional = ...  # type: bool
437
438     def __init__(
439             self,
440             value: Optional[Union["UTF8String", str, bytes]]=...,
441             bounds: Optional[Tuple[int, int]]=...,
442             impl: Optional[bytes]=...,
443             expl: Optional[bytes]=...,
444             default: Optional[Union["UTF8String", str, bytes]]=...,
445             optional: bool=...,
446     ) -> None: ...
447
448     def __str__(self) -> str: ...
449
450
451 class NumericString(CommonString):
452     tag_default = ...  # type: bytes
453     encoding = ...  # type: str
454     asn1_type_name = ...  # type: str
455     default = ...  # type: "NumericString"
456     optional = ...  # type: bool
457
458     def __init__(
459             self,
460             value: Optional[Union["NumericString", str, bytes]]=...,
461             bounds: Optional[Tuple[int, int]]=...,
462             impl: Optional[bytes]=...,
463             expl: Optional[bytes]=...,
464             default: Optional[Union["NumericString", str, bytes]]=...,
465             optional: bool=...,
466     ) -> None: ...
467
468
469 class PrintableString(CommonString):
470     tag_default = ...  # type: bytes
471     encoding = ...  # type: str
472     asn1_type_name = ...  # type: str
473     default = ...  # type: "PrintableString"
474     optional = ...  # type: bool
475
476     def __init__(
477             self,
478             value: Optional[Union["PrintableString", str, bytes]]=...,
479             bounds: Optional[Tuple[int, int]]=...,
480             impl: Optional[bytes]=...,
481             expl: Optional[bytes]=...,
482             default: Optional[Union["PrintableString", str, bytes]]=...,
483             optional: bool=...,
484     ) -> None: ...
485
486
487 class TeletexString(CommonString):
488     tag_default = ...  # type: bytes
489     encoding = ...  # type: str
490     asn1_type_name = ...  # type: str
491     default = ...  # type: "TeletexString"
492     optional = ...  # type: bool
493
494     def __init__(
495             self,
496             value: Optional[Union["TeletexString", str, bytes]]=...,
497             bounds: Optional[Tuple[int, int]]=...,
498             impl: Optional[bytes]=...,
499             expl: Optional[bytes]=...,
500             default: Optional[Union["TeletexString", str, bytes]]=...,
501             optional: bool=...,
502     ) -> None: ...
503
504
505 class T61String(TeletexString):
506     asn1_type_name = ...  # type: str
507     default = ...  # type: "T61String"
508     optional = ...  # type: bool
509
510
511 class VideotexString(CommonString):
512     tag_default = ...  # type: bytes
513     encoding = ...  # type: str
514     asn1_type_name = ...  # type: str
515     default = ...  # type: "VideotexString"
516     optional = ...  # type: bool
517
518     def __init__(
519             self,
520             value: Optional[Union["VideotexString", str, bytes]]=...,
521             bounds: Optional[Tuple[int, int]]=...,
522             impl: Optional[bytes]=...,
523             expl: Optional[bytes]=...,
524             default: Optional[Union["VideotexString", str, bytes]]=...,
525             optional: bool=...,
526     ) -> None: ...
527
528
529 class IA5String(CommonString):
530     tag_default = ...  # type: bytes
531     encoding = ...  # type: str
532     asn1_type_name = ...  # type: str
533     default = ...  # type: "IA5String"
534     optional = ...  # type: bool
535
536     def __init__(
537             self,
538             value: Optional[Union["IA5String", str, bytes]]=...,
539             bounds: Optional[Tuple[int, int]]=...,
540             impl: Optional[bytes]=...,
541             expl: Optional[bytes]=...,
542             default: Optional[Union["IA5String", str, bytes]]=...,
543             optional: bool=...,
544     ) -> None: ...
545
546
547 class UTCTime(CommonString):
548     tag_default = ...  # type: bytes
549     encoding = ...  # type: str
550     asn1_type_name = ...  # type: str
551     default = ...  # type: "UTCTime"
552     optional = ...  # type: bool
553
554     def __init__(
555             self,
556             value: Optional[Union["UTCTime", datetime]]=...,
557             impl: Optional[bytes]=...,
558             expl: Optional[bytes]=...,
559             default: Optional[Union["UTCTime", datetime]]=...,
560             optional: bool=...,
561     ) -> None: ...
562
563     def todatetime(self) -> datetime: ...
564
565     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...  # type: ignore
566
567
568 class GeneralizedTime(UTCTime):
569     tag_default = ...  # type: bytes
570     asn1_type_name = ...  # type: str
571     default = ...  # type: "GeneralizedTime"
572     optional = ...  # type: bool
573
574     def todatetime(self) -> datetime: ...
575
576
577 class GraphicString(CommonString):
578     tag_default = ...  # type: bytes
579     encoding = ...  # type: str
580     asn1_type_name = ...  # type: str
581     default = ...  # type: "GraphicString"
582     optional = ...  # type: bool
583
584     def __init__(
585             self,
586             value: Optional[Union["GraphicString", str, bytes]]=...,
587             bounds: Optional[Tuple[int, int]]=...,
588             impl: Optional[bytes]=...,
589             expl: Optional[bytes]=...,
590             default: Optional[Union["GraphicString", str, bytes]]=...,
591             optional: bool=...,
592     ) -> None: ...
593
594
595 class VisibleString(CommonString):
596     tag_default = ...  # type: bytes
597     encoding = ...  # type: str
598     asn1_type_name = ...  # type: str
599     default = ...  # type: "VisibleString"
600     optional = ...  # type: bool
601
602     def __init__(
603             self,
604             value: Optional[Union["VisibleString", str, bytes]]=...,
605             bounds: Optional[Tuple[int, int]]=...,
606             impl: Optional[bytes]=...,
607             expl: Optional[bytes]=...,
608             default: Optional[Union["VisibleString", str, bytes]]=...,
609             optional: bool=...,
610     ) -> None: ...
611
612
613 class ISO646String(VisibleString):
614     asn1_type_name = ...  # type: str
615     default = ...  # type: "ISO646String"
616     optional = ...  # type: bool
617
618
619 class GeneralString(CommonString):
620     tag_default = ...  # type: bytes
621     encoding = ...  # type: str
622     asn1_type_name = ...  # type: str
623     default = ...  # type: "GeneralString"
624     optional = ...  # type: bool
625
626     def __init__(
627             self,
628             value: Optional[Union["GeneralString", str, bytes]]=...,
629             bounds: Optional[Tuple[int, int]]=...,
630             impl: Optional[bytes]=...,
631             expl: Optional[bytes]=...,
632             default: Optional[Union["GeneralString", str, bytes]]=...,
633             optional: bool=...,
634     ) -> None: ...
635
636
637 class UniversalString(CommonString):
638     tag_default = ...  # type: bytes
639     encoding = ...  # type: str
640     asn1_type_name = ...  # type: str
641     default = ...  # type: "UniversalString"
642     optional = ...  # type: bool
643
644     def __init__(
645             self,
646             value: Optional[Union["UniversalString", str, bytes]]=...,
647             bounds: Optional[Tuple[int, int]]=...,
648             impl: Optional[bytes]=...,
649             expl: Optional[bytes]=...,
650             default: Optional[Union["UniversalString", str, bytes]]=...,
651             optional: bool=...,
652     ) -> None: ...
653
654
655 class BMPString(CommonString):
656     tag_default = ...  # type: bytes
657     encoding = ...  # type: str
658     asn1_type_name = ...  # type: str
659     default = ...  # type: "BMPString"
660     optional = ...  # type: bool
661
662     def __init__(
663             self,
664             value: Optional[Union["BMPString", str, bytes]]=...,
665             bounds: Optional[Tuple[int, int]]=...,
666             impl: Optional[bytes]=...,
667             expl: Optional[bytes]=...,
668             default: Optional[Union["BMPString", str, bytes]]=...,
669             optional: bool=...,
670     ) -> None: ...
671
672
673 class Choice(Obj):
674     tag_default = ...  # type: bytes
675     asn1_type_name = ...  # type: str
676     specs = ...  # type: Dict[str, Obj]
677     default = ...  # type: "Choice"
678     optional = ...  # type: bool
679
680     def __init__(
681             self,
682             value: Optional[Union["Choice", Tuple[str, Obj]]]=...,
683             impl: Optional[bytes]=...,
684             expl: Optional[bytes]=...,
685             default: Optional[Union["Choice", Tuple[str, Obj]]]=...,
686             optional: bool=...,
687     ) -> None: ...
688
689     @property
690     def ready(self) -> bool: ...
691
692     def copy(self) -> "Choice": ...
693
694     def __call__(
695             self,
696             value: Optional[Union["Choice", Tuple[str, Obj]]]=...,
697             expl: Optional[bytes]=...,
698             default: Optional[Union["Choice", Tuple[str, Obj]]]=...,
699             optional: Optional[bool]=...,
700     ) -> "Choice": ...
701
702     def __getitem__(self, key: str) -> Optional[Obj]: ...
703
704     def __setitem__(self, key: str, value: Obj) -> None: ...
705
706     @property
707     def choice(self) -> str: ...
708
709     @property
710     def value(self) -> Obj: ...
711
712     @property
713     def tlen(self) -> int: ...
714
715     @property
716     def decoded(self) -> bool: ...
717
718     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
719
720
721 class PrimitiveTypes(Choice):
722     schema = ...  # type: Dict[str, Obj]
723
724
725 class Any(Obj):
726     tag_default = ...  # type: bytes
727     asn1_type_name = ...  # type: str
728     default = ...  # type: "Any"
729     optional = ...  # type: bool
730
731     def __init__(
732             self,
733             value: Optional[Union[Obj, bytes]]=...,
734             expl: Optional[bytes]=...,
735             optional: bool=...,
736     ) -> None: ...
737
738     @property
739     def ready(self) -> bool: ...
740
741     def copy(self) -> "Any": ...
742
743     def __call__(
744             self,
745             value: Optional[Union[Obj, bytes]]=...,
746             expl: Optional[bytes]=...,
747             optional: Optional[bool]=...,
748     ) -> "Any": ...
749
750     def __bytes__(self) -> bytes: ...
751
752     @property
753     def tlen(self) -> int: ...
754
755     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
756
757
758 class Sequence(Obj):
759     tag_default = ...  # type: bytes
760     asn1_type_name = ...  # type: str
761     specs = ...  # type: Dict[str, Obj]
762     default = ...  # type: "Sequence"
763     optional = ...  # type: bool
764
765     def __init__(
766             self,
767             value: Optional["Sequence"]=...,
768             impl: Optional[bytes]=...,
769             expl: Optional[bytes]=...,
770             default: Optional["Sequence"]=...,
771             optional: bool=...,
772     ) -> None: ...
773
774     @property
775     def ready(self) -> bool: ...
776
777     def copy(self) -> "Sequence": ...
778
779     def __call__(
780             self,
781             value: Optional["Sequence"]=...,
782             impl: Optional[bytes]=...,
783             expl: Optional[bytes]=...,
784             default: Optional["Sequence"]=...,
785             optional: Optional[bool]=...,
786     ) -> "Sequence": ...
787
788     def __getitem__(self, key: str) -> Optional[Obj]: ...
789
790     def __setitem__(self, key: str, value: Obj) -> None: ...
791
792     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
793
794
795 class Set(Sequence):
796     tag_default = ...  # type: bytes
797     asn1_type_name = ...  # type: str
798     default = ...  # type: "Set"
799     optional = ...  # type: bool
800
801
802 class SequenceOf(Obj):
803     tag_default = ...  # type: bytes
804     asn1_type_name = ...  # type: str
805     spec = ...  # type: Obj
806     default = ...  # type: "SequenceOf"
807     optional = ...  # type: bool
808
809     def __init__(
810             self,
811             value: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
812             bounds: Optional[Tuple[int, int]]=...,
813             impl: Optional[bytes]=...,
814             expl: Optional[bytes]=...,
815             default: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
816             optional: Optional[bool]=...,
817     ) -> None: ...
818
819     @property
820     def ready(self) -> bool: ...
821
822     def copy(self) -> "SequenceOf": ...
823
824     def __call__(
825             self,
826             value: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
827             bounds: Optional[Tuple[int, int]]=...,
828             impl: Optional[bytes]=...,
829             expl: Optional[bytes]=...,
830             default: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
831             optional: Optional[bool]=...,
832     ) -> "SequenceOf": ...
833
834     def __getitem__(self, key: int) -> Obj: ...
835
836     def __iter__(self) -> TSequence[Obj]: ...
837
838     def append(self, value: Obj) -> None: ...
839
840     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
841
842
843 class SetOf(SequenceOf):
844     tag_default = ...  # type: bytes
845     asn1_type_name = ...  # type: str
846     default = ...  # type: "SetOf"
847     optional = ...  # type: bool
848
849
850 def obj_by_path(pypath: str) -> TAny: ...