Skip to content

Commit

Permalink
chore: protobuf 3.18.1 (#1043)
Browse files Browse the repository at this point in the history
* chore(ruby): Re-enable bigquery-storage-v1 generation, which also required updating protobuf from 3.15.3 to 3.18.1 for codegen

PiperOrigin-RevId: 403132955

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Oct 14 10:50:47 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: d2977af9e9f1fc0c9dc8368352daa032471f3c63
Source-Link: googleapis/googleapis@d2977af

* feat: Add create_time to Instance

Committer: @gdcolella
PiperOrigin-RevId: 404267819

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Oct 19 08:27:59 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 324f036d9dcc21318d89172ceaba5e0fd2377271
Source-Link: googleapis/googleapis@324f036
  • Loading branch information
yoshi-automation committed Oct 25, 2021
1 parent d2e03d2 commit 6e64e45
Show file tree
Hide file tree
Showing 64 changed files with 636 additions and 249 deletions.
Expand Up @@ -525,6 +525,7 @@ public final UnaryCallable<ListInstancesRequest, ListInstancesResponse> listInst
* .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
* .setDisplayName("displayName1714148973")
* .putAllLabels(new HashMap<String, String>())
* .setCreateTime(Timestamp.newBuilder().build())
* .build();
* Instance response = baseBigtableInstanceAdminClient.updateInstance(request);
* }
Expand Down Expand Up @@ -552,6 +553,7 @@ public final Instance updateInstance(Instance request) {
* .setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
* .setDisplayName("displayName1714148973")
* .putAllLabels(new HashMap<String, String>())
* .setCreateTime(Timestamp.newBuilder().build())
* .build();
* ApiFuture<Instance> future =
* baseBigtableInstanceAdminClient.updateInstanceCallable().futureCall(request);
Expand Down
Expand Up @@ -67,6 +67,7 @@
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import io.grpc.StatusRuntimeException;
import java.io.IOException;
import java.util.ArrayList;
Expand Down Expand Up @@ -130,6 +131,7 @@ public void createInstanceTest() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -188,6 +190,7 @@ public void createInstanceTest2() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -246,6 +249,7 @@ public void getInstanceTest() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
mockBigtableInstanceAdmin.addResponse(expectedResponse);

Expand Down Expand Up @@ -286,6 +290,7 @@ public void getInstanceTest2() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
mockBigtableInstanceAdmin.addResponse(expectedResponse);

Expand Down Expand Up @@ -406,6 +411,7 @@ public void updateInstanceTest() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
mockBigtableInstanceAdmin.addResponse(expectedResponse);

Expand All @@ -414,6 +420,7 @@ public void updateInstanceTest() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();

Instance actualResponse = client.updateInstance(request);
Expand All @@ -428,6 +435,7 @@ public void updateInstanceTest() throws Exception {
Assert.assertEquals(request.getState(), actualRequest.getState());
Assert.assertEquals(request.getType(), actualRequest.getType());
Assert.assertEquals(request.getLabelsMap(), actualRequest.getLabelsMap());
Assert.assertEquals(request.getCreateTime(), actualRequest.getCreateTime());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -445,6 +453,7 @@ public void updateInstanceExceptionTest() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
client.updateInstance(request);
Assert.fail("No exception raised");
Expand All @@ -460,6 +469,7 @@ public void partialUpdateInstanceTest() throws Exception {
.setName(InstanceName.of("[PROJECT]", "[INSTANCE]").toString())
.setDisplayName("displayName1714148973")
.putAllLabels(new HashMap<String, String>())
.setCreateTime(Timestamp.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Expand Up @@ -1216,7 +1216,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getClusterIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterId_);
}
if (allowTransactionalWrites_ != false) {
Expand All @@ -1231,7 +1231,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getClusterIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterId_);
}
if (allowTransactionalWrites_ != false) {
Expand Down Expand Up @@ -2104,13 +2104,13 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getEtagBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_);
}
if (!getDescriptionBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (routingPolicyCase_ == 5) {
Expand All @@ -2130,13 +2130,13 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getEtagBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_);
}
if (!getDescriptionBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (routingPolicyCase_ == 5) {
Expand Down
Expand Up @@ -774,10 +774,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getSourceTableBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceTable_);
}
if (expireTime_ != null) {
Expand Down Expand Up @@ -807,10 +807,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getSourceTableBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceTable_);
}
if (expireTime_ != null) {
Expand Down
Expand Up @@ -365,7 +365,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getBackupBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backup_);
}
if (startTime_ != null) {
Expand All @@ -374,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (endTime_ != null) {
output.writeMessage(3, getEndTime());
}
if (!getSourceTableBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sourceTable_);
}
unknownFields.writeTo(output);
Expand All @@ -386,7 +386,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getBackupBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backup_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, backup_);
}
if (startTime_ != null) {
Expand All @@ -395,7 +395,7 @@ public int getSerializedSize() {
if (endTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime());
}
if (!getSourceTableBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sourceTable_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -240,10 +240,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getConsistencyTokenBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consistencyToken_);
}
unknownFields.writeTo(output);
Expand All @@ -255,10 +255,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getConsistencyTokenBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consistencyToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consistencyToken_);
}
size += unknownFields.getSerializedSize();
Expand Down
Expand Up @@ -589,7 +589,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getKmsKeyNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, kmsKeyName_);
}
unknownFields.writeTo(output);
Expand All @@ -601,7 +601,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getKmsKeyNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKeyName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, kmsKeyName_);
}
size += unknownFields.getSerializedSize();
Expand Down Expand Up @@ -1368,10 +1368,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getLocationBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, location_);
}
if (state_ != com.google.bigtable.admin.v2.Cluster.State.STATE_NOT_KNOWN.getNumber()) {
Expand All @@ -1396,10 +1396,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getLocationBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, location_);
}
if (state_ != com.google.bigtable.admin.v2.Cluster.State.STATE_NOT_KNOWN.getNumber()) {
Expand Down
Expand Up @@ -339,10 +339,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getAppProfileIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appProfileId_);
}
if (appProfile_ != null) {
Expand All @@ -360,10 +360,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getAppProfileIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appProfileId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appProfileId_);
}
if (appProfile_ != null) {
Expand Down
Expand Up @@ -354,10 +354,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getSourceTableBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceTable_);
}
if (startTime_ != null) {
Expand All @@ -375,10 +375,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getSourceTableBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceTable_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceTable_);
}
if (startTime_ != null) {
Expand Down
Expand Up @@ -314,10 +314,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getBackupIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, backupId_);
}
if (backup_ != null) {
Expand All @@ -332,10 +332,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getBackupIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, backupId_);
}
if (backup_ != null) {
Expand Down
Expand Up @@ -311,10 +311,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
}
if (!getClusterIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_);
}
if (cluster_ != null) {
Expand All @@ -329,10 +329,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getParentBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
}
if (!getClusterIdBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_);
}
if (cluster_ != null) {
Expand Down

0 comments on commit 6e64e45

Please sign in to comment.