Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-optimization</artifactId>
<version>1.1.8</version>
<version>1.1.9</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-optimization:1.1.8'
implementation 'com.google.cloud:google-cloud-optimization:1.1.9'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-optimization" % "1.1.8"
libraryDependencies += "com.google.cloud" % "google-cloud-optimization" % "1.1.9"
```

## Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@
* calls that map to API methods. Sample code to get started:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* OptimizeToursRequest request =
* OptimizeToursRequest.newBuilder()
Expand Down Expand Up @@ -102,8 +105,11 @@
* <p>To customize credentials:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* FleetRoutingSettings fleetRoutingSettings =
* FleetRoutingSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
Expand All @@ -114,8 +120,11 @@
* <p>To customize the endpoint:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* FleetRoutingSettings fleetRoutingSettings =
* FleetRoutingSettings.newBuilder().setEndpoint(myEndpoint).build();
* FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings);
Expand All @@ -125,8 +134,11 @@
* the wire:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* FleetRoutingSettings fleetRoutingSettings =
* FleetRoutingSettings.newBuilder()
* .setTransportChannelProvider(
Expand Down Expand Up @@ -229,8 +241,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* OptimizeToursRequest request =
* OptimizeToursRequest.newBuilder()
Expand Down Expand Up @@ -280,8 +295,11 @@ public final OptimizeToursResponse optimizeTours(OptimizeToursRequest request) {
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* OptimizeToursRequest request =
* OptimizeToursRequest.newBuilder()
Expand Down Expand Up @@ -327,8 +345,11 @@ public final UnaryCallable<OptimizeToursRequest, OptimizeToursResponse> optimize
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* BatchOptimizeToursRequest request =
* BatchOptimizeToursRequest.newBuilder()
Expand Down Expand Up @@ -362,8 +383,11 @@ public final UnaryCallable<OptimizeToursRequest, OptimizeToursResponse> optimize
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* BatchOptimizeToursRequest request =
* BatchOptimizeToursRequest.newBuilder()
Expand Down Expand Up @@ -397,8 +421,11 @@ public final UnaryCallable<OptimizeToursRequest, OptimizeToursResponse> optimize
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* BatchOptimizeToursRequest request =
* BatchOptimizeToursRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@
* <p>For example, to set the total timeout of optimizeTours to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* FleetRoutingSettings.Builder fleetRoutingSettingsBuilder = FleetRoutingSettings.newBuilder();
* fleetRoutingSettingsBuilder
* .optimizeToursSettings()
* .setRetrySettings(
* fleetRoutingSettingsBuilder
* .optimizeToursSettings()
* .getRetrySettings()
* .toBuilder()
* fleetRoutingSettingsBuilder.optimizeToursSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* FleetRoutingSettings fleetRoutingSettings = fleetRoutingSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@
* <p>Sample for FleetRoutingClient:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
* OptimizeToursRequest request =
* OptimizeToursRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@
* <p>For example, to set the total timeout of optimizeTours to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* FleetRoutingStubSettings.Builder fleetRoutingSettingsBuilder =
* FleetRoutingStubSettings.newBuilder();
* fleetRoutingSettingsBuilder
* .optimizeToursSettings()
* .setRetrySettings(
* fleetRoutingSettingsBuilder
* .optimizeToursSettings()
* .getRetrySettings()
* .toBuilder()
* fleetRoutingSettingsBuilder.optimizeToursSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* FleetRoutingStubSettings fleetRoutingSettings = fleetRoutingSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public class HttpJsonFleetRoutingStub extends FleetRoutingStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<OptimizeToursResponse>newBuilder()
Expand Down Expand Up @@ -126,7 +126,7 @@ public class HttpJsonFleetRoutingStub extends FleetRoutingStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
.toBody("*", request.toBuilder().clearParent().build()))
.toBody("*", request.toBuilder().clearParent().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.<Operation>newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
}

public static void asyncBatchOptimizeTours() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
BatchOptimizeToursRequest request =
BatchOptimizeToursRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
}

public static void asyncBatchOptimizeToursLRO() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
BatchOptimizeToursRequest request =
BatchOptimizeToursRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}

public static void syncBatchOptimizeTours() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
BatchOptimizeToursRequest request =
BatchOptimizeToursRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
}

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.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FleetRoutingSettings fleetRoutingSettings =
FleetRoutingSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
}

public static void syncCreateSetCredentialsProvider1() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FleetRoutingSettings fleetRoutingSettings =
FleetRoutingSettings.newBuilder()
.setTransportChannelProvider(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
}

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.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
FleetRoutingSettings fleetRoutingSettings =
FleetRoutingSettings.newBuilder().setEndpoint(myEndpoint).build();
FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create(fleetRoutingSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
}

public static void asyncOptimizeTours() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
OptimizeToursRequest request =
OptimizeToursRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
}

public static void syncOptimizeTours() throws Exception {
// This snippet has been automatically generated for illustrative purposes only.
// It may require modifications to work in your environment.
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (FleetRoutingClient fleetRoutingClient = FleetRoutingClient.create()) {
OptimizeToursRequest request =
OptimizeToursRequest.newBuilder()
Expand Down
Loading