# 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.provisioning.v1 import stack_resource_pb2 as spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.create_stack_resource = channel.unary_unary(
                '/spaceone.api.provisioning.v1.StackResource/create_stack_resource',
                request_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.CreateStackResourceRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.FromString,
                )
        self.get_stack_resources = channel.unary_unary(
                '/spaceone.api.provisioning.v1.StackResource/get_stack_resources',
                request_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceQuery.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourcesInfo.FromString,
                )
        self.get_stack_resource = channel.unary_unary(
                '/spaceone.api.provisioning.v1.StackResource/get_stack_resource',
                request_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.GetStackResourceRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.FromString,
                )
        self.update_stack_resource = channel.unary_unary(
                '/spaceone.api.provisioning.v1.StackResource/update_stack_resource',
                request_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.UpdateStackResourceRequest.SerializeToString,
                response_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.FromString,
                )
        self.delete_stack_resource = channel.unary_unary(
                '/spaceone.api.provisioning.v1.StackResource/delete_stack_resource',
                request_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.stat = channel.unary_unary(
                '/spaceone.api.provisioning.v1.StackResource/stat',
                request_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceStatQuery.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_struct__pb2.Struct.FromString,
                )


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

    def create_stack_resource(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 get_stack_resources(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 get_stack_resource(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 update_stack_resource(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 delete_stack_resource(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 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_StackResourceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'create_stack_resource': grpc.unary_unary_rpc_method_handler(
                    servicer.create_stack_resource,
                    request_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.CreateStackResourceRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.SerializeToString,
            ),
            'get_stack_resources': grpc.unary_unary_rpc_method_handler(
                    servicer.get_stack_resources,
                    request_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceQuery.FromString,
                    response_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourcesInfo.SerializeToString,
            ),
            'get_stack_resource': grpc.unary_unary_rpc_method_handler(
                    servicer.get_stack_resource,
                    request_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.GetStackResourceRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.SerializeToString,
            ),
            'update_stack_resource': grpc.unary_unary_rpc_method_handler(
                    servicer.update_stack_resource,
                    request_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.UpdateStackResourceRequest.FromString,
                    response_serializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.SerializeToString,
            ),
            'delete_stack_resource': grpc.unary_unary_rpc_method_handler(
                    servicer.delete_stack_resource,
                    request_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'stat': grpc.unary_unary_rpc_method_handler(
                    servicer.stat,
                    request_deserializer=spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceStatQuery.FromString,
                    response_serializer=google_dot_protobuf_dot_struct__pb2.Struct.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'spaceone.api.provisioning.v1.StackResource', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def create_stack_resource(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.provisioning.v1.StackResource/create_stack_resource',
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.CreateStackResourceRequest.SerializeToString,
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get_stack_resources(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.provisioning.v1.StackResource/get_stack_resources',
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceQuery.SerializeToString,
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourcesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def get_stack_resource(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.provisioning.v1.StackResource/get_stack_resource',
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.GetStackResourceRequest.SerializeToString,
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def update_stack_resource(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.provisioning.v1.StackResource/update_stack_resource',
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.UpdateStackResourceRequest.SerializeToString,
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def delete_stack_resource(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.provisioning.v1.StackResource/delete_stack_resource',
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.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.provisioning.v1.StackResource/stat',
            spaceone_dot_api_dot_provisioning_dot_v1_dot_stack__resource__pb2.StackResourceStatQuery.SerializeToString,
            google_dot_protobuf_dot_struct__pb2.Struct.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
