diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsAccessRole.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsAccessRole.java new file mode 100644 index 00000000..62a9ceba --- /dev/null +++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsAccessRole.java @@ -0,0 +1,832 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/bigquery/connection/v1/connection.proto + +package com.google.cloud.bigquery.connection.v1; + +/** + * + * + *
+ * Authentication method for Amazon Web Services (AWS) that uses Google owned + * Google service account to assume into customer's AWS IAM Role. + *+ * + * Protobuf type {@code google.cloud.bigquery.connection.v1.AwsAccessRole} + */ +public final class AwsAccessRole extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.connection.v1.AwsAccessRole) + AwsAccessRoleOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsAccessRole.newBuilder() to construct. + private AwsAccessRole(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private AwsAccessRole() { + iamRoleId_ = ""; + identity_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsAccessRole(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsAccessRole( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + iamRoleId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + identity_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass + .internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass + .internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.connection.v1.AwsAccessRole.class, + com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder.class); + } + + public static final int IAM_ROLE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object iamRoleId_; + /** + * + * + *
+ * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return The iamRoleId.
+ */
+ @java.lang.Override
+ public java.lang.String getIamRoleId() {
+ java.lang.Object ref = iamRoleId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ iamRoleId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return The bytes for iamRoleId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getIamRoleIdBytes() {
+ java.lang.Object ref = iamRoleId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ iamRoleId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IDENTITY_FIELD_NUMBER = 2;
+ private volatile java.lang.Object identity_;
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return The identity.
+ */
+ @java.lang.Override
+ public java.lang.String getIdentity() {
+ java.lang.Object ref = identity_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ identity_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return The bytes for identity.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getIdentityBytes() {
+ java.lang.Object ref = identity_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ identity_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getIamRoleIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, iamRoleId_);
+ }
+ if (!getIdentityBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, identity_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getIamRoleIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, iamRoleId_);
+ }
+ if (!getIdentityBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, identity_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.connection.v1.AwsAccessRole)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole other =
+ (com.google.cloud.bigquery.connection.v1.AwsAccessRole) obj;
+
+ if (!getIamRoleId().equals(other.getIamRoleId())) return false;
+ if (!getIdentity().equals(other.getIdentity())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + IAM_ROLE_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getIamRoleId().hashCode();
+ hash = (37 * hash) + IDENTITY_FIELD_NUMBER;
+ hash = (53 * hash) + getIdentity().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Authentication method for Amazon Web Services (AWS) that uses Google owned + * Google service account to assume into customer's AWS IAM Role. + *+ * + * Protobuf type {@code google.cloud.bigquery.connection.v1.AwsAccessRole} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return The iamRoleId.
+ */
+ public java.lang.String getIamRoleId() {
+ java.lang.Object ref = iamRoleId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ iamRoleId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return The bytes for iamRoleId.
+ */
+ public com.google.protobuf.ByteString getIamRoleIdBytes() {
+ java.lang.Object ref = iamRoleId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ iamRoleId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @param value The iamRoleId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIamRoleId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ iamRoleId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIamRoleId() {
+
+ iamRoleId_ = getDefaultInstance().getIamRoleId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @param value The bytes for iamRoleId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIamRoleIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ iamRoleId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object identity_ = "";
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return The identity.
+ */
+ public java.lang.String getIdentity() {
+ java.lang.Object ref = identity_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ identity_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return The bytes for identity.
+ */
+ public com.google.protobuf.ByteString getIdentityBytes() {
+ java.lang.Object ref = identity_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ identity_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @param value The identity to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIdentity(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ identity_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIdentity() {
+
+ identity_ = getDefaultInstance().getIdentity();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @param value The bytes for identity to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIdentityBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ identity_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.connection.v1.AwsAccessRole)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.connection.v1.AwsAccessRole)
+ private static final com.google.cloud.bigquery.connection.v1.AwsAccessRole DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.connection.v1.AwsAccessRole();
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.AwsAccessRole getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return The iamRoleId.
+ */
+ java.lang.String getIamRoleId();
+ /**
+ *
+ *
+ * + * The user’s AWS IAM Role that trusts the Google-owned AWS IAM user + * Connection. + *+ * + *
string iam_role_id = 1;
+ *
+ * @return The bytes for iamRoleId.
+ */
+ com.google.protobuf.ByteString getIamRoleIdBytes();
+
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return The identity.
+ */
+ java.lang.String getIdentity();
+ /**
+ *
+ *
+ * + * A unique Google-owned and Google-generated identity for the Connection. + * This identity will be used to access the user's AWS IAM Role. + *+ * + *
string identity = 2;
+ *
+ * @return The bytes for identity.
+ */
+ com.google.protobuf.ByteString getIdentityBytes();
+}
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsProperties.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsProperties.java
index ab1eb518..9639a07d 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsProperties.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsProperties.java
@@ -90,6 +90,26 @@ private AwsProperties(
authenticationMethodCase_ = 2;
break;
}
+ case 26:
+ {
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder subBuilder = null;
+ if (authenticationMethodCase_ == 3) {
+ subBuilder =
+ ((com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_)
+ .toBuilder();
+ }
+ authenticationMethod_ =
+ input.readMessage(
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(
+ (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_);
+ authenticationMethod_ = subBuilder.buildPartial();
+ }
+ authenticationMethodCase_ = 3;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -132,6 +152,7 @@ public enum AuthenticationMethodCase
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CROSS_ACCOUNT_ROLE(2),
+ ACCESS_ROLE(3),
AUTHENTICATIONMETHOD_NOT_SET(0);
private final int value;
@@ -152,6 +173,8 @@ public static AuthenticationMethodCase forNumber(int value) {
switch (value) {
case 2:
return CROSS_ACCOUNT_ROLE;
+ case 3:
+ return ACCESS_ROLE;
case 0:
return AUTHENTICATIONMETHOD_NOT_SET;
default:
@@ -223,6 +246,60 @@ public com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole getCrossAccou
return com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole.getDefaultInstance();
}
+ public static final int ACCESS_ROLE_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ *
+ * @return Whether the accessRole field is set.
+ */
+ @java.lang.Override
+ public boolean hasAccessRole() {
+ return authenticationMethodCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ *
+ * @return The accessRole.
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.AwsAccessRole getAccessRole() {
+ if (authenticationMethodCase_ == 3) {
+ return (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_;
+ }
+ return com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.AwsAccessRoleOrBuilder getAccessRoleOrBuilder() {
+ if (authenticationMethodCase_ == 3) {
+ return (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_;
+ }
+ return com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance();
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -241,6 +318,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
output.writeMessage(
2, (com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole) authenticationMethod_);
}
+ if (authenticationMethodCase_ == 3) {
+ output.writeMessage(
+ 3, (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_);
+ }
unknownFields.writeTo(output);
}
@@ -256,6 +337,11 @@ public int getSerializedSize() {
2,
(com.google.cloud.bigquery.connection.v1.AwsCrossAccountRole) authenticationMethod_);
}
+ if (authenticationMethodCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -277,6 +363,9 @@ public boolean equals(final java.lang.Object obj) {
case 2:
if (!getCrossAccountRole().equals(other.getCrossAccountRole())) return false;
break;
+ case 3:
+ if (!getAccessRole().equals(other.getAccessRole())) return false;
+ break;
case 0:
default:
}
@@ -296,6 +385,10 @@ public int hashCode() {
hash = (37 * hash) + CROSS_ACCOUNT_ROLE_FIELD_NUMBER;
hash = (53 * hash) + getCrossAccountRole().hashCode();
break;
+ case 3:
+ hash = (37 * hash) + ACCESS_ROLE_FIELD_NUMBER;
+ hash = (53 * hash) + getAccessRole().hashCode();
+ break;
case 0:
default:
}
@@ -481,6 +574,13 @@ public com.google.cloud.bigquery.connection.v1.AwsProperties buildPartial() {
result.authenticationMethod_ = crossAccountRoleBuilder_.build();
}
}
+ if (authenticationMethodCase_ == 3) {
+ if (accessRoleBuilder_ == null) {
+ result.authenticationMethod_ = authenticationMethod_;
+ } else {
+ result.authenticationMethod_ = accessRoleBuilder_.build();
+ }
+ }
result.authenticationMethodCase_ = authenticationMethodCase_;
onBuilt();
return result;
@@ -538,6 +638,11 @@ public Builder mergeFrom(com.google.cloud.bigquery.connection.v1.AwsProperties o
mergeCrossAccountRole(other.getCrossAccountRole());
break;
}
+ case ACCESS_ROLE:
+ {
+ mergeAccessRole(other.getAccessRole());
+ break;
+ }
case AUTHENTICATIONMETHOD_NOT_SET:
{
break;
@@ -815,6 +920,226 @@ public Builder clearCrossAccountRole() {
return crossAccountRoleBuilder_;
}
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole,
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder,
+ com.google.cloud.bigquery.connection.v1.AwsAccessRoleOrBuilder>
+ accessRoleBuilder_;
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ *
+ * @return Whether the accessRole field is set.
+ */
+ @java.lang.Override
+ public boolean hasAccessRole() {
+ return authenticationMethodCase_ == 3;
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ *
+ * @return The accessRole.
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.AwsAccessRole getAccessRole() {
+ if (accessRoleBuilder_ == null) {
+ if (authenticationMethodCase_ == 3) {
+ return (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_;
+ }
+ return com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance();
+ } else {
+ if (authenticationMethodCase_ == 3) {
+ return accessRoleBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ public Builder setAccessRole(com.google.cloud.bigquery.connection.v1.AwsAccessRole value) {
+ if (accessRoleBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ authenticationMethod_ = value;
+ onChanged();
+ } else {
+ accessRoleBuilder_.setMessage(value);
+ }
+ authenticationMethodCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ public Builder setAccessRole(
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder builderForValue) {
+ if (accessRoleBuilder_ == null) {
+ authenticationMethod_ = builderForValue.build();
+ onChanged();
+ } else {
+ accessRoleBuilder_.setMessage(builderForValue.build());
+ }
+ authenticationMethodCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ public Builder mergeAccessRole(com.google.cloud.bigquery.connection.v1.AwsAccessRole value) {
+ if (accessRoleBuilder_ == null) {
+ if (authenticationMethodCase_ == 3
+ && authenticationMethod_
+ != com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance()) {
+ authenticationMethod_ =
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.newBuilder(
+ (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ authenticationMethod_ = value;
+ }
+ onChanged();
+ } else {
+ if (authenticationMethodCase_ == 3) {
+ accessRoleBuilder_.mergeFrom(value);
+ }
+ accessRoleBuilder_.setMessage(value);
+ }
+ authenticationMethodCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ public Builder clearAccessRole() {
+ if (accessRoleBuilder_ == null) {
+ if (authenticationMethodCase_ == 3) {
+ authenticationMethodCase_ = 0;
+ authenticationMethod_ = null;
+ onChanged();
+ }
+ } else {
+ if (authenticationMethodCase_ == 3) {
+ authenticationMethodCase_ = 0;
+ authenticationMethod_ = null;
+ }
+ accessRoleBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ public com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder getAccessRoleBuilder() {
+ return getAccessRoleFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.AwsAccessRoleOrBuilder getAccessRoleOrBuilder() {
+ if ((authenticationMethodCase_ == 3) && (accessRoleBuilder_ != null)) {
+ return accessRoleBuilder_.getMessageOrBuilder();
+ } else {
+ if (authenticationMethodCase_ == 3) {
+ return (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_;
+ }
+ return com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole,
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder,
+ com.google.cloud.bigquery.connection.v1.AwsAccessRoleOrBuilder>
+ getAccessRoleFieldBuilder() {
+ if (accessRoleBuilder_ == null) {
+ if (!(authenticationMethodCase_ == 3)) {
+ authenticationMethod_ =
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.getDefaultInstance();
+ }
+ accessRoleBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole,
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole.Builder,
+ com.google.cloud.bigquery.connection.v1.AwsAccessRoleOrBuilder>(
+ (com.google.cloud.bigquery.connection.v1.AwsAccessRole) authenticationMethod_,
+ getParentForChildren(),
+ isClean());
+ authenticationMethod_ = null;
+ }
+ authenticationMethodCase_ = 3;
+ onChanged();
+ ;
+ return accessRoleBuilder_;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsPropertiesOrBuilder.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsPropertiesOrBuilder.java
index 0a0ad7cc..41ed383b 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsPropertiesOrBuilder.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/AwsPropertiesOrBuilder.java
@@ -62,6 +62,44 @@ public interface AwsPropertiesOrBuilder
com.google.cloud.bigquery.connection.v1.AwsCrossAccountRoleOrBuilder
getCrossAccountRoleOrBuilder();
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ *
+ * @return Whether the accessRole field is set.
+ */
+ boolean hasAccessRole();
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ *
+ * @return The accessRole.
+ */
+ com.google.cloud.bigquery.connection.v1.AwsAccessRole getAccessRole();
+ /**
+ *
+ *
+ * + * Authentication using Google owned service account to assume into + * customer's AWS IAM Role. + *+ * + *
.google.cloud.bigquery.connection.v1.AwsAccessRole access_role = 3;
+ */
+ com.google.cloud.bigquery.connection.v1.AwsAccessRoleOrBuilder getAccessRoleOrBuilder();
+
public com.google.cloud.bigquery.connection.v1.AwsProperties.AuthenticationMethodCase
getAuthenticationMethodCase();
}
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/CloudSpannerProperties.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/CloudSpannerProperties.java
new file mode 100644
index 00000000..1da57e12
--- /dev/null
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/CloudSpannerProperties.java
@@ -0,0 +1,733 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/cloud/bigquery/connection/v1/connection.proto
+
+package com.google.cloud.bigquery.connection.v1;
+
+/**
+ *
+ *
+ * + * Connection properties specific to Cloud Spanner. + *+ * + * Protobuf type {@code google.cloud.bigquery.connection.v1.CloudSpannerProperties} + */ +public final class CloudSpannerProperties extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.connection.v1.CloudSpannerProperties) + CloudSpannerPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudSpannerProperties.newBuilder() to construct. + private CloudSpannerProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CloudSpannerProperties() { + database_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudSpannerProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudSpannerProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + database_ = s; + break; + } + case 16: + { + useParallelism_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass + .internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.connection.v1.ConnectionOuterClass + .internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.class, + com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder.class); + } + + public static final int DATABASE_FIELD_NUMBER = 1; + private volatile java.lang.Object database_; + /** + * + * + *
+ * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return The database.
+ */
+ @java.lang.Override
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ database_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return The bytes for database.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int USE_PARALLELISM_FIELD_NUMBER = 2;
+ private boolean useParallelism_;
+ /**
+ *
+ *
+ * + * If parallelism should be used when reading from Cloud Spanner + *+ * + *
bool use_parallelism = 2;
+ *
+ * @return The useParallelism.
+ */
+ @java.lang.Override
+ public boolean getUseParallelism() {
+ return useParallelism_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getDatabaseBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, database_);
+ }
+ if (useParallelism_ != false) {
+ output.writeBool(2, useParallelism_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDatabaseBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, database_);
+ }
+ if (useParallelism_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, useParallelism_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.bigquery.connection.v1.CloudSpannerProperties)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties other =
+ (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) obj;
+
+ if (!getDatabase().equals(other.getDatabase())) return false;
+ if (getUseParallelism() != other.getUseParallelism()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DATABASE_FIELD_NUMBER;
+ hash = (53 * hash) + getDatabase().hashCode();
+ hash = (37 * hash) + USE_PARALLELISM_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseParallelism());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ * + * Connection properties specific to Cloud Spanner. + *+ * + * Protobuf type {@code google.cloud.bigquery.connection.v1.CloudSpannerProperties} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return The database.
+ */
+ public java.lang.String getDatabase() {
+ java.lang.Object ref = database_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ database_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return The bytes for database.
+ */
+ public com.google.protobuf.ByteString getDatabaseBytes() {
+ java.lang.Object ref = database_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ database_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @param value The database to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDatabase(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDatabase() {
+
+ database_ = getDefaultInstance().getDatabase();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @param value The bytes for database to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDatabaseBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ database_ = value;
+ onChanged();
+ return this;
+ }
+
+ private boolean useParallelism_;
+ /**
+ *
+ *
+ * + * If parallelism should be used when reading from Cloud Spanner + *+ * + *
bool use_parallelism = 2;
+ *
+ * @return The useParallelism.
+ */
+ @java.lang.Override
+ public boolean getUseParallelism() {
+ return useParallelism_;
+ }
+ /**
+ *
+ *
+ * + * If parallelism should be used when reading from Cloud Spanner + *+ * + *
bool use_parallelism = 2;
+ *
+ * @param value The useParallelism to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUseParallelism(boolean value) {
+
+ useParallelism_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If parallelism should be used when reading from Cloud Spanner + *+ * + *
bool use_parallelism = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearUseParallelism() {
+
+ useParallelism_ = false;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.connection.v1.CloudSpannerProperties)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.bigquery.connection.v1.CloudSpannerProperties)
+ private static final com.google.cloud.bigquery.connection.v1.CloudSpannerProperties
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.bigquery.connection.v1.CloudSpannerProperties();
+ }
+
+ public static com.google.cloud.bigquery.connection.v1.CloudSpannerProperties
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return The database.
+ */
+ java.lang.String getDatabase();
+ /**
+ *
+ *
+ * + * Cloud Spanner database in the form `project/instance/database' + *+ * + *
string database = 1;
+ *
+ * @return The bytes for database.
+ */
+ com.google.protobuf.ByteString getDatabaseBytes();
+
+ /**
+ *
+ *
+ * + * If parallelism should be used when reading from Cloud Spanner + *+ * + *
bool use_parallelism = 2;
+ *
+ * @return The useParallelism.
+ */
+ boolean getUseParallelism();
+}
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/Connection.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/Connection.java
index 56a5e255..3fd55c4a 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/Connection.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/Connection.java
@@ -149,6 +149,27 @@ private Connection(
propertiesCase_ = 8;
break;
}
+ case 170:
+ {
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder subBuilder =
+ null;
+ if (propertiesCase_ == 21) {
+ subBuilder =
+ ((com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_)
+ .toBuilder();
+ }
+ properties_ =
+ input.readMessage(
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.parser(),
+ extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(
+ (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_);
+ properties_ = subBuilder.buildPartial();
+ }
+ propertiesCase_ = 21;
+ break;
+ }
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
@@ -192,6 +213,7 @@ public enum PropertiesCase
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CLOUD_SQL(4),
AWS(8),
+ CLOUD_SPANNER(21),
PROPERTIES_NOT_SET(0);
private final int value;
@@ -214,6 +236,8 @@ public static PropertiesCase forNumber(int value) {
return CLOUD_SQL;
case 8:
return AWS;
+ case 21:
+ return CLOUD_SPANNER;
case 0:
return PROPERTIES_NOT_SET;
default:
@@ -482,6 +506,58 @@ public com.google.cloud.bigquery.connection.v1.AwsPropertiesOrBuilder getAwsOrBu
return com.google.cloud.bigquery.connection.v1.AwsProperties.getDefaultInstance();
}
+ public static final int CLOUD_SPANNER_FIELD_NUMBER = 21;
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ *
+ * @return Whether the cloudSpanner field is set.
+ */
+ @java.lang.Override
+ public boolean hasCloudSpanner() {
+ return propertiesCase_ == 21;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ *
+ * @return The cloudSpanner.
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.CloudSpannerProperties getCloudSpanner() {
+ if (propertiesCase_ == 21) {
+ return (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_;
+ }
+ return com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesOrBuilder
+ getCloudSpannerOrBuilder() {
+ if (propertiesCase_ == 21) {
+ return (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_;
+ }
+ return com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.getDefaultInstance();
+ }
+
public static final int CREATION_TIME_FIELD_NUMBER = 5;
private long creationTime_;
/**
@@ -575,6 +651,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (propertiesCase_ == 8) {
output.writeMessage(8, (com.google.cloud.bigquery.connection.v1.AwsProperties) properties_);
}
+ if (propertiesCase_ == 21) {
+ output.writeMessage(
+ 21, (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_);
+ }
unknownFields.writeTo(output);
}
@@ -612,6 +692,11 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
8, (com.google.cloud.bigquery.connection.v1.AwsProperties) properties_);
}
+ if (propertiesCase_ == 21) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 21, (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_);
+ }
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
@@ -642,6 +727,9 @@ public boolean equals(final java.lang.Object obj) {
case 8:
if (!getAws().equals(other.getAws())) return false;
break;
+ case 21:
+ if (!getCloudSpanner().equals(other.getCloudSpanner())) return false;
+ break;
case 0:
default:
}
@@ -677,6 +765,10 @@ public int hashCode() {
hash = (37 * hash) + AWS_FIELD_NUMBER;
hash = (53 * hash) + getAws().hashCode();
break;
+ case 21:
+ hash = (37 * hash) + CLOUD_SPANNER_FIELD_NUMBER;
+ hash = (53 * hash) + getCloudSpanner().hashCode();
+ break;
case 0:
default:
}
@@ -884,6 +976,13 @@ public com.google.cloud.bigquery.connection.v1.Connection buildPartial() {
result.properties_ = awsBuilder_.build();
}
}
+ if (propertiesCase_ == 21) {
+ if (cloudSpannerBuilder_ == null) {
+ result.properties_ = properties_;
+ } else {
+ result.properties_ = cloudSpannerBuilder_.build();
+ }
+ }
result.creationTime_ = creationTime_;
result.lastModifiedTime_ = lastModifiedTime_;
result.hasCredential_ = hasCredential_;
@@ -970,6 +1069,11 @@ public Builder mergeFrom(com.google.cloud.bigquery.connection.v1.Connection othe
mergeAws(other.getAws());
break;
}
+ case CLOUD_SPANNER:
+ {
+ mergeCloudSpanner(other.getCloudSpanner());
+ break;
+ }
case PROPERTIES_NOT_SET:
{
break;
@@ -1765,6 +1869,222 @@ public com.google.cloud.bigquery.connection.v1.AwsPropertiesOrBuilder getAwsOrBu
return awsBuilder_;
}
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties,
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder,
+ com.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesOrBuilder>
+ cloudSpannerBuilder_;
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ *
+ * @return Whether the cloudSpanner field is set.
+ */
+ @java.lang.Override
+ public boolean hasCloudSpanner() {
+ return propertiesCase_ == 21;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ *
+ * @return The cloudSpanner.
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.CloudSpannerProperties getCloudSpanner() {
+ if (cloudSpannerBuilder_ == null) {
+ if (propertiesCase_ == 21) {
+ return (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_;
+ }
+ return com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.getDefaultInstance();
+ } else {
+ if (propertiesCase_ == 21) {
+ return cloudSpannerBuilder_.getMessage();
+ }
+ return com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ public Builder setCloudSpanner(
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties value) {
+ if (cloudSpannerBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ properties_ = value;
+ onChanged();
+ } else {
+ cloudSpannerBuilder_.setMessage(value);
+ }
+ propertiesCase_ = 21;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ public Builder setCloudSpanner(
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder builderForValue) {
+ if (cloudSpannerBuilder_ == null) {
+ properties_ = builderForValue.build();
+ onChanged();
+ } else {
+ cloudSpannerBuilder_.setMessage(builderForValue.build());
+ }
+ propertiesCase_ = 21;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ public Builder mergeCloudSpanner(
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties value) {
+ if (cloudSpannerBuilder_ == null) {
+ if (propertiesCase_ == 21
+ && properties_
+ != com.google.cloud.bigquery.connection.v1.CloudSpannerProperties
+ .getDefaultInstance()) {
+ properties_ =
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.newBuilder(
+ (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ properties_ = value;
+ }
+ onChanged();
+ } else {
+ if (propertiesCase_ == 21) {
+ cloudSpannerBuilder_.mergeFrom(value);
+ }
+ cloudSpannerBuilder_.setMessage(value);
+ }
+ propertiesCase_ = 21;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ public Builder clearCloudSpanner() {
+ if (cloudSpannerBuilder_ == null) {
+ if (propertiesCase_ == 21) {
+ propertiesCase_ = 0;
+ properties_ = null;
+ onChanged();
+ }
+ } else {
+ if (propertiesCase_ == 21) {
+ propertiesCase_ = 0;
+ properties_ = null;
+ }
+ cloudSpannerBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ public com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder
+ getCloudSpannerBuilder() {
+ return getCloudSpannerFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ @java.lang.Override
+ public com.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesOrBuilder
+ getCloudSpannerOrBuilder() {
+ if ((propertiesCase_ == 21) && (cloudSpannerBuilder_ != null)) {
+ return cloudSpannerBuilder_.getMessageOrBuilder();
+ } else {
+ if (propertiesCase_ == 21) {
+ return (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_;
+ }
+ return com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties,
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder,
+ com.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesOrBuilder>
+ getCloudSpannerFieldBuilder() {
+ if (cloudSpannerBuilder_ == null) {
+ if (!(propertiesCase_ == 21)) {
+ properties_ =
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.getDefaultInstance();
+ }
+ cloudSpannerBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties,
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties.Builder,
+ com.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesOrBuilder>(
+ (com.google.cloud.bigquery.connection.v1.CloudSpannerProperties) properties_,
+ getParentForChildren(),
+ isClean());
+ properties_ = null;
+ }
+ propertiesCase_ = 21;
+ onChanged();
+ ;
+ return cloudSpannerBuilder_;
+ }
+
private long creationTime_;
/**
*
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionName.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionName.java
index 76aa6070..385ee7fc 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionName.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionName.java
@@ -211,9 +211,9 @@ public Builder setConnection(String connection) {
}
private Builder(ConnectionName connectionName) {
- project = connectionName.project;
- location = connectionName.location;
- connection = connectionName.connection;
+ this.project = connectionName.project;
+ this.location = connectionName.location;
+ this.connection = connectionName.connection;
}
public ConnectionName build() {
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOrBuilder.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOrBuilder.java
index 94100ed8..f6884994 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOrBuilder.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOrBuilder.java
@@ -170,6 +170,42 @@ public interface ConnectionOrBuilder
*/
com.google.cloud.bigquery.connection.v1.AwsPropertiesOrBuilder getAwsOrBuilder();
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ *
+ * @return Whether the cloudSpanner field is set.
+ */
+ boolean hasCloudSpanner();
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ *
+ * @return The cloudSpanner.
+ */
+ com.google.cloud.bigquery.connection.v1.CloudSpannerProperties getCloudSpanner();
+ /**
+ *
+ *
+ * + * Cloud Spanner properties. + *+ * + *
.google.cloud.bigquery.connection.v1.CloudSpannerProperties cloud_spanner = 21;
+ */
+ com.google.cloud.bigquery.connection.v1.CloudSpannerPropertiesOrBuilder
+ getCloudSpannerOrBuilder();
+
/**
*
*
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOuterClass.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOuterClass.java
index 2349aa11..9ee2890c 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOuterClass.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/ConnectionOuterClass.java
@@ -63,6 +63,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_bigquery_connection_v1_CloudSqlCredential_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_bigquery_connection_v1_AwsProperties_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@@ -71,6 +75,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
internal_static_google_cloud_bigquery_connection_v1_AwsCrossAccountRole_descriptor;
static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_bigquery_connection_v1_AwsCrossAccountRole_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
@@ -110,81 +118,88 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"]\n"
+ "\027DeleteConnectionRequest\022B\n\004name\030\001 \001(\tB4"
+ "\340A\002\372A.\n,bigqueryconnection.googleapis.co"
- + "m/Connection\"\264\003\n\nConnection\022\014\n\004name\030\001 \001("
+ + "m/Connection\"\212\004\n\nConnection\022\014\n\004name\030\001 \001("
+ "\t\022\025\n\rfriendly_name\030\002 \001(\t\022\023\n\013description\030"
+ "\003 \001(\t\022L\n\tcloud_sql\030\004 \001(\01327.google.cloud."
+ "bigquery.connection.v1.CloudSqlPropertie"
+ "sH\000\022A\n\003aws\030\010 \001(\01322.google.cloud.bigquery"
- + ".connection.v1.AwsPropertiesH\000\022\032\n\rcreati"
- + "on_time\030\005 \001(\003B\003\340A\003\022\037\n\022last_modified_time"
- + "\030\006 \001(\003B\003\340A\003\022\033\n\016has_credential\030\007 \001(\010B\003\340A\003"
- + ":s\352Ap\n,bigqueryconnection.googleapis.com"
- + "/Connection\022@projects/{project}/location"
- + "s/{location}/connections/{connection}B\014\n"
- + "\nproperties\"\251\002\n\022CloudSqlProperties\022\023\n\013in"
- + "stance_id\030\001 \001(\t\022\020\n\010database\030\002 \001(\t\022R\n\004typ"
- + "e\030\003 \001(\0162D.google.cloud.bigquery.connecti"
- + "on.v1.CloudSqlProperties.DatabaseType\022P\n"
- + "\ncredential\030\004 \001(\01327.google.cloud.bigquer"
- + "y.connection.v1.CloudSqlCredentialB\003\340A\004\""
- + "F\n\014DatabaseType\022\035\n\031DATABASE_TYPE_UNSPECI"
- + "FIED\020\000\022\014\n\010POSTGRES\020\001\022\t\n\005MYSQL\020\002\"8\n\022Cloud"
- + "SqlCredential\022\020\n\010username\030\001 \001(\t\022\020\n\010passw"
- + "ord\030\002 \001(\t\"\200\001\n\rAwsProperties\022V\n\022cross_acc"
- + "ount_role\030\002 \001(\01328.google.cloud.bigquery."
- + "connection.v1.AwsCrossAccountRoleH\000B\027\n\025a"
- + "uthentication_method\"^\n\023AwsCrossAccountR"
- + "ole\022\023\n\013iam_role_id\030\001 \001(\t\022\030\n\013iam_user_id\030"
- + "\002 \001(\tB\003\340A\003\022\030\n\013external_id\030\003 \001(\tB\003\340A\0032\314\r\n"
- + "\021ConnectionService\022\350\001\n\020CreateConnection\022"
- + "<.google.cloud.bigquery.connection.v1.Cr"
- + "eateConnectionRequest\032/.google.cloud.big"
- + "query.connection.v1.Connection\"e\202\323\344\223\002=\"/"
- + "/v1/{parent=projects/*/locations/*}/conn"
- + "ections:\nconnection\332A\037parent,connection,"
- + "connection_id\022\273\001\n\rGetConnection\0229.google"
- + ".cloud.bigquery.connection.v1.GetConnect"
- + "ionRequest\032/.google.cloud.bigquery.conne"
- + "ction.v1.Connection\">\202\323\344\223\0021\022//v1/{name=p"
- + "rojects/*/locations/*/connections/*}\332A\004n"
- + "ame\022\316\001\n\017ListConnections\022;.google.cloud.b"
- + "igquery.connection.v1.ListConnectionsReq"
- + "uest\032<.google.cloud.bigquery.connection."
- + "v1.ListConnectionsResponse\"@\202\323\344\223\0021\022//v1/"
- + "{parent=projects/*/locations/*}/connecti"
- + "ons\332A\006parent\022\344\001\n\020UpdateConnection\022<.goog"
- + "le.cloud.bigquery.connection.v1.UpdateCo"
- + "nnectionRequest\032/.google.cloud.bigquery."
- + "connection.v1.Connection\"a\202\323\344\223\002=2//v1/{n"
- + "ame=projects/*/locations/*/connections/*"
- + "}:\nconnection\332A\033name,connection,update_m"
- + "ask\022\250\001\n\020DeleteConnection\022<.google.cloud."
- + "bigquery.connection.v1.DeleteConnectionR"
- + "equest\032\026.google.protobuf.Empty\">\202\323\344\223\0021*/"
+ + ".connection.v1.AwsPropertiesH\000\022T\n\rcloud_"
+ + "spanner\030\025 \001(\0132;.google.cloud.bigquery.co"
+ + "nnection.v1.CloudSpannerPropertiesH\000\022\032\n\r"
+ + "creation_time\030\005 \001(\003B\003\340A\003\022\037\n\022last_modifie"
+ + "d_time\030\006 \001(\003B\003\340A\003\022\033\n\016has_credential\030\007 \001("
+ + "\010B\003\340A\003:s\352Ap\n,bigqueryconnection.googleap"
+ + "is.com/Connection\022@projects/{project}/lo"
+ + "cations/{location}/connections/{connecti"
+ + "on}B\014\n\nproperties\"\251\002\n\022CloudSqlProperties"
+ + "\022\023\n\013instance_id\030\001 \001(\t\022\020\n\010database\030\002 \001(\t\022"
+ + "R\n\004type\030\003 \001(\0162D.google.cloud.bigquery.co"
+ + "nnection.v1.CloudSqlProperties.DatabaseT"
+ + "ype\022P\n\ncredential\030\004 \001(\01327.google.cloud.b"
+ + "igquery.connection.v1.CloudSqlCredential"
+ + "B\003\340A\004\"F\n\014DatabaseType\022\035\n\031DATABASE_TYPE_U"
+ + "NSPECIFIED\020\000\022\014\n\010POSTGRES\020\001\022\t\n\005MYSQL\020\002\"8\n"
+ + "\022CloudSqlCredential\022\020\n\010username\030\001 \001(\t\022\020\n"
+ + "\010password\030\002 \001(\t\"C\n\026CloudSpannerPropertie"
+ + "s\022\020\n\010database\030\001 \001(\t\022\027\n\017use_parallelism\030\002"
+ + " \001(\010\"\313\001\n\rAwsProperties\022V\n\022cross_account_"
+ + "role\030\002 \001(\01328.google.cloud.bigquery.conne"
+ + "ction.v1.AwsCrossAccountRoleH\000\022I\n\013access"
+ + "_role\030\003 \001(\01322.google.cloud.bigquery.conn"
+ + "ection.v1.AwsAccessRoleH\000B\027\n\025authenticat"
+ + "ion_method\"^\n\023AwsCrossAccountRole\022\023\n\013iam"
+ + "_role_id\030\001 \001(\t\022\030\n\013iam_user_id\030\002 \001(\tB\003\340A\003"
+ + "\022\030\n\013external_id\030\003 \001(\tB\003\340A\003\"6\n\rAwsAccessR"
+ + "ole\022\023\n\013iam_role_id\030\001 \001(\t\022\020\n\010identity\030\002 \001"
+ + "(\t2\314\r\n\021ConnectionService\022\350\001\n\020CreateConne"
+ + "ction\022<.google.cloud.bigquery.connection"
+ + ".v1.CreateConnectionRequest\032/.google.clo"
+ + "ud.bigquery.connection.v1.Connection\"e\202\323"
+ + "\344\223\002=\"//v1/{parent=projects/*/locations/*"
+ + "}/connections:\nconnection\332A\037parent,conne"
+ + "ction,connection_id\022\273\001\n\rGetConnection\0229."
+ + "google.cloud.bigquery.connection.v1.GetC"
+ + "onnectionRequest\032/.google.cloud.bigquery"
+ + ".connection.v1.Connection\">\202\323\344\223\0021\022//v1/{"
+ + "name=projects/*/locations/*/connections/"
+ + "*}\332A\004name\022\316\001\n\017ListConnections\022;.google.c"
+ + "loud.bigquery.connection.v1.ListConnecti"
+ + "onsRequest\032<.google.cloud.bigquery.conne"
+ + "ction.v1.ListConnectionsResponse\"@\202\323\344\223\0021"
+ + "\022//v1/{parent=projects/*/locations/*}/co"
+ + "nnections\332A\006parent\022\344\001\n\020UpdateConnection\022"
+ + "<.google.cloud.bigquery.connection.v1.Up"
+ + "dateConnectionRequest\032/.google.cloud.big"
+ + "query.connection.v1.Connection\"a\202\323\344\223\002=2/"
+ "/v1/{name=projects/*/locations/*/connect"
- + "ions/*}\332A\004name\022\251\001\n\014GetIamPolicy\022\".google"
- + ".iam.v1.GetIamPolicyRequest\032\025.google.iam"
- + ".v1.Policy\"^\202\323\344\223\002E\"@/v1/{resource=projec"
- + "ts/*/locations/*/connections/*}:getIamPo"
- + "licy:\001*\332A\020resource,options\022\250\001\n\014SetIamPol"
- + "icy\022\".google.iam.v1.SetIamPolicyRequest\032"
- + "\025.google.iam.v1.Policy\"]\202\323\344\223\002E\"@/v1/{res"
- + "ource=projects/*/locations/*/connections"
- + "/*}:setIamPolicy:\001*\332A\017resource,policy\022\323\001"
- + "\n\022TestIamPermissions\022(.google.iam.v1.Tes"
- + "tIamPermissionsRequest\032).google.iam.v1.T"
- + "estIamPermissionsResponse\"h\202\323\344\223\002K\"F/v1/{"
- + "resource=projects/*/locations/*/connecti"
- + "ons/*}:testIamPermissions:\001*\332A\024resource,"
- + "permissions\032~\312A!bigqueryconnection.googl"
- + "eapis.com\322AWhttps://www.googleapis.com/a"
- + "uth/bigquery,https://www.googleapis.com/"
- + "auth/cloud-platformB\306\001\n\'com.google.cloud"
- + ".bigquery.connection.v1P\001ZMgoogle.golang"
- + ".org/genproto/googleapis/cloud/bigquery/"
- + "connection/v1;connection\252\002#Google.Cloud."
- + "BigQuery.Connection.V1\312\002#Google\\Cloud\\Bi"
- + "gQuery\\Connection\\V1b\006proto3"
+ + "ions/*}:\nconnection\332A\033name,connection,up"
+ + "date_mask\022\250\001\n\020DeleteConnection\022<.google."
+ + "cloud.bigquery.connection.v1.DeleteConne"
+ + "ctionRequest\032\026.google.protobuf.Empty\">\202\323"
+ + "\344\223\0021*//v1/{name=projects/*/locations/*/c"
+ + "onnections/*}\332A\004name\022\251\001\n\014GetIamPolicy\022\"."
+ + "google.iam.v1.GetIamPolicyRequest\032\025.goog"
+ + "le.iam.v1.Policy\"^\202\323\344\223\002E\"@/v1/{resource="
+ + "projects/*/locations/*/connections/*}:ge"
+ + "tIamPolicy:\001*\332A\020resource,options\022\250\001\n\014Set"
+ + "IamPolicy\022\".google.iam.v1.SetIamPolicyRe"
+ + "quest\032\025.google.iam.v1.Policy\"]\202\323\344\223\002E\"@/v"
+ + "1/{resource=projects/*/locations/*/conne"
+ + "ctions/*}:setIamPolicy:\001*\332A\017resource,pol"
+ + "icy\022\323\001\n\022TestIamPermissions\022(.google.iam."
+ + "v1.TestIamPermissionsRequest\032).google.ia"
+ + "m.v1.TestIamPermissionsResponse\"h\202\323\344\223\002K\""
+ + "F/v1/{resource=projects/*/locations/*/co"
+ + "nnections/*}:testIamPermissions:\001*\332A\024res"
+ + "ource,permissions\032~\312A!bigqueryconnection"
+ + ".googleapis.com\322AWhttps://www.googleapis"
+ + ".com/auth/bigquery,https://www.googleapi"
+ + "s.com/auth/cloud-platformB\306\001\n\'com.google"
+ + ".cloud.bigquery.connection.v1P\001ZMgoogle."
+ + "golang.org/genproto/googleapis/cloud/big"
+ + "query/connection/v1;connection\252\002#Google."
+ + "Cloud.BigQuery.Connection.V1\312\002#Google\\Cl"
+ + "oud\\BigQuery\\Connection\\V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -259,6 +274,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"Description",
"CloudSql",
"Aws",
+ "CloudSpanner",
"CreationTime",
"LastModifiedTime",
"HasCredential",
@@ -280,22 +296,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new java.lang.String[] {
"Username", "Password",
});
- internal_static_google_cloud_bigquery_connection_v1_AwsProperties_descriptor =
+ internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_descriptor =
getDescriptor().getMessageTypes().get(9);
+ internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_connection_v1_CloudSpannerProperties_descriptor,
+ new java.lang.String[] {
+ "Database", "UseParallelism",
+ });
+ internal_static_google_cloud_bigquery_connection_v1_AwsProperties_descriptor =
+ getDescriptor().getMessageTypes().get(10);
internal_static_google_cloud_bigquery_connection_v1_AwsProperties_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_bigquery_connection_v1_AwsProperties_descriptor,
new java.lang.String[] {
- "CrossAccountRole", "AuthenticationMethod",
+ "CrossAccountRole", "AccessRole", "AuthenticationMethod",
});
internal_static_google_cloud_bigquery_connection_v1_AwsCrossAccountRole_descriptor =
- getDescriptor().getMessageTypes().get(10);
+ getDescriptor().getMessageTypes().get(11);
internal_static_google_cloud_bigquery_connection_v1_AwsCrossAccountRole_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_bigquery_connection_v1_AwsCrossAccountRole_descriptor,
new java.lang.String[] {
"IamRoleId", "IamUserId", "ExternalId",
});
+ internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_descriptor =
+ getDescriptor().getMessageTypes().get(12);
+ internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_fieldAccessorTable =
+ new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_cloud_bigquery_connection_v1_AwsAccessRole_descriptor,
+ new java.lang.String[] {
+ "IamRoleId", "Identity",
+ });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.ClientProto.defaultHost);
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/LocationName.java b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/LocationName.java
index 132df548..d2189b81 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/LocationName.java
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/java/com/google/cloud/bigquery/connection/v1/LocationName.java
@@ -181,8 +181,8 @@ public Builder setLocation(String location) {
}
private Builder(LocationName locationName) {
- project = locationName.project;
- location = locationName.location;
+ this.project = locationName.project;
+ this.location = locationName.location;
}
public LocationName build() {
diff --git a/proto-google-cloud-bigqueryconnection-v1/src/main/proto/google/cloud/bigquery/connection/v1/connection.proto b/proto-google-cloud-bigqueryconnection-v1/src/main/proto/google/cloud/bigquery/connection/v1/connection.proto
index 3db05ef1..697b0b8f 100644
--- a/proto-google-cloud-bigqueryconnection-v1/src/main/proto/google/cloud/bigquery/connection/v1/connection.proto
+++ b/proto-google-cloud-bigqueryconnection-v1/src/main/proto/google/cloud/bigquery/connection/v1/connection.proto
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -233,6 +233,9 @@ message Connection {
// Amazon Web Services (AWS) properties.
AwsProperties aws = 8;
+
+ // Cloud Spanner properties.
+ CloudSpannerProperties cloud_spanner = 21;
}
// Output only. The creation timestamp of the connection.
@@ -281,6 +284,15 @@ message CloudSqlCredential {
string password = 2;
}
+// Connection properties specific to Cloud Spanner.
+message CloudSpannerProperties {
+ // Cloud Spanner database in the form `project/instance/database'
+ string database = 1;
+
+ // If parallelism should be used when reading from Cloud Spanner
+ bool use_parallelism = 2;
+}
+
// Connection properties specific to Amazon Web Services (AWS).
message AwsProperties {
// Authentication method chosen at connection creation.
@@ -288,6 +300,10 @@ message AwsProperties {
// Authentication using Google owned AWS IAM user's access key to assume
// into customer's AWS IAM Role.
AwsCrossAccountRole cross_account_role = 2;
+
+ // Authentication using Google owned service account to assume into
+ // customer's AWS IAM Role.
+ AwsAccessRole access_role = 3;
}
}
@@ -306,3 +322,15 @@ message AwsCrossAccountRole {
// https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
string external_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
+
+// Authentication method for Amazon Web Services (AWS) that uses Google owned
+// Google service account to assume into customer's AWS IAM Role.
+message AwsAccessRole {
+ // The user’s AWS IAM Role that trusts the Google-owned AWS IAM user
+ // Connection.
+ string iam_role_id = 1;
+
+ // A unique Google-owned and Google-generated identity for the Connection.
+ // This identity will be used to access the user's AWS IAM Role.
+ string identity = 2;
+}
diff --git a/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionName.java b/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionName.java
index 9b2508ed..f912845b 100644
--- a/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionName.java
+++ b/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/ConnectionName.java
@@ -211,9 +211,9 @@ public Builder setConnection(String connection) {
}
private Builder(ConnectionName connectionName) {
- project = connectionName.project;
- location = connectionName.location;
- connection = connectionName.connection;
+ this.project = connectionName.project;
+ this.location = connectionName.location;
+ this.connection = connectionName.connection;
}
public ConnectionName build() {
diff --git a/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/LocationName.java b/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/LocationName.java
index 87f612d4..130c3a2b 100644
--- a/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/LocationName.java
+++ b/proto-google-cloud-bigqueryconnection-v1beta1/src/main/java/com/google/cloud/bigquery/connection/v1beta1/LocationName.java
@@ -181,8 +181,8 @@ public Builder setLocation(String location) {
}
private Builder(LocationName locationName) {
- project = locationName.project;
- location = locationName.location;
+ this.project = locationName.project;
+ this.location = locationName.location;
}
public LocationName build() {