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

from google.cloud.bigquery_datatransfer_v1.proto import (
    datatransfer_pb2 as google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2,
)
from google.cloud.bigquery_datatransfer_v1.proto import (
    transfer_pb2 as google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class DataTransferServiceStub(object):
    """The Google BigQuery Data Transfer Service API enables BigQuery users to
  configure the transfer of their data from other Google Products into
  BigQuery. This service contains methods that are end user exposed. It backs
  up the frontend.
  """

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

    Args:
      channel: A grpc.Channel.
    """
        self.GetDataSource = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/GetDataSource",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.GetDataSourceRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.DataSource.FromString,
        )
        self.ListDataSources = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListDataSources",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListDataSourcesRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListDataSourcesResponse.FromString,
        )
        self.CreateTransferConfig = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/CreateTransferConfig",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.CreateTransferConfigRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2.TransferConfig.FromString,
        )
        self.UpdateTransferConfig = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/UpdateTransferConfig",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.UpdateTransferConfigRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2.TransferConfig.FromString,
        )
        self.DeleteTransferConfig = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferConfig",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.DeleteTransferConfigRequest.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
        self.GetTransferConfig = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/GetTransferConfig",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.GetTransferConfigRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2.TransferConfig.FromString,
        )
        self.ListTransferConfigs = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferConfigs",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListTransferConfigsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListTransferConfigsResponse.FromString,
        )
        self.ScheduleTransferRuns = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/ScheduleTransferRuns",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ScheduleTransferRunsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ScheduleTransferRunsResponse.FromString,
        )
        self.StartManualTransferRuns = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/StartManualTransferRuns",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.StartManualTransferRunsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.StartManualTransferRunsResponse.FromString,
        )
        self.GetTransferRun = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/GetTransferRun",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.GetTransferRunRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2.TransferRun.FromString,
        )
        self.DeleteTransferRun = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferRun",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.DeleteTransferRunRequest.SerializeToString,
            response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )
        self.ListTransferRuns = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferRuns",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListTransferRunsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListTransferRunsResponse.FromString,
        )
        self.ListTransferLogs = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferLogs",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListTransferLogsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListTransferLogsResponse.FromString,
        )
        self.CheckValidCreds = channel.unary_unary(
            "/google.cloud.bigquery.datatransfer.v1.DataTransferService/CheckValidCreds",
            request_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.CheckValidCredsRequest.SerializeToString,
            response_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.CheckValidCredsResponse.FromString,
        )


class DataTransferServiceServicer(object):
    """The Google BigQuery Data Transfer Service API enables BigQuery users to
  configure the transfer of their data from other Google Products into
  BigQuery. This service contains methods that are end user exposed. It backs
  up the frontend.
  """

    def GetDataSource(self, request, context):
        """Retrieves a supported data source and returns its settings,
    which can be used for UI rendering.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListDataSources(self, request, context):
        """Lists supported data sources and returns their settings,
    which can be used for UI rendering.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CreateTransferConfig(self, request, context):
        """Creates a new data transfer configuration.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def UpdateTransferConfig(self, request, context):
        """Updates a data transfer configuration.
    All fields must be set, even if they are not updated.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteTransferConfig(self, request, context):
        """Deletes a data transfer configuration,
    including any associated transfer runs and logs.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetTransferConfig(self, request, context):
        """Returns information about a data transfer config.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListTransferConfigs(self, request, context):
        """Returns information about all data transfers in the project.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ScheduleTransferRuns(self, request, context):
        """Creates transfer runs for a time range [start_time, end_time].
    For each date - or whatever granularity the data source supports - in the
    range, one transfer run is created.
    Note that runs are created per UTC time in the time range.
    DEPRECATED: use StartManualTransferRuns instead.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def StartManualTransferRuns(self, request, context):
        """Start manual transfer runs to be executed now with schedule_time equal to
    current time. The transfer runs can be created for a time range where the
    run_time is between start_time (inclusive) and end_time (exclusive), or for
    a specific run_time.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetTransferRun(self, request, context):
        """Returns information about the particular transfer run.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def DeleteTransferRun(self, request, context):
        """Deletes the specified transfer run.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListTransferRuns(self, request, context):
        """Returns information about running and completed jobs.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListTransferLogs(self, request, context):
        """Returns user facing log messages for the data transfer run.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def CheckValidCreds(self, request, context):
        """Returns true if valid credentials exist for the given data source and
    requesting user.
    Some data sources doesn't support service account, so we need to talk to
    them on behalf of the end user. This API just checks whether we have OAuth
    token for the particular user, which is a pre-requisite before user can
    create a transfer config.
    """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_DataTransferServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetDataSource": grpc.unary_unary_rpc_method_handler(
            servicer.GetDataSource,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.GetDataSourceRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.DataSource.SerializeToString,
        ),
        "ListDataSources": grpc.unary_unary_rpc_method_handler(
            servicer.ListDataSources,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListDataSourcesRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.ListDataSourcesResponse.SerializeToString,
        ),
        "CreateTransferConfig": grpc.unary_unary_rpc_method_handler(
            servicer.CreateTransferConfig,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.CreateTransferConfigRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2.TransferConfig.SerializeToString,
        ),
        "UpdateTransferConfig": grpc.unary_unary_rpc_method_handler(
            servicer.UpdateTransferConfig,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.UpdateTransferConfigRequest.FromString,
            response_serializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_transfer__pb2.TransferConfig.SerializeToString,
        ),
        "DeleteTransferConfig": grpc.unary_unary_rpc_method_handler(
            servicer.DeleteTransferConfig,
            request_deserializer=google_dot_cloud_dot_bigquery_dot_datatransfer__v1_dot_proto_dot_datatransfer__pb2.DeleteTransferConfigRequest.FromString,
            response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
        ),