Search in sources :

Example 1 with LibraryServiceSettings

use of com.google.cloud.example.library.v1.LibraryServiceSettings in project gapic-generator-java by googleapis.

the class SyncCreateShelf method syncCreateShelf.

public static void syncCreateShelf() throws Exception {
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    LibraryServiceSettings.Builder libraryServiceSettingsBuilder = LibraryServiceSettings.newBuilder();
    libraryServiceSettingsBuilder.createShelfSettings().setRetrySettings(libraryServiceSettingsBuilder.createShelfSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
    LibraryServiceSettings libraryServiceSettings = libraryServiceSettingsBuilder.build();
}
Also used : LibraryServiceSettings(com.google.cloud.example.library.v1.LibraryServiceSettings)

Example 2 with LibraryServiceSettings

use of com.google.cloud.example.library.v1.LibraryServiceSettings in project gapic-generator-java by googleapis.

the class SyncCreateShelf method syncCreateShelf.

public static void syncCreateShelf() throws Exception {
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    LibraryServiceStubSettings.Builder libraryServiceSettingsBuilder = LibraryServiceStubSettings.newBuilder();
    libraryServiceSettingsBuilder.createShelfSettings().setRetrySettings(libraryServiceSettingsBuilder.createShelfSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());
    LibraryServiceStubSettings libraryServiceSettings = libraryServiceSettingsBuilder.build();
}
Also used : LibraryServiceStubSettings(com.google.cloud.example.library.v1.stub.LibraryServiceStubSettings)

Example 3 with LibraryServiceSettings

use of com.google.cloud.example.library.v1.LibraryServiceSettings 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.
    LibraryServiceSettings libraryServiceSettings = LibraryServiceSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();
    LibraryServiceClient libraryServiceClient = LibraryServiceClient.create(libraryServiceSettings);
}
Also used : LibraryServiceClient(com.google.cloud.example.library.v1.LibraryServiceClient) LibraryServiceSettings(com.google.cloud.example.library.v1.LibraryServiceSettings)

Example 4 with LibraryServiceSettings

use of com.google.cloud.example.library.v1.LibraryServiceSettings 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.
    LibraryServiceSettings libraryServiceSettings = LibraryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
    LibraryServiceClient libraryServiceClient = LibraryServiceClient.create(libraryServiceSettings);
}
Also used : LibraryServiceClient(com.google.cloud.example.library.v1.LibraryServiceClient) LibraryServiceSettings(com.google.cloud.example.library.v1.LibraryServiceSettings)

Aggregations

LibraryServiceSettings (com.google.cloud.example.library.v1.LibraryServiceSettings)3 LibraryServiceClient (com.google.cloud.example.library.v1.LibraryServiceClient)2 LibraryServiceStubSettings (com.google.cloud.example.library.v1.stub.LibraryServiceStubSettings)1