// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/monitoring/v3/metric_service.proto
// Original file comments:
// Copyright 2016 Google 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.
//
#region Designer generated code

using System;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;

namespace Google.Monitoring.V3 {
  /// <summary>
  ///  Manages metric descriptors, monitored resource descriptors, and
  ///  time series data.
  /// </summary>
  public static class MetricService
  {
    static readonly string __ServiceName = "google.monitoring.v3.MetricService";

    static readonly Marshaller<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest> __Marshaller_ListMonitoredResourceDescriptorsRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse> __Marshaller_ListMonitoredResourceDescriptorsResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest> __Marshaller_GetMonitoredResourceDescriptorRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Api.MonitoredResourceDescriptor> __Marshaller_MonitoredResourceDescriptor = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Api.MonitoredResourceDescriptor.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.ListMetricDescriptorsRequest> __Marshaller_ListMetricDescriptorsRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.ListMetricDescriptorsRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.ListMetricDescriptorsResponse> __Marshaller_ListMetricDescriptorsResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.ListMetricDescriptorsResponse.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.GetMetricDescriptorRequest> __Marshaller_GetMetricDescriptorRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.GetMetricDescriptorRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Api.MetricDescriptor> __Marshaller_MetricDescriptor = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Api.MetricDescriptor.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.CreateMetricDescriptorRequest> __Marshaller_CreateMetricDescriptorRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.CreateMetricDescriptorRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.DeleteMetricDescriptorRequest> __Marshaller_DeleteMetricDescriptorRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.DeleteMetricDescriptorRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Protobuf.WellKnownTypes.Empty> __Marshaller_Empty = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.Empty.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.ListTimeSeriesRequest> __Marshaller_ListTimeSeriesRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.ListTimeSeriesRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.ListTimeSeriesResponse> __Marshaller_ListTimeSeriesResponse = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.ListTimeSeriesResponse.Parser.ParseFrom);
    static readonly Marshaller<global::Google.Monitoring.V3.CreateTimeSeriesRequest> __Marshaller_CreateTimeSeriesRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Monitoring.V3.CreateTimeSeriesRequest.Parser.ParseFrom);

    static readonly Method<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest, global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse> __Method_ListMonitoredResourceDescriptors = new Method<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest, global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse>(
        MethodType.Unary,
        __ServiceName,
        "ListMonitoredResourceDescriptors",
        __Marshaller_ListMonitoredResourceDescriptorsRequest,
        __Marshaller_ListMonitoredResourceDescriptorsResponse);

    static readonly Method<global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest, global::Google.Api.MonitoredResourceDescriptor> __Method_GetMonitoredResourceDescriptor = new Method<global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest, global::Google.Api.MonitoredResourceDescriptor>(
        MethodType.Unary,
        __ServiceName,
        "GetMonitoredResourceDescriptor",
        __Marshaller_GetMonitoredResourceDescriptorRequest,
        __Marshaller_MonitoredResourceDescriptor);

    static readonly Method<global::Google.Monitoring.V3.ListMetricDescriptorsRequest, global::Google.Monitoring.V3.ListMetricDescriptorsResponse> __Method_ListMetricDescriptors = new Method<global::Google.Monitoring.V3.ListMetricDescriptorsRequest, global::Google.Monitoring.V3.ListMetricDescriptorsResponse>(
        MethodType.Unary,
        __ServiceName,
        "ListMetricDescriptors",
        __Marshaller_ListMetricDescriptorsRequest,
        __Marshaller_ListMetricDescriptorsResponse);

    static readonly Method<global::Google.Monitoring.V3.GetMetricDescriptorRequest, global::Google.Api.MetricDescriptor> __Method_GetMetricDescriptor = new Method<global::Google.Monitoring.V3.GetMetricDescriptorRequest, global::Google.Api.MetricDescriptor>(
        MethodType.Unary,
        __ServiceName,
        "GetMetricDescriptor",
        __Marshaller_GetMetricDescriptorRequest,
        __Marshaller_MetricDescriptor);

    static readonly Method<global::Google.Monitoring.V3.CreateMetricDescriptorRequest, global::Google.Api.MetricDescriptor> __Method_CreateMetricDescriptor = new Method<global::Google.Monitoring.V3.CreateMetricDescriptorRequest, global::Google.Api.MetricDescriptor>(
        MethodType.Unary,
        __ServiceName,
        "CreateMetricDescriptor",
        __Marshaller_CreateMetricDescriptorRequest,
        __Marshaller_MetricDescriptor);

    static readonly Method<global::Google.Monitoring.V3.DeleteMetricDescriptorRequest, global::Google.Protobuf.WellKnownTypes.Empty> __Method_DeleteMetricDescriptor = new Method<global::Google.Monitoring.V3.DeleteMetricDescriptorRequest, global::Google.Protobuf.WellKnownTypes.Empty>(
        MethodType.Unary,
        __ServiceName,
        "DeleteMetricDescriptor",
        __Marshaller_DeleteMetricDescriptorRequest,
        __Marshaller_Empty);

    static readonly Method<global::Google.Monitoring.V3.ListTimeSeriesRequest, global::Google.Monitoring.V3.ListTimeSeriesResponse> __Method_ListTimeSeries = new Method<global::Google.Monitoring.V3.ListTimeSeriesRequest, global::Google.Monitoring.V3.ListTimeSeriesResponse>(
        MethodType.Unary,
        __ServiceName,
        "ListTimeSeries",
        __Marshaller_ListTimeSeriesRequest,
        __Marshaller_ListTimeSeriesResponse);

    static readonly Method<global::Google.Monitoring.V3.CreateTimeSeriesRequest, global::Google.Protobuf.WellKnownTypes.Empty> __Method_CreateTimeSeries = new Method<global::Google.Monitoring.V3.CreateTimeSeriesRequest, global::Google.Protobuf.WellKnownTypes.Empty>(
        MethodType.Unary,
        __ServiceName,
        "CreateTimeSeries",
        __Marshaller_CreateTimeSeriesRequest,
        __Marshaller_Empty);

    /// <summary>Service descriptor</summary>
    public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
    {
      get { return global::Google.Monitoring.V3.MetricServiceReflection.Descriptor.Services[0]; }
    }

    /// <summary>Base class for server-side implementations of MetricService</summary>
    public abstract class MetricServiceBase
    {
      /// <summary>
      ///  Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse> ListMonitoredResourceDescriptors(global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Api.MonitoredResourceDescriptor> GetMonitoredResourceDescriptor(global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Monitoring.V3.ListMetricDescriptorsResponse> ListMetricDescriptors(global::Google.Monitoring.V3.ListMetricDescriptorsRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Gets a single metric descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Api.MetricDescriptor> GetMetricDescriptor(global::Google.Monitoring.V3.GetMetricDescriptorRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Creates a new metric descriptor.
      ///  User-created metric descriptors define
      ///  [custom metrics](/monitoring/custom-metrics).
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Api.MetricDescriptor> CreateMetricDescriptor(global::Google.Monitoring.V3.CreateMetricDescriptorRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Deletes a metric descriptor. Only user-created
      ///  [custom metrics](/monitoring/custom-metrics) can be deleted.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> DeleteMetricDescriptor(global::Google.Monitoring.V3.DeleteMetricDescriptorRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Lists time series that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Monitoring.V3.ListTimeSeriesResponse> ListTimeSeries(global::Google.Monitoring.V3.ListTimeSeriesRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

      /// <summary>
      ///  Creates or adds data to one or more time series.
      ///  The response is empty if all time series in the request were written.
      ///  If any time series could not be written, a corresponding failure message is
      ///  included in the error response.
      /// </summary>
      public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Empty> CreateTimeSeries(global::Google.Monitoring.V3.CreateTimeSeriesRequest request, ServerCallContext context)
      {
        throw new RpcException(new Status(StatusCode.Unimplemented, ""));
      }

    }

    /// <summary>Client for MetricService</summary>
    public class MetricServiceClient : ClientBase<MetricServiceClient>
    {
      /// <summary>Creates a new client for MetricService</summary>
      /// <param name="channel">The channel to use to make remote calls.</param>
      public MetricServiceClient(Channel channel) : base(channel)
      {
      }
      /// <summary>Creates a new client for MetricService that uses a custom <c>CallInvoker</c>.</summary>
      /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
      public MetricServiceClient(CallInvoker callInvoker) : base(callInvoker)
      {
      }
      /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
      protected MetricServiceClient() : base()
      {
      }
      /// <summary>Protected constructor to allow creation of configured clients.</summary>
      /// <param name="configuration">The client configuration.</param>
      protected MetricServiceClient(ClientBaseConfiguration configuration) : base(configuration)
      {
      }

      /// <summary>
      ///  Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse ListMonitoredResourceDescriptors(global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return ListMonitoredResourceDescriptors(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse ListMonitoredResourceDescriptors(global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_ListMonitoredResourceDescriptors, null, options, request);
      }
      /// <summary>
      ///  Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse> ListMonitoredResourceDescriptorsAsync(global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return ListMonitoredResourceDescriptorsAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Lists monitored resource descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsResponse> ListMonitoredResourceDescriptorsAsync(global::Google.Monitoring.V3.ListMonitoredResourceDescriptorsRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_ListMonitoredResourceDescriptors, null, options, request);
      }
      /// <summary>
      ///  Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Api.MonitoredResourceDescriptor GetMonitoredResourceDescriptor(global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return GetMonitoredResourceDescriptor(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Api.MonitoredResourceDescriptor GetMonitoredResourceDescriptor(global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_GetMonitoredResourceDescriptor, null, options, request);
      }
      /// <summary>
      ///  Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Api.MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return GetMonitoredResourceDescriptorAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Gets a single monitored resource descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Api.MonitoredResourceDescriptor> GetMonitoredResourceDescriptorAsync(global::Google.Monitoring.V3.GetMonitoredResourceDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_GetMonitoredResourceDescriptor, null, options, request);
      }
      /// <summary>
      ///  Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Monitoring.V3.ListMetricDescriptorsResponse ListMetricDescriptors(global::Google.Monitoring.V3.ListMetricDescriptorsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return ListMetricDescriptors(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Monitoring.V3.ListMetricDescriptorsResponse ListMetricDescriptors(global::Google.Monitoring.V3.ListMetricDescriptorsRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_ListMetricDescriptors, null, options, request);
      }
      /// <summary>
      ///  Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Monitoring.V3.ListMetricDescriptorsResponse> ListMetricDescriptorsAsync(global::Google.Monitoring.V3.ListMetricDescriptorsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return ListMetricDescriptorsAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Lists metric descriptors that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Monitoring.V3.ListMetricDescriptorsResponse> ListMetricDescriptorsAsync(global::Google.Monitoring.V3.ListMetricDescriptorsRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_ListMetricDescriptors, null, options, request);
      }
      /// <summary>
      ///  Gets a single metric descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Api.MetricDescriptor GetMetricDescriptor(global::Google.Monitoring.V3.GetMetricDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return GetMetricDescriptor(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Gets a single metric descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Api.MetricDescriptor GetMetricDescriptor(global::Google.Monitoring.V3.GetMetricDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_GetMetricDescriptor, null, options, request);
      }
      /// <summary>
      ///  Gets a single metric descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Api.MetricDescriptor> GetMetricDescriptorAsync(global::Google.Monitoring.V3.GetMetricDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return GetMetricDescriptorAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Gets a single metric descriptor. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Api.MetricDescriptor> GetMetricDescriptorAsync(global::Google.Monitoring.V3.GetMetricDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_GetMetricDescriptor, null, options, request);
      }
      /// <summary>
      ///  Creates a new metric descriptor.
      ///  User-created metric descriptors define
      ///  [custom metrics](/monitoring/custom-metrics).
      /// </summary>
      public virtual global::Google.Api.MetricDescriptor CreateMetricDescriptor(global::Google.Monitoring.V3.CreateMetricDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return CreateMetricDescriptor(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Creates a new metric descriptor.
      ///  User-created metric descriptors define
      ///  [custom metrics](/monitoring/custom-metrics).
      /// </summary>
      public virtual global::Google.Api.MetricDescriptor CreateMetricDescriptor(global::Google.Monitoring.V3.CreateMetricDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_CreateMetricDescriptor, null, options, request);
      }
      /// <summary>
      ///  Creates a new metric descriptor.
      ///  User-created metric descriptors define
      ///  [custom metrics](/monitoring/custom-metrics).
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Api.MetricDescriptor> CreateMetricDescriptorAsync(global::Google.Monitoring.V3.CreateMetricDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return CreateMetricDescriptorAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Creates a new metric descriptor.
      ///  User-created metric descriptors define
      ///  [custom metrics](/monitoring/custom-metrics).
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Api.MetricDescriptor> CreateMetricDescriptorAsync(global::Google.Monitoring.V3.CreateMetricDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_CreateMetricDescriptor, null, options, request);
      }
      /// <summary>
      ///  Deletes a metric descriptor. Only user-created
      ///  [custom metrics](/monitoring/custom-metrics) can be deleted.
      /// </summary>
      public virtual global::Google.Protobuf.WellKnownTypes.Empty DeleteMetricDescriptor(global::Google.Monitoring.V3.DeleteMetricDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return DeleteMetricDescriptor(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Deletes a metric descriptor. Only user-created
      ///  [custom metrics](/monitoring/custom-metrics) can be deleted.
      /// </summary>
      public virtual global::Google.Protobuf.WellKnownTypes.Empty DeleteMetricDescriptor(global::Google.Monitoring.V3.DeleteMetricDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_DeleteMetricDescriptor, null, options, request);
      }
      /// <summary>
      ///  Deletes a metric descriptor. Only user-created
      ///  [custom metrics](/monitoring/custom-metrics) can be deleted.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> DeleteMetricDescriptorAsync(global::Google.Monitoring.V3.DeleteMetricDescriptorRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return DeleteMetricDescriptorAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Deletes a metric descriptor. Only user-created
      ///  [custom metrics](/monitoring/custom-metrics) can be deleted.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> DeleteMetricDescriptorAsync(global::Google.Monitoring.V3.DeleteMetricDescriptorRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_DeleteMetricDescriptor, null, options, request);
      }
      /// <summary>
      ///  Lists time series that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Monitoring.V3.ListTimeSeriesResponse ListTimeSeries(global::Google.Monitoring.V3.ListTimeSeriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return ListTimeSeries(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Lists time series that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual global::Google.Monitoring.V3.ListTimeSeriesResponse ListTimeSeries(global::Google.Monitoring.V3.ListTimeSeriesRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_ListTimeSeries, null, options, request);
      }
      /// <summary>
      ///  Lists time series that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Monitoring.V3.ListTimeSeriesResponse> ListTimeSeriesAsync(global::Google.Monitoring.V3.ListTimeSeriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return ListTimeSeriesAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Lists time series that match a filter. This method does not require a Stackdriver account.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Monitoring.V3.ListTimeSeriesResponse> ListTimeSeriesAsync(global::Google.Monitoring.V3.ListTimeSeriesRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_ListTimeSeries, null, options, request);
      }
      /// <summary>
      ///  Creates or adds data to one or more time series.
      ///  The response is empty if all time series in the request were written.
      ///  If any time series could not be written, a corresponding failure message is
      ///  included in the error response.
      /// </summary>
      public virtual global::Google.Protobuf.WellKnownTypes.Empty CreateTimeSeries(global::Google.Monitoring.V3.CreateTimeSeriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return CreateTimeSeries(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Creates or adds data to one or more time series.
      ///  The response is empty if all time series in the request were written.
      ///  If any time series could not be written, a corresponding failure message is
      ///  included in the error response.
      /// </summary>
      public virtual global::Google.Protobuf.WellKnownTypes.Empty CreateTimeSeries(global::Google.Monitoring.V3.CreateTimeSeriesRequest request, CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_CreateTimeSeries, null, options, request);
      }
      /// <summary>
      ///  Creates or adds data to one or more time series.
      ///  The response is empty if all time series in the request were written.
      ///  If any time series could not be written, a corresponding failure message is
      ///  included in the error response.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> CreateTimeSeriesAsync(global::Google.Monitoring.V3.CreateTimeSeriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        return CreateTimeSeriesAsync(request, new CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      ///  Creates or adds data to one or more time series.
      ///  The response is empty if all time series in the request were written.
      ///  If any time series could not be written, a corresponding failure message is
      ///  included in the error response.
      /// </summary>
      public virtual AsyncUnaryCall<global::Google.Protobuf.WellKnownTypes.Empty> CreateTimeSeriesAsync(global::Google.Monitoring.V3.CreateTimeSeriesRequest request, CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_CreateTimeSeries, null, options, request);
      }
      protected override MetricServiceClient NewInstance(ClientBaseConfiguration configuration)
      {
        return new MetricServiceClient(configuration);
      }
    }

    /// <summary>Creates service definition that can be registered with a server</summary>
    public static ServerServiceDefinition BindService(MetricServiceBase serviceImpl)
    {
      return ServerServiceDefinition.CreateBuilder()
          .AddMethod(__Method_ListMonitoredResourceDescriptors, serviceImpl.ListMonitoredResourceDescriptors)
          .AddMethod(__Method_GetMonitoredResourceDescriptor, serviceImpl.GetMonitoredResourceDescriptor)
          .AddMethod(__Method_ListMetricDescriptors, serviceImpl.ListMetricDescriptors)
          .AddMethod(__Method_GetMetricDescriptor, serviceImpl.GetMetricDescriptor)
          .AddMethod(__Method_CreateMetricDescriptor, serviceImpl.CreateMetricDescriptor)
          .AddMethod(__Method_DeleteMetricDescriptor, serviceImpl.DeleteMetricDescriptor)
          .AddMethod(__Method_ListTimeSeries, serviceImpl.ListTimeSeries)
          .AddMethod(__Method_CreateTimeSeries, serviceImpl.CreateTimeSeries).Build();
    }

  }
}
#endregion
