Skip to content

Commit

Permalink
fix: Correcting the proto field Id for field data_boost_enabled (goog…
Browse files Browse the repository at this point in the history
…leapis#2328)

* fix: Add service_yaml_parameters to `java_gapic_library` targets

PiperOrigin-RevId: 515423972

Source-Link: googleapis/googleapis@b5b4571

Source-Link: https://github.com/googleapis/googleapis-gen/commit/806347af5bd3f5d1e9c6d85ccf489d5dbc5ef667
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODA2MzQ3YWY1YmQzZjVkMWU5YzZkODVjY2Y0ODlkNWRiYzVlZjY2NyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore(deps): Update gapic-generator-java to 2.15.3

PiperOrigin-RevId: 516900470

Source-Link: googleapis/googleapis@42ba7e6

Source-Link: https://github.com/googleapis/googleapis-gen/commit/21abfad42a1f2edae64130bbf897283221cd66d7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjFhYmZhZDQyYTFmMmVkYWU2NDEzMGJiZjg5NzI4MzIyMWNkNjZkNyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix!: Correcting the proto field Id for field data_boost_enabled

PiperOrigin-RevId: 517156905

Source-Link: googleapis/googleapis@f30cd5e

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6a3b040daef7db3fc3b879ad08f5480aa037818a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmEzYjA0MGRhZWY3ZGIzZmMzYjg3OWFkMDhmNTQ4MGFhMDM3ODE4YSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: gauravpurohit <gauravpurohit@google.com>
  • Loading branch information
3 people committed Mar 19, 2023
1 parent 5eac2be commit 6159d7e
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import static com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient.ListDatabaseRolesPagedResponse;
import static com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient.ListDatabasesPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
Expand All @@ -37,6 +38,7 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.common.collect.ImmutableMap;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
Expand Down Expand Up @@ -909,7 +911,84 @@ protected HttpJsonDatabaseAdminStub(
throws IOException {
this.callableFactory = callableFactory;
this.httpJsonOperationsStub =
HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry);
HttpJsonOperationsStub.create(
clientContext,
callableFactory,
typeRegistry,
ImmutableMap.<String, HttpRule>builder()
.put(
"google.longrunning.Operations.CancelOperation",
HttpRule.newBuilder()
.setPost(
"/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel")
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost("/v1/{name=projects/*/instances/*/operations/*}:cancel")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
"/v1/{name=projects/*/instances/*/backups/*/operations/*}:cancel")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
"/v1/{name=projects/*/instanceConfigs/*/operations/*}:cancel")
.build())
.build())
.put(
"google.longrunning.Operations.DeleteOperation",
HttpRule.newBuilder()
.setDelete("/v1/{name=projects/*/instances/*/databases/*/operations/*}")
.addAdditionalBindings(
HttpRule.newBuilder()
.setDelete("/v1/{name=projects/*/instances/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setDelete(
"/v1/{name=projects/*/instances/*/backups/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setDelete("/v1/{name=projects/*/instanceConfigs/*/operations/*}")
.build())
.build())
.put(
"google.longrunning.Operations.GetOperation",
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/databases/*/operations/*}")
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/backups/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instanceConfigs/*/operations/*}")
.build())
.build())
.put(
"google.longrunning.Operations.ListOperations",
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/databases/*/operations}")
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/operations}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/backups/*/operations}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instanceConfigs/*/operations}")
.build())
.build())
.build());

HttpJsonCallSettings<ListDatabasesRequest, ListDatabasesResponse>
listDatabasesTransportSettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Cloud Spanner Instance Admin API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= InstanceAdminClient =======================
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigsPagedResponse;
import static com.google.cloud.spanner.admin.instance.v1.InstanceAdminClient.ListInstancesPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
Expand All @@ -35,6 +36,7 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.common.collect.ImmutableMap;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
Expand Down Expand Up @@ -703,7 +705,49 @@ protected HttpJsonInstanceAdminStub(
throws IOException {
this.callableFactory = callableFactory;
this.httpJsonOperationsStub =
HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry);
HttpJsonOperationsStub.create(
clientContext,
callableFactory,
typeRegistry,
ImmutableMap.<String, HttpRule>builder()
.put(
"google.longrunning.Operations.CancelOperation",
HttpRule.newBuilder()
.setPost(
"/v1/{name=projects/*/instances/*/databases/*/operations/*}:cancel")
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost("/v1/{name=projects/*/instances/*/operations/*}:cancel")
.build())
.build())
.put(
"google.longrunning.Operations.DeleteOperation",
HttpRule.newBuilder()
.setDelete("/v1/{name=projects/*/instances/*/databases/*/operations/*}")
.addAdditionalBindings(
HttpRule.newBuilder()
.setDelete("/v1/{name=projects/*/instances/*/operations/*}")
.build())
.build())
.put(
"google.longrunning.Operations.GetOperation",
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/databases/*/operations/*}")
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/operations/*}")
.build())
.build())
.put(
"google.longrunning.Operations.ListOperations",
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/databases/*/operations}")
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/instances/*/operations}")
.build())
.build())
.build());

HttpJsonCallSettings<ListInstanceConfigsRequest, ListInstanceConfigsResponse>
listInstanceConfigsTransportSettings =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

/**
* The interfaces provided are listed below, along with usage samples.
* A client to Cloud Spanner API
*
* <p>The interfaces provided are listed below, along with usage samples.
*
* <p>======================= SpannerClient =======================
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1972,19 +1972,19 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder(
: requestOptions_;
}

public static final int DATA_BOOST_ENABLED_FIELD_NUMBER = 15;
public static final int DATA_BOOST_ENABLED_FIELD_NUMBER = 16;
private boolean dataBoostEnabled_ = false;
/**
*
*
* <pre>
* If this is for a partitioned read and this field is set to `true`, the
* If this is for a partitioned query and this field is set to `true`, the
* request will be executed via Spanner independent compute resources.
* If the field is set to `true` but the request does not set
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
* </pre>
*
* <code>bool data_boost_enabled = 15;</code>
* <code>bool data_boost_enabled = 16;</code>
*
* @return The dataBoostEnabled.
*/
Expand Down Expand Up @@ -2040,7 +2040,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
output.writeMessage(11, getRequestOptions());
}
if (dataBoostEnabled_ != false) {
output.writeBool(15, dataBoostEnabled_);
output.writeBool(16, dataBoostEnabled_);
}
getUnknownFields().writeTo(output);
}
Expand Down Expand Up @@ -2092,7 +2092,7 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getRequestOptions());
}
if (dataBoostEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, dataBoostEnabled_);
size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, dataBoostEnabled_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
Expand Down Expand Up @@ -2627,12 +2627,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000400;
break;
} // case 90
case 120:
case 128:
{
dataBoostEnabled_ = input.readBool();
bitField0_ |= 0x00000800;
break;
} // case 120
} // case 128
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -4258,13 +4258,13 @@ public com.google.spanner.v1.RequestOptionsOrBuilder getRequestOptionsOrBuilder(
*
*
* <pre>
* If this is for a partitioned read and this field is set to `true`, the
* If this is for a partitioned query and this field is set to `true`, the
* request will be executed via Spanner independent compute resources.
* If the field is set to `true` but the request does not set
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
* </pre>
*
* <code>bool data_boost_enabled = 15;</code>
* <code>bool data_boost_enabled = 16;</code>
*
* @return The dataBoostEnabled.
*/
Expand All @@ -4276,13 +4276,13 @@ public boolean getDataBoostEnabled() {
*
*
* <pre>
* If this is for a partitioned read and this field is set to `true`, the
* If this is for a partitioned query and this field is set to `true`, the
* request will be executed via Spanner independent compute resources.
* If the field is set to `true` but the request does not set
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
* </pre>
*
* <code>bool data_boost_enabled = 15;</code>
* <code>bool data_boost_enabled = 16;</code>
*
* @param value The dataBoostEnabled to set.
* @return This builder for chaining.
Expand All @@ -4298,13 +4298,13 @@ public Builder setDataBoostEnabled(boolean value) {
*
*
* <pre>
* If this is for a partitioned read and this field is set to `true`, the
* If this is for a partitioned query and this field is set to `true`, the
* request will be executed via Spanner independent compute resources.
* If the field is set to `true` but the request does not set
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
* </pre>
*
* <code>bool data_boost_enabled = 15;</code>
* <code>bool data_boost_enabled = 16;</code>
*
* @return This builder for chaining.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,13 @@ com.google.spanner.v1.Type getParamTypesOrDefault(
*
*
* <pre>
* If this is for a partitioned read and this field is set to `true`, the
* If this is for a partitioned query and this field is set to `true`, the
* request will be executed via Spanner independent compute resources.
* If the field is set to `true` but the request does not set
* `partition_token`, the API will return an `INVALID_ARGUMENT` error.
* </pre>
*
* <code>bool data_boost_enabled = 15;</code>
* <code>bool data_boost_enabled = 16;</code>
*
* @return The dataBoostEnabled.
*/
Expand Down
Loading

0 comments on commit 6159d7e

Please sign in to comment.