use of com.google.cloud.logging.v2.MetricsSettings in project gapic-generator-java by googleapis.
the class SyncGetLogMetric method syncGetLogMetric.
public static void syncGetLogMetric() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
MetricsServiceV2StubSettings.Builder metricsSettingsBuilder = MetricsServiceV2StubSettings.newBuilder();
metricsSettingsBuilder.getLogMetricSettings().setRetrySettings(metricsSettingsBuilder.getLogMetricSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
MetricsServiceV2StubSettings metricsSettings = metricsSettingsBuilder.build();
}
use of com.google.cloud.logging.v2.MetricsSettings in project gapic-generator-java by googleapis.
the class SyncCreateSetEndpoint method syncCreateSetEndpoint.
public static void syncCreateSetEndpoint() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
MetricsSettings metricsSettings = MetricsSettings.newBuilder().setEndpoint(myEndpoint).build();
MetricsClient metricsClient = MetricsClient.create(metricsSettings);
}
use of com.google.cloud.logging.v2.MetricsSettings in project gapic-generator-java by googleapis.
the class SyncGetLogMetric method syncGetLogMetric.
public static void syncGetLogMetric() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
MetricsSettings.Builder metricsSettingsBuilder = MetricsSettings.newBuilder();
metricsSettingsBuilder.getLogMetricSettings().setRetrySettings(metricsSettingsBuilder.getLogMetricSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
MetricsSettings metricsSettings = metricsSettingsBuilder.build();
}
use of com.google.cloud.logging.v2.MetricsSettings in project gapic-generator-java by googleapis.
the class SyncCreateSetCredentialsProvider method syncCreateSetCredentialsProvider.
public static void syncCreateSetCredentialsProvider() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
MetricsSettings metricsSettings = MetricsSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();
MetricsClient metricsClient = MetricsClient.create(metricsSettings);
}
Aggregations