# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from google.cloud.datacatalog_v1beta1.proto import (
    policytagmanagerserialization_pb2 as google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2,
)


class PolicyTagManagerSerializationStub(object):
    """Policy tag manager serialization API service allows clients to manipulate
  their taxonomies and policy tags data with serialized format.
  """

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

    Args:
      channel: A grpc.Channel.
    """
        self.ImportTaxonomies = channel.unary_unary(
            "/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ImportTaxonomies",
            request_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesResponse.FromString,
        )
        self.ExportTaxonomies = channel.unary_unary(
            "/google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization/ExportTaxonomies",
            request_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesResponse.FromString,
        )


class PolicyTagManagerSerializationServicer(object):
    """Policy tag manager serialization API service allows clients to manipulate
  their taxonomies and policy tags data with serialized format.
  """

    def ImportTaxonomies(self, request, context):
        """Imports all taxonomies and their policy tags to a project as new
    taxonomies.

    This method provides a bulk taxonomy / policy tag creation using nested
    proto structure.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ExportTaxonomies(self, request, context):
        """Exports all taxonomies and their policy tags in a project.

    This method generates SerializedTaxonomy protos with nested policy tags
    that can be used as an input for future ImportTaxonomies calls.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_PolicyTagManagerSerializationServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "ImportTaxonomies": grpc.unary_unary_rpc_method_handler(
            servicer.ImportTaxonomies,
            request_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesRequest.FromString,
            response_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ImportTaxonomiesResponse.SerializeToString,
        ),
        "ExportTaxonomies": grpc.unary_unary_rpc_method_handler(
            servicer.ExportTaxonomies,
            request_deserializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesRequest.FromString,
            response_serializer=google_dot_cloud_dot_datacatalog__v1beta1_dot_proto_dot_policytagmanagerserialization__pb2.ExportTaxonomiesResponse.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization",
        rpc_method_handlers,
    )
    server.add_generic_rpc_handlers((generic_handler,))
