]> Cypherpunks.ru repositories - pyderasn.git/blob - pyderasn.pyi
83f00329d7d65dcb2bcd404a3ba04869d5931918
[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
187     def __init__(
188             self,
189             value: Optional[Union["Boolean", bool]]=...,
190             impl: Optional[bytes]=...,
191             expl: Optional[bytes]=...,
192             default: Optional[Union["Boolean", bool]]=...,
193             optional: bool=...,
194     ) -> None: ...
195
196     @property
197     def ready(self) -> bool: ...
198
199     def copy(self) -> "Boolean": ...
200
201     def __call__(
202             self,
203             value: Optional[Union["Boolean", bool]]=...,
204             impl: Optional[bytes]=...,
205             expl: Optional[bytes]=...,
206             default: Optional[Union["Boolean", bool]]=...,
207             optional: Optional[bool]=...,
208     ) -> "Boolean": ...
209
210     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
211
212
213 class Integer(Obj):
214     tag_default = ...  # type: bytes
215     asn1_type_name = ...  # type: str
216     specs = ...  # type: Dict[str, int]
217     default = ...  # type: "Integer"
218
219     def __init__(
220             self,
221             value: Optional[Union["Integer", int, str]]=...,
222             bounds: Optional[Tuple[int, int]]=...,
223             impl: Optional[bytes]=...,
224             expl: Optional[bytes]=...,
225             default: Optional[Union["Integer", int, str]]=...,
226             optional: bool=...,
227     ) -> None: ...
228
229     @property
230     def ready(self) -> bool: ...
231
232     def copy(self) -> "Integer": ...
233
234     @property
235     def named(self) -> Optional[str]: ...
236
237     def __call__(
238             self,
239             value: Optional[Union["Integer", int, str]]=...,
240             bounds: Optional[Tuple[int, int]]=...,
241             impl: Optional[bytes]=...,
242             expl: Optional[bytes]=...,
243             default: Optional[Union["Integer", int, str]]=...,
244             optional: Optional[bool]=...,
245     ) -> "Integer": ...
246
247     def __int__(self) -> int: ...
248
249     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
250
251
252 class BitString(Obj):
253     tag_default = ...  # type: bytes
254     asn1_type_name = ...  # type: str
255     specs = ...  # type: Dict[str, int]
256     default = ...  # type: "BitString"
257
258     def __init__(
259             self,
260             value: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
261             impl: Optional[bytes]=...,
262             expl: Optional[bytes]=...,
263             default: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
264             optional: bool=...,
265     ) -> None: ...
266
267     @property
268     def ready(self) -> bool: ...
269
270     def copy(self) -> "BitString": ...
271
272     @property
273     def bit_len(self) -> int: ...
274
275     @property
276     def named(self) -> TSequence[str]: ...
277
278     def __call__(
279             self,
280             value: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
281             impl: Optional[bytes]=...,
282             expl: Optional[bytes]=...,
283             default: Optional[Union["BitString", bytes, Tuple[str, ...]]]=...,
284             optional: Optional[bool]=...,
285     ) -> "BitString": ...
286
287     def __bytes__(self) -> bytes: ...
288
289     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
290
291
292 class OctetString(Obj):
293     tag_default = ...  # type: bytes
294     asn1_type_name = ...  # type: str
295     default = ...  # type: "OctetString"
296
297     def __init__(
298             self,
299             value: Optional[Union["OctetString", bytes]]=...,
300             bounds: Optional[Tuple[int, int]]=...,
301             impl: Optional[bytes]=...,
302             expl: Optional[bytes]=...,
303             default: Optional[Union["OctetString", bytes]]=...,
304             optional: bool=...,
305     ) -> None: ...
306
307     @property
308     def ready(self) -> bool: ...
309
310     def copy(self) -> "OctetString": ...
311
312     def __call__(
313             self,
314             value: Optional[Union["OctetString", bytes]]=...,
315             bounds: Optional[Tuple[int, int]]=...,
316             impl: Optional[bytes]=...,
317             expl: Optional[bytes]=...,
318             default: Optional[Union["OctetString", bytes]]=...,
319             optional: Optional[bool]=...,
320     ) -> "OctetString": ...
321
322     def __bytes__(self) -> bytes: ...
323
324     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
325
326
327 class Null(Obj):
328     tag_default = ...  # type: bytes
329     asn1_type_name = ...  # type: str
330     default = ...  # type: "Null"
331
332     def __init__(
333             self,
334             impl: Optional[bytes]=...,
335             expl: Optional[bytes]=...,
336             optional: bool=...,
337     ) -> None: ...
338
339     @property
340     def ready(self) -> bool: ...
341
342     def copy(self) -> "Null": ...
343
344     def __call__(
345             self,
346             impl: Optional[bytes]=...,
347             expl: Optional[bytes]=...,
348             optional: Optional[bool]=...,
349     ) -> "Null": ...
350
351     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
352
353
354 class ObjectIdentifier(Obj):
355     tag_default = ...  # type: bytes
356     asn1_type_name = ...  # type: str
357     default = ...  # type: "ObjectIdentifier"
358
359     def __init__(
360             self,
361             value: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
362             impl: Optional[bytes]=...,
363             expl: Optional[bytes]=...,
364             default: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
365             optional: bool=...,
366     ) -> None: ...
367
368     @property
369     def ready(self) -> bool: ...
370
371     def copy(self) -> "ObjectIdentifier": ...
372
373     def __call__(
374             self,
375             value: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
376             impl: Optional[bytes]=...,
377             expl: Optional[bytes]=...,
378             default: Optional[Union["ObjectIdentifier", str, Tuple[int, ...]]]=...,
379             optional: Optional[bool]=...,
380     ) -> "ObjectIdentifier": ...
381
382     def __add__(
383             self,
384             their: Union["ObjectIdentifier", Tuple[int, ...]],
385     ) -> "ObjectIdentifier": ...
386
387     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
388
389
390 class Enumerated(Integer):
391     tag_default = ...  # type: bytes
392     asn1_type_name = ...  # type: str
393     default = ...  # type: "Enumerated"
394
395     def __init__(
396             self,
397             value: Optional[Union["Enumerated", str, int]]=...,
398             impl: Optional[bytes]=...,
399             expl: Optional[bytes]=...,
400             default: Optional[Union["Enumerated", str, int]]=...,
401             optional: bool=...,
402     ) -> None: ...
403
404     def copy(self) -> "Enumerated": ...
405
406     def __call__(  # type: ignore
407             self,
408             value: Optional[Union["Enumerated", str, int]]=...,
409             impl: Optional[bytes]=...,
410             expl: Optional[bytes]=...,
411             default: Optional[Union["Enumerated", str, int]]=...,
412             optional: Optional[bool]=...,
413     ) -> "Enumerated": ...
414
415
416 class CommonString(OctetString):
417     def pps(
418             self,
419             decode_path: Tuple[str, ...]=...,
420             no_unicode: bool=...,
421     ) -> TSequence[PP]: ...
422
423
424 class UTF8String(CommonString):
425     tag_default = ...  # type: bytes
426     encoding = ...  # type: str
427     asn1_type_name = ...  # type: str
428     default = ...  # type: "UTF8String"
429
430     def __init__(
431             self,
432             value: Optional[Union["UTF8String", str, bytes]]=...,
433             bounds: Optional[Tuple[int, int]]=...,
434             impl: Optional[bytes]=...,
435             expl: Optional[bytes]=...,
436             default: Optional[Union["UTF8String", str, bytes]]=...,
437             optional: bool=...,
438     ) -> None: ...
439
440     def __str__(self) -> str: ...
441
442
443 class NumericString(CommonString):
444     tag_default = ...  # type: bytes
445     encoding = ...  # type: str
446     asn1_type_name = ...  # type: str
447     default = ...  # type: "NumericString"
448
449     def __init__(
450             self,
451             value: Optional[Union["NumericString", str, bytes]]=...,
452             bounds: Optional[Tuple[int, int]]=...,
453             impl: Optional[bytes]=...,
454             expl: Optional[bytes]=...,
455             default: Optional[Union["NumericString", str, bytes]]=...,
456             optional: bool=...,
457     ) -> None: ...
458
459
460 class PrintableString(CommonString):
461     tag_default = ...  # type: bytes
462     encoding = ...  # type: str
463     asn1_type_name = ...  # type: str
464     default = ...  # type: "PrintableString"
465
466     def __init__(
467             self,
468             value: Optional[Union["PrintableString", str, bytes]]=...,
469             bounds: Optional[Tuple[int, int]]=...,
470             impl: Optional[bytes]=...,
471             expl: Optional[bytes]=...,
472             default: Optional[Union["PrintableString", str, bytes]]=...,
473             optional: bool=...,
474     ) -> None: ...
475
476
477 class TeletexString(CommonString):
478     tag_default = ...  # type: bytes
479     encoding = ...  # type: str
480     asn1_type_name = ...  # type: str
481     default = ...  # type: "TeletexString"
482
483     def __init__(
484             self,
485             value: Optional[Union["TeletexString", str, bytes]]=...,
486             bounds: Optional[Tuple[int, int]]=...,
487             impl: Optional[bytes]=...,
488             expl: Optional[bytes]=...,
489             default: Optional[Union["TeletexString", str, bytes]]=...,
490             optional: bool=...,
491     ) -> None: ...
492
493
494 class T61String(TeletexString):
495     asn1_type_name = ...  # type: str
496     default = ...  # type: "T61String"
497
498
499 class VideotexString(CommonString):
500     tag_default = ...  # type: bytes
501     encoding = ...  # type: str
502     asn1_type_name = ...  # type: str
503     default = ...  # type: "VideotexString"
504
505     def __init__(
506             self,
507             value: Optional[Union["VideotexString", str, bytes]]=...,
508             bounds: Optional[Tuple[int, int]]=...,
509             impl: Optional[bytes]=...,
510             expl: Optional[bytes]=...,
511             default: Optional[Union["VideotexString", str, bytes]]=...,
512             optional: bool=...,
513     ) -> None: ...
514
515
516 class IA5String(CommonString):
517     tag_default = ...  # type: bytes
518     encoding = ...  # type: str
519     asn1_type_name = ...  # type: str
520     default = ...  # type: "IA5String"
521
522     def __init__(
523             self,
524             value: Optional[Union["IA5String", str, bytes]]=...,
525             bounds: Optional[Tuple[int, int]]=...,
526             impl: Optional[bytes]=...,
527             expl: Optional[bytes]=...,
528             default: Optional[Union["IA5String", str, bytes]]=...,
529             optional: bool=...,
530     ) -> None: ...
531
532
533 class UTCTime(CommonString):
534     tag_default = ...  # type: bytes
535     encoding = ...  # type: str
536     asn1_type_name = ...  # type: str
537     default = ...  # type: "UTCTime"
538
539     def __init__(
540             self,
541             value: Optional[Union["UTCTime", datetime]]=...,
542             impl: Optional[bytes]=...,
543             expl: Optional[bytes]=...,
544             default: Optional[Union["UTCTime", datetime]]=...,
545             optional: bool=...,
546     ) -> None: ...
547
548     def todatetime(self) -> datetime: ...
549
550     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...  # type: ignore
551
552
553 class GeneralizedTime(UTCTime):
554     tag_default = ...  # type: bytes
555     asn1_type_name = ...  # type: str
556     default = ...  # type: "GeneralizedTime"
557
558     def todatetime(self) -> datetime: ...
559
560
561 class GraphicString(CommonString):
562     tag_default = ...  # type: bytes
563     encoding = ...  # type: str
564     asn1_type_name = ...  # type: str
565     default = ...  # type: "GraphicString"
566
567     def __init__(
568             self,
569             value: Optional[Union["GraphicString", str, bytes]]=...,
570             bounds: Optional[Tuple[int, int]]=...,
571             impl: Optional[bytes]=...,
572             expl: Optional[bytes]=...,
573             default: Optional[Union["GraphicString", str, bytes]]=...,
574             optional: bool=...,
575     ) -> None: ...
576
577
578 class VisibleString(CommonString):
579     tag_default = ...  # type: bytes
580     encoding = ...  # type: str
581     asn1_type_name = ...  # type: str
582     default = ...  # type: "VisibleString"
583
584     def __init__(
585             self,
586             value: Optional[Union["VisibleString", str, bytes]]=...,
587             bounds: Optional[Tuple[int, int]]=...,
588             impl: Optional[bytes]=...,
589             expl: Optional[bytes]=...,
590             default: Optional[Union["VisibleString", str, bytes]]=...,
591             optional: bool=...,
592     ) -> None: ...
593
594
595 class ISO646String(VisibleString):
596     asn1_type_name = ...  # type: str
597     default = ...  # type: "ISO646String"
598
599
600 class GeneralString(CommonString):
601     tag_default = ...  # type: bytes
602     encoding = ...  # type: str
603     asn1_type_name = ...  # type: str
604     default = ...  # type: "GeneralString"
605
606     def __init__(
607             self,
608             value: Optional[Union["GeneralString", str, bytes]]=...,
609             bounds: Optional[Tuple[int, int]]=...,
610             impl: Optional[bytes]=...,
611             expl: Optional[bytes]=...,
612             default: Optional[Union["GeneralString", str, bytes]]=...,
613             optional: bool=...,
614     ) -> None: ...
615
616
617 class UniversalString(CommonString):
618     tag_default = ...  # type: bytes
619     encoding = ...  # type: str
620     asn1_type_name = ...  # type: str
621     default = ...  # type: "UniversalString"
622
623     def __init__(
624             self,
625             value: Optional[Union["UniversalString", str, bytes]]=...,
626             bounds: Optional[Tuple[int, int]]=...,
627             impl: Optional[bytes]=...,
628             expl: Optional[bytes]=...,
629             default: Optional[Union["UniversalString", str, bytes]]=...,
630             optional: bool=...,
631     ) -> None: ...
632
633
634 class BMPString(CommonString):
635     tag_default = ...  # type: bytes
636     encoding = ...  # type: str
637     asn1_type_name = ...  # type: str
638     default = ...  # type: "BMPString"
639
640     def __init__(
641             self,
642             value: Optional[Union["BMPString", str, bytes]]=...,
643             bounds: Optional[Tuple[int, int]]=...,
644             impl: Optional[bytes]=...,
645             expl: Optional[bytes]=...,
646             default: Optional[Union["BMPString", str, bytes]]=...,
647             optional: bool=...,
648     ) -> None: ...
649
650
651 class Choice(Obj):
652     tag_default = ...  # type: bytes
653     asn1_type_name = ...  # type: str
654     specs = ...  # type: Dict[str, Obj]
655     default = ...  # type: "Choice"
656
657     def __init__(
658             self,
659             value: Optional[Union["Choice", Tuple[str, Obj]]]=...,
660             impl: Optional[bytes]=...,
661             expl: Optional[bytes]=...,
662             default: Optional[Union["Choice", Tuple[str, Obj]]]=...,
663             optional: bool=...,
664     ) -> None: ...
665
666     @property
667     def ready(self) -> bool: ...
668
669     def copy(self) -> "Choice": ...
670
671     def __call__(
672             self,
673             value: Optional[Union["Choice", Tuple[str, Obj]]]=...,
674             expl: Optional[bytes]=...,
675             default: Optional[Union["Choice", Tuple[str, Obj]]]=...,
676             optional: Optional[bool]=...,
677     ) -> "Choice": ...
678
679     def __getitem__(self, key: str) -> Optional[Obj]: ...
680
681     def __setitem__(self, key: str, value: Obj) -> None: ...
682
683     @property
684     def choice(self) -> str: ...
685
686     @property
687     def value(self) -> Obj: ...
688
689     @property
690     def tlen(self) -> int: ...
691
692     @property
693     def decoded(self) -> bool: ...
694
695     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
696
697
698 class PrimitiveTypes(Choice):
699     schema = ...  # type: Dict[str, Obj]
700
701
702 class Any(Obj):
703     tag_default = ...  # type: bytes
704     asn1_type_name = ...  # type: str
705     default = ...  # type: "Any"
706
707     def __init__(
708             self,
709             value: Optional[Union[Obj, bytes]]=...,
710             expl: Optional[bytes]=...,
711             optional: bool=...,
712     ) -> None: ...
713
714     @property
715     def ready(self) -> bool: ...
716
717     def copy(self) -> "Any": ...
718
719     def __call__(
720             self,
721             value: Optional[Union[Obj, bytes]]=...,
722             expl: Optional[bytes]=...,
723             optional: Optional[bool]=...,
724     ) -> "Any": ...
725
726     def __bytes__(self) -> bytes: ...
727
728     @property
729     def tlen(self) -> int: ...
730
731     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
732
733
734 class Sequence(Obj):
735     tag_default = ...  # type: bytes
736     asn1_type_name = ...  # type: str
737     specs = ...  # type: Dict[str, Obj]
738     default = ...  # type: "Sequence"
739
740     def __init__(
741             self,
742             value: Optional["Sequence"]=...,
743             impl: Optional[bytes]=...,
744             expl: Optional[bytes]=...,
745             default: Optional["Sequence"]=...,
746             optional: bool=...,
747     ) -> None: ...
748
749     @property
750     def ready(self) -> bool: ...
751
752     def copy(self) -> "Sequence": ...
753
754     def __call__(
755             self,
756             value: Optional["Sequence"]=...,
757             impl: Optional[bytes]=...,
758             expl: Optional[bytes]=...,
759             default: Optional["Sequence"]=...,
760             optional: Optional[bool]=...,
761     ) -> "Sequence": ...
762
763     def __getitem__(self, key: str) -> Optional[Obj]: ...
764
765     def __setitem__(self, key: str, value: Obj) -> None: ...
766
767     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
768
769
770 class Set(Sequence):
771     tag_default = ...  # type: bytes
772     asn1_type_name = ...  # type: str
773     default = ...  # type: "Set"
774
775
776 class SequenceOf(Obj):
777     tag_default = ...  # type: bytes
778     asn1_type_name = ...  # type: str
779     spec = ...  # type: Obj
780     default = ...  # type: "SequenceOf"
781
782     def __init__(
783             self,
784             value: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
785             bounds: Optional[Tuple[int, int]]=...,
786             impl: Optional[bytes]=...,
787             expl: Optional[bytes]=...,
788             default: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
789             optional: Optional[bool]=...,
790     ) -> None: ...
791
792     @property
793     def ready(self) -> bool: ...
794
795     def copy(self) -> "SequenceOf": ...
796
797     def __call__(
798             self,
799             value: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
800             bounds: Optional[Tuple[int, int]]=...,
801             impl: Optional[bytes]=...,
802             expl: Optional[bytes]=...,
803             default: Optional[Union["SequenceOf", TSequence[Obj]]]=...,
804             optional: Optional[bool]=...,
805     ) -> "SequenceOf": ...
806
807     def __getitem__(self, key: int) -> Obj: ...
808
809     def __iter__(self) -> TSequence[Obj]: ...
810
811     def append(self, value: Obj) -> None: ...
812
813     def pps(self, decode_path: Tuple[str, ...]=...) -> TSequence[PP]: ...
814
815
816 class SetOf(SequenceOf):
817     tag_default = ...  # type: bytes
818     asn1_type_name = ...  # type: str
819     default = ...  # type: "SetOf"
820
821
822 def obj_by_path(pypath: str) -> TAny: ...