Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
feat: Update documentai/v1beta3 protos: add support for boolean norma…
Browse files Browse the repository at this point in the history
…lized value (#358)

This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/21a7cafd-ffcd-4b64-a40c-b26bf361386d/targets

- [ ] To automatically regenerate this PR, check this box.

PiperOrigin-RevId: 359109762
Source-Link: googleapis/googleapis@8c058c5
  • Loading branch information
yoshi-automation committed Mar 2, 2021
1 parent 811fe32 commit 2f341a1
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 102 deletions.
Expand Up @@ -34289,11 +34289,11 @@ public interface EntityOrBuilder
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The id.
*/
Expand All @@ -34302,11 +34302,11 @@ public interface EntityOrBuilder
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The bytes for id.
*/
Expand Down Expand Up @@ -34870,6 +34870,20 @@ public interface NormalizedValueOrBuilder
*/
com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder();

/**
*
*
* <pre>
* Boolean value. Can be used for entities with binary values, or for
* checkboxes.
* </pre>
*
* <code>bool boolean_value = 6;</code>
*
* @return The booleanValue.
*/
boolean getBooleanValue();

/**
*
*
Expand Down Expand Up @@ -35027,6 +35041,12 @@ private NormalizedValue(
structuredValueCase_ = 5;
break;
}
case 48:
{
structuredValueCase_ = 6;
structuredValue_ = input.readBool();
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
Expand Down Expand Up @@ -35073,6 +35093,7 @@ public enum StructuredValueCase
DATE_VALUE(3),
DATETIME_VALUE(4),
ADDRESS_VALUE(5),
BOOLEAN_VALUE(6),
STRUCTUREDVALUE_NOT_SET(0);
private final int value;

Expand All @@ -35099,6 +35120,8 @@ public static StructuredValueCase forNumber(int value) {
return DATETIME_VALUE;
case 5:
return ADDRESS_VALUE;
case 6:
return BOOLEAN_VALUE;
case 0:
return STRUCTUREDVALUE_NOT_SET;
default:
Expand Down Expand Up @@ -35343,6 +35366,27 @@ public com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder() {
return com.google.type.PostalAddress.getDefaultInstance();
}

public static final int BOOLEAN_VALUE_FIELD_NUMBER = 6;
/**
*
*
* <pre>
* Boolean value. Can be used for entities with binary values, or for
* checkboxes.
* </pre>
*
* <code>bool boolean_value = 6;</code>
*
* @return The booleanValue.
*/
@java.lang.Override
public boolean getBooleanValue() {
if (structuredValueCase_ == 6) {
return (java.lang.Boolean) structuredValue_;
}
return false;
}

public static final int TEXT_FIELD_NUMBER = 1;
private volatile java.lang.Object text_;
/**
Expand Down Expand Up @@ -35431,6 +35475,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (structuredValueCase_ == 5) {
output.writeMessage(5, (com.google.type.PostalAddress) structuredValue_);
}
if (structuredValueCase_ == 6) {
output.writeBool(6, (boolean) ((java.lang.Boolean) structuredValue_));
}
unknownFields.writeTo(output);
}

Expand Down Expand Up @@ -35463,6 +35510,11 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
5, (com.google.type.PostalAddress) structuredValue_);
}
if (structuredValueCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
6, (boolean) ((java.lang.Boolean) structuredValue_));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
Expand Down Expand Up @@ -35494,6 +35546,9 @@ public boolean equals(final java.lang.Object obj) {
case 5:
if (!getAddressValue().equals(other.getAddressValue())) return false;
break;
case 6:
if (getBooleanValue() != other.getBooleanValue()) return false;
break;
case 0:
default:
}
Expand Down Expand Up @@ -35527,6 +35582,10 @@ public int hashCode() {
hash = (37 * hash) + ADDRESS_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getAddressValue().hashCode();
break;
case 6:
hash = (37 * hash) + BOOLEAN_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBooleanValue());
break;
case 0:
default:
}
Expand Down Expand Up @@ -35744,6 +35803,9 @@ public com.google.cloud.documentai.v1beta3.Document.Entity.NormalizedValue build
result.structuredValue_ = addressValueBuilder_.build();
}
}
if (structuredValueCase_ == 6) {
result.structuredValue_ = structuredValue_;
}
result.text_ = text_;
result.structuredValueCase_ = structuredValueCase_;
onBuilt();
Expand Down Expand Up @@ -35827,6 +35889,11 @@ public Builder mergeFrom(
mergeAddressValue(other.getAddressValue());
break;
}
case BOOLEAN_VALUE:
{
setBooleanValue(other.getBooleanValue());
break;
}
case STRUCTUREDVALUE_NOT_SET:
{
break;
Expand Down Expand Up @@ -36768,6 +36835,64 @@ public com.google.type.PostalAddressOrBuilder getAddressValueOrBuilder() {
return addressValueBuilder_;
}

/**
*
*
* <pre>
* Boolean value. Can be used for entities with binary values, or for
* checkboxes.
* </pre>
*
* <code>bool boolean_value = 6;</code>
*
* @return The booleanValue.
*/
public boolean getBooleanValue() {
if (structuredValueCase_ == 6) {
return (java.lang.Boolean) structuredValue_;
}
return false;
}
/**
*
*
* <pre>
* Boolean value. Can be used for entities with binary values, or for
* checkboxes.
* </pre>
*
* <code>bool boolean_value = 6;</code>
*
* @param value The booleanValue to set.
* @return This builder for chaining.
*/
public Builder setBooleanValue(boolean value) {
structuredValueCase_ = 6;
structuredValue_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* Boolean value. Can be used for entities with binary values, or for
* checkboxes.
* </pre>
*
* <code>bool boolean_value = 6;</code>
*
* @return This builder for chaining.
*/
public Builder clearBooleanValue() {
if (structuredValueCase_ == 6) {
structuredValueCase_ = 0;
structuredValue_ = null;
onChanged();
}
return this;
}

private java.lang.Object text_ = "";
/**
*
Expand Down Expand Up @@ -37236,11 +37361,11 @@ public com.google.cloud.documentai.v1beta3.Document.PageAnchor getPageAnchor() {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The id.
*/
Expand All @@ -37260,11 +37385,11 @@ public java.lang.String getId() {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The bytes for id.
*/
Expand Down Expand Up @@ -38866,11 +38991,11 @@ public Builder clearPageAnchor() {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The id.
*/
Expand All @@ -38889,11 +39014,11 @@ public java.lang.String getId() {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return The bytes for id.
*/
Expand All @@ -38912,11 +39037,11 @@ public com.google.protobuf.ByteString getIdBytes() {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @param value The id to set.
* @return This builder for chaining.
Expand All @@ -38934,11 +39059,11 @@ public Builder setId(java.lang.String value) {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @return This builder for chaining.
*/
Expand All @@ -38952,11 +39077,11 @@ public Builder clearId() {
*
*
* <pre>
* Canonical id. This will be a unique value in the entity list
* Optional. Canonical id. This will be a unique value in the entity list
* for this document.
* </pre>
*
* <code>string id = 7;</code>
* <code>string id = 7 [(.google.api.field_behavior) = OPTIONAL];</code>
*
* @param value The bytes for id to set.
* @return This builder for chaining.
Expand Down Expand Up @@ -44988,7 +45113,8 @@ public interface PageRefOrBuilder
*
*
* <pre>
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
* [Document.pages][page_refs.page] to locate the related page element.
* </pre>
*
* <code>int64 page = 1 [(.google.api.field_behavior) = REQUIRED];</code>
Expand Down Expand Up @@ -45497,7 +45623,8 @@ private LayoutType(int value) {
*
*
* <pre>
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
* [Document.pages][page_refs.page] to locate the related page element.
* </pre>
*
* <code>int64 page = 1 [(.google.api.field_behavior) = REQUIRED];</code>
Expand Down Expand Up @@ -46062,7 +46189,8 @@ public Builder mergeFrom(
*
*
* <pre>
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
* [Document.pages][page_refs.page] to locate the related page element.
* </pre>
*
* <code>int64 page = 1 [(.google.api.field_behavior) = REQUIRED];</code>
Expand All @@ -46077,7 +46205,8 @@ public long getPage() {
*
*
* <pre>
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
* [Document.pages][page_refs.page] to locate the related page element.
* </pre>
*
* <code>int64 page = 1 [(.google.api.field_behavior) = REQUIRED];</code>
Expand All @@ -46095,7 +46224,8 @@ public Builder setPage(long value) {
*
*
* <pre>
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element
* Required. Index into the [Document.pages][google.cloud.documentai.v1beta3.Document.pages] element, for example using
* [Document.pages][page_refs.page] to locate the related page element.
* </pre>
*
* <code>int64 page = 1 [(.google.api.field_behavior) = REQUIRED];</code>
Expand Down

0 comments on commit 2f341a1

Please sign in to comment.