|
| 1 | +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! |
| 2 | +"""Client and server classes corresponding to protobuf-defined services.""" |
| 3 | +import grpc |
| 4 | + |
| 5 | +from cs3.identity.tenant.v1beta1 import tenant_api_pb2 as cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2 |
| 6 | + |
| 7 | + |
| 8 | +class TenantAPIStub(object): |
| 9 | + """TenantProvider API. |
| 10 | +
|
| 11 | + The TenantProvider API is responsible for providing |
| 12 | + methods to retrieve information about Tenants. |
| 13 | +
|
| 14 | + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL |
| 15 | + NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and |
| 16 | + "OPTIONAL" in this document are to be interpreted as described in |
| 17 | + RFC 2119. |
| 18 | +
|
| 19 | + The following are global requirements that apply to all methods: |
| 20 | + Any method MUST return CODE_OK on a successful operation. |
| 21 | + Any method MAY return NOT_IMPLEMENTED. |
| 22 | + Any method MAY return INTERNAL. |
| 23 | + Any method MAY return UNKNOWN. |
| 24 | + Any method MAY return UNAUTHENTICATED. |
| 25 | +
|
| 26 | + Provides an API for managing users. |
| 27 | + """ |
| 28 | + |
| 29 | + def __init__(self, channel): |
| 30 | + """Constructor. |
| 31 | +
|
| 32 | + Args: |
| 33 | + channel: A grpc.Channel. |
| 34 | + """ |
| 35 | + self.GetTenant = channel.unary_unary( |
| 36 | + '/cs3.identity.tenant.v1beta1.TenantAPI/GetTenant', |
| 37 | + request_serializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantRequest.SerializeToString, |
| 38 | + response_deserializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantResponse.FromString, |
| 39 | + ) |
| 40 | + self.GetTenantByClaim = channel.unary_unary( |
| 41 | + '/cs3.identity.tenant.v1beta1.TenantAPI/GetTenantByClaim', |
| 42 | + request_serializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantByClaimRequest.SerializeToString, |
| 43 | + response_deserializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantByClaimResponse.FromString, |
| 44 | + ) |
| 45 | + |
| 46 | + |
| 47 | +class TenantAPIServicer(object): |
| 48 | + """TenantProvider API. |
| 49 | +
|
| 50 | + The TenantProvider API is responsible for providing |
| 51 | + methods to retrieve information about Tenants. |
| 52 | +
|
| 53 | + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL |
| 54 | + NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and |
| 55 | + "OPTIONAL" in this document are to be interpreted as described in |
| 56 | + RFC 2119. |
| 57 | +
|
| 58 | + The following are global requirements that apply to all methods: |
| 59 | + Any method MUST return CODE_OK on a successful operation. |
| 60 | + Any method MAY return NOT_IMPLEMENTED. |
| 61 | + Any method MAY return INTERNAL. |
| 62 | + Any method MAY return UNKNOWN. |
| 63 | + Any method MAY return UNAUTHENTICATED. |
| 64 | +
|
| 65 | + Provides an API for managing users. |
| 66 | + """ |
| 67 | + |
| 68 | + def GetTenant(self, request, context): |
| 69 | + """Gets the information about a Tenant by the tenant id. |
| 70 | + """ |
| 71 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 72 | + context.set_details('Method not implemented!') |
| 73 | + raise NotImplementedError('Method not implemented!') |
| 74 | + |
| 75 | + def GetTenantByClaim(self, request, context): |
| 76 | + """Gets the information about a Tenant based on a specified claim. |
| 77 | + """ |
| 78 | + context.set_code(grpc.StatusCode.UNIMPLEMENTED) |
| 79 | + context.set_details('Method not implemented!') |
| 80 | + raise NotImplementedError('Method not implemented!') |
| 81 | + |
| 82 | + |
| 83 | +def add_TenantAPIServicer_to_server(servicer, server): |
| 84 | + rpc_method_handlers = { |
| 85 | + 'GetTenant': grpc.unary_unary_rpc_method_handler( |
| 86 | + servicer.GetTenant, |
| 87 | + request_deserializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantRequest.FromString, |
| 88 | + response_serializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantResponse.SerializeToString, |
| 89 | + ), |
| 90 | + 'GetTenantByClaim': grpc.unary_unary_rpc_method_handler( |
| 91 | + servicer.GetTenantByClaim, |
| 92 | + request_deserializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantByClaimRequest.FromString, |
| 93 | + response_serializer=cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantByClaimResponse.SerializeToString, |
| 94 | + ), |
| 95 | + } |
| 96 | + generic_handler = grpc.method_handlers_generic_handler( |
| 97 | + 'cs3.identity.tenant.v1beta1.TenantAPI', rpc_method_handlers) |
| 98 | + server.add_generic_rpc_handlers((generic_handler,)) |
| 99 | + |
| 100 | + |
| 101 | + # This class is part of an EXPERIMENTAL API. |
| 102 | +class TenantAPI(object): |
| 103 | + """TenantProvider API. |
| 104 | +
|
| 105 | + The TenantProvider API is responsible for providing |
| 106 | + methods to retrieve information about Tenants. |
| 107 | +
|
| 108 | + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL |
| 109 | + NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and |
| 110 | + "OPTIONAL" in this document are to be interpreted as described in |
| 111 | + RFC 2119. |
| 112 | +
|
| 113 | + The following are global requirements that apply to all methods: |
| 114 | + Any method MUST return CODE_OK on a successful operation. |
| 115 | + Any method MAY return NOT_IMPLEMENTED. |
| 116 | + Any method MAY return INTERNAL. |
| 117 | + Any method MAY return UNKNOWN. |
| 118 | + Any method MAY return UNAUTHENTICATED. |
| 119 | +
|
| 120 | + Provides an API for managing users. |
| 121 | + """ |
| 122 | + |
| 123 | + @staticmethod |
| 124 | + def GetTenant(request, |
| 125 | + target, |
| 126 | + options=(), |
| 127 | + channel_credentials=None, |
| 128 | + call_credentials=None, |
| 129 | + insecure=False, |
| 130 | + compression=None, |
| 131 | + wait_for_ready=None, |
| 132 | + timeout=None, |
| 133 | + metadata=None): |
| 134 | + return grpc.experimental.unary_unary(request, target, '/cs3.identity.tenant.v1beta1.TenantAPI/GetTenant', |
| 135 | + cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantRequest.SerializeToString, |
| 136 | + cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantResponse.FromString, |
| 137 | + options, channel_credentials, |
| 138 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
| 139 | + |
| 140 | + @staticmethod |
| 141 | + def GetTenantByClaim(request, |
| 142 | + target, |
| 143 | + options=(), |
| 144 | + channel_credentials=None, |
| 145 | + call_credentials=None, |
| 146 | + insecure=False, |
| 147 | + compression=None, |
| 148 | + wait_for_ready=None, |
| 149 | + timeout=None, |
| 150 | + metadata=None): |
| 151 | + return grpc.experimental.unary_unary(request, target, '/cs3.identity.tenant.v1beta1.TenantAPI/GetTenantByClaim', |
| 152 | + cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantByClaimRequest.SerializeToString, |
| 153 | + cs3_dot_identity_dot_tenant_dot_v1beta1_dot_tenant__api__pb2.GetTenantByClaimResponse.FromString, |
| 154 | + options, channel_credentials, |
| 155 | + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) |
0 commit comments