
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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/annotations.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;
/**
*
*
*
* For any cloud function based customer processing logic, customer's cloud
* function is expected to receive AppPlatformCloudFunctionRequest as request
* and send back AppPlatformCloudFunctionResponse as response.
* Message of request from AppPlatform to Cloud Function.
*
*
* Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionRequest}
*/
public final class AppPlatformCloudFunctionRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest)
AppPlatformCloudFunctionRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use AppPlatformCloudFunctionRequest.newBuilder() to construct.
private AppPlatformCloudFunctionRequest(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AppPlatformCloudFunctionRequest() {
annotations_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AppPlatformCloudFunctionRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.class,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.Builder.class);
}
public interface StructedInputAnnotationOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The ingestion time of the current annotation.
*
*
* int64 ingestion_time_micros = 1;
*
* @return The ingestionTimeMicros.
*/
long getIngestionTimeMicros();
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*
* @return Whether the annotation field is set.
*/
boolean hasAnnotation();
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*
* @return The annotation.
*/
com.google.protobuf.Struct getAnnotation();
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
com.google.protobuf.StructOrBuilder getAnnotationOrBuilder();
}
/**
*
*
*
* A general annotation message that uses struct format to represent different
* concrete annotation protobufs.
*
*
* Protobuf type {@code
* google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation}
*/
public static final class StructedInputAnnotation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
StructedInputAnnotationOrBuilder {
private static final long serialVersionUID = 0L;
// Use StructedInputAnnotation.newBuilder() to construct.
private StructedInputAnnotation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StructedInputAnnotation() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new StructedInputAnnotation();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.class,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder.class);
}
private int bitField0_;
public static final int INGESTION_TIME_MICROS_FIELD_NUMBER = 1;
private long ingestionTimeMicros_ = 0L;
/**
*
*
*
* The ingestion time of the current annotation.
*
*
* int64 ingestion_time_micros = 1;
*
* @return The ingestionTimeMicros.
*/
@java.lang.Override
public long getIngestionTimeMicros() {
return ingestionTimeMicros_;
}
public static final int ANNOTATION_FIELD_NUMBER = 2;
private com.google.protobuf.Struct annotation_;
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*
* @return Whether the annotation field is set.
*/
@java.lang.Override
public boolean hasAnnotation() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*
* @return The annotation.
*/
@java.lang.Override
public com.google.protobuf.Struct getAnnotation() {
return annotation_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotation_;
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getAnnotationOrBuilder() {
return annotation_ == null ? com.google.protobuf.Struct.getDefaultInstance() : annotation_;
}
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 (ingestionTimeMicros_ != 0L) {
output.writeInt64(1, ingestionTimeMicros_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getAnnotation());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (ingestionTimeMicros_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, ingestionTimeMicros_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnnotation());
}
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.AppPlatformCloudFunctionRequest.StructedInputAnnotation)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation other =
(com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
obj;
if (getIngestionTimeMicros() != other.getIngestionTimeMicros()) return false;
if (hasAnnotation() != other.hasAnnotation()) return false;
if (hasAnnotation()) {
if (!getAnnotation().equals(other.getAnnotation())) 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) + INGESTION_TIME_MICROS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIngestionTimeMicros());
if (hasAnnotation()) {
hash = (37 * hash) + ANNOTATION_FIELD_NUMBER;
hash = (53 * hash) + getAnnotation().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
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.AppPlatformCloudFunctionRequest.StructedInputAnnotation
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;
}
/**
*
*
*
* A general annotation message that uses struct format to represent different
* concrete annotation protobufs.
*
*
* Protobuf type {@code
* google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.class,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder.class);
}
// Construct using
// com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getAnnotationFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
ingestionTimeMicros_ = 0L;
annotation_ = null;
if (annotationBuilder_ != null) {
annotationBuilder_.dispose();
annotationBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_StructedInputAnnotation_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
build() {
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
buildPartial() {
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
result =
new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.ingestionTimeMicros_ = ingestionTimeMicros_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.annotation_ =
annotationBuilder_ == null ? annotation_ : annotationBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.AppPlatformCloudFunctionRequest.StructedInputAnnotation) {
return mergeFrom(
(com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
other) {
if (other
== com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.getDefaultInstance()) return this;
if (other.getIngestionTimeMicros() != 0L) {
setIngestionTimeMicros(other.getIngestionTimeMicros());
}
if (other.hasAnnotation()) {
mergeAnnotation(other.getAnnotation());
}
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 8:
{
ingestionTimeMicros_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
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 long ingestionTimeMicros_;
/**
*
*
*
* The ingestion time of the current annotation.
*
*
* int64 ingestion_time_micros = 1;
*
* @return The ingestionTimeMicros.
*/
@java.lang.Override
public long getIngestionTimeMicros() {
return ingestionTimeMicros_;
}
/**
*
*
*
* The ingestion time of the current annotation.
*
*
* int64 ingestion_time_micros = 1;
*
* @param value The ingestionTimeMicros to set.
* @return This builder for chaining.
*/
public Builder setIngestionTimeMicros(long value) {
ingestionTimeMicros_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The ingestion time of the current annotation.
*
*
* int64 ingestion_time_micros = 1;
*
* @return This builder for chaining.
*/
public Builder clearIngestionTimeMicros() {
bitField0_ = (bitField0_ & ~0x00000001);
ingestionTimeMicros_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Struct annotation_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
annotationBuilder_;
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*
* @return Whether the annotation field is set.
*/
public boolean hasAnnotation() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*
* @return The annotation.
*/
public com.google.protobuf.Struct getAnnotation() {
if (annotationBuilder_ == null) {
return annotation_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: annotation_;
} else {
return annotationBuilder_.getMessage();
}
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
public Builder setAnnotation(com.google.protobuf.Struct value) {
if (annotationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
annotation_ = value;
} else {
annotationBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
public Builder setAnnotation(com.google.protobuf.Struct.Builder builderForValue) {
if (annotationBuilder_ == null) {
annotation_ = builderForValue.build();
} else {
annotationBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
public Builder mergeAnnotation(com.google.protobuf.Struct value) {
if (annotationBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& annotation_ != null
&& annotation_ != com.google.protobuf.Struct.getDefaultInstance()) {
getAnnotationBuilder().mergeFrom(value);
} else {
annotation_ = value;
}
} else {
annotationBuilder_.mergeFrom(value);
}
if (annotation_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
public Builder clearAnnotation() {
bitField0_ = (bitField0_ & ~0x00000002);
annotation_ = null;
if (annotationBuilder_ != null) {
annotationBuilder_.dispose();
annotationBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
public com.google.protobuf.Struct.Builder getAnnotationBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getAnnotationFieldBuilder().getBuilder();
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
public com.google.protobuf.StructOrBuilder getAnnotationOrBuilder() {
if (annotationBuilder_ != null) {
return annotationBuilder_.getMessageOrBuilder();
} else {
return annotation_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: annotation_;
}
}
/**
*
*
*
* The struct format of the actual annotation.
*
*
* .google.protobuf.Struct annotation = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getAnnotationFieldBuilder() {
if (annotationBuilder_ == null) {
annotationBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
getAnnotation(), getParentForChildren(), isClean());
annotation_ = null;
}
return annotationBuilder_;
}
@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.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation)
private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation();
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StructedInputAnnotation 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.AppPlatformCloudFunctionRequest.StructedInputAnnotation
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int APP_PLATFORM_METADATA_FIELD_NUMBER = 1;
private com.google.cloud.visionai.v1.AppPlatformMetadata appPlatformMetadata_;
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*
* @return Whether the appPlatformMetadata field is set.
*/
@java.lang.Override
public boolean hasAppPlatformMetadata() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*
* @return The appPlatformMetadata.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformMetadata getAppPlatformMetadata() {
return appPlatformMetadata_ == null
? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()
: appPlatformMetadata_;
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder
getAppPlatformMetadataOrBuilder() {
return appPlatformMetadata_ == null
? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()
: appPlatformMetadata_;
}
public static final int ANNOTATIONS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation>
annotations_;
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
@java.lang.Override
public java.util.List<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation>
getAnnotationsList() {
return annotations_;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder>
getAnnotationsOrBuilderList() {
return annotations_;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
@java.lang.Override
public int getAnnotationsCount() {
return annotations_.size();
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
getAnnotations(int index) {
return annotations_.get(index);
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder
getAnnotationsOrBuilder(int index) {
return annotations_.get(index);
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getAppPlatformMetadata());
}
for (int i = 0; i < annotations_.size(); i++) {
output.writeMessage(2, annotations_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAppPlatformMetadata());
}
for (int i = 0; i < annotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, annotations_.get(i));
}
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.AppPlatformCloudFunctionRequest)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest other =
(com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) obj;
if (hasAppPlatformMetadata() != other.hasAppPlatformMetadata()) return false;
if (hasAppPlatformMetadata()) {
if (!getAppPlatformMetadata().equals(other.getAppPlatformMetadata())) return false;
}
if (!getAnnotationsList().equals(other.getAnnotationsList())) 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();
if (hasAppPlatformMetadata()) {
hash = (37 * hash) + APP_PLATFORM_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getAppPlatformMetadata().hashCode();
}
if (getAnnotationsCount() > 0) {
hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getAnnotationsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest 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;
}
/**
*
*
*
* For any cloud function based customer processing logic, customer's cloud
* function is expected to receive AppPlatformCloudFunctionRequest as request
* and send back AppPlatformCloudFunctionResponse as response.
* Message of request from AppPlatform to Cloud Function.
*
*
* Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest)
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.class,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getAppPlatformMetadataFieldBuilder();
getAnnotationsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
appPlatformMetadata_ = null;
if (appPlatformMetadataBuilder_ != null) {
appPlatformMetadataBuilder_.dispose();
appPlatformMetadataBuilder_ = null;
}
if (annotationsBuilder_ == null) {
annotations_ = java.util.Collections.emptyList();
} else {
annotations_ = null;
annotationsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionRequest_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest build() {
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest buildPartial() {
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result =
new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result) {
if (annotationsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
annotations_ = java.util.Collections.unmodifiableList(annotations_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.annotations_ = annotations_;
} else {
result.annotations_ = annotationsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.appPlatformMetadata_ =
appPlatformMetadataBuilder_ == null
? appPlatformMetadata_
: appPlatformMetadataBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@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.AppPlatformCloudFunctionRequest) {
return mergeFrom((com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest other) {
if (other
== com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.getDefaultInstance())
return this;
if (other.hasAppPlatformMetadata()) {
mergeAppPlatformMetadata(other.getAppPlatformMetadata());
}
if (annotationsBuilder_ == null) {
if (!other.annotations_.isEmpty()) {
if (annotations_.isEmpty()) {
annotations_ = other.annotations_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureAnnotationsIsMutable();
annotations_.addAll(other.annotations_);
}
onChanged();
}
} else {
if (!other.annotations_.isEmpty()) {
if (annotationsBuilder_.isEmpty()) {
annotationsBuilder_.dispose();
annotationsBuilder_ = null;
annotations_ = other.annotations_;
bitField0_ = (bitField0_ & ~0x00000002);
annotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getAnnotationsFieldBuilder()
: null;
} else {
annotationsBuilder_.addAllMessages(other.annotations_);
}
}
}
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:
{
input.readMessage(
getAppPlatformMetadataFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
m =
input.readMessage(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation.parser(),
extensionRegistry);
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.add(m);
} else {
annotationsBuilder_.addMessage(m);
}
break;
} // case 18
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 com.google.cloud.visionai.v1.AppPlatformMetadata appPlatformMetadata_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AppPlatformMetadata,
com.google.cloud.visionai.v1.AppPlatformMetadata.Builder,
com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder>
appPlatformMetadataBuilder_;
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*
* @return Whether the appPlatformMetadata field is set.
*/
public boolean hasAppPlatformMetadata() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*
* @return The appPlatformMetadata.
*/
public com.google.cloud.visionai.v1.AppPlatformMetadata getAppPlatformMetadata() {
if (appPlatformMetadataBuilder_ == null) {
return appPlatformMetadata_ == null
? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()
: appPlatformMetadata_;
} else {
return appPlatformMetadataBuilder_.getMessage();
}
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
public Builder setAppPlatformMetadata(com.google.cloud.visionai.v1.AppPlatformMetadata value) {
if (appPlatformMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
appPlatformMetadata_ = value;
} else {
appPlatformMetadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
public Builder setAppPlatformMetadata(
com.google.cloud.visionai.v1.AppPlatformMetadata.Builder builderForValue) {
if (appPlatformMetadataBuilder_ == null) {
appPlatformMetadata_ = builderForValue.build();
} else {
appPlatformMetadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
public Builder mergeAppPlatformMetadata(
com.google.cloud.visionai.v1.AppPlatformMetadata value) {
if (appPlatformMetadataBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& appPlatformMetadata_ != null
&& appPlatformMetadata_
!= com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()) {
getAppPlatformMetadataBuilder().mergeFrom(value);
} else {
appPlatformMetadata_ = value;
}
} else {
appPlatformMetadataBuilder_.mergeFrom(value);
}
if (appPlatformMetadata_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
public Builder clearAppPlatformMetadata() {
bitField0_ = (bitField0_ & ~0x00000001);
appPlatformMetadata_ = null;
if (appPlatformMetadataBuilder_ != null) {
appPlatformMetadataBuilder_.dispose();
appPlatformMetadataBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
public com.google.cloud.visionai.v1.AppPlatformMetadata.Builder
getAppPlatformMetadataBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getAppPlatformMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
public com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder
getAppPlatformMetadataOrBuilder() {
if (appPlatformMetadataBuilder_ != null) {
return appPlatformMetadataBuilder_.getMessageOrBuilder();
} else {
return appPlatformMetadata_ == null
? com.google.cloud.visionai.v1.AppPlatformMetadata.getDefaultInstance()
: appPlatformMetadata_;
}
}
/**
*
*
*
* The metadata of the AppPlatform for customer to identify the source of the
* payload.
*
*
* .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AppPlatformMetadata,
com.google.cloud.visionai.v1.AppPlatformMetadata.Builder,
com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder>
getAppPlatformMetadataFieldBuilder() {
if (appPlatformMetadataBuilder_ == null) {
appPlatformMetadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.AppPlatformMetadata,
com.google.cloud.visionai.v1.AppPlatformMetadata.Builder,
com.google.cloud.visionai.v1.AppPlatformMetadataOrBuilder>(
getAppPlatformMetadata(), getParentForChildren(), isClean());
appPlatformMetadata_ = null;
}
return appPlatformMetadataBuilder_;
}
private java.util.List<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation>
annotations_ = java.util.Collections.emptyList();
private void ensureAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
annotations_ =
new java.util.ArrayList<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation>(annotations_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder>
annotationsBuilder_;
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public java.util.List<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation>
getAnnotationsList() {
if (annotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(annotations_);
} else {
return annotationsBuilder_.getMessageList();
}
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public int getAnnotationsCount() {
if (annotationsBuilder_ == null) {
return annotations_.size();
} else {
return annotationsBuilder_.getCount();
}
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
getAnnotations(int index) {
if (annotationsBuilder_ == null) {
return annotations_.get(index);
} else {
return annotationsBuilder_.getMessage(index);
}
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder setAnnotations(
int index,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationsIsMutable();
annotations_.set(index, value);
onChanged();
} else {
annotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder setAnnotations(
int index,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.Builder
builderForValue) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.set(index, builderForValue.build());
onChanged();
} else {
annotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder addAnnotations(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationsIsMutable();
annotations_.add(value);
onChanged();
} else {
annotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder addAnnotations(
int index,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationsIsMutable();
annotations_.add(index, value);
onChanged();
} else {
annotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder addAnnotations(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.Builder
builderForValue) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.add(builderForValue.build());
onChanged();
} else {
annotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder addAnnotations(
int index,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation.Builder
builderForValue) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.add(index, builderForValue.build());
onChanged();
} else {
annotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder addAllAnnotations(
java.lang.Iterable<
? extends
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation>
values) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_);
onChanged();
} else {
annotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder clearAnnotations() {
if (annotationsBuilder_ == null) {
annotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
annotationsBuilder_.clear();
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public Builder removeAnnotations(int index) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.remove(index);
onChanged();
} else {
annotationsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder
getAnnotationsBuilder(int index) {
return getAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder
getAnnotationsOrBuilder(int index) {
if (annotationsBuilder_ == null) {
return annotations_.get(index);
} else {
return annotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public java.util.List<
? extends
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder>
getAnnotationsOrBuilderList() {
if (annotationsBuilder_ != null) {
return annotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(annotations_);
}
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder
addAnnotationsBuilder() {
return getAnnotationsFieldBuilder()
.addBuilder(
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.getDefaultInstance());
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder
addAnnotationsBuilder(int index) {
return getAnnotationsFieldBuilder()
.addBuilder(
index,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.getDefaultInstance());
}
/**
*
*
*
* The actual annotations to be processed by the customized Cloud Function.
*
*
*
* repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2;
*
*/
public java.util.List<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder>
getAnnotationsBuilderList() {
return getAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder>
getAnnotationsFieldBuilder() {
if (annotationsBuilder_ == null) {
annotationsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotation,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation
.Builder,
com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
.StructedInputAnnotationOrBuilder>(
annotations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
annotations_ = null;
}
return annotationsBuilder_;
}
@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.AppPlatformCloudFunctionRequest)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionRequest)
private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest();
}
public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AppPlatformCloudFunctionRequest 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.AppPlatformCloudFunctionRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy