Create |ASN.1| schema or value object. |ASN.1| class is based on :class:`~pyasn1.type.base.SimpleAsn1Type`, its objects are immutable and duck-type Python :class:`tuple` objects (tuple of non-negative integers). Keyword Args ------------ value: :class:`tuple`, :class:`str`
| 1021 | |
| 1022 | |
| 1023 | class ObjectIdentifier(base.SimpleAsn1Type): |
| 1024 | """Create |ASN.1| schema or value object. |
| 1025 | |
| 1026 | |ASN.1| class is based on :class:`~pyasn1.type.base.SimpleAsn1Type`, its |
| 1027 | objects are immutable and duck-type Python :class:`tuple` objects |
| 1028 | (tuple of non-negative integers). |
| 1029 | |
| 1030 | Keyword Args |
| 1031 | ------------ |
| 1032 | value: :class:`tuple`, :class:`str` or |ASN.1| object |
| 1033 | Python sequence of :class:`int` or :class:`str` literal or |ASN.1| object. |
| 1034 | If `value` is not given, schema object will be created. |
| 1035 | |
| 1036 | tagSet: :py:class:`~pyasn1.type.tag.TagSet` |
| 1037 | Object representing non-default ASN.1 tag(s) |
| 1038 | |
| 1039 | subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection` |
| 1040 | Object representing non-default ASN.1 subtype constraint(s). Constraints |
| 1041 | verification for |ASN.1| type occurs automatically on object |
| 1042 | instantiation. |
| 1043 | |
| 1044 | Raises |
| 1045 | ------ |
| 1046 | ~pyasn1.error.ValueConstraintError, ~pyasn1.error.PyAsn1Error |
| 1047 | On constraint violation or bad initializer. |
| 1048 | |
| 1049 | Examples |
| 1050 | -------- |
| 1051 | .. code-block:: python |
| 1052 | |
| 1053 | class ID(ObjectIdentifier): |
| 1054 | ''' |
| 1055 | ASN.1 specification: |
| 1056 | |
| 1057 | ID ::= OBJECT IDENTIFIER |
| 1058 | |
| 1059 | id-edims ID ::= { joint-iso-itu-t mhs-motif(6) edims(7) } |
| 1060 | id-bp ID ::= { id-edims 11 } |
| 1061 | ''' |
| 1062 | id_edims = ID('2.6.7') |
| 1063 | id_bp = id_edims + (11,) |
| 1064 | """ |
| 1065 | #: Set (on class, not on instance) or return a |
| 1066 | #: :py:class:`~pyasn1.type.tag.TagSet` object representing ASN.1 tag(s) |
| 1067 | #: associated with |ASN.1| type. |
| 1068 | tagSet = tag.initTagSet( |
| 1069 | tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x06) |
| 1070 | ) |
| 1071 | |
| 1072 | #: Set (on class, not on instance) or return a |
| 1073 | #: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection` object |
| 1074 | #: imposing constraints on |ASN.1| type initialization values. |
| 1075 | subtypeSpec = constraint.ConstraintsIntersection() |
| 1076 | |
| 1077 | # Optimization for faster codec lookup |
| 1078 | typeId = base.SimpleAsn1Type.getTypeId() |
| 1079 | |
| 1080 | def __add__(self, other): |