Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 22a0e0f

Browse files
committed
[samplecode][1/3]Implement Pure Unary RPC sample code (#573)
1 parent a2a318a commit 22a0e0f

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

test/integration/goldens/logging/MetricsClient.java

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,6 @@ public MetricsServiceV2Stub getStub() {
152152
/**
153153
* Lists logs-based metrics.
154154
*
155-
* <p>Sample code:
156-
*
157-
* <pre>{@code
158-
* try (MetricsClient metricsClient = MetricsClient.create()) {
159-
* ProjectName parent = ProjectName.of("[PROJECT]");
160-
* for (LogMetric element : metricsClient.listLogMetrics(parent).iterateAll()) {
161-
* // doThingsWith(element);
162-
* }
163-
* }
164-
* }</pre>
165-
*
166155
* @param parent Required. The name of the project containing the metrics:
167156
* <p>"projects/[PROJECT_ID]"
168157
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -179,17 +168,6 @@ public final ListLogMetricsPagedResponse listLogMetrics(ProjectName parent) {
179168
/**
180169
* Lists logs-based metrics.
181170
*
182-
* <p>Sample code:
183-
*
184-
* <pre>{@code
185-
* try (MetricsClient metricsClient = MetricsClient.create()) {
186-
* String parent = ProjectName.of("[PROJECT]").toString();
187-
* for (LogMetric element : metricsClient.listLogMetrics(parent).iterateAll()) {
188-
* // doThingsWith(element);
189-
* }
190-
* }
191-
* }</pre>
192-
*
193171
* @param parent Required. The name of the project containing the metrics:
194172
* <p>"projects/[PROJECT_ID]"
195173
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -261,7 +239,7 @@ public final ListLogMetricsPagedResponse listLogMetrics(ListLogMetricsRequest re
261239
* }
262240
* }</pre>
263241
*
264-
* @param metricName Required. The resource name of the desired metric:
242+
* @param metric_name Required. The resource name of the desired metric:
265243
* <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
266244
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
267245
*/
@@ -286,7 +264,7 @@ public final LogMetric getLogMetric(LogMetricName metricName) {
286264
* }
287265
* }</pre>
288266
*
289-
* @param metricName Required. The resource name of the desired metric:
267+
* @param metric_name Required. The resource name of the desired metric:
290268
* <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
291269
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
292270
*/
@@ -409,7 +387,7 @@ public final UnaryCallable<CreateLogMetricRequest, LogMetric> createLogMetricCal
409387
* }
410388
* }</pre>
411389
*
412-
* @param metricName Required. The resource name of the metric to update:
390+
* @param metric_name Required. The resource name of the metric to update:
413391
* <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
414392
* <p>The updated metric must be provided in the request and it's `name` field must be the
415393
* same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is
@@ -440,7 +418,7 @@ public final LogMetric updateLogMetric(LogMetricName metricName, LogMetric metri
440418
* }
441419
* }</pre>
442420
*
443-
* @param metricName Required. The resource name of the metric to update:
421+
* @param metric_name Required. The resource name of the metric to update:
444422
* <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
445423
* <p>The updated metric must be provided in the request and it's `name` field must be the
446424
* same as `[METRIC_ID]` If the metric does not exist in `[PROJECT_ID]`, then a new metric is
@@ -488,7 +466,7 @@ public final UnaryCallable<UpdateLogMetricRequest, LogMetric> updateLogMetricCal
488466
* }
489467
* }</pre>
490468
*
491-
* @param metricName Required. The resource name of the metric to delete:
469+
* @param metric_name Required. The resource name of the metric to delete:
492470
* <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
493471
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
494472
*/
@@ -513,7 +491,7 @@ public final void deleteLogMetric(LogMetricName metricName) {
513491
* }
514492
* }</pre>
515493
*
516-
* @param metricName Required. The resource name of the metric to delete:
494+
* @param metric_name Required. The resource name of the metric to delete:
517495
* <p>"projects/[PROJECT_ID]/metrics/[METRIC_ID]"
518496
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
519497
*/

0 commit comments

Comments
 (0)