# Class MetricsServiceV2Grpc.MetricsServiceV2Stub (3.34.0)

3.34.0 (latest) 3.32.0 3.29.0 3.28.0 3.26.0 3.24.0 3.23.10 3.22.6 3.21.4 3.20.7 3.19.0 3.18.0 3.17.2 3.16.2 3.15.17 3.14.9 3.13.7 3.12.1 3.11.10 3.10.7 3.9.0 3.8.0 3.7.6 3.6.4 3.5.3

    public static final class MetricsServiceV2Grpc.MetricsServiceV2Stub extends AbstractAsyncStub<MetricsServiceV2Grpc.MetricsServiceV2Stub>

A stub to allow clients to do asynchronous rpc calls to service MetricsServiceV2.

Service for configuring logs-based metrics.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> io.grpc.stub.AbstractStub \> io.grpc.stub.AbstractAsyncStub \> MetricsServiceV2Grpc.MetricsServiceV2Stub

## Inherited Members

io.grpc.stub.AbstractAsyncStub.\<T\>newStub(io.grpc.stub.AbstractStub.StubFactory\<T\>,io.grpc.Channel) io.grpc.stub.AbstractAsyncStub.\<T\>newStub(io.grpc.stub.AbstractStub.StubFactory\<T\>,io.grpc.Channel,io.grpc.CallOptions) io.grpc.stub.AbstractStub.\<T\>withOption(io.grpc.CallOptions.Key\<T\>,T) io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions) io.grpc.stub.AbstractStub.getCallOptions() io.grpc.stub.AbstractStub.getChannel() io.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials) io.grpc.stub.AbstractStub.withChannel(io.grpc.Channel) io.grpc.stub.AbstractStub.withCompression(java.lang.String) io.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline) io.grpc.stub.AbstractStub.withDeadlineAfter(java.time.Duration) io.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit) io.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor) io.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...) io.grpc.stub.AbstractStub.withMaxInboundMessageSize(int) io.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int) io.grpc.stub.AbstractStub.withOnReadyThreshold(int) io.grpc.stub.AbstractStub.withWaitForReady() [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Methods

### build(Channel channel, CallOptions callOptions)

    protected MetricsServiceV2Grpc.MetricsServiceV2Stub build(Channel channel, CallOptions callOptions)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `channel` | `io.grpc.Channel` |
| `callOptions` | `io.grpc.CallOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.MetricsServiceV2Grpc.MetricsServiceV2Stub` |   |

**Overrides** io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

### createLogMetric(CreateLogMetricRequest request, StreamObserver\<LogMetric\> responseObserver)

    public void createLogMetric(CreateLogMetricRequest request, StreamObserver<LogMetric> responseObserver)

Creates a logs-based metric.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.CreateLogMetricRequest` |
| `responseObserver` | `io.grpc.stub.StreamObserver<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogMetric>` |

### deleteLogMetric(DeleteLogMetricRequest request, StreamObserver\<Empty\> responseObserver)

    public void deleteLogMetric(DeleteLogMetricRequest request, StreamObserver<Empty> responseObserver)

Deletes a logs-based metric.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.DeleteLogMetricRequest` |
| `responseObserver` | `io.grpc.stub.StreamObserver<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |

### getLogMetric(GetLogMetricRequest request, StreamObserver\<LogMetric\> responseObserver)

    public void getLogMetric(GetLogMetricRequest request, StreamObserver<LogMetric> responseObserver)

Gets a logs-based metric.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.GetLogMetricRequest` |
| `responseObserver` | `io.grpc.stub.StreamObserver<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogMetric>` |

### listLogMetrics(ListLogMetricsRequest request, StreamObserver\<ListLogMetricsResponse\> responseObserver)

    public void listLogMetrics(ListLogMetricsRequest request, StreamObserver<ListLogMetricsResponse> responseObserver)

Lists logs-based metrics.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListLogMetricsRequest` |
| `responseObserver` | `io.grpc.stub.StreamObserver<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.ListLogMetricsResponse>` |

### updateLogMetric(UpdateLogMetricRequest request, StreamObserver\<LogMetric\> responseObserver)

    public void updateLogMetric(UpdateLogMetricRequest request, StreamObserver<LogMetric> responseObserver)

Creates or updates a logs-based metric.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.UpdateLogMetricRequest` |
| `responseObserver` | `io.grpc.stub.StreamObserver<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogMetric>` |