# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
from spaceone.api.inventory.v1 import cloud_service_type_pb2 as spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2


class CloudServiceTypeStub(object):
    """Missing associated documentation comment in .proto file."""

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.create = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/create',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CreateCloudServiceTypeRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.FromString,
                )
        self.update = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/update',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.UpdateCloudServiceTypeRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.FromString,
                )
        self.delete = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/delete',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.get = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/get',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.GetCloudServiceTypeRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.FromString,
                )
        self.list = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/list',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypesInfo.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/stat',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )
        self.allow_delete_stat = channel.unary_unary(
                '/spaceone.api.inventory.v1.CloudServiceType/allow_delete_stat',
                request_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


class CloudServiceTypeServicer(object):
    """Missing associated documentation comment in .proto file."""

    def create(self, request, context):
        """
        desc: Creates a new CloudServiceType. You must specify the `name`, `provider`, and `group` parameters to create a CloudServiceType. One or several CloudServiceTypes exist in a specific `group`, and each CloudServiceType is identified by the `name` parameter.
        request_example: >-
        {
        "name": "API-TEST",
        "provider": "aws",
        "group": "APIGateway",
        "service_code": "AmazonApiGateway",
        "is_primary": true,
        "is_major": true,
        "resource_type": "inventory.CloudService",
        "metadata": {},
        "labels": [
        "Networking"
        ],
        "tags": {
        "a": "b"
        }
        }
        response_example: >-
        {
        "cloud_service_type_id": "cloud-svc-type-27dd73ac89f8",
        "name": "API-TEST",
        "provider": "aws",
        "group": "APIGateway",
        "cloud_service_type_key": "aws.APIGateway.API-TEST",
        "service_code": "AmazonApiGateway",
        "is_primary": true,
        "is_major": true,
        "resource_type": "inventory.CloudService",
        "metadata": {},
        "tags": {
        "a": "b"
        },
        "labels": [
        "Networking"
        ],
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-06-22T01:38:16.301Z",
        "updated_at": "2022-06-22T01:38:16.301Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def update(self, request, context):
        """
        desc: Updates a specific CloudServiceType. You can make changes in CloudServiceType settings, except for `name`, `provider` and `group`. In particular, you can set the CloudServiceType's priority in a `group`.
        request_example: >-
        {
        "cloud_service_type_id": "cloud-svc-type-27dd73ac89f8",
        "service_code": "AmazonApi",
        "metadata": {},
        "labels": [
        "Networking2"
        ],
        "tags": {
        "b": "c"
        }
        }
        response_example: >-
        {
        "cloud_service_type_id": "cloud-svc-type-27dd73ac89f8",
        "name": "API-TEST",
        "provider": "aws",
        "group": "APIGateway",
        "cloud_service_type_key": "aws.APIGateway.API-TEST",
        "service_code": "AmazonApi",
        "is_primary": true,
        "is_major": true,
        "resource_type": "inventory.CloudService",
        "metadata": {},
        "tags": {
        "b": "c"
        },
        "labels": [
        "Networking2"
        ],
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-06-22T01:38:16.301Z",
        "updated_at": "2022-06-22T02:12:11.184Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def delete(self, request, context):
        """
        desc: Deletes a specific CloudServiceType. You must specify the `cloud_service_type_id` of the CloudServiceType to delete.
        request_example: >-
        {
        "cloud_service_type_id": "cloud-svc-type-27dd73ac89f8"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get(self, request, context):
        """
        desc: Gets a specific CloudServiceType. Prints detailed information about the CloudServiceType.
        request_example: >-
        {
        "cloud_service_type_id": "cloud-svc-type-27dd73ac89f8"
        }
        response_example: >-
        {
        "cloud_service_type_id": "cloud-svc-type-27dd73ac89f8",
        "name": "API-TEST",
        "provider": "aws",
        "group": "APIGateway",
        "cloud_service_type_key": "aws.APIGateway.API-TEST",
        "service_code": "AmazonApi",
        "is_primary": true,
        "is_major": true,
        "resource_type": "inventory.CloudService",
        "metadata": {},
        "tags": {
        "b": "c"
        },
        "labels": [
        "Networking2"
        ],
        "domain_id": "domain-58010aa2e451",
        "created_at": "2022-06-22T01:38:16.301Z",
        "updated_at": "2022-06-22T02:12:11.184Z"
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def list(self, request, context):
        """
        desc: Gets a list of all CloudServiceTypes. You can use a query to get a filtered list of CloudServiceTypes.
        request_example: >-
        {
        "query": {
        "filter": [
        {
        "key": "provider",
        "value": "aws",
        "operator": "eq"
        }
        ]
        }
        }
        response_example: >-
        {
        "results": [
        {
        "cloud_service_type_id": "cloud-svc-type-7e1c113b39ff",
        "name": "API",
        "provider": "aws",
        "group": "APIGateway",
        "cloud_service_type_key": "aws.APIGateway.API",
        "service_code": "AmazonApiGateway",
        "is_primary": true,
        "is_major": true,
        "resource_type": "inventory.CloudService",
        "metadata": {
        },
        "tags": {
        "spaceone:icon": "https://spaceone.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/aws/Amazon-API-Gateway.svg"
        },
        "labels": [
        "Networking"
        ],
        "domain_id": "domain-58010aa2e451",
        "created_at": "2021-06-03T02:29:32.690Z",
        "updated_at": "2022-06-22T00:04:45.477Z"
        },
        {
        "cloud_service_type_id": "cloud-svc-type-64a0de601371",
        "name": "Certificate",
        "provider": "aws",
        "group": "CertificateManager",
        "cloud_service_type_key": "aws.CertificateManager.Certificate",
        "service_code": "AWSCertificateManager",
        "is_primary": true,
        "resource_type": "inventory.CloudService",
        "metadata": {
        },
        "tags": {
        "spaceone:icon": "https://spaceone.s3.ap-northeast-2.amazonaws.com/console-assets/icons/cloud-services/aws/AWS-Certificate-Manager.svg"
        },
        "labels": [
        "Security"
        ],
        "domain_id": "domain-58010aa2e451",
        "created_at": "2021-06-03T02:29:53.052Z",
        "updated_at": "2022-06-22T00:05:41.252Z"
        }
        ],
        "total_count": 2
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stat(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def allow_delete_stat(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CloudServiceTypeServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create': grpc.unary_unary_rpc_method_handler(
                    servicer.create,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CreateCloudServiceTypeRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.SerializeToString,
            ),
            'update': grpc.unary_unary_rpc_method_handler(
                    servicer.update,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.UpdateCloudServiceTypeRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.GetCloudServiceTypeRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.SerializeToString,
            ),
            'list': grpc.unary_unary_rpc_method_handler(
                    servicer.list,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypesInfo.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
            'allow_delete_stat': grpc.unary_unary_rpc_method_handler(
                    servicer.allow_delete_stat,
                    request_deserializer=spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.inventory.v1.CloudServiceType', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class CloudServiceType(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def create(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/create',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CreateCloudServiceTypeRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/update',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.UpdateCloudServiceTypeRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/delete',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/get',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.GetCloudServiceTypeRequest.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def list(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/list',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeQuery.SerializeToString,
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stat(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/stat',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def allow_delete_stat(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/spaceone.api.inventory.v1.CloudServiceType/allow_delete_stat',
            spaceone_dot_api_dot_inventory_dot_v1_dot_cloud__service__type__pb2.CloudServiceTypeStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
