Skip to content

Commit

Permalink
feat: add default_missing_value_interpretation field; indicate KMS_SE…
Browse files Browse the repository at this point in the history
…RVICE_ERROR is retryable (#2229)

* feat: add beta2 deprecation message

PiperOrigin-RevId: 556875976

Source-Link: googleapis/googleapis@29b8ec7

Source-Link: googleapis/googleapis-gen@cc401b7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2M0MDFiN2NhYzVjNzdjNjgxMDU2Yzc4OGFiMWM4ZTIwMjVlN2JhNiJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: add default_missing_value_interpretation field; indicate KMS_SERVICE_ERROR is retryable

PiperOrigin-RevId: 556931084

Source-Link: googleapis/googleapis@ca3d7e8

Source-Link: googleapis/googleapis-gen@861a1c3
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODYxYTFjMzQ2MjRhNTcyNTEzNDVjODIwZDY5ODg3YTQ5NWVlNDE3YSJ9

* 🦉 Updates from OwlBot post-processor

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

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Aug 15, 2023
1 parent 9b9b5c0 commit df686d6
Show file tree
Hide file tree
Showing 13 changed files with 520 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
*
* <p>The Write API can be used to write data to BigQuery.
*
* <p>The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1) should be used
* instead of the v1beta2 API for BigQueryWrite operations.
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
*
* <p>The Write API can be used to write data to BigQuery.
*
* <p>The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1) should be used
* instead of the v1beta2 API for BigQueryWrite operations.
*
* <p>Sample for BigQueryWriteClient:
*
* <pre>{@code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
* <pre>
* BigQuery Write API.
* The Write API can be used to write data to BigQuery.
* The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1)
* should be used instead of the v1beta2 API for BigQueryWrite operations.
* </pre>
*/
@javax.annotation.Generated(
Expand Down Expand Up @@ -369,6 +372,9 @@ public BigQueryWriteFutureStub newStub(
* <pre>
* BigQuery Write API.
* The Write API can be used to write data to BigQuery.
* The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1)
* should be used instead of the v1beta2 API for BigQueryWrite operations.
* </pre>
*/
public interface AsyncService {
Expand Down Expand Up @@ -502,6 +508,9 @@ default void flushRows(
* <pre>
* BigQuery Write API.
* The Write API can be used to write data to BigQuery.
* The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1)
* should be used instead of the v1beta2 API for BigQueryWrite operations.
* </pre>
*/
public abstract static class BigQueryWriteImplBase
Expand All @@ -519,6 +528,9 @@ public final io.grpc.ServerServiceDefinition bindService() {
* <pre>
* BigQuery Write API.
* The Write API can be used to write data to BigQuery.
* The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1)
* should be used instead of the v1beta2 API for BigQueryWrite operations.
* </pre>
*/
public static final class BigQueryWriteStub
Expand Down Expand Up @@ -670,6 +682,9 @@ public void flushRows(
* <pre>
* BigQuery Write API.
* The Write API can be used to write data to BigQuery.
* The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1)
* should be used instead of the v1beta2 API for BigQueryWrite operations.
* </pre>
*/
public static final class BigQueryWriteBlockingStub
Expand Down Expand Up @@ -773,6 +788,9 @@ public com.google.cloud.bigquery.storage.v1beta2.FlushRowsResponse flushRows(
* <pre>
* BigQuery Write API.
* The Write API can be used to write data to BigQuery.
* The [google.cloud.bigquery.storage.v1
* API](/bigquery/docs/reference/storage/rpc/google.cloud.bigquery.storage.v1)
* should be used instead of the v1beta2 API for BigQueryWrite operations.
* </pre>
*/
public static final class BigQueryWriteFutureStub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ private AppendRowsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> buil
private AppendRowsRequest() {
writeStream_ = "";
traceId_ = "";
defaultMissingValueInterpretation_ = 0;
}

@java.lang.Override
Expand Down Expand Up @@ -2119,6 +2120,66 @@ public int getMissingValueInterpretationsValueOrThrow(java.lang.String key) {
return map.get(key);
}

public static final int DEFAULT_MISSING_VALUE_INTERPRETATION_FIELD_NUMBER = 8;
private int defaultMissingValueInterpretation_ = 0;
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return The enum numeric value on the wire for defaultMissingValueInterpretation.
*/
@java.lang.Override
public int getDefaultMissingValueInterpretationValue() {
return defaultMissingValueInterpretation_;
}
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return The defaultMissingValueInterpretation.
*/
@java.lang.Override
public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
getDefaultMissingValueInterpretation() {
com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation result =
com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation.forNumber(
defaultMissingValueInterpretation_);
return result == null
? com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
.UNRECOGNIZED
: result;
}

private byte memoizedIsInitialized = -1;

@java.lang.Override
Expand Down Expand Up @@ -2157,6 +2218,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
internalGetMissingValueInterpretations(),
MissingValueInterpretationsDefaultEntryHolder.defaultEntry,
7);
if (defaultMissingValueInterpretation_
!= com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
.MISSING_VALUE_INTERPRETATION_UNSPECIFIED
.getNumber()) {
output.writeEnum(8, defaultMissingValueInterpretation_);
}
getUnknownFields().writeTo(output);
}

Expand Down Expand Up @@ -2193,6 +2260,14 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
7, missingValueInterpretations__);
}
if (defaultMissingValueInterpretation_
!= com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
.MISSING_VALUE_INTERPRETATION_UNSPECIFIED
.getNumber()) {
size +=
com.google.protobuf.CodedOutputStream.computeEnumSize(
8, defaultMissingValueInterpretation_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
Expand All @@ -2217,6 +2292,8 @@ public boolean equals(final java.lang.Object obj) {
if (!getTraceId().equals(other.getTraceId())) return false;
if (!internalGetMissingValueInterpretations()
.equals(other.internalGetMissingValueInterpretations())) return false;
if (defaultMissingValueInterpretation_ != other.defaultMissingValueInterpretation_)
return false;
if (!getRowsCase().equals(other.getRowsCase())) return false;
switch (rowsCase_) {
case 4:
Expand Down Expand Up @@ -2248,6 +2325,8 @@ public int hashCode() {
hash = (37 * hash) + MISSING_VALUE_INTERPRETATIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetMissingValueInterpretations().hashCode();
}
hash = (37 * hash) + DEFAULT_MISSING_VALUE_INTERPRETATION_FIELD_NUMBER;
hash = (53 * hash) + defaultMissingValueInterpretation_;
switch (rowsCase_) {
case 4:
hash = (37 * hash) + PROTO_ROWS_FIELD_NUMBER;
Expand Down Expand Up @@ -2435,6 +2514,7 @@ public Builder clear() {
}
traceId_ = "";
internalGetMutableMissingValueInterpretations().clear();
defaultMissingValueInterpretation_ = 0;
rowsCase_ = 0;
rows_ = null;
return this;
Expand Down Expand Up @@ -2487,6 +2567,9 @@ private void buildPartial0(com.google.cloud.bigquery.storage.v1.AppendRowsReques
result.missingValueInterpretations_ = internalGetMissingValueInterpretations();
result.missingValueInterpretations_.makeImmutable();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.defaultMissingValueInterpretation_ = defaultMissingValueInterpretation_;
}
}

private void buildPartialOneofs(com.google.cloud.bigquery.storage.v1.AppendRowsRequest result) {
Expand Down Expand Up @@ -2559,6 +2642,10 @@ public Builder mergeFrom(com.google.cloud.bigquery.storage.v1.AppendRowsRequest
internalGetMutableMissingValueInterpretations()
.mergeFrom(other.internalGetMissingValueInterpretations());
bitField0_ |= 0x00000010;
if (other.defaultMissingValueInterpretation_ != 0) {
setDefaultMissingValueInterpretationValue(
other.getDefaultMissingValueInterpretationValue());
}
switch (other.getRowsCase()) {
case PROTO_ROWS:
{
Expand Down Expand Up @@ -2641,6 +2728,12 @@ public Builder mergeFrom(
bitField0_ |= 0x00000010;
break;
} // case 58
case 64:
{
defaultMissingValueInterpretation_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 64
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
Expand Down Expand Up @@ -4005,6 +4098,152 @@ public Builder putAllMissingValueInterpretationsValue(
return this;
}

private int defaultMissingValueInterpretation_ = 0;
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return The enum numeric value on the wire for defaultMissingValueInterpretation.
*/
@java.lang.Override
public int getDefaultMissingValueInterpretationValue() {
return defaultMissingValueInterpretation_;
}
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @param value The enum numeric value on the wire for defaultMissingValueInterpretation to set.
* @return This builder for chaining.
*/
public Builder setDefaultMissingValueInterpretationValue(int value) {
defaultMissingValueInterpretation_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return The defaultMissingValueInterpretation.
*/
@java.lang.Override
public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
getDefaultMissingValueInterpretation() {
com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation result =
com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
.forNumber(defaultMissingValueInterpretation_);
return result == null
? com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation
.UNRECOGNIZED
: result;
}
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @param value The defaultMissingValueInterpretation to set.
* @return This builder for chaining.
*/
public Builder setDefaultMissingValueInterpretation(
com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
defaultMissingValueInterpretation_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
* <pre>
* Optional. Default missing value interpretation for all columns in the
* table. When a value is specified on an `AppendRowsRequest`, it is applied
* to all requests on the connection from that point forward, until a
* subsequent `AppendRowsRequest` sets it to a different value.
* `missing_value_interpretation` can override
* `default_missing_value_interpretation`. For example, if you want to write
* `NULL` instead of using default values for some columns, you can set
* `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same
* time, set `missing_value_interpretations` to `NULL_VALUE` on those columns.
* </pre>
*
* <code>
* .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL];
* </code>
*
* @return This builder for chaining.
*/
public Builder clearDefaultMissingValueInterpretation() {
bitField0_ = (bitField0_ & ~0x00000020);
defaultMissingValueInterpretation_ = 0;
onChanged();
return this;
}

@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
Expand Down
Loading

0 comments on commit df686d6

Please sign in to comment.