def add_TenantManagementServiceServicer_to_server()

in custos-client-sdks/custos-python-sdk/custos/server/integration/TenantManagementService_pb2_grpc.py [0:0]


def add_TenantManagementServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'createTenant': grpc.unary_unary_rpc_method_handler(
                    servicer.createTenant,
                    request_deserializer=TenantProfileService__pb2.Tenant.FromString,
                    response_serializer=TenantManagementService__pb2.CreateTenantResponse.SerializeToString,
            ),
            'getTenant': grpc.unary_unary_rpc_method_handler(
                    servicer.getTenant,
                    request_deserializer=TenantManagementService__pb2.GetTenantRequest.FromString,
                    response_serializer=TenantProfileService__pb2.Tenant.SerializeToString,
            ),
            'updateTenant': grpc.unary_unary_rpc_method_handler(
                    servicer.updateTenant,
                    request_deserializer=TenantManagementService__pb2.UpdateTenantRequest.FromString,
                    response_serializer=TenantProfileService__pb2.Tenant.SerializeToString,
            ),
            'deleteTenant': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteTenant,
                    request_deserializer=TenantManagementService__pb2.DeleteTenantRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'validateTenant': grpc.unary_unary_rpc_method_handler(
                    servicer.validateTenant,
                    request_deserializer=TenantManagementService__pb2.TenantValidationRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'addTenantRoles': grpc.unary_unary_rpc_method_handler(
                    servicer.addTenantRoles,
                    request_deserializer=IamAdminService__pb2.AddRolesRequest.FromString,
                    response_serializer=IamAdminService__pb2.AllRoles.SerializeToString,
            ),
            'getTenantRoles': grpc.unary_unary_rpc_method_handler(
                    servicer.getTenantRoles,
                    request_deserializer=IamAdminService__pb2.GetRolesRequest.FromString,
                    response_serializer=IamAdminService__pb2.AllRoles.SerializeToString,
            ),
            'deleteRole': grpc.unary_unary_rpc_method_handler(
                    servicer.deleteRole,
                    request_deserializer=IamAdminService__pb2.DeleteRoleRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'addProtocolMapper': grpc.unary_unary_rpc_method_handler(
                    servicer.addProtocolMapper,
                    request_deserializer=IamAdminService__pb2.AddProtocolMapperRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'configureEventPersistence': grpc.unary_unary_rpc_method_handler(
                    servicer.configureEventPersistence,
                    request_deserializer=IamAdminService__pb2.EventPersistenceRequest.FromString,
                    response_serializer=IamAdminService__pb2.OperationStatus.SerializeToString,
            ),
            'enableMessaging': grpc.unary_unary_rpc_method_handler(
                    servicer.enableMessaging,
                    request_deserializer=MessagingService__pb2.MessageEnablingRequest.FromString,
                    response_serializer=MessagingService__pb2.MessageEnablingResponse.SerializeToString,
            ),
            'updateTenantStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.updateTenantStatus,
                    request_deserializer=TenantProfileService__pb2.UpdateStatusRequest.FromString,
                    response_serializer=TenantProfileService__pb2.UpdateStatusResponse.SerializeToString,
            ),
            'getAllTenants': grpc.unary_unary_rpc_method_handler(
                    servicer.getAllTenants,
                    request_deserializer=TenantProfileService__pb2.GetTenantsRequest.FromString,
                    response_serializer=TenantProfileService__pb2.GetAllTenantsResponse.SerializeToString,
            ),
            'getChildTenants': grpc.unary_unary_rpc_method_handler(
                    servicer.getChildTenants,
                    request_deserializer=TenantProfileService__pb2.GetTenantsRequest.FromString,
                    response_serializer=TenantProfileService__pb2.GetAllTenantsResponse.SerializeToString,
            ),
            'getAllTenantsForUser': grpc.unary_unary_rpc_method_handler(
                    servicer.getAllTenantsForUser,
                    request_deserializer=TenantProfileService__pb2.GetAllTenantsForUserRequest.FromString,
                    response_serializer=TenantProfileService__pb2.GetAllTenantsForUserResponse.SerializeToString,
            ),
            'getTenantStatusUpdateAuditTrail': grpc.unary_unary_rpc_method_handler(
                    servicer.getTenantStatusUpdateAuditTrail,
                    request_deserializer=TenantProfileService__pb2.GetAuditTrailRequest.FromString,
                    response_serializer=TenantProfileService__pb2.GetStatusUpdateAuditTrailResponse.SerializeToString,
            ),
            'getTenantAttributeUpdateAuditTrail': grpc.unary_unary_rpc_method_handler(
                    servicer.getTenantAttributeUpdateAuditTrail,
                    request_deserializer=TenantProfileService__pb2.GetAuditTrailRequest.FromString,
                    response_serializer=TenantProfileService__pb2.GetAttributeUpdateAuditTrailResponse.SerializeToString,
            ),
            'addToCache': grpc.unary_unary_rpc_method_handler(
                    servicer.addToCache,
                    request_deserializer=FederatedAuthenticationService__pb2.CacheManipulationRequest.FromString,
                    response_serializer=FederatedAuthenticationService__pb2.Status.SerializeToString,
            ),
            'removeFromCache': grpc.unary_unary_rpc_method_handler(
                    servicer.removeFromCache,
                    request_deserializer=FederatedAuthenticationService__pb2.CacheManipulationRequest.FromString,
                    response_serializer=FederatedAuthenticationService__pb2.Status.SerializeToString,
            ),
            'getFromCache': grpc.unary_unary_rpc_method_handler(
                    servicer.getFromCache,
                    request_deserializer=FederatedAuthenticationService__pb2.CacheManipulationRequest.FromString,
                    response_serializer=FederatedAuthenticationService__pb2.GetInstitutionsResponse.SerializeToString,
            ),
            'getInstitutions': grpc.unary_unary_rpc_method_handler(
                    servicer.getInstitutions,
                    request_deserializer=FederatedAuthenticationService__pb2.CacheManipulationRequest.FromString,
                    response_serializer=FederatedAuthenticationService__pb2.GetInstitutionsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'org.apache.custos.tenant.management.service.TenantManagementService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))