Search in sources :

Example 1 with 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.
    MetricsServiceV2StubSettings.Builder metricsSettingsBuilder = MetricsServiceV2StubSettings.newBuilder();
    metricsSettingsBuilder.getLogMetricSettings().setRetrySettings(metricsSettingsBuilder.getLogMetricSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
    MetricsServiceV2StubSettings metricsSettings = metricsSettingsBuilder.build();
}
Also used : MetricsServiceV2StubSettings(com.google.cloud.logging.v2.stub.MetricsServiceV2StubSettings)

Example 2 with MetricsSettings

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);
}
Also used : MetricsClient(com.google.cloud.logging.v2.MetricsClient) MetricsSettings(com.google.cloud.logging.v2.MetricsSettings)

Example 3 with 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();
}
Also used : MetricsSettings(com.google.cloud.logging.v2.MetricsSettings)

Example 4 with MetricsSettings

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);
}
Also used : MetricsClient(com.google.cloud.logging.v2.MetricsClient) MetricsSettings(com.google.cloud.logging.v2.MetricsSettings)

Aggregations

MetricsSettings (com.google.cloud.logging.v2.MetricsSettings)3 MetricsClient (com.google.cloud.logging.v2.MetricsClient)2 MetricsServiceV2StubSettings (com.google.cloud.logging.v2.stub.MetricsServiceV2StubSettings)1