diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java index 81374b331..30669e338 100644 --- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java +++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminClient.java @@ -113,8 +113,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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* GetIndexRequest request =
* GetIndexRequest.newBuilder()
@@ -154,8 +157,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
* DatastoreAdminSettings datastoreAdminSettings =
* DatastoreAdminSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -166,8 +172,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
* DatastoreAdminSettings datastoreAdminSettings =
* DatastoreAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
* DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create(datastoreAdminSettings);
@@ -177,8 +186,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
* DatastoreAdminSettings datastoreAdminSettings =
* DatastoreAdminSettings.newBuilder()
* .setTransportChannelProvider(
@@ -276,8 +288,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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* String projectId = "projectId-894832108";
* Map labels = new HashMap<>();
@@ -336,8 +351,11 @@ public final OperationFuture exp
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ExportEntitiesRequest request =
* ExportEntitiesRequest.newBuilder()
@@ -370,8 +388,11 @@ public final OperationFuture exp
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ExportEntitiesRequest request =
* ExportEntitiesRequest.newBuilder()
@@ -405,8 +426,11 @@ public final OperationFuture exp
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ExportEntitiesRequest request =
* ExportEntitiesRequest.newBuilder()
@@ -436,8 +460,11 @@ public final UnaryCallable exportEntitiesCalla
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* String projectId = "projectId-894832108";
* Map labels = new HashMap<>();
@@ -487,8 +514,11 @@ public final OperationFuture importEntitiesAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ImportEntitiesRequest request =
* ImportEntitiesRequest.newBuilder()
@@ -519,8 +549,11 @@ public final OperationFuture importEntitiesAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ImportEntitiesRequest request =
* ImportEntitiesRequest.newBuilder()
@@ -551,8 +584,11 @@ public final OperationFuture importEntitiesAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ImportEntitiesRequest request =
* ImportEntitiesRequest.newBuilder()
@@ -589,8 +625,11 @@ public final UnaryCallable importEntitiesCalla
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* CreateIndexRequest request =
* CreateIndexRequest.newBuilder()
@@ -626,8 +665,11 @@ public final OperationFuture createIndexAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* CreateIndexRequest request =
* CreateIndexRequest.newBuilder()
@@ -663,8 +705,11 @@ public final OperationFuture createIndexAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* CreateIndexRequest request =
* CreateIndexRequest.newBuilder()
@@ -696,8 +741,11 @@ public final UnaryCallable createIndexCallable()
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* DeleteIndexRequest request =
* DeleteIndexRequest.newBuilder()
@@ -731,8 +779,11 @@ public final OperationFuture deleteIndexAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* DeleteIndexRequest request =
* DeleteIndexRequest.newBuilder()
@@ -766,8 +817,11 @@ public final OperationFuture deleteIndexAsync(
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* DeleteIndexRequest request =
* DeleteIndexRequest.newBuilder()
@@ -791,8 +845,11 @@ public final UnaryCallable deleteIndexCallable()
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* GetIndexRequest request =
* GetIndexRequest.newBuilder()
@@ -817,8 +874,11 @@ public final Index getIndex(GetIndexRequest 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* GetIndexRequest request =
* GetIndexRequest.newBuilder()
@@ -843,8 +903,11 @@ public final UnaryCallable getIndexCallable() {
* 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ListIndexesRequest request =
* ListIndexesRequest.newBuilder()
@@ -874,8 +937,11 @@ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ListIndexesRequest request =
* ListIndexesRequest.newBuilder()
@@ -905,8 +971,11 @@ public final ListIndexesPagedResponse listIndexes(ListIndexesRequest 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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* ListIndexesRequest request =
* ListIndexesRequest.newBuilder()
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java
index 6d915b802..2d5d1aeb2 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/DatastoreAdminSettings.java
@@ -68,17 +68,17 @@
* For example, to set the total timeout of getIndex 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
* DatastoreAdminSettings.Builder datastoreAdminSettingsBuilder =
* DatastoreAdminSettings.newBuilder();
* datastoreAdminSettingsBuilder
* .getIndexSettings()
* .setRetrySettings(
- * datastoreAdminSettingsBuilder
- * .getIndexSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * datastoreAdminSettingsBuilder.getIndexSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DatastoreAdminSettings datastoreAdminSettings = datastoreAdminSettingsBuilder.build();
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/package-info.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/package-info.java
index 4bb6f2eea..b82ab22ea 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/package-info.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/package-info.java
@@ -79,8 +79,11 @@
* Sample for DatastoreAdminClient:
*
*
{@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 (DatastoreAdminClient datastoreAdminClient = DatastoreAdminClient.create()) {
* GetIndexRequest request =
* GetIndexRequest.newBuilder()
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
index 2abc133c6..d93cd65f6 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/DatastoreAdminStubSettings.java
@@ -88,17 +88,17 @@
* For example, to set the total timeout of getIndex 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
* DatastoreAdminStubSettings.Builder datastoreAdminSettingsBuilder =
* DatastoreAdminStubSettings.newBuilder();
* datastoreAdminSettingsBuilder
* .getIndexSettings()
* .setRetrySettings(
- * datastoreAdminSettingsBuilder
- * .getIndexSettings()
- * .getRetrySettings()
- * .toBuilder()
+ * datastoreAdminSettingsBuilder.getIndexSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DatastoreAdminStubSettings datastoreAdminSettings = datastoreAdminSettingsBuilder.build();
diff --git a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java
index 207ca1d45..cbe5516bc 100644
--- a/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java
+++ b/google-cloud-datastore/src/main/java/com/google/cloud/datastore/admin/v1/stub/HttpJsonDatastoreAdminStub.java
@@ -102,7 +102,7 @@ public class HttpJsonDatastoreAdminStub extends DatastoreAdminStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearProjectId().build()))
+ .toBody("*", request.toBuilder().clearProjectId().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -141,7 +141,7 @@ public class HttpJsonDatastoreAdminStub extends DatastoreAdminStub {
.setRequestBodyExtractor(
request ->
ProtoRestSerializer.create()
- .toBody("*", request.toBuilder().clearProjectId().build()))
+ .toBody("*", request.toBuilder().clearProjectId().build(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()
@@ -179,7 +179,8 @@ public class HttpJsonDatastoreAdminStub extends DatastoreAdminStub {
})
.setRequestBodyExtractor(
request ->
- ProtoRestSerializer.create().toBody("index", request.getIndex()))
+ ProtoRestSerializer.create()
+ .toBody("index", request.getIndex(), false))
.build())
.setResponseParser(
ProtoMessageResponseParser.newBuilder()