# Copyright 2020 Google LLC. All Rights Reserved.
#
# 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!
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from googlecloudsdk.third_party.logging_v2.proto import logging_metrics_pb2 as googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2


class MetricsServiceV2Stub(object):
  """Service for configuring logs-based metrics.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.ListLogMetrics = channel.unary_unary(
        '/google.logging.v2.MetricsServiceV2/ListLogMetrics',
        request_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.SerializeToString,
        response_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.FromString,
        )
    self.GetLogMetric = channel.unary_unary(
        '/google.logging.v2.MetricsServiceV2/GetLogMetric',
        request_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.SerializeToString,
        response_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString,
        )
    self.CreateLogMetric = channel.unary_unary(
        '/google.logging.v2.MetricsServiceV2/CreateLogMetric',
        request_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.SerializeToString,
        response_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString,
        )
    self.UpdateLogMetric = channel.unary_unary(
        '/google.logging.v2.MetricsServiceV2/UpdateLogMetric',
        request_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.SerializeToString,
        response_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.FromString,
        )
    self.DeleteLogMetric = channel.unary_unary(
        '/google.logging.v2.MetricsServiceV2/DeleteLogMetric',
        request_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.SerializeToString,
        response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
        )


class MetricsServiceV2Servicer(object):
  """Service for configuring logs-based metrics.
  """

  def ListLogMetrics(self, request, context):
    """Lists logs-based metrics.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetLogMetric(self, request, context):
    """Gets a logs-based metric.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def CreateLogMetric(self, request, context):
    """Creates a logs-based metric.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateLogMetric(self, request, context):
    """Creates or updates a logs-based metric.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteLogMetric(self, request, context):
    """Deletes a logs-based metric.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_MetricsServiceV2Servicer_to_server(servicer, server):
  rpc_method_handlers = {
      'ListLogMetrics': grpc.unary_unary_rpc_method_handler(
          servicer.ListLogMetrics,
          request_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsRequest.FromString,
          response_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.ListLogMetricsResponse.SerializeToString,
      ),
      'GetLogMetric': grpc.unary_unary_rpc_method_handler(
          servicer.GetLogMetric,
          request_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.GetLogMetricRequest.FromString,
          response_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString,
      ),
      'CreateLogMetric': grpc.unary_unary_rpc_method_handler(
          servicer.CreateLogMetric,
          request_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.CreateLogMetricRequest.FromString,
          response_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString,
      ),
      'UpdateLogMetric': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateLogMetric,
          request_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.UpdateLogMetricRequest.FromString,
          response_serializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.LogMetric.SerializeToString,
      ),
      'DeleteLogMetric': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteLogMetric,
          request_deserializer=googlecloudsdk_dot_third__party_dot_logging__v2_dot_proto_dot_logging__metrics__pb2.DeleteLogMetricRequest.FromString,
          response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'google.logging.v2.MetricsServiceV2', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
