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

com.google.cloud.visionai.v1.CustomProcessorSourceInfo Maven / Gradle / Ivy

/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/visionai/v1/platform.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;

/**
 *
 *
 * 
 * Describes the source info for a custom processor.
 * 
* * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo} */ public final class CustomProcessorSourceInfo extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo) CustomProcessorSourceInfoOrBuilder { private static final long serialVersionUID = 0L; // Use CustomProcessorSourceInfo.newBuilder() to construct. private CustomProcessorSourceInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CustomProcessorSourceInfo() { sourceType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new CustomProcessorSourceInfo(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetAdditionalInfo(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.class, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder.class); } /** * * *
   * Source type of the imported custom processor.
   * 
* * Protobuf enum {@code google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType} */ public enum SourceType implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Source type unspecified.
     * 
* * SOURCE_TYPE_UNSPECIFIED = 0; */ SOURCE_TYPE_UNSPECIFIED(0), /** * * *
     * Custom processors coming from Vertex AutoML product.
     * 
* * VERTEX_AUTOML = 1; */ VERTEX_AUTOML(1), /** * * *
     * Custom processors coming from general custom models from Vertex.
     * 
* * VERTEX_CUSTOM = 2; */ VERTEX_CUSTOM(2), /** * * *
     * Source for Product Recognizer.
     * 
* * PRODUCT_RECOGNIZER = 3; */ PRODUCT_RECOGNIZER(3), UNRECOGNIZED(-1), ; /** * * *
     * Source type unspecified.
     * 
* * SOURCE_TYPE_UNSPECIFIED = 0; */ public static final int SOURCE_TYPE_UNSPECIFIED_VALUE = 0; /** * * *
     * Custom processors coming from Vertex AutoML product.
     * 
* * VERTEX_AUTOML = 1; */ public static final int VERTEX_AUTOML_VALUE = 1; /** * * *
     * Custom processors coming from general custom models from Vertex.
     * 
* * VERTEX_CUSTOM = 2; */ public static final int VERTEX_CUSTOM_VALUE = 2; /** * * *
     * Source for Product Recognizer.
     * 
* * PRODUCT_RECOGNIZER = 3; */ public static final int PRODUCT_RECOGNIZER_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SourceType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static SourceType forNumber(int value) { switch (value) { case 0: return SOURCE_TYPE_UNSPECIFIED; case 1: return VERTEX_AUTOML; case 2: return VERTEX_CUSTOM; case 3: return PRODUCT_RECOGNIZER; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public SourceType findValueByNumber(int number) { return SourceType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDescriptor() .getEnumTypes() .get(0); } private static final SourceType[] VALUES = values(); public static SourceType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private SourceType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType) } public interface ProductRecognizerArtifactOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) com.google.protobuf.MessageOrBuilder { /** * * *
     * Required. Resource name of RetailProductRecognitionIndex.
     * Format is
     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
     * 
* * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The retailProductRecognitionIndex. */ java.lang.String getRetailProductRecognitionIndex(); /** * * *
     * Required. Resource name of RetailProductRecognitionIndex.
     * Format is
     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
     * 
* * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The bytes for retailProductRecognitionIndex. */ com.google.protobuf.ByteString getRetailProductRecognitionIndexBytes(); /** * * *
     * Optional. The resource name of embedding model hosted in Vertex AI
     * Platform.
     * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The vertexModel. */ java.lang.String getVertexModel(); /** * * *
     * Optional. The resource name of embedding model hosted in Vertex AI
     * Platform.
     * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for vertexModel. */ com.google.protobuf.ByteString getVertexModelBytes(); } /** * * *
   * Message describes product recognizer artifact.
   * 
* * Protobuf type {@code * google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact} */ public static final class ProductRecognizerArtifact extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) ProductRecognizerArtifactOrBuilder { private static final long serialVersionUID = 0L; // Use ProductRecognizerArtifact.newBuilder() to construct. private ProductRecognizerArtifact(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ProductRecognizerArtifact() { retailProductRecognitionIndex_ = ""; vertexModel_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ProductRecognizerArtifact(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .class, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .Builder.class); } public static final int RETAIL_PRODUCT_RECOGNITION_INDEX_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object retailProductRecognitionIndex_ = ""; /** * * *
     * Required. Resource name of RetailProductRecognitionIndex.
     * Format is
     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
     * 
* * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The retailProductRecognitionIndex. */ @java.lang.Override public java.lang.String getRetailProductRecognitionIndex() { java.lang.Object ref = retailProductRecognitionIndex_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); retailProductRecognitionIndex_ = s; return s; } } /** * * *
     * Required. Resource name of RetailProductRecognitionIndex.
     * Format is
     * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
     * 
* * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The bytes for retailProductRecognitionIndex. */ @java.lang.Override public com.google.protobuf.ByteString getRetailProductRecognitionIndexBytes() { java.lang.Object ref = retailProductRecognitionIndex_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); retailProductRecognitionIndex_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VERTEX_MODEL_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object vertexModel_ = ""; /** * * *
     * Optional. The resource name of embedding model hosted in Vertex AI
     * Platform.
     * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The vertexModel. */ @java.lang.Override public java.lang.String getVertexModel() { java.lang.Object ref = vertexModel_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); vertexModel_ = s; return s; } } /** * * *
     * Optional. The resource name of embedding model hosted in Vertex AI
     * Platform.
     * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for vertexModel. */ @java.lang.Override public com.google.protobuf.ByteString getVertexModelBytes() { java.lang.Object ref = vertexModel_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); vertexModel_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(retailProductRecognitionIndex_)) { com.google.protobuf.GeneratedMessageV3.writeString( output, 1, retailProductRecognitionIndex_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vertexModel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vertexModel_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(retailProductRecognitionIndex_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize( 1, retailProductRecognitionIndex_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vertexModel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vertexModel_); } 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.CustomProcessorSourceInfo.ProductRecognizerArtifact)) { return super.equals(obj); } com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact other = (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) obj; if (!getRetailProductRecognitionIndex().equals(other.getRetailProductRecognitionIndex())) return false; if (!getVertexModel().equals(other.getVertexModel())) 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) + RETAIL_PRODUCT_RECOGNITION_INDEX_FIELD_NUMBER; hash = (53 * hash) + getRetailProductRecognitionIndex().hashCode(); hash = (37 * hash) + VERTEX_MODEL_FIELD_NUMBER; hash = (53 * hash) + getVertexModel().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact 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 describes product recognizer artifact.
     * 
* * Protobuf type {@code * google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .class, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .Builder.class); } // Construct using // com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; retailProductRecognitionIndex_ = ""; vertexModel_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ProductRecognizerArtifact_descriptor; } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact getDefaultInstanceForType() { return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact build() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact buildPartial() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact result = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact( this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.retailProductRecognitionIndex_ = retailProductRecognitionIndex_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.vertexModel_ = vertexModel_; } } @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.CustomProcessorSourceInfo.ProductRecognizerArtifact) { return mergeFrom( (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact other) { if (other == com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance()) return this; if (!other.getRetailProductRecognitionIndex().isEmpty()) { retailProductRecognitionIndex_ = other.retailProductRecognitionIndex_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getVertexModel().isEmpty()) { vertexModel_ = other.vertexModel_; bitField0_ |= 0x00000002; onChanged(); } 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: { retailProductRecognitionIndex_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { vertexModel_ = input.readStringRequireUtf8(); 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 java.lang.Object retailProductRecognitionIndex_ = ""; /** * * *
       * Required. Resource name of RetailProductRecognitionIndex.
       * Format is
       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
       * 
* * * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The retailProductRecognitionIndex. */ public java.lang.String getRetailProductRecognitionIndex() { java.lang.Object ref = retailProductRecognitionIndex_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); retailProductRecognitionIndex_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Required. Resource name of RetailProductRecognitionIndex.
       * Format is
       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
       * 
* * * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The bytes for retailProductRecognitionIndex. */ public com.google.protobuf.ByteString getRetailProductRecognitionIndexBytes() { java.lang.Object ref = retailProductRecognitionIndex_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); retailProductRecognitionIndex_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Required. Resource name of RetailProductRecognitionIndex.
       * Format is
       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
       * 
* * * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The retailProductRecognitionIndex to set. * @return This builder for chaining. */ public Builder setRetailProductRecognitionIndex(java.lang.String value) { if (value == null) { throw new NullPointerException(); } retailProductRecognitionIndex_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Required. Resource name of RetailProductRecognitionIndex.
       * Format is
       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
       * 
* * * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearRetailProductRecognitionIndex() { retailProductRecognitionIndex_ = getDefaultInstance().getRetailProductRecognitionIndex(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Required. Resource name of RetailProductRecognitionIndex.
       * Format is
       * 'projects/*/locations/*/retailCatalogs/*/retailProductRecognitionIndexes/*'
       * 
* * * string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The bytes for retailProductRecognitionIndex to set. * @return This builder for chaining. */ public Builder setRetailProductRecognitionIndexBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); retailProductRecognitionIndex_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object vertexModel_ = ""; /** * * *
       * Optional. The resource name of embedding model hosted in Vertex AI
       * Platform.
       * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The vertexModel. */ public java.lang.String getVertexModel() { java.lang.Object ref = vertexModel_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); vertexModel_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Optional. The resource name of embedding model hosted in Vertex AI
       * Platform.
       * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for vertexModel. */ public com.google.protobuf.ByteString getVertexModelBytes() { java.lang.Object ref = vertexModel_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); vertexModel_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Optional. The resource name of embedding model hosted in Vertex AI
       * Platform.
       * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The vertexModel to set. * @return This builder for chaining. */ public Builder setVertexModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } vertexModel_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Optional. The resource name of embedding model hosted in Vertex AI
       * Platform.
       * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearVertexModel() { vertexModel_ = getDefaultInstance().getVertexModel(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
       * Optional. The resource name of embedding model hosted in Vertex AI
       * Platform.
       * 
* * string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for vertexModel to set. * @return This builder for chaining. */ public Builder setVertexModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); vertexModel_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) } // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) private static final com.google.cloud.visionai.v1.CustomProcessorSourceInfo .ProductRecognizerArtifact DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact(); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ProductRecognizerArtifact 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.CustomProcessorSourceInfo.ProductRecognizerArtifact getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ModelSchemaOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) com.google.protobuf.MessageOrBuilder { /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * instance used in prediction and explanation requests.
     * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; * * @return Whether the instancesSchema field is set. */ boolean hasInstancesSchema(); /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * instance used in prediction and explanation requests.
     * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; * * @return The instancesSchema. */ com.google.cloud.visionai.v1.GcsSource getInstancesSchema(); /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * instance used in prediction and explanation requests.
     * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ com.google.cloud.visionai.v1.GcsSourceOrBuilder getInstancesSchemaOrBuilder(); /** * * *
     * Cloud Storage location to a YAML file that defines the prediction and
     * explanation parameters.
     * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; * * @return Whether the parametersSchema field is set. */ boolean hasParametersSchema(); /** * * *
     * Cloud Storage location to a YAML file that defines the prediction and
     * explanation parameters.
     * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; * * @return The parametersSchema. */ com.google.cloud.visionai.v1.GcsSource getParametersSchema(); /** * * *
     * Cloud Storage location to a YAML file that defines the prediction and
     * explanation parameters.
     * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ com.google.cloud.visionai.v1.GcsSourceOrBuilder getParametersSchemaOrBuilder(); /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * prediction or explanation.
     * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; * * @return Whether the predictionsSchema field is set. */ boolean hasPredictionsSchema(); /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * prediction or explanation.
     * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; * * @return The predictionsSchema. */ com.google.cloud.visionai.v1.GcsSource getPredictionsSchema(); /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * prediction or explanation.
     * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ com.google.cloud.visionai.v1.GcsSourceOrBuilder getPredictionsSchemaOrBuilder(); } /** * * *
   * The schema is defined as an OpenAPI 3.0.2 [Schema
   * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
   * 
* * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema} */ public static final class ModelSchema extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) ModelSchemaOrBuilder { private static final long serialVersionUID = 0L; // Use ModelSchema.newBuilder() to construct. private ModelSchema(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ModelSchema() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ModelSchema(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.class, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder.class); } private int bitField0_; public static final int INSTANCES_SCHEMA_FIELD_NUMBER = 1; private com.google.cloud.visionai.v1.GcsSource instancesSchema_; /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * instance used in prediction and explanation requests.
     * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; * * @return Whether the instancesSchema field is set. */ @java.lang.Override public boolean hasInstancesSchema() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * instance used in prediction and explanation requests.
     * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; * * @return The instancesSchema. */ @java.lang.Override public com.google.cloud.visionai.v1.GcsSource getInstancesSchema() { return instancesSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : instancesSchema_; } /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * instance used in prediction and explanation requests.
     * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ @java.lang.Override public com.google.cloud.visionai.v1.GcsSourceOrBuilder getInstancesSchemaOrBuilder() { return instancesSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : instancesSchema_; } public static final int PARAMETERS_SCHEMA_FIELD_NUMBER = 2; private com.google.cloud.visionai.v1.GcsSource parametersSchema_; /** * * *
     * Cloud Storage location to a YAML file that defines the prediction and
     * explanation parameters.
     * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; * * @return Whether the parametersSchema field is set. */ @java.lang.Override public boolean hasParametersSchema() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
     * Cloud Storage location to a YAML file that defines the prediction and
     * explanation parameters.
     * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; * * @return The parametersSchema. */ @java.lang.Override public com.google.cloud.visionai.v1.GcsSource getParametersSchema() { return parametersSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : parametersSchema_; } /** * * *
     * Cloud Storage location to a YAML file that defines the prediction and
     * explanation parameters.
     * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ @java.lang.Override public com.google.cloud.visionai.v1.GcsSourceOrBuilder getParametersSchemaOrBuilder() { return parametersSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : parametersSchema_; } public static final int PREDICTIONS_SCHEMA_FIELD_NUMBER = 3; private com.google.cloud.visionai.v1.GcsSource predictionsSchema_; /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * prediction or explanation.
     * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; * * @return Whether the predictionsSchema field is set. */ @java.lang.Override public boolean hasPredictionsSchema() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * prediction or explanation.
     * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; * * @return The predictionsSchema. */ @java.lang.Override public com.google.cloud.visionai.v1.GcsSource getPredictionsSchema() { return predictionsSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : predictionsSchema_; } /** * * *
     * Cloud Storage location to a YAML file that defines the format of a single
     * prediction or explanation.
     * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ @java.lang.Override public com.google.cloud.visionai.v1.GcsSourceOrBuilder getPredictionsSchemaOrBuilder() { return predictionsSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : predictionsSchema_; } 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, getInstancesSchema()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getParametersSchema()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(3, getPredictionsSchema()); } 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, getInstancesSchema()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParametersSchema()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPredictionsSchema()); } 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.CustomProcessorSourceInfo.ModelSchema)) { return super.equals(obj); } com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema other = (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) obj; if (hasInstancesSchema() != other.hasInstancesSchema()) return false; if (hasInstancesSchema()) { if (!getInstancesSchema().equals(other.getInstancesSchema())) return false; } if (hasParametersSchema() != other.hasParametersSchema()) return false; if (hasParametersSchema()) { if (!getParametersSchema().equals(other.getParametersSchema())) return false; } if (hasPredictionsSchema() != other.hasPredictionsSchema()) return false; if (hasPredictionsSchema()) { if (!getPredictionsSchema().equals(other.getPredictionsSchema())) 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 (hasInstancesSchema()) { hash = (37 * hash) + INSTANCES_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getInstancesSchema().hashCode(); } if (hasParametersSchema()) { hash = (37 * hash) + PARAMETERS_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getParametersSchema().hashCode(); } if (hasPredictionsSchema()) { hash = (37 * hash) + PREDICTIONS_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getPredictionsSchema().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema 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.CustomProcessorSourceInfo.ModelSchema 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; } /** * * *
     * The schema is defined as an OpenAPI 3.0.2 [Schema
     * Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject).
     * 
* * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.class, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder.class); } // Construct using // com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getInstancesSchemaFieldBuilder(); getParametersSchemaFieldBuilder(); getPredictionsSchemaFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; instancesSchema_ = null; if (instancesSchemaBuilder_ != null) { instancesSchemaBuilder_.dispose(); instancesSchemaBuilder_ = null; } parametersSchema_ = null; if (parametersSchemaBuilder_ != null) { parametersSchemaBuilder_.dispose(); parametersSchemaBuilder_ = null; } predictionsSchema_ = null; if (predictionsSchemaBuilder_ != null) { predictionsSchemaBuilder_.dispose(); predictionsSchemaBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_ModelSchema_descriptor; } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getDefaultInstanceForType() { return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema .getDefaultInstance(); } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema build() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema buildPartial() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema result = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.instancesSchema_ = instancesSchemaBuilder_ == null ? instancesSchema_ : instancesSchemaBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.parametersSchema_ = parametersSchemaBuilder_ == null ? parametersSchema_ : parametersSchemaBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.predictionsSchema_ = predictionsSchemaBuilder_ == null ? predictionsSchema_ : predictionsSchemaBuilder_.build(); to_bitField0_ |= 0x00000004; } 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.CustomProcessorSourceInfo.ModelSchema) { return mergeFrom( (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema other) { if (other == com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema .getDefaultInstance()) return this; if (other.hasInstancesSchema()) { mergeInstancesSchema(other.getInstancesSchema()); } if (other.hasParametersSchema()) { mergeParametersSchema(other.getParametersSchema()); } if (other.hasPredictionsSchema()) { mergePredictionsSchema(other.getPredictionsSchema()); } 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( getInstancesSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getParametersSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getPredictionsSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 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.GcsSource instancesSchema_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder> instancesSchemaBuilder_; /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; * * @return Whether the instancesSchema field is set. */ public boolean hasInstancesSchema() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; * * @return The instancesSchema. */ public com.google.cloud.visionai.v1.GcsSource getInstancesSchema() { if (instancesSchemaBuilder_ == null) { return instancesSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : instancesSchema_; } else { return instancesSchemaBuilder_.getMessage(); } } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ public Builder setInstancesSchema(com.google.cloud.visionai.v1.GcsSource value) { if (instancesSchemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } instancesSchema_ = value; } else { instancesSchemaBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ public Builder setInstancesSchema( com.google.cloud.visionai.v1.GcsSource.Builder builderForValue) { if (instancesSchemaBuilder_ == null) { instancesSchema_ = builderForValue.build(); } else { instancesSchemaBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ public Builder mergeInstancesSchema(com.google.cloud.visionai.v1.GcsSource value) { if (instancesSchemaBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && instancesSchema_ != null && instancesSchema_ != com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) { getInstancesSchemaBuilder().mergeFrom(value); } else { instancesSchema_ = value; } } else { instancesSchemaBuilder_.mergeFrom(value); } if (instancesSchema_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ public Builder clearInstancesSchema() { bitField0_ = (bitField0_ & ~0x00000001); instancesSchema_ = null; if (instancesSchemaBuilder_ != null) { instancesSchemaBuilder_.dispose(); instancesSchemaBuilder_ = null; } onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ public com.google.cloud.visionai.v1.GcsSource.Builder getInstancesSchemaBuilder() { bitField0_ |= 0x00000001; onChanged(); return getInstancesSchemaFieldBuilder().getBuilder(); } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ public com.google.cloud.visionai.v1.GcsSourceOrBuilder getInstancesSchemaOrBuilder() { if (instancesSchemaBuilder_ != null) { return instancesSchemaBuilder_.getMessageOrBuilder(); } else { return instancesSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : instancesSchema_; } } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * instance used in prediction and explanation requests.
       * 
* * .google.cloud.visionai.v1.GcsSource instances_schema = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder> getInstancesSchemaFieldBuilder() { if (instancesSchemaBuilder_ == null) { instancesSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder>( getInstancesSchema(), getParentForChildren(), isClean()); instancesSchema_ = null; } return instancesSchemaBuilder_; } private com.google.cloud.visionai.v1.GcsSource parametersSchema_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder> parametersSchemaBuilder_; /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; * * @return Whether the parametersSchema field is set. */ public boolean hasParametersSchema() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; * * @return The parametersSchema. */ public com.google.cloud.visionai.v1.GcsSource getParametersSchema() { if (parametersSchemaBuilder_ == null) { return parametersSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : parametersSchema_; } else { return parametersSchemaBuilder_.getMessage(); } } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ public Builder setParametersSchema(com.google.cloud.visionai.v1.GcsSource value) { if (parametersSchemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } parametersSchema_ = value; } else { parametersSchemaBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ public Builder setParametersSchema( com.google.cloud.visionai.v1.GcsSource.Builder builderForValue) { if (parametersSchemaBuilder_ == null) { parametersSchema_ = builderForValue.build(); } else { parametersSchemaBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ public Builder mergeParametersSchema(com.google.cloud.visionai.v1.GcsSource value) { if (parametersSchemaBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && parametersSchema_ != null && parametersSchema_ != com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) { getParametersSchemaBuilder().mergeFrom(value); } else { parametersSchema_ = value; } } else { parametersSchemaBuilder_.mergeFrom(value); } if (parametersSchema_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ public Builder clearParametersSchema() { bitField0_ = (bitField0_ & ~0x00000002); parametersSchema_ = null; if (parametersSchemaBuilder_ != null) { parametersSchemaBuilder_.dispose(); parametersSchemaBuilder_ = null; } onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ public com.google.cloud.visionai.v1.GcsSource.Builder getParametersSchemaBuilder() { bitField0_ |= 0x00000002; onChanged(); return getParametersSchemaFieldBuilder().getBuilder(); } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ public com.google.cloud.visionai.v1.GcsSourceOrBuilder getParametersSchemaOrBuilder() { if (parametersSchemaBuilder_ != null) { return parametersSchemaBuilder_.getMessageOrBuilder(); } else { return parametersSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : parametersSchema_; } } /** * * *
       * Cloud Storage location to a YAML file that defines the prediction and
       * explanation parameters.
       * 
* * .google.cloud.visionai.v1.GcsSource parameters_schema = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder> getParametersSchemaFieldBuilder() { if (parametersSchemaBuilder_ == null) { parametersSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder>( getParametersSchema(), getParentForChildren(), isClean()); parametersSchema_ = null; } return parametersSchemaBuilder_; } private com.google.cloud.visionai.v1.GcsSource predictionsSchema_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder> predictionsSchemaBuilder_; /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; * * @return Whether the predictionsSchema field is set. */ public boolean hasPredictionsSchema() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; * * @return The predictionsSchema. */ public com.google.cloud.visionai.v1.GcsSource getPredictionsSchema() { if (predictionsSchemaBuilder_ == null) { return predictionsSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : predictionsSchema_; } else { return predictionsSchemaBuilder_.getMessage(); } } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ public Builder setPredictionsSchema(com.google.cloud.visionai.v1.GcsSource value) { if (predictionsSchemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } predictionsSchema_ = value; } else { predictionsSchemaBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ public Builder setPredictionsSchema( com.google.cloud.visionai.v1.GcsSource.Builder builderForValue) { if (predictionsSchemaBuilder_ == null) { predictionsSchema_ = builderForValue.build(); } else { predictionsSchemaBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ public Builder mergePredictionsSchema(com.google.cloud.visionai.v1.GcsSource value) { if (predictionsSchemaBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && predictionsSchema_ != null && predictionsSchema_ != com.google.cloud.visionai.v1.GcsSource.getDefaultInstance()) { getPredictionsSchemaBuilder().mergeFrom(value); } else { predictionsSchema_ = value; } } else { predictionsSchemaBuilder_.mergeFrom(value); } if (predictionsSchema_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ public Builder clearPredictionsSchema() { bitField0_ = (bitField0_ & ~0x00000004); predictionsSchema_ = null; if (predictionsSchemaBuilder_ != null) { predictionsSchemaBuilder_.dispose(); predictionsSchemaBuilder_ = null; } onChanged(); return this; } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ public com.google.cloud.visionai.v1.GcsSource.Builder getPredictionsSchemaBuilder() { bitField0_ |= 0x00000004; onChanged(); return getPredictionsSchemaFieldBuilder().getBuilder(); } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ public com.google.cloud.visionai.v1.GcsSourceOrBuilder getPredictionsSchemaOrBuilder() { if (predictionsSchemaBuilder_ != null) { return predictionsSchemaBuilder_.getMessageOrBuilder(); } else { return predictionsSchema_ == null ? com.google.cloud.visionai.v1.GcsSource.getDefaultInstance() : predictionsSchema_; } } /** * * *
       * Cloud Storage location to a YAML file that defines the format of a single
       * prediction or explanation.
       * 
* * .google.cloud.visionai.v1.GcsSource predictions_schema = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder> getPredictionsSchemaFieldBuilder() { if (predictionsSchemaBuilder_ == null) { predictionsSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.GcsSource, com.google.cloud.visionai.v1.GcsSource.Builder, com.google.cloud.visionai.v1.GcsSourceOrBuilder>( getPredictionsSchema(), getParentForChildren(), isClean()); predictionsSchema_ = null; } return predictionsSchemaBuilder_; } @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.CustomProcessorSourceInfo.ModelSchema) } // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema) private static final com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema(); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ModelSchema 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.CustomProcessorSourceInfo.ModelSchema getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; private int artifactPathCase_ = 0; @SuppressWarnings("serial") private java.lang.Object artifactPath_; public enum ArtifactPathCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { VERTEX_MODEL(2), PRODUCT_RECOGNIZER_ARTIFACT(3), ARTIFACTPATH_NOT_SET(0); private final int value; private ArtifactPathCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ArtifactPathCase valueOf(int value) { return forNumber(value); } public static ArtifactPathCase forNumber(int value) { switch (value) { case 2: return VERTEX_MODEL; case 3: return PRODUCT_RECOGNIZER_ARTIFACT; case 0: return ARTIFACTPATH_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ArtifactPathCase getArtifactPathCase() { return ArtifactPathCase.forNumber(artifactPathCase_); } public static final int VERTEX_MODEL_FIELD_NUMBER = 2; /** * * *
   * The resource name original model hosted in the vertex AI platform.
   * 
* * string vertex_model = 2; * * @return Whether the vertexModel field is set. */ public boolean hasVertexModel() { return artifactPathCase_ == 2; } /** * * *
   * The resource name original model hosted in the vertex AI platform.
   * 
* * string vertex_model = 2; * * @return The vertexModel. */ public java.lang.String getVertexModel() { java.lang.Object ref = ""; if (artifactPathCase_ == 2) { ref = artifactPath_; } if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (artifactPathCase_ == 2) { artifactPath_ = s; } return s; } } /** * * *
   * The resource name original model hosted in the vertex AI platform.
   * 
* * string vertex_model = 2; * * @return The bytes for vertexModel. */ public com.google.protobuf.ByteString getVertexModelBytes() { java.lang.Object ref = ""; if (artifactPathCase_ == 2) { ref = artifactPath_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (artifactPathCase_ == 2) { artifactPath_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PRODUCT_RECOGNIZER_ARTIFACT_FIELD_NUMBER = 3; /** * * *
   * Artifact for product recognizer.
   * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * * * @return Whether the productRecognizerArtifact field is set. */ @java.lang.Override public boolean hasProductRecognizerArtifact() { return artifactPathCase_ == 3; } /** * * *
   * Artifact for product recognizer.
   * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * * * @return The productRecognizerArtifact. */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact getProductRecognizerArtifact() { if (artifactPathCase_ == 3) { return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_; } return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } /** * * *
   * Artifact for product recognizer.
   * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder getProductRecognizerArtifactOrBuilder() { if (artifactPathCase_ == 3) { return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_; } return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } public static final int SOURCE_TYPE_FIELD_NUMBER = 1; private int sourceType_ = 0; /** * * *
   * The original product which holds the custom processor's functionality.
   * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @return The enum numeric value on the wire for sourceType. */ @java.lang.Override public int getSourceTypeValue() { return sourceType_; } /** * * *
   * The original product which holds the custom processor's functionality.
   * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @return The sourceType. */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType getSourceType() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType result = com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.forNumber(sourceType_); return result == null ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.UNRECOGNIZED : result; } public static final int ADDITIONAL_INFO_FIELD_NUMBER = 4; private static final class AdditionalInfoDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_AdditionalInfoEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField additionalInfo_; private com.google.protobuf.MapField internalGetAdditionalInfo() { if (additionalInfo_ == null) { return com.google.protobuf.MapField.emptyMapField( AdditionalInfoDefaultEntryHolder.defaultEntry); } return additionalInfo_; } public int getAdditionalInfoCount() { return internalGetAdditionalInfo().getMap().size(); } /** * * *
   * Output only. Additional info related to the imported custom processor.
   * Data is filled in by app platform during the processor creation.
   * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public boolean containsAdditionalInfo(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetAdditionalInfo().getMap().containsKey(key); } /** Use {@link #getAdditionalInfoMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAdditionalInfo() { return getAdditionalInfoMap(); } /** * * *
   * Output only. Additional info related to the imported custom processor.
   * Data is filled in by app platform during the processor creation.
   * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.Map getAdditionalInfoMap() { return internalGetAdditionalInfo().getMap(); } /** * * *
   * Output only. Additional info related to the imported custom processor.
   * Data is filled in by app platform during the processor creation.
   * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public /* nullable */ java.lang.String getAdditionalInfoOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAdditionalInfo().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Output only. Additional info related to the imported custom processor.
   * Data is filled in by app platform during the processor creation.
   * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.lang.String getAdditionalInfoOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAdditionalInfo().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int MODEL_SCHEMA_FIELD_NUMBER = 5; private com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema modelSchema_; /** * * *
   * Model schema files which specifies the signature of the model.
   * For VERTEX_CUSTOM models, instances schema is required.
   * If instances schema is not specified during the processor creation,
   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
   * creation will fail.
   * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * * @return Whether the modelSchema field is set. */ @java.lang.Override public boolean hasModelSchema() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Model schema files which specifies the signature of the model.
   * For VERTEX_CUSTOM models, instances schema is required.
   * If instances schema is not specified during the processor creation,
   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
   * creation will fail.
   * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * * @return The modelSchema. */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getModelSchema() { return modelSchema_ == null ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.getDefaultInstance() : modelSchema_; } /** * * *
   * Model schema files which specifies the signature of the model.
   * For VERTEX_CUSTOM models, instances schema is required.
   * If instances schema is not specified during the processor creation,
   * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
   * creation will fail.
   * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder getModelSchemaOrBuilder() { return modelSchema_ == null ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.getDefaultInstance() : modelSchema_; } 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 (sourceType_ != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.SOURCE_TYPE_UNSPECIFIED .getNumber()) { output.writeEnum(1, sourceType_); } if (artifactPathCase_ == 2) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, artifactPath_); } if (artifactPathCase_ == 3) { output.writeMessage( 3, (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAdditionalInfo(), AdditionalInfoDefaultEntryHolder.defaultEntry, 4); if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getModelSchema()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (sourceType_ != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.SOURCE_TYPE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sourceType_); } if (artifactPathCase_ == 2) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, artifactPath_); } if (artifactPathCase_ == 3) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_); } for (java.util.Map.Entry entry : internalGetAdditionalInfo().getMap().entrySet()) { com.google.protobuf.MapEntry additionalInfo__ = AdditionalInfoDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, additionalInfo__); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getModelSchema()); } 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.CustomProcessorSourceInfo)) { return super.equals(obj); } com.google.cloud.visionai.v1.CustomProcessorSourceInfo other = (com.google.cloud.visionai.v1.CustomProcessorSourceInfo) obj; if (sourceType_ != other.sourceType_) return false; if (!internalGetAdditionalInfo().equals(other.internalGetAdditionalInfo())) return false; if (hasModelSchema() != other.hasModelSchema()) return false; if (hasModelSchema()) { if (!getModelSchema().equals(other.getModelSchema())) return false; } if (!getArtifactPathCase().equals(other.getArtifactPathCase())) return false; switch (artifactPathCase_) { case 2: if (!getVertexModel().equals(other.getVertexModel())) return false; break; case 3: if (!getProductRecognizerArtifact().equals(other.getProductRecognizerArtifact())) return false; break; case 0: default: } 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) + SOURCE_TYPE_FIELD_NUMBER; hash = (53 * hash) + sourceType_; if (!internalGetAdditionalInfo().getMap().isEmpty()) { hash = (37 * hash) + ADDITIONAL_INFO_FIELD_NUMBER; hash = (53 * hash) + internalGetAdditionalInfo().hashCode(); } if (hasModelSchema()) { hash = (37 * hash) + MODEL_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getModelSchema().hashCode(); } switch (artifactPathCase_) { case 2: hash = (37 * hash) + VERTEX_MODEL_FIELD_NUMBER; hash = (53 * hash) + getVertexModel().hashCode(); break; case 3: hash = (37 * hash) + PRODUCT_RECOGNIZER_ARTIFACT_FIELD_NUMBER; hash = (53 * hash) + getProductRecognizerArtifact().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo 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.CustomProcessorSourceInfo 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; } /** * * *
   * Describes the source info for a custom processor.
   * 
* * Protobuf type {@code google.cloud.visionai.v1.CustomProcessorSourceInfo} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.CustomProcessorSourceInfo) com.google.cloud.visionai.v1.CustomProcessorSourceInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 4: return internalGetAdditionalInfo(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 4: return internalGetMutableAdditionalInfo(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.class, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.Builder.class); } // Construct using com.google.cloud.visionai.v1.CustomProcessorSourceInfo.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getModelSchemaFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (productRecognizerArtifactBuilder_ != null) { productRecognizerArtifactBuilder_.clear(); } sourceType_ = 0; internalGetMutableAdditionalInfo().clear(); modelSchema_ = null; if (modelSchemaBuilder_ != null) { modelSchemaBuilder_.dispose(); modelSchemaBuilder_ = null; } artifactPathCase_ = 0; artifactPath_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.visionai.v1.PlatformProto .internal_static_google_cloud_visionai_v1_CustomProcessorSourceInfo_descriptor; } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo getDefaultInstanceForType() { return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance(); } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo build() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo buildPartial() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo result = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.google.cloud.visionai.v1.CustomProcessorSourceInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.sourceType_ = sourceType_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.additionalInfo_ = internalGetAdditionalInfo(); result.additionalInfo_.makeImmutable(); } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.modelSchema_ = modelSchemaBuilder_ == null ? modelSchema_ : modelSchemaBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.cloud.visionai.v1.CustomProcessorSourceInfo result) { result.artifactPathCase_ = artifactPathCase_; result.artifactPath_ = this.artifactPath_; if (artifactPathCase_ == 3 && productRecognizerArtifactBuilder_ != null) { result.artifactPath_ = productRecognizerArtifactBuilder_.build(); } } @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.CustomProcessorSourceInfo) { return mergeFrom((com.google.cloud.visionai.v1.CustomProcessorSourceInfo) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.visionai.v1.CustomProcessorSourceInfo other) { if (other == com.google.cloud.visionai.v1.CustomProcessorSourceInfo.getDefaultInstance()) return this; if (other.sourceType_ != 0) { setSourceTypeValue(other.getSourceTypeValue()); } internalGetMutableAdditionalInfo().mergeFrom(other.internalGetAdditionalInfo()); bitField0_ |= 0x00000008; if (other.hasModelSchema()) { mergeModelSchema(other.getModelSchema()); } switch (other.getArtifactPathCase()) { case VERTEX_MODEL: { artifactPathCase_ = 2; artifactPath_ = other.artifactPath_; onChanged(); break; } case PRODUCT_RECOGNIZER_ARTIFACT: { mergeProductRecognizerArtifact(other.getProductRecognizerArtifact()); break; } case ARTIFACTPATH_NOT_SET: { break; } } 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: { sourceType_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 8 case 18: { java.lang.String s = input.readStringRequireUtf8(); artifactPathCase_ = 2; artifactPath_ = s; break; } // case 18 case 26: { input.readMessage( getProductRecognizerArtifactFieldBuilder().getBuilder(), extensionRegistry); artifactPathCase_ = 3; break; } // case 26 case 34: { com.google.protobuf.MapEntry additionalInfo__ = input.readMessage( AdditionalInfoDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableAdditionalInfo() .getMutableMap() .put(additionalInfo__.getKey(), additionalInfo__.getValue()); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage(getModelSchemaFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 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 artifactPathCase_ = 0; private java.lang.Object artifactPath_; public ArtifactPathCase getArtifactPathCase() { return ArtifactPathCase.forNumber(artifactPathCase_); } public Builder clearArtifactPath() { artifactPathCase_ = 0; artifactPath_ = null; onChanged(); return this; } private int bitField0_; /** * * *
     * The resource name original model hosted in the vertex AI platform.
     * 
* * string vertex_model = 2; * * @return Whether the vertexModel field is set. */ @java.lang.Override public boolean hasVertexModel() { return artifactPathCase_ == 2; } /** * * *
     * The resource name original model hosted in the vertex AI platform.
     * 
* * string vertex_model = 2; * * @return The vertexModel. */ @java.lang.Override public java.lang.String getVertexModel() { java.lang.Object ref = ""; if (artifactPathCase_ == 2) { ref = artifactPath_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (artifactPathCase_ == 2) { artifactPath_ = s; } return s; } else { return (java.lang.String) ref; } } /** * * *
     * The resource name original model hosted in the vertex AI platform.
     * 
* * string vertex_model = 2; * * @return The bytes for vertexModel. */ @java.lang.Override public com.google.protobuf.ByteString getVertexModelBytes() { java.lang.Object ref = ""; if (artifactPathCase_ == 2) { ref = artifactPath_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); if (artifactPathCase_ == 2) { artifactPath_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The resource name original model hosted in the vertex AI platform.
     * 
* * string vertex_model = 2; * * @param value The vertexModel to set. * @return This builder for chaining. */ public Builder setVertexModel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } artifactPathCase_ = 2; artifactPath_ = value; onChanged(); return this; } /** * * *
     * The resource name original model hosted in the vertex AI platform.
     * 
* * string vertex_model = 2; * * @return This builder for chaining. */ public Builder clearVertexModel() { if (artifactPathCase_ == 2) { artifactPathCase_ = 0; artifactPath_ = null; onChanged(); } return this; } /** * * *
     * The resource name original model hosted in the vertex AI platform.
     * 
* * string vertex_model = 2; * * @param value The bytes for vertexModel to set. * @return This builder for chaining. */ public Builder setVertexModelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); artifactPathCase_ = 2; artifactPath_ = value; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .Builder, com.google.cloud.visionai.v1.CustomProcessorSourceInfo .ProductRecognizerArtifactOrBuilder> productRecognizerArtifactBuilder_; /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * * * @return Whether the productRecognizerArtifact field is set. */ @java.lang.Override public boolean hasProductRecognizerArtifact() { return artifactPathCase_ == 3; } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * * * @return The productRecognizerArtifact. */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact getProductRecognizerArtifact() { if (productRecognizerArtifactBuilder_ == null) { if (artifactPathCase_ == 3) { return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_; } return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } else { if (artifactPathCase_ == 3) { return productRecognizerArtifactBuilder_.getMessage(); } return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ public Builder setProductRecognizerArtifact( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact value) { if (productRecognizerArtifactBuilder_ == null) { if (value == null) { throw new NullPointerException(); } artifactPath_ = value; onChanged(); } else { productRecognizerArtifactBuilder_.setMessage(value); } artifactPathCase_ = 3; return this; } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ public Builder setProductRecognizerArtifact( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact.Builder builderForValue) { if (productRecognizerArtifactBuilder_ == null) { artifactPath_ = builderForValue.build(); onChanged(); } else { productRecognizerArtifactBuilder_.setMessage(builderForValue.build()); } artifactPathCase_ = 3; return this; } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ public Builder mergeProductRecognizerArtifact( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact value) { if (productRecognizerArtifactBuilder_ == null) { if (artifactPathCase_ == 3 && artifactPath_ != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance()) { artifactPath_ = com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .newBuilder( (com.google.cloud.visionai.v1.CustomProcessorSourceInfo .ProductRecognizerArtifact) artifactPath_) .mergeFrom(value) .buildPartial(); } else { artifactPath_ = value; } onChanged(); } else { if (artifactPathCase_ == 3) { productRecognizerArtifactBuilder_.mergeFrom(value); } else { productRecognizerArtifactBuilder_.setMessage(value); } } artifactPathCase_ = 3; return this; } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ public Builder clearProductRecognizerArtifact() { if (productRecognizerArtifactBuilder_ == null) { if (artifactPathCase_ == 3) { artifactPathCase_ = 0; artifactPath_ = null; onChanged(); } } else { if (artifactPathCase_ == 3) { artifactPathCase_ = 0; artifactPath_ = null; } productRecognizerArtifactBuilder_.clear(); } return this; } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact.Builder getProductRecognizerArtifactBuilder() { return getProductRecognizerArtifactFieldBuilder().getBuilder(); } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactOrBuilder getProductRecognizerArtifactOrBuilder() { if ((artifactPathCase_ == 3) && (productRecognizerArtifactBuilder_ != null)) { return productRecognizerArtifactBuilder_.getMessageOrBuilder(); } else { if (artifactPathCase_ == 3) { return (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_; } return com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } } /** * * *
     * Artifact for product recognizer.
     * 
* * * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .Builder, com.google.cloud.visionai.v1.CustomProcessorSourceInfo .ProductRecognizerArtifactOrBuilder> getProductRecognizerArtifactFieldBuilder() { if (productRecognizerArtifactBuilder_ == null) { if (!(artifactPathCase_ == 3)) { artifactPath_ = com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .getDefaultInstance(); } productRecognizerArtifactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact .Builder, com.google.cloud.visionai.v1.CustomProcessorSourceInfo .ProductRecognizerArtifactOrBuilder>( (com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact) artifactPath_, getParentForChildren(), isClean()); artifactPath_ = null; } artifactPathCase_ = 3; onChanged(); return productRecognizerArtifactBuilder_; } private int sourceType_ = 0; /** * * *
     * The original product which holds the custom processor's functionality.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @return The enum numeric value on the wire for sourceType. */ @java.lang.Override public int getSourceTypeValue() { return sourceType_; } /** * * *
     * The original product which holds the custom processor's functionality.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @param value The enum numeric value on the wire for sourceType to set. * @return This builder for chaining. */ public Builder setSourceTypeValue(int value) { sourceType_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * The original product which holds the custom processor's functionality.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @return The sourceType. */ @java.lang.Override public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType getSourceType() { com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType result = com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.forNumber(sourceType_); return result == null ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType.UNRECOGNIZED : result; } /** * * *
     * The original product which holds the custom processor's functionality.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @param value The sourceType to set. * @return This builder for chaining. */ public Builder setSourceType( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; sourceType_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The original product which holds the custom processor's functionality.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; * * @return This builder for chaining. */ public Builder clearSourceType() { bitField0_ = (bitField0_ & ~0x00000004); sourceType_ = 0; onChanged(); return this; } private com.google.protobuf.MapField additionalInfo_; private com.google.protobuf.MapField internalGetAdditionalInfo() { if (additionalInfo_ == null) { return com.google.protobuf.MapField.emptyMapField( AdditionalInfoDefaultEntryHolder.defaultEntry); } return additionalInfo_; } private com.google.protobuf.MapField internalGetMutableAdditionalInfo() { if (additionalInfo_ == null) { additionalInfo_ = com.google.protobuf.MapField.newMapField(AdditionalInfoDefaultEntryHolder.defaultEntry); } if (!additionalInfo_.isMutable()) { additionalInfo_ = additionalInfo_.copy(); } bitField0_ |= 0x00000008; onChanged(); return additionalInfo_; } public int getAdditionalInfoCount() { return internalGetAdditionalInfo().getMap().size(); } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public boolean containsAdditionalInfo(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetAdditionalInfo().getMap().containsKey(key); } /** Use {@link #getAdditionalInfoMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getAdditionalInfo() { return getAdditionalInfoMap(); } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.Map getAdditionalInfoMap() { return internalGetAdditionalInfo().getMap(); } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public /* nullable */ java.lang.String getAdditionalInfoOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAdditionalInfo().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.lang.String getAdditionalInfoOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetAdditionalInfo().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearAdditionalInfo() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableAdditionalInfo().getMutableMap().clear(); return this; } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeAdditionalInfo(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableAdditionalInfo().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableAdditionalInfo() { bitField0_ |= 0x00000008; return internalGetMutableAdditionalInfo().getMutableMap(); } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder putAdditionalInfo(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableAdditionalInfo().getMutableMap().put(key, value); bitField0_ |= 0x00000008; return this; } /** * * *
     * Output only. Additional info related to the imported custom processor.
     * Data is filled in by app platform during the processor creation.
     * 
* * * map<string, string> additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder putAllAdditionalInfo(java.util.Map values) { internalGetMutableAdditionalInfo().getMutableMap().putAll(values); bitField0_ |= 0x00000008; return this; } private com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema modelSchema_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder> modelSchemaBuilder_; /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * * * @return Whether the modelSchema field is set. */ public boolean hasModelSchema() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * * * @return The modelSchema. */ public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema getModelSchema() { if (modelSchemaBuilder_ == null) { return modelSchema_ == null ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema .getDefaultInstance() : modelSchema_; } else { return modelSchemaBuilder_.getMessage(); } } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ public Builder setModelSchema( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema value) { if (modelSchemaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } modelSchema_ = value; } else { modelSchemaBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ public Builder setModelSchema( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder builderForValue) { if (modelSchemaBuilder_ == null) { modelSchema_ = builderForValue.build(); } else { modelSchemaBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ public Builder mergeModelSchema( com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema value) { if (modelSchemaBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && modelSchema_ != null && modelSchema_ != com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema .getDefaultInstance()) { getModelSchemaBuilder().mergeFrom(value); } else { modelSchema_ = value; } } else { modelSchemaBuilder_.mergeFrom(value); } if (modelSchema_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ public Builder clearModelSchema() { bitField0_ = (bitField0_ & ~0x00000010); modelSchema_ = null; if (modelSchemaBuilder_ != null) { modelSchemaBuilder_.dispose(); modelSchemaBuilder_ = null; } onChanged(); return this; } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder getModelSchemaBuilder() { bitField0_ |= 0x00000010; onChanged(); return getModelSchemaFieldBuilder().getBuilder(); } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ public com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder getModelSchemaOrBuilder() { if (modelSchemaBuilder_ != null) { return modelSchemaBuilder_.getMessageOrBuilder(); } else { return modelSchema_ == null ? com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema .getDefaultInstance() : modelSchema_; } } /** * * *
     * Model schema files which specifies the signature of the model.
     * For VERTEX_CUSTOM models, instances schema is required.
     * If instances schema is not specified during the processor creation,
     * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the
     * creation will fail.
     * 
* * .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder> getModelSchemaFieldBuilder() { if (modelSchemaBuilder_ == null) { modelSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema.Builder, com.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchemaOrBuilder>( getModelSchema(), getParentForChildren(), isClean()); modelSchema_ = null; } return modelSchemaBuilder_; } @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.CustomProcessorSourceInfo) } // @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.CustomProcessorSourceInfo) private static final com.google.cloud.visionai.v1.CustomProcessorSourceInfo DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.CustomProcessorSourceInfo(); } public static com.google.cloud.visionai.v1.CustomProcessorSourceInfo getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CustomProcessorSourceInfo 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.CustomProcessorSourceInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy