
com.google.cloud.visionai.v1.BigQueryConfig Maven / Gradle / Ivy
/*
* Copyright 2024 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/visionai/v1/platform.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;
/**
*
*
*
* Message of configurations for BigQuery processor.
*
*
* Protobuf type {@code google.cloud.visionai.v1.BigQueryConfig}
*/
public final class BigQueryConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.BigQueryConfig)
BigQueryConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use BigQueryConfig.newBuilder() to construct.
private BigQueryConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BigQueryConfig() {
table_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BigQueryConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetCloudFunctionMapping();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_BigQueryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.BigQueryConfig.class,
com.google.cloud.visionai.v1.BigQueryConfig.Builder.class);
}
public static final int TABLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object table_ = "";
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @return The table.
*/
@java.lang.Override
public java.lang.String getTable() {
java.lang.Object ref = table_;
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();
table_ = s;
return s;
}
}
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @return The bytes for table.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTableBytes() {
java.lang.Object ref = table_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
table_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLOUD_FUNCTION_MAPPING_FIELD_NUMBER = 2;
private static final class CloudFunctionMappingDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_BigQueryConfig_CloudFunctionMappingEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField cloudFunctionMapping_;
private com.google.protobuf.MapField
internalGetCloudFunctionMapping() {
if (cloudFunctionMapping_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CloudFunctionMappingDefaultEntryHolder.defaultEntry);
}
return cloudFunctionMapping_;
}
public int getCloudFunctionMappingCount() {
return internalGetCloudFunctionMapping().getMap().size();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public boolean containsCloudFunctionMapping(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetCloudFunctionMapping().getMap().containsKey(key);
}
/** Use {@link #getCloudFunctionMappingMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCloudFunctionMapping() {
return getCloudFunctionMappingMap();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public java.util.Map getCloudFunctionMappingMap() {
return internalGetCloudFunctionMapping().getMap();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public /* nullable */ java.lang.String getCloudFunctionMappingOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetCloudFunctionMapping().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public java.lang.String getCloudFunctionMappingOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetCloudFunctionMapping().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int CREATE_DEFAULT_TABLE_IF_NOT_EXISTS_FIELD_NUMBER = 3;
private boolean createDefaultTableIfNotExists_ = false;
/**
*
*
*
* If true, App Platform will create the BigQuery DataSet and the
* BigQuery Table with default schema if the specified table doesn't exist.
* This doesn't work if any cloud function customized schema is specified
* since the system doesn't know your desired schema.
* JSON column will be used in the default table created by App Platform.
*
*
* bool create_default_table_if_not_exists = 3;
*
* @return The createDefaultTableIfNotExists.
*/
@java.lang.Override
public boolean getCreateDefaultTableIfNotExists() {
return createDefaultTableIfNotExists_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, table_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output,
internalGetCloudFunctionMapping(),
CloudFunctionMappingDefaultEntryHolder.defaultEntry,
2);
if (createDefaultTableIfNotExists_ != false) {
output.writeBool(3, createDefaultTableIfNotExists_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, table_);
}
for (java.util.Map.Entry entry :
internalGetCloudFunctionMapping().getMap().entrySet()) {
com.google.protobuf.MapEntry cloudFunctionMapping__ =
CloudFunctionMappingDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, cloudFunctionMapping__);
}
if (createDefaultTableIfNotExists_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(3, createDefaultTableIfNotExists_);
}
size += getUnknownFields().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.visionai.v1.BigQueryConfig)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.BigQueryConfig other =
(com.google.cloud.visionai.v1.BigQueryConfig) obj;
if (!getTable().equals(other.getTable())) return false;
if (!internalGetCloudFunctionMapping().equals(other.internalGetCloudFunctionMapping()))
return false;
if (getCreateDefaultTableIfNotExists() != other.getCreateDefaultTableIfNotExists())
return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + TABLE_FIELD_NUMBER;
hash = (53 * hash) + getTable().hashCode();
if (!internalGetCloudFunctionMapping().getMap().isEmpty()) {
hash = (37 * hash) + CLOUD_FUNCTION_MAPPING_FIELD_NUMBER;
hash = (53 * hash) + internalGetCloudFunctionMapping().hashCode();
}
hash = (37 * hash) + CREATE_DEFAULT_TABLE_IF_NOT_EXISTS_FIELD_NUMBER;
hash =
(53 * hash) + com.google.protobuf.Internal.hashBoolean(getCreateDefaultTableIfNotExists());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.BigQueryConfig parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.BigQueryConfig parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.BigQueryConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.BigQueryConfig 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.visionai.v1.BigQueryConfig 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;
}
/**
*
*
*
* Message of configurations for BigQuery processor.
*
*
* Protobuf type {@code google.cloud.visionai.v1.BigQueryConfig}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.BigQueryConfig)
com.google.cloud.visionai.v1.BigQueryConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetCloudFunctionMapping();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableCloudFunctionMapping();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_BigQueryConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.BigQueryConfig.class,
com.google.cloud.visionai.v1.BigQueryConfig.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.BigQueryConfig.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
table_ = "";
internalGetMutableCloudFunctionMapping().clear();
createDefaultTableIfNotExists_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_BigQueryConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.BigQueryConfig getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.BigQueryConfig build() {
com.google.cloud.visionai.v1.BigQueryConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.BigQueryConfig buildPartial() {
com.google.cloud.visionai.v1.BigQueryConfig result =
new com.google.cloud.visionai.v1.BigQueryConfig(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.visionai.v1.BigQueryConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.table_ = table_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.cloudFunctionMapping_ = internalGetCloudFunctionMapping();
result.cloudFunctionMapping_.makeImmutable();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.createDefaultTableIfNotExists_ = createDefaultTableIfNotExists_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.visionai.v1.BigQueryConfig) {
return mergeFrom((com.google.cloud.visionai.v1.BigQueryConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.BigQueryConfig other) {
if (other == com.google.cloud.visionai.v1.BigQueryConfig.getDefaultInstance()) return this;
if (!other.getTable().isEmpty()) {
table_ = other.table_;
bitField0_ |= 0x00000001;
onChanged();
}
internalGetMutableCloudFunctionMapping().mergeFrom(other.internalGetCloudFunctionMapping());
bitField0_ |= 0x00000002;
if (other.getCreateDefaultTableIfNotExists() != false) {
setCreateDefaultTableIfNotExists(other.getCreateDefaultTableIfNotExists());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
table_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
com.google.protobuf.MapEntry
cloudFunctionMapping__ =
input.readMessage(
CloudFunctionMappingDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableCloudFunctionMapping()
.getMutableMap()
.put(cloudFunctionMapping__.getKey(), cloudFunctionMapping__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
createDefaultTableIfNotExists_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object table_ = "";
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @return The table.
*/
public java.lang.String getTable() {
java.lang.Object ref = table_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
table_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @return The bytes for table.
*/
public com.google.protobuf.ByteString getTableBytes() {
java.lang.Object ref = table_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
table_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @param value The table to set.
* @return This builder for chaining.
*/
public Builder setTable(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
table_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @return This builder for chaining.
*/
public Builder clearTable() {
table_ = getDefaultInstance().getTable();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* BigQuery table resource for Vision AI Platform to ingest annotations to.
*
*
* string table = 1;
*
* @param value The bytes for table to set.
* @return This builder for chaining.
*/
public Builder setTableBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
table_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField cloudFunctionMapping_;
private com.google.protobuf.MapField
internalGetCloudFunctionMapping() {
if (cloudFunctionMapping_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CloudFunctionMappingDefaultEntryHolder.defaultEntry);
}
return cloudFunctionMapping_;
}
private com.google.protobuf.MapField
internalGetMutableCloudFunctionMapping() {
if (cloudFunctionMapping_ == null) {
cloudFunctionMapping_ =
com.google.protobuf.MapField.newMapField(
CloudFunctionMappingDefaultEntryHolder.defaultEntry);
}
if (!cloudFunctionMapping_.isMutable()) {
cloudFunctionMapping_ = cloudFunctionMapping_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return cloudFunctionMapping_;
}
public int getCloudFunctionMappingCount() {
return internalGetCloudFunctionMapping().getMap().size();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public boolean containsCloudFunctionMapping(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetCloudFunctionMapping().getMap().containsKey(key);
}
/** Use {@link #getCloudFunctionMappingMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCloudFunctionMapping() {
return getCloudFunctionMappingMap();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public java.util.Map getCloudFunctionMappingMap() {
return internalGetCloudFunctionMapping().getMap();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public /* nullable */ java.lang.String getCloudFunctionMappingOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetCloudFunctionMapping().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
@java.lang.Override
public java.lang.String getCloudFunctionMappingOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map =
internalGetCloudFunctionMapping().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearCloudFunctionMapping() {
bitField0_ = (bitField0_ & ~0x00000002);
internalGetMutableCloudFunctionMapping().getMutableMap().clear();
return this;
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
public Builder removeCloudFunctionMapping(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableCloudFunctionMapping().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableCloudFunctionMapping() {
bitField0_ |= 0x00000002;
return internalGetMutableCloudFunctionMapping().getMutableMap();
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
public Builder putCloudFunctionMapping(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableCloudFunctionMapping().getMutableMap().put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* Data Schema
* By default, Vision AI Application will try to write annotations to the
* target BigQuery table using the following schema:
*
* ingestion_time: TIMESTAMP, the ingestion time of the original data.
*
* application: STRING, name of the application which produces the annotation.
*
* instance: STRING, Id of the instance which produces the annotation.
*
* node: STRING, name of the application graph node which produces the
* annotation.
*
* annotation: STRING or JSON, the actual annotation protobuf will be
* converted to json string with bytes field as 64 encoded string. It can be
* written to both String or Json type column.
*
* To forward annotation data to an existing BigQuery table, customer needs to
* make sure the compatibility of the schema.
* The map maps application node name to its corresponding cloud function
* endpoint to transform the annotations directly to the
* google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or
* proto_rows should be set). If configured, annotations produced by
* corresponding application node will sent to the Cloud Function at first
* before be forwarded to BigQuery.
*
* If the default table schema doesn't fit, customer is able to transform the
* annotation output from Vision AI Application to arbitrary BigQuery table
* schema with CloudFunction.
* * The cloud function will receive AppPlatformCloudFunctionRequest where
* the annotations field will be the json format of Vision AI annotation.
* * The cloud function should return AppPlatformCloudFunctionResponse with
* AppendRowsRequest stored in the annotations field.
* * To drop the annotation, simply clear the annotations field in the
* returned AppPlatformCloudFunctionResponse.
*
*
* map<string, string> cloud_function_mapping = 2;
*/
public Builder putAllCloudFunctionMapping(
java.util.Map values) {
internalGetMutableCloudFunctionMapping().getMutableMap().putAll(values);
bitField0_ |= 0x00000002;
return this;
}
private boolean createDefaultTableIfNotExists_;
/**
*
*
*
* If true, App Platform will create the BigQuery DataSet and the
* BigQuery Table with default schema if the specified table doesn't exist.
* This doesn't work if any cloud function customized schema is specified
* since the system doesn't know your desired schema.
* JSON column will be used in the default table created by App Platform.
*
*
* bool create_default_table_if_not_exists = 3;
*
* @return The createDefaultTableIfNotExists.
*/
@java.lang.Override
public boolean getCreateDefaultTableIfNotExists() {
return createDefaultTableIfNotExists_;
}
/**
*
*
*
* If true, App Platform will create the BigQuery DataSet and the
* BigQuery Table with default schema if the specified table doesn't exist.
* This doesn't work if any cloud function customized schema is specified
* since the system doesn't know your desired schema.
* JSON column will be used in the default table created by App Platform.
*
*
* bool create_default_table_if_not_exists = 3;
*
* @param value The createDefaultTableIfNotExists to set.
* @return This builder for chaining.
*/
public Builder setCreateDefaultTableIfNotExists(boolean value) {
createDefaultTableIfNotExists_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* If true, App Platform will create the BigQuery DataSet and the
* BigQuery Table with default schema if the specified table doesn't exist.
* This doesn't work if any cloud function customized schema is specified
* since the system doesn't know your desired schema.
* JSON column will be used in the default table created by App Platform.
*
*
* bool create_default_table_if_not_exists = 3;
*
* @return This builder for chaining.
*/
public Builder clearCreateDefaultTableIfNotExists() {
bitField0_ = (bitField0_ & ~0x00000004);
createDefaultTableIfNotExists_ = 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.visionai.v1.BigQueryConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.BigQueryConfig)
private static final com.google.cloud.visionai.v1.BigQueryConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.BigQueryConfig();
}
public static com.google.cloud.visionai.v1.BigQueryConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BigQueryConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.BigQueryConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy