# Copyright 2020 StrongDM Inc
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from . import approval_workflow_steps_pb2 as approval__workflow__steps__pb2


class ApprovalWorkflowStepsStub(object):
    """ApprovalWorkflowSteps link approval workflow steps to an ApprovalWorkflow
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/v1.ApprovalWorkflowSteps/Create',
                request_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepCreateRequest.SerializeToString,
                response_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepCreateResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/v1.ApprovalWorkflowSteps/Get',
                request_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepGetRequest.SerializeToString,
                response_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepGetResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/v1.ApprovalWorkflowSteps/Delete',
                request_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepDeleteRequest.SerializeToString,
                response_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepDeleteResponse.FromString,
                )
        self.List = channel.unary_unary(
                '/v1.ApprovalWorkflowSteps/List',
                request_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepListRequest.SerializeToString,
                response_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepListResponse.FromString,
                )


class ApprovalWorkflowStepsServicer(object):
    """ApprovalWorkflowSteps link approval workflow steps to an ApprovalWorkflow
    """

    def Create(self, request, context):
        """Deprecated: Create creates a new approval workflow step.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Deprecated: Get reads one approval workflow step by ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Deprecated: Delete deletes an existing approval workflow step.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """Deprecated: Lists existing approval workflow steps.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ApprovalWorkflowStepsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepCreateRequest.FromString,
                    response_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepCreateResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepGetRequest.FromString,
                    response_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepGetResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepDeleteRequest.FromString,
                    response_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepDeleteResponse.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=approval__workflow__steps__pb2.ApprovalWorkflowStepListRequest.FromString,
                    response_serializer=approval__workflow__steps__pb2.ApprovalWorkflowStepListResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'v1.ApprovalWorkflowSteps', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ApprovalWorkflowSteps(object):
    """ApprovalWorkflowSteps link approval workflow steps to an ApprovalWorkflow
    """

    @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, '/v1.ApprovalWorkflowSteps/Create',
            approval__workflow__steps__pb2.ApprovalWorkflowStepCreateRequest.SerializeToString,
            approval__workflow__steps__pb2.ApprovalWorkflowStepCreateResponse.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, '/v1.ApprovalWorkflowSteps/Get',
            approval__workflow__steps__pb2.ApprovalWorkflowStepGetRequest.SerializeToString,
            approval__workflow__steps__pb2.ApprovalWorkflowStepGetResponse.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, '/v1.ApprovalWorkflowSteps/Delete',
            approval__workflow__steps__pb2.ApprovalWorkflowStepDeleteRequest.SerializeToString,
            approval__workflow__steps__pb2.ApprovalWorkflowStepDeleteResponse.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, '/v1.ApprovalWorkflowSteps/List',
            approval__workflow__steps__pb2.ApprovalWorkflowStepListRequest.SerializeToString,
            approval__workflow__steps__pb2.ApprovalWorkflowStepListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
