All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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;

/**
 *
 *
 * 
 * Message of the response from customer's Cloud Function to AppPlatform.
 * 
* * Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionResponse} */ public final class AppPlatformCloudFunctionResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) AppPlatformCloudFunctionResponseOrBuilder { private static final long serialVersionUID = 0L; // Use AppPlatformCloudFunctionResponse.newBuilder() to construct. private AppPlatformCloudFunctionResponse( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AppPlatformCloudFunctionResponse() { annotations_ = java.util.Collections.emptyList(); events_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AppPlatformCloudFunctionResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.class, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.Builder.class); } public interface StructedOutputAnnotationOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) com.google.protobuf.MessageOrBuilder { /** * * *
     * The struct format of the actual annotation.
     * 
* * .google.protobuf.Struct annotation = 1; * * @return Whether the annotation field is set. */ boolean hasAnnotation(); /** * * *
     * The struct format of the actual annotation.
     * 
* * .google.protobuf.Struct annotation = 1; * * @return The annotation. */ com.google.protobuf.Struct getAnnotation(); /** * * *
     * The struct format of the actual annotation.
     * 
* * .google.protobuf.Struct annotation = 1; */ 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.AppPlatformCloudFunctionResponse.StructedOutputAnnotation} */ public static final class StructedOutputAnnotation extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) StructedOutputAnnotationOrBuilder { private static final long serialVersionUID = 0L; // Use StructedOutputAnnotation.newBuilder() to construct. private StructedOutputAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StructedOutputAnnotation() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new StructedOutputAnnotation(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .class, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder.class); } private int bitField0_; public static final int ANNOTATION_FIELD_NUMBER = 1; private com.google.protobuf.Struct annotation_; /** * * *
     * The struct format of the actual annotation.
     * 
* * .google.protobuf.Struct annotation = 1; * * @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 = 1; * * @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 = 1; */ @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 (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getAnnotation()); } 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, 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.AppPlatformCloudFunctionResponse.StructedOutputAnnotation)) { return super.equals(obj); } com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation other = (com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) obj; 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(); 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse.StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse.StructedOutputAnnotation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation.class, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation.Builder.class); } // Construct using // com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation.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; 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_AppPlatformCloudFunctionResponse_StructedOutputAnnotation_descriptor; } @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation getDefaultInstanceForType() { return com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation.getDefaultInstance(); } @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation build() { com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation buildPartial() { com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation result = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 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.AppPlatformCloudFunctionResponse .StructedOutputAnnotation) { return mergeFrom( (com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation other) { if (other == com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation.getDefaultInstance()) return this; 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 10: { input.readMessage(getAnnotationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 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.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 = 1; * * @return Whether the annotation field is set. */ public boolean hasAnnotation() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
       * The struct format of the actual annotation.
       * 
* * .google.protobuf.Struct annotation = 1; * * @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 = 1; */ public Builder setAnnotation(com.google.protobuf.Struct value) { if (annotationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } annotation_ = value; } else { annotationBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The struct format of the actual annotation.
       * 
* * .google.protobuf.Struct annotation = 1; */ public Builder setAnnotation(com.google.protobuf.Struct.Builder builderForValue) { if (annotationBuilder_ == null) { annotation_ = builderForValue.build(); } else { annotationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * The struct format of the actual annotation.
       * 
* * .google.protobuf.Struct annotation = 1; */ public Builder mergeAnnotation(com.google.protobuf.Struct value) { if (annotationBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && annotation_ != null && annotation_ != com.google.protobuf.Struct.getDefaultInstance()) { getAnnotationBuilder().mergeFrom(value); } else { annotation_ = value; } } else { annotationBuilder_.mergeFrom(value); } if (annotation_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
       * The struct format of the actual annotation.
       * 
* * .google.protobuf.Struct annotation = 1; */ public Builder clearAnnotation() { bitField0_ = (bitField0_ & ~0x00000001); annotation_ = null; if (annotationBuilder_ != null) { annotationBuilder_.dispose(); annotationBuilder_ = null; } onChanged(); return this; } /** * * *
       * The struct format of the actual annotation.
       * 
* * .google.protobuf.Struct annotation = 1; */ public com.google.protobuf.Struct.Builder getAnnotationBuilder() { bitField0_ |= 0x00000001; onChanged(); return getAnnotationFieldBuilder().getBuilder(); } /** * * *
       * The struct format of the actual annotation.
       * 
* * .google.protobuf.Struct annotation = 1; */ 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 = 1; */ 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.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) } // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation) private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation(); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StructedOutputAnnotation 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.AppPlatformCloudFunctionResponse.StructedOutputAnnotation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int ANNOTATIONS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> annotations_; /** * * *
   * The modified annotations that is returned back to AppPlatform.
   * If the annotations fields are empty, then those annotations will be dropped
   * by AppPlatform.
   * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ @java.lang.Override public java.util.List< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> getAnnotationsList() { return annotations_; } /** * * *
   * The modified annotations that is returned back to AppPlatform.
   * If the annotations fields are empty, then those annotations will be dropped
   * by AppPlatform.
   * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ @java.lang.Override public java.util.List< ? extends com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder> getAnnotationsOrBuilderList() { return annotations_; } /** * * *
   * The modified annotations that is returned back to AppPlatform.
   * If the annotations fields are empty, then those annotations will be dropped
   * by AppPlatform.
   * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ @java.lang.Override public int getAnnotationsCount() { return annotations_.size(); } /** * * *
   * The modified annotations that is returned back to AppPlatform.
   * If the annotations fields are empty, then those annotations will be dropped
   * by AppPlatform.
   * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation getAnnotations(int index) { return annotations_.get(index); } /** * * *
   * The modified annotations that is returned back to AppPlatform.
   * If the annotations fields are empty, then those annotations will be dropped
   * by AppPlatform.
   * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder getAnnotationsOrBuilder(int index) { return annotations_.get(index); } public static final int ANNOTATION_PASSTHROUGH_FIELD_NUMBER = 3; private boolean annotationPassthrough_ = false; /** * * *
   * If set to true, AppPlatform will use original annotations instead of
   * dropping them, even if it is empty in the annotations filed.
   * 
* * bool annotation_passthrough = 3; * * @return The annotationPassthrough. */ @java.lang.Override public boolean getAnnotationPassthrough() { return annotationPassthrough_; } public static final int EVENTS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List events_; /** * * *
   * The event notifications that is returned back to AppPlatform. Typically it
   * will then be configured to be consumed/forwared to a operator that handles
   * events, such as Pub/Sub operator.
   * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ @java.lang.Override public java.util.List getEventsList() { return events_; } /** * * *
   * The event notifications that is returned back to AppPlatform. Typically it
   * will then be configured to be consumed/forwared to a operator that handles
   * events, such as Pub/Sub operator.
   * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ @java.lang.Override public java.util.List getEventsOrBuilderList() { return events_; } /** * * *
   * The event notifications that is returned back to AppPlatform. Typically it
   * will then be configured to be consumed/forwared to a operator that handles
   * events, such as Pub/Sub operator.
   * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ @java.lang.Override public int getEventsCount() { return events_.size(); } /** * * *
   * The event notifications that is returned back to AppPlatform. Typically it
   * will then be configured to be consumed/forwared to a operator that handles
   * events, such as Pub/Sub operator.
   * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformEventBody getEvents(int index) { return events_.get(index); } /** * * *
   * The event notifications that is returned back to AppPlatform. Typically it
   * will then be configured to be consumed/forwared to a operator that handles
   * events, such as Pub/Sub operator.
   * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder getEventsOrBuilder(int index) { return events_.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 { for (int i = 0; i < annotations_.size(); i++) { output.writeMessage(2, annotations_.get(i)); } if (annotationPassthrough_ != false) { output.writeBool(3, annotationPassthrough_); } for (int i = 0; i < events_.size(); i++) { output.writeMessage(4, events_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < annotations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, annotations_.get(i)); } if (annotationPassthrough_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, annotationPassthrough_); } for (int i = 0; i < events_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, events_.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.AppPlatformCloudFunctionResponse)) { return super.equals(obj); } com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse other = (com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) obj; if (!getAnnotationsList().equals(other.getAnnotationsList())) return false; if (getAnnotationPassthrough() != other.getAnnotationPassthrough()) return false; if (!getEventsList().equals(other.getEventsList())) 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 (getAnnotationsCount() > 0) { hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + getAnnotationsList().hashCode(); } hash = (37 * hash) + ANNOTATION_PASSTHROUGH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAnnotationPassthrough()); if (getEventsCount() > 0) { hash = (37 * hash) + EVENTS_FIELD_NUMBER; hash = (53 * hash) + getEventsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse 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 the response from customer's Cloud Function to AppPlatform.
   * 
* * Protobuf type {@code google.cloud.visionai.v1.AppPlatformCloudFunctionResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.AnnotationsProto .internal_static_google_cloud_visionai_v1_AppPlatformCloudFunctionResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.class, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.Builder.class); } // Construct using com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (annotationsBuilder_ == null) { annotations_ = java.util.Collections.emptyList(); } else { annotations_ = null; annotationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); annotationPassthrough_ = false; if (eventsBuilder_ == null) { events_ = java.util.Collections.emptyList(); } else { events_ = null; eventsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); 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_AppPlatformCloudFunctionResponse_descriptor; } @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse getDefaultInstanceForType() { return com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.getDefaultInstance(); } @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse build() { com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse buildPartial() { com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result) { if (annotationsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { annotations_ = java.util.Collections.unmodifiableList(annotations_); bitField0_ = (bitField0_ & ~0x00000001); } result.annotations_ = annotations_; } else { result.annotations_ = annotationsBuilder_.build(); } if (eventsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { events_ = java.util.Collections.unmodifiableList(events_); bitField0_ = (bitField0_ & ~0x00000004); } result.events_ = events_; } else { result.events_ = eventsBuilder_.build(); } } private void buildPartial0( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { result.annotationPassthrough_ = annotationPassthrough_; } } @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.AppPlatformCloudFunctionResponse) { return mergeFrom((com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse other) { if (other == com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.getDefaultInstance()) return this; if (annotationsBuilder_ == null) { if (!other.annotations_.isEmpty()) { if (annotations_.isEmpty()) { annotations_ = other.annotations_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAnnotationsIsMutable(); annotations_.addAll(other.annotations_); } onChanged(); } } else { if (!other.annotations_.isEmpty()) { if (annotationsBuilder_.isEmpty()) { annotationsBuilder_.dispose(); annotationsBuilder_ = null; annotations_ = other.annotations_; bitField0_ = (bitField0_ & ~0x00000001); annotationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getAnnotationsFieldBuilder() : null; } else { annotationsBuilder_.addAllMessages(other.annotations_); } } } if (other.getAnnotationPassthrough() != false) { setAnnotationPassthrough(other.getAnnotationPassthrough()); } if (eventsBuilder_ == null) { if (!other.events_.isEmpty()) { if (events_.isEmpty()) { events_ = other.events_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureEventsIsMutable(); events_.addAll(other.events_); } onChanged(); } } else { if (!other.events_.isEmpty()) { if (eventsBuilder_.isEmpty()) { eventsBuilder_.dispose(); eventsBuilder_ = null; events_ = other.events_; bitField0_ = (bitField0_ & ~0x00000004); eventsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEventsFieldBuilder() : null; } else { eventsBuilder_.addAllMessages(other.events_); } } } 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 18: { com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation m = input.readMessage( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation.parser(), extensionRegistry); if (annotationsBuilder_ == null) { ensureAnnotationsIsMutable(); annotations_.add(m); } else { annotationsBuilder_.addMessage(m); } break; } // case 18 case 24: { annotationPassthrough_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 24 case 34: { com.google.cloud.visionai.v1.AppPlatformEventBody m = input.readMessage( com.google.cloud.visionai.v1.AppPlatformEventBody.parser(), extensionRegistry); if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(m); } else { eventsBuilder_.addMessage(m); } break; } // case 34 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.util.List< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> annotations_ = java.util.Collections.emptyList(); private void ensureAnnotationsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { annotations_ = new java.util.ArrayList< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation>(annotations_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder> annotationsBuilder_; /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public java.util.List< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation> getAnnotationsList() { if (annotationsBuilder_ == null) { return java.util.Collections.unmodifiableList(annotations_); } else { return annotationsBuilder_.getMessageList(); } } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public int getAnnotationsCount() { if (annotationsBuilder_ == null) { return annotations_.size(); } else { return annotationsBuilder_.getCount(); } } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation getAnnotations(int index) { if (annotationsBuilder_ == null) { return annotations_.get(index); } else { return annotationsBuilder_.getMessage(index); } } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder setAnnotations( int index, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation value) { if (annotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAnnotationsIsMutable(); annotations_.set(index, value); onChanged(); } else { annotationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder setAnnotations( int index, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder builderForValue) { if (annotationsBuilder_ == null) { ensureAnnotationsIsMutable(); annotations_.set(index, builderForValue.build()); onChanged(); } else { annotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder addAnnotations( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation value) { if (annotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAnnotationsIsMutable(); annotations_.add(value); onChanged(); } else { annotationsBuilder_.addMessage(value); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder addAnnotations( int index, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation value) { if (annotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureAnnotationsIsMutable(); annotations_.add(index, value); onChanged(); } else { annotationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder addAnnotations( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder builderForValue) { if (annotationsBuilder_ == null) { ensureAnnotationsIsMutable(); annotations_.add(builderForValue.build()); onChanged(); } else { annotationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder addAnnotations( int index, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder builderForValue) { if (annotationsBuilder_ == null) { ensureAnnotationsIsMutable(); annotations_.add(index, builderForValue.build()); onChanged(); } else { annotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder addAllAnnotations( java.lang.Iterable< ? extends com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation> values) { if (annotationsBuilder_ == null) { ensureAnnotationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotations_); onChanged(); } else { annotationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder clearAnnotations() { if (annotationsBuilder_ == null) { annotations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { annotationsBuilder_.clear(); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public Builder removeAnnotations(int index) { if (annotationsBuilder_ == null) { ensureAnnotationsIsMutable(); annotations_.remove(index); onChanged(); } else { annotationsBuilder_.remove(index); } return this; } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder getAnnotationsBuilder(int index) { return getAnnotationsFieldBuilder().getBuilder(index); } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder getAnnotationsOrBuilder(int index) { if (annotationsBuilder_ == null) { return annotations_.get(index); } else { return annotationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public java.util.List< ? extends com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder> getAnnotationsOrBuilderList() { if (annotationsBuilder_ != null) { return annotationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(annotations_); } } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder addAnnotationsBuilder() { return getAnnotationsFieldBuilder() .addBuilder( com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .getDefaultInstance()); } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder addAnnotationsBuilder(int index) { return getAnnotationsFieldBuilder() .addBuilder( index, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .getDefaultInstance()); } /** * * *
     * The modified annotations that is returned back to AppPlatform.
     * If the annotations fields are empty, then those annotations will be dropped
     * by AppPlatform.
     * 
* * * repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; * */ public java.util.List< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder> getAnnotationsBuilderList() { return getAnnotationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation .Builder, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder> getAnnotationsFieldBuilder() { if (annotationsBuilder_ == null) { annotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotation.Builder, com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse .StructedOutputAnnotationOrBuilder>( annotations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); annotations_ = null; } return annotationsBuilder_; } private boolean annotationPassthrough_; /** * * *
     * If set to true, AppPlatform will use original annotations instead of
     * dropping them, even if it is empty in the annotations filed.
     * 
* * bool annotation_passthrough = 3; * * @return The annotationPassthrough. */ @java.lang.Override public boolean getAnnotationPassthrough() { return annotationPassthrough_; } /** * * *
     * If set to true, AppPlatform will use original annotations instead of
     * dropping them, even if it is empty in the annotations filed.
     * 
* * bool annotation_passthrough = 3; * * @param value The annotationPassthrough to set. * @return This builder for chaining. */ public Builder setAnnotationPassthrough(boolean value) { annotationPassthrough_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * If set to true, AppPlatform will use original annotations instead of
     * dropping them, even if it is empty in the annotations filed.
     * 
* * bool annotation_passthrough = 3; * * @return This builder for chaining. */ public Builder clearAnnotationPassthrough() { bitField0_ = (bitField0_ & ~0x00000002); annotationPassthrough_ = false; onChanged(); return this; } private java.util.List events_ = java.util.Collections.emptyList(); private void ensureEventsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { events_ = new java.util.ArrayList(events_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.visionai.v1.AppPlatformEventBody, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder, com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder> eventsBuilder_; /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public java.util.List getEventsList() { if (eventsBuilder_ == null) { return java.util.Collections.unmodifiableList(events_); } else { return eventsBuilder_.getMessageList(); } } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public int getEventsCount() { if (eventsBuilder_ == null) { return events_.size(); } else { return eventsBuilder_.getCount(); } } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public com.google.cloud.visionai.v1.AppPlatformEventBody getEvents(int index) { if (eventsBuilder_ == null) { return events_.get(index); } else { return eventsBuilder_.getMessage(index); } } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder setEvents(int index, com.google.cloud.visionai.v1.AppPlatformEventBody value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventsIsMutable(); events_.set(index, value); onChanged(); } else { eventsBuilder_.setMessage(index, value); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder setEvents( int index, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.set(index, builderForValue.build()); onChanged(); } else { eventsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder addEvents(com.google.cloud.visionai.v1.AppPlatformEventBody value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventsIsMutable(); events_.add(value); onChanged(); } else { eventsBuilder_.addMessage(value); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder addEvents(int index, com.google.cloud.visionai.v1.AppPlatformEventBody value) { if (eventsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureEventsIsMutable(); events_.add(index, value); onChanged(); } else { eventsBuilder_.addMessage(index, value); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder addEvents( com.google.cloud.visionai.v1.AppPlatformEventBody.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(builderForValue.build()); onChanged(); } else { eventsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder addEvents( int index, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder builderForValue) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.add(index, builderForValue.build()); onChanged(); } else { eventsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder addAllEvents( java.lang.Iterable values) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, events_); onChanged(); } else { eventsBuilder_.addAllMessages(values); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder clearEvents() { if (eventsBuilder_ == null) { events_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { eventsBuilder_.clear(); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public Builder removeEvents(int index) { if (eventsBuilder_ == null) { ensureEventsIsMutable(); events_.remove(index); onChanged(); } else { eventsBuilder_.remove(index); } return this; } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public com.google.cloud.visionai.v1.AppPlatformEventBody.Builder getEventsBuilder(int index) { return getEventsFieldBuilder().getBuilder(index); } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder getEventsOrBuilder( int index) { if (eventsBuilder_ == null) { return events_.get(index); } else { return eventsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public java.util.List getEventsOrBuilderList() { if (eventsBuilder_ != null) { return eventsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(events_); } } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public com.google.cloud.visionai.v1.AppPlatformEventBody.Builder addEventsBuilder() { return getEventsFieldBuilder() .addBuilder(com.google.cloud.visionai.v1.AppPlatformEventBody.getDefaultInstance()); } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public com.google.cloud.visionai.v1.AppPlatformEventBody.Builder addEventsBuilder(int index) { return getEventsFieldBuilder() .addBuilder( index, com.google.cloud.visionai.v1.AppPlatformEventBody.getDefaultInstance()); } /** * * *
     * The event notifications that is returned back to AppPlatform. Typically it
     * will then be configured to be consumed/forwared to a operator that handles
     * events, such as Pub/Sub operator.
     * 
* * repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; */ public java.util.List getEventsBuilderList() { return getEventsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.visionai.v1.AppPlatformEventBody, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder, com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder> getEventsFieldBuilder() { if (eventsBuilder_ == null) { eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.visionai.v1.AppPlatformEventBody, com.google.cloud.visionai.v1.AppPlatformEventBody.Builder, com.google.cloud.visionai.v1.AppPlatformEventBodyOrBuilder>( events_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); events_ = null; } return eventsBuilder_; } @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.AppPlatformCloudFunctionResponse) } // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.AppPlatformCloudFunctionResponse) private static final com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse(); } public static com.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AppPlatformCloudFunctionResponse 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.AppPlatformCloudFunctionResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy