Class MetricsServiceV2.MetricsServiceV2Client (3.4.0)

public class MetricsServiceV2Client : ClientBase<MetricsServiceV2.MetricsServiceV2Client>

Client for MetricsServiceV2

Inheritance

System.Object > ClientBase > ClientBase<MetricsServiceV2.MetricsServiceV2Client> > MetricsServiceV2.MetricsServiceV2Client

Namespace

Google.Cloud.Logging.V2

Assembly

Google.Cloud.Logging.V2.dll

Constructors

MetricsServiceV2Client()

protected MetricsServiceV2Client()

Protected parameterless constructor to allow creation of test doubles.

MetricsServiceV2Client(CallInvoker)

public MetricsServiceV2Client(CallInvoker callInvoker)

Creates a new client for MetricsServiceV2 that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

MetricsServiceV2Client(Channel)

[Obsolete("This constructor overload is present for compatibility only, and will be removed in the next major version")]
public MetricsServiceV2Client(Channel channel)

Creates a new client using a channel.

Parameter
NameDescription
channelGrpc.Core.Channel

The channel to use to make remote calls.

MetricsServiceV2Client(ChannelBase)

public MetricsServiceV2Client(ChannelBase channel)

Creates a new client for MetricsServiceV2

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

MetricsServiceV2Client(ClientBase.ClientBaseConfiguration)

protected MetricsServiceV2Client(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

CreateLogMetric(CreateLogMetricRequest, CallOptions)

public virtual LogMetric CreateLogMetric(CreateLogMetricRequest request, CallOptions options)

Creates a logs-based metric.

Parameters
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
LogMetric

The response received from the server.

CreateLogMetric(CreateLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual LogMetric CreateLogMetric(CreateLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Creates a logs-based metric.

Parameters
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
LogMetric

The response received from the server.

CreateLogMetricAsync(CreateLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<LogMetric> CreateLogMetricAsync(CreateLogMetricRequest request, CallOptions options)

Creates a logs-based metric.

Parameters
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<LogMetric>

The call object.

CreateLogMetricAsync(CreateLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<LogMetric> CreateLogMetricAsync(CreateLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Creates a logs-based metric.

Parameters
NameDescription
requestCreateLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<LogMetric>

The call object.

DeleteLogMetric(DeleteLogMetricRequest, CallOptions)

public virtual Empty DeleteLogMetric(DeleteLogMetricRequest request, CallOptions options)

Deletes a logs-based metric.

Parameters
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteLogMetric(DeleteLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual Empty DeleteLogMetric(DeleteLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Deletes a logs-based metric.

Parameters
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteLogMetricAsync(DeleteLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteLogMetricAsync(DeleteLogMetricRequest request, CallOptions options)

Deletes a logs-based metric.

Parameters
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DeleteLogMetricAsync(DeleteLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteLogMetricAsync(DeleteLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Deletes a logs-based metric.

Parameters
NameDescription
requestDeleteLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

GetLogMetric(GetLogMetricRequest, CallOptions)

public virtual LogMetric GetLogMetric(GetLogMetricRequest request, CallOptions options)

Gets a logs-based metric.

Parameters
NameDescription
requestGetLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
LogMetric

The response received from the server.

GetLogMetric(GetLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual LogMetric GetLogMetric(GetLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets a logs-based metric.

Parameters
NameDescription
requestGetLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
LogMetric

The response received from the server.

GetLogMetricAsync(GetLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<LogMetric> GetLogMetricAsync(GetLogMetricRequest request, CallOptions options)

Gets a logs-based metric.

Parameters
NameDescription
requestGetLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<LogMetric>

The call object.

GetLogMetricAsync(GetLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<LogMetric> GetLogMetricAsync(GetLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Gets a logs-based metric.

Parameters
NameDescription
requestGetLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<LogMetric>

The call object.

ListLogMetrics(ListLogMetricsRequest, CallOptions)

public virtual ListLogMetricsResponse ListLogMetrics(ListLogMetricsRequest request, CallOptions options)

Lists logs-based metrics.

Parameters
NameDescription
requestListLogMetricsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListLogMetricsResponse

The response received from the server.

ListLogMetrics(ListLogMetricsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual ListLogMetricsResponse ListLogMetrics(ListLogMetricsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Lists logs-based metrics.

Parameters
NameDescription
requestListLogMetricsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListLogMetricsResponse

The response received from the server.

ListLogMetricsAsync(ListLogMetricsRequest, CallOptions)

public virtual AsyncUnaryCall<ListLogMetricsResponse> ListLogMetricsAsync(ListLogMetricsRequest request, CallOptions options)

Lists logs-based metrics.

Parameters
NameDescription
requestListLogMetricsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListLogMetricsResponse>

The call object.

ListLogMetricsAsync(ListLogMetricsRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<ListLogMetricsResponse> ListLogMetricsAsync(ListLogMetricsRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Lists logs-based metrics.

Parameters
NameDescription
requestListLogMetricsRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<ListLogMetricsResponse>

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

protected override MetricsServiceV2.MetricsServiceV2Client NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
MetricsServiceV2.MetricsServiceV2Client
Overrides
Grpc.Core.ClientBase<Google.Cloud.Logging.V2.MetricsServiceV2.MetricsServiceV2Client>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

UpdateLogMetric(UpdateLogMetricRequest, CallOptions)

public virtual LogMetric UpdateLogMetric(UpdateLogMetricRequest request, CallOptions options)

Creates or updates a logs-based metric.

Parameters
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
LogMetric

The response received from the server.

UpdateLogMetric(UpdateLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual LogMetric UpdateLogMetric(UpdateLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Creates or updates a logs-based metric.

Parameters
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
LogMetric

The response received from the server.

UpdateLogMetricAsync(UpdateLogMetricRequest, CallOptions)

public virtual AsyncUnaryCall<LogMetric> UpdateLogMetricAsync(UpdateLogMetricRequest request, CallOptions options)

Creates or updates a logs-based metric.

Parameters
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<LogMetric>

The call object.

UpdateLogMetricAsync(UpdateLogMetricRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<LogMetric> UpdateLogMetricAsync(UpdateLogMetricRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))

Creates or updates a logs-based metric.

Parameters
NameDescription
requestUpdateLogMetricRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<LogMetric>

The call object.