github.com/darrenli6/fabric-sdk-example@v0.0.0-20220109053535-94b13b56df8c/bddtests/common/policies_pb2.py (about)

     1  # Generated by the protocol buffer compiler.  DO NOT EDIT!
     2  # source: common/policies.proto
     3  
     4  import sys
     5  _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
     6  from google.protobuf import descriptor as _descriptor
     7  from google.protobuf import message as _message
     8  from google.protobuf import reflection as _reflection
     9  from google.protobuf import symbol_database as _symbol_database
    10  from google.protobuf import descriptor_pb2
    11  # @@protoc_insertion_point(imports)
    12  
    13  _sym_db = _symbol_database.Default()
    14  
    15  
    16  from msp import msp_principal_pb2 as msp_dot_msp__principal__pb2
    17  
    18  
    19  DESCRIPTOR = _descriptor.FileDescriptor(
    20    name='common/policies.proto',
    21    package='common',
    22    syntax='proto3',
    23    serialized_pb=_b('\n\x15\x63ommon/policies.proto\x12\x06\x63ommon\x1a\x17msp/msp_principal.proto\"k\n\x06Policy\x12\x0c\n\x04type\x18\x01 \x01(\x05\x12\r\n\x05value\x18\x02 \x01(\x0c\"D\n\nPolicyType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tSIGNATURE\x10\x01\x12\x07\n\x03MSP\x10\x02\x12\x11\n\rIMPLICIT_META\x10\x03\"{\n\x17SignaturePolicyEnvelope\x12\x0f\n\x07version\x18\x01 \x01(\x05\x12%\n\x04rule\x18\x02 \x01(\x0b\x32\x17.common.SignaturePolicy\x12(\n\nidentities\x18\x03 \x03(\x0b\x32\x14.common.MSPPrincipal\"\x9f\x01\n\x0fSignaturePolicy\x12\x13\n\tsigned_by\x18\x01 \x01(\x05H\x00\x12\x32\n\x08n_out_of\x18\x02 \x01(\x0b\x32\x1e.common.SignaturePolicy.NOutOfH\x00\x1a;\n\x06NOutOf\x12\t\n\x01n\x18\x01 \x01(\x05\x12&\n\x05rules\x18\x02 \x03(\x0b\x32\x17.common.SignaturePolicyB\x06\n\x04Type\"\x7f\n\x12ImplicitMetaPolicy\x12\x12\n\nsub_policy\x18\x01 \x01(\t\x12-\n\x04rule\x18\x02 \x01(\x0e\x32\x1f.common.ImplicitMetaPolicy.Rule\"&\n\x04Rule\x12\x07\n\x03\x41NY\x10\x00\x12\x07\n\x03\x41LL\x10\x01\x12\x0c\n\x08MAJORITY\x10\x02\x42S\n$org.hyperledger.fabric.protos.commonZ+github.com/hyperledger/fabric/protos/commonb\x06proto3')
    24    ,
    25    dependencies=[msp_dot_msp__principal__pb2.DESCRIPTOR,])
    26  _sym_db.RegisterFileDescriptor(DESCRIPTOR)
    27  
    28  
    29  
    30  _POLICY_POLICYTYPE = _descriptor.EnumDescriptor(
    31    name='PolicyType',
    32    full_name='common.Policy.PolicyType',
    33    filename=None,
    34    file=DESCRIPTOR,
    35    values=[
    36      _descriptor.EnumValueDescriptor(
    37        name='UNKNOWN', index=0, number=0,
    38        options=None,
    39        type=None),
    40      _descriptor.EnumValueDescriptor(
    41        name='SIGNATURE', index=1, number=1,
    42        options=None,
    43        type=None),
    44      _descriptor.EnumValueDescriptor(
    45        name='MSP', index=2, number=2,
    46        options=None,
    47        type=None),
    48      _descriptor.EnumValueDescriptor(
    49        name='IMPLICIT_META', index=3, number=3,
    50        options=None,
    51        type=None),
    52    ],
    53    containing_type=None,
    54    options=None,
    55    serialized_start=97,
    56    serialized_end=165,
    57  )
    58  _sym_db.RegisterEnumDescriptor(_POLICY_POLICYTYPE)
    59  
    60  _IMPLICITMETAPOLICY_RULE = _descriptor.EnumDescriptor(
    61    name='Rule',
    62    full_name='common.ImplicitMetaPolicy.Rule',
    63    filename=None,
    64    file=DESCRIPTOR,
    65    values=[
    66      _descriptor.EnumValueDescriptor(
    67        name='ANY', index=0, number=0,
    68        options=None,
    69        type=None),
    70      _descriptor.EnumValueDescriptor(
    71        name='ALL', index=1, number=1,
    72        options=None,
    73        type=None),
    74      _descriptor.EnumValueDescriptor(
    75        name='MAJORITY', index=2, number=2,
    76        options=None,
    77        type=None),
    78    ],
    79    containing_type=None,
    80    options=None,
    81    serialized_start=543,
    82    serialized_end=581,
    83  )
    84  _sym_db.RegisterEnumDescriptor(_IMPLICITMETAPOLICY_RULE)
    85  
    86  
    87  _POLICY = _descriptor.Descriptor(
    88    name='Policy',
    89    full_name='common.Policy',
    90    filename=None,
    91    file=DESCRIPTOR,
    92    containing_type=None,
    93    fields=[
    94      _descriptor.FieldDescriptor(
    95        name='type', full_name='common.Policy.type', index=0,
    96        number=1, type=5, cpp_type=1, label=1,
    97        has_default_value=False, default_value=0,
    98        message_type=None, enum_type=None, containing_type=None,
    99        is_extension=False, extension_scope=None,
   100        options=None),
   101      _descriptor.FieldDescriptor(
   102        name='value', full_name='common.Policy.value', index=1,
   103        number=2, type=12, cpp_type=9, label=1,
   104        has_default_value=False, default_value=_b(""),
   105        message_type=None, enum_type=None, containing_type=None,
   106        is_extension=False, extension_scope=None,
   107        options=None),
   108    ],
   109    extensions=[
   110    ],
   111    nested_types=[],
   112    enum_types=[
   113      _POLICY_POLICYTYPE,
   114    ],
   115    options=None,
   116    is_extendable=False,
   117    syntax='proto3',
   118    extension_ranges=[],
   119    oneofs=[
   120    ],
   121    serialized_start=58,
   122    serialized_end=165,
   123  )
   124  
   125  
   126  _SIGNATUREPOLICYENVELOPE = _descriptor.Descriptor(
   127    name='SignaturePolicyEnvelope',
   128    full_name='common.SignaturePolicyEnvelope',
   129    filename=None,
   130    file=DESCRIPTOR,
   131    containing_type=None,
   132    fields=[
   133      _descriptor.FieldDescriptor(
   134        name='version', full_name='common.SignaturePolicyEnvelope.version', index=0,
   135        number=1, type=5, cpp_type=1, label=1,
   136        has_default_value=False, default_value=0,
   137        message_type=None, enum_type=None, containing_type=None,
   138        is_extension=False, extension_scope=None,
   139        options=None),
   140      _descriptor.FieldDescriptor(
   141        name='rule', full_name='common.SignaturePolicyEnvelope.rule', index=1,
   142        number=2, type=11, cpp_type=10, label=1,
   143        has_default_value=False, default_value=None,
   144        message_type=None, enum_type=None, containing_type=None,
   145        is_extension=False, extension_scope=None,
   146        options=None),
   147      _descriptor.FieldDescriptor(
   148        name='identities', full_name='common.SignaturePolicyEnvelope.identities', index=2,
   149        number=3, type=11, cpp_type=10, label=3,
   150        has_default_value=False, default_value=[],
   151        message_type=None, enum_type=None, containing_type=None,
   152        is_extension=False, extension_scope=None,
   153        options=None),
   154    ],
   155    extensions=[
   156    ],
   157    nested_types=[],
   158    enum_types=[
   159    ],
   160    options=None,
   161    is_extendable=False,
   162    syntax='proto3',
   163    extension_ranges=[],
   164    oneofs=[
   165    ],
   166    serialized_start=167,
   167    serialized_end=290,
   168  )
   169  
   170  
   171  _SIGNATUREPOLICY_NOUTOF = _descriptor.Descriptor(
   172    name='NOutOf',
   173    full_name='common.SignaturePolicy.NOutOf',
   174    filename=None,
   175    file=DESCRIPTOR,
   176    containing_type=None,
   177    fields=[
   178      _descriptor.FieldDescriptor(
   179        name='n', full_name='common.SignaturePolicy.NOutOf.n', index=0,
   180        number=1, type=5, cpp_type=1, label=1,
   181        has_default_value=False, default_value=0,
   182        message_type=None, enum_type=None, containing_type=None,
   183        is_extension=False, extension_scope=None,
   184        options=None),
   185      _descriptor.FieldDescriptor(
   186        name='rules', full_name='common.SignaturePolicy.NOutOf.rules', index=1,
   187        number=2, type=11, cpp_type=10, label=3,
   188        has_default_value=False, default_value=[],
   189        message_type=None, enum_type=None, containing_type=None,
   190        is_extension=False, extension_scope=None,
   191        options=None),
   192    ],
   193    extensions=[
   194    ],
   195    nested_types=[],
   196    enum_types=[
   197    ],
   198    options=None,
   199    is_extendable=False,
   200    syntax='proto3',
   201    extension_ranges=[],
   202    oneofs=[
   203    ],
   204    serialized_start=385,
   205    serialized_end=444,
   206  )
   207  
   208  _SIGNATUREPOLICY = _descriptor.Descriptor(
   209    name='SignaturePolicy',
   210    full_name='common.SignaturePolicy',
   211    filename=None,
   212    file=DESCRIPTOR,
   213    containing_type=None,
   214    fields=[
   215      _descriptor.FieldDescriptor(
   216        name='signed_by', full_name='common.SignaturePolicy.signed_by', index=0,
   217        number=1, type=5, cpp_type=1, label=1,
   218        has_default_value=False, default_value=0,
   219        message_type=None, enum_type=None, containing_type=None,
   220        is_extension=False, extension_scope=None,
   221        options=None),
   222      _descriptor.FieldDescriptor(
   223        name='n_out_of', full_name='common.SignaturePolicy.n_out_of', index=1,
   224        number=2, type=11, cpp_type=10, label=1,
   225        has_default_value=False, default_value=None,
   226        message_type=None, enum_type=None, containing_type=None,
   227        is_extension=False, extension_scope=None,
   228        options=None),
   229    ],
   230    extensions=[
   231    ],
   232    nested_types=[_SIGNATUREPOLICY_NOUTOF, ],
   233    enum_types=[
   234    ],
   235    options=None,
   236    is_extendable=False,
   237    syntax='proto3',
   238    extension_ranges=[],
   239    oneofs=[
   240      _descriptor.OneofDescriptor(
   241        name='Type', full_name='common.SignaturePolicy.Type',
   242        index=0, containing_type=None, fields=[]),
   243    ],
   244    serialized_start=293,
   245    serialized_end=452,
   246  )
   247  
   248  
   249  _IMPLICITMETAPOLICY = _descriptor.Descriptor(
   250    name='ImplicitMetaPolicy',
   251    full_name='common.ImplicitMetaPolicy',
   252    filename=None,
   253    file=DESCRIPTOR,
   254    containing_type=None,
   255    fields=[
   256      _descriptor.FieldDescriptor(
   257        name='sub_policy', full_name='common.ImplicitMetaPolicy.sub_policy', index=0,
   258        number=1, type=9, cpp_type=9, label=1,
   259        has_default_value=False, default_value=_b("").decode('utf-8'),
   260        message_type=None, enum_type=None, containing_type=None,
   261        is_extension=False, extension_scope=None,
   262        options=None),
   263      _descriptor.FieldDescriptor(
   264        name='rule', full_name='common.ImplicitMetaPolicy.rule', index=1,
   265        number=2, type=14, cpp_type=8, label=1,
   266        has_default_value=False, default_value=0,
   267        message_type=None, enum_type=None, containing_type=None,
   268        is_extension=False, extension_scope=None,
   269        options=None),
   270    ],
   271    extensions=[
   272    ],
   273    nested_types=[],
   274    enum_types=[
   275      _IMPLICITMETAPOLICY_RULE,
   276    ],
   277    options=None,
   278    is_extendable=False,
   279    syntax='proto3',
   280    extension_ranges=[],
   281    oneofs=[
   282    ],
   283    serialized_start=454,
   284    serialized_end=581,
   285  )
   286  
   287  _POLICY_POLICYTYPE.containing_type = _POLICY
   288  _SIGNATUREPOLICYENVELOPE.fields_by_name['rule'].message_type = _SIGNATUREPOLICY
   289  _SIGNATUREPOLICYENVELOPE.fields_by_name['identities'].message_type = msp_dot_msp__principal__pb2._MSPPRINCIPAL
   290  _SIGNATUREPOLICY_NOUTOF.fields_by_name['rules'].message_type = _SIGNATUREPOLICY
   291  _SIGNATUREPOLICY_NOUTOF.containing_type = _SIGNATUREPOLICY
   292  _SIGNATUREPOLICY.fields_by_name['n_out_of'].message_type = _SIGNATUREPOLICY_NOUTOF
   293  _SIGNATUREPOLICY.oneofs_by_name['Type'].fields.append(
   294    _SIGNATUREPOLICY.fields_by_name['signed_by'])
   295  _SIGNATUREPOLICY.fields_by_name['signed_by'].containing_oneof = _SIGNATUREPOLICY.oneofs_by_name['Type']
   296  _SIGNATUREPOLICY.oneofs_by_name['Type'].fields.append(
   297    _SIGNATUREPOLICY.fields_by_name['n_out_of'])
   298  _SIGNATUREPOLICY.fields_by_name['n_out_of'].containing_oneof = _SIGNATUREPOLICY.oneofs_by_name['Type']
   299  _IMPLICITMETAPOLICY.fields_by_name['rule'].enum_type = _IMPLICITMETAPOLICY_RULE
   300  _IMPLICITMETAPOLICY_RULE.containing_type = _IMPLICITMETAPOLICY
   301  DESCRIPTOR.message_types_by_name['Policy'] = _POLICY
   302  DESCRIPTOR.message_types_by_name['SignaturePolicyEnvelope'] = _SIGNATUREPOLICYENVELOPE
   303  DESCRIPTOR.message_types_by_name['SignaturePolicy'] = _SIGNATUREPOLICY
   304  DESCRIPTOR.message_types_by_name['ImplicitMetaPolicy'] = _IMPLICITMETAPOLICY
   305  
   306  Policy = _reflection.GeneratedProtocolMessageType('Policy', (_message.Message,), dict(
   307    DESCRIPTOR = _POLICY,
   308    __module__ = 'common.policies_pb2'
   309    # @@protoc_insertion_point(class_scope:common.Policy)
   310    ))
   311  _sym_db.RegisterMessage(Policy)
   312  
   313  SignaturePolicyEnvelope = _reflection.GeneratedProtocolMessageType('SignaturePolicyEnvelope', (_message.Message,), dict(
   314    DESCRIPTOR = _SIGNATUREPOLICYENVELOPE,
   315    __module__ = 'common.policies_pb2'
   316    # @@protoc_insertion_point(class_scope:common.SignaturePolicyEnvelope)
   317    ))
   318  _sym_db.RegisterMessage(SignaturePolicyEnvelope)
   319  
   320  SignaturePolicy = _reflection.GeneratedProtocolMessageType('SignaturePolicy', (_message.Message,), dict(
   321  
   322    NOutOf = _reflection.GeneratedProtocolMessageType('NOutOf', (_message.Message,), dict(
   323      DESCRIPTOR = _SIGNATUREPOLICY_NOUTOF,
   324      __module__ = 'common.policies_pb2'
   325      # @@protoc_insertion_point(class_scope:common.SignaturePolicy.NOutOf)
   326      ))
   327    ,
   328    DESCRIPTOR = _SIGNATUREPOLICY,
   329    __module__ = 'common.policies_pb2'
   330    # @@protoc_insertion_point(class_scope:common.SignaturePolicy)
   331    ))
   332  _sym_db.RegisterMessage(SignaturePolicy)
   333  _sym_db.RegisterMessage(SignaturePolicy.NOutOf)
   334  
   335  ImplicitMetaPolicy = _reflection.GeneratedProtocolMessageType('ImplicitMetaPolicy', (_message.Message,), dict(
   336    DESCRIPTOR = _IMPLICITMETAPOLICY,
   337    __module__ = 'common.policies_pb2'
   338    # @@protoc_insertion_point(class_scope:common.ImplicitMetaPolicy)
   339    ))
   340  _sym_db.RegisterMessage(ImplicitMetaPolicy)
   341  
   342  
   343  DESCRIPTOR.has_options = True
   344  DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n$org.hyperledger.fabric.protos.commonZ+github.com/hyperledger/fabric/protos/common'))
   345  try:
   346    # THESE ELEMENTS WILL BE DEPRECATED.
   347    # Please use the generated *_pb2_grpc.py files instead.
   348    import grpc
   349    from grpc.beta import implementations as beta_implementations
   350    from grpc.beta import interfaces as beta_interfaces
   351    from grpc.framework.common import cardinality
   352    from grpc.framework.interfaces.face import utilities as face_utilities
   353  except ImportError:
   354    pass
   355  # @@protoc_insertion_point(module_scope)