diff --git a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java index 9e39a2e33c25..bb663a7f5a8e 100644 --- a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java +++ b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingClient.java @@ -47,8 +47,11 @@ * calls that map to API methods. Sample code to get started: * *
{@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()
@@ -102,8 +105,11 @@
  * 

To customize credentials: * *

{@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))
@@ -114,8 +120,11 @@
  * 

To customize the endpoint: * *

{@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);
@@ -125,8 +134,11 @@
  * the wire:
  *
  * 
{@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(
@@ -229,8 +241,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@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()
@@ -280,8 +295,11 @@ public final OptimizeToursResponse optimizeTours(OptimizeToursRequest request) {
    * 

Sample code: * *

{@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()
@@ -327,8 +345,11 @@ public final UnaryCallable optimize
    * 

Sample code: * *

{@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()
@@ -362,8 +383,11 @@ public final UnaryCallable optimize
    * 

Sample code: * *

{@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()
@@ -397,8 +421,11 @@ public final UnaryCallable optimize
    * 

Sample code: * *

{@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()
diff --git a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java
index d945f644efb5..251d461baec6 100644
--- a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java
+++ b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/FleetRoutingSettings.java
@@ -53,16 +53,16 @@
  * 

For example, to set the total timeout of optimizeTours to 30 seconds: * *

{@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();
diff --git a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/package-info.java b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/package-info.java
index 2656e18e3db6..b77faf5febba 100644
--- a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/package-info.java
+++ b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/package-info.java
@@ -36,8 +36,11 @@
  * 

Sample for FleetRoutingClient: * *

{@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()
diff --git a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java
index c65e70c49a1e..120cbce76a80 100644
--- a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java
+++ b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/FleetRoutingStubSettings.java
@@ -72,17 +72,17 @@
  * 

For example, to set the total timeout of optimizeTours to 30 seconds: * *

{@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();
diff --git a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java
index de95502e3e42..316bb8102bd3 100644
--- a/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java
+++ b/java-optimization/google-cloud-optimization/src/main/java/com/google/cloud/optimization/v1/stub/HttpJsonFleetRoutingStub.java
@@ -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.newBuilder()
@@ -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.newBuilder()
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java
index 005ceb66c65d..a2e1c865fd01 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeTours.java
@@ -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()
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java
index c940969c7095..4a4619c45bd3 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/AsyncBatchOptimizeToursLRO.java
@@ -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()
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java
index f619b4617d5d..19753fbec562 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/batchoptimizetours/SyncBatchOptimizeTours.java
@@ -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()
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java
index a12b1325cd09..56f42505e8fa 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider.java
@@ -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))
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java
index 3e689855d4e3..f8c19829c3bf 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetCredentialsProvider1.java
@@ -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(
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java
index f26438373ca6..896627d71ba9 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/create/SyncCreateSetEndpoint.java
@@ -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);
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java
index 61eda2daf21e..3f76b575bf96 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/AsyncOptimizeTours.java
@@ -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()
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java
index ad5f8dad5860..84113db759b6 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingclient/optimizetours/SyncOptimizeTours.java
@@ -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()
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java
index 563228a3a344..16d220dd40d0 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/fleetroutingsettings/optimizetours/SyncOptimizeTours.java
@@ -27,16 +27,16 @@ 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
     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();
diff --git a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java
index 931c07b5f981..d5a7f29b2bda 100644
--- a/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java
+++ b/java-optimization/samples/snippets/generated/com/google/cloud/optimization/v1/stub/fleetroutingstubsettings/optimizetours/SyncOptimizeTours.java
@@ -27,17 +27,17 @@ 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
     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();