Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correcting the proto field Id for field data_boost_enabled #2328

Merged
merged 7 commits into from
Mar 19, 2023
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