com.google.cloud.automl.v1.DeployModelRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-automl-v1 Show documentation
Show all versions of proto-google-cloud-automl-v1 Show documentation
PROTO library for proto-google-cloud-automl-v1
/*
* Copyright 2020 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/automl/v1/service.proto
package com.google.cloud.automl.v1;
/**
*
*
*
* Request message for
* [AutoMl.DeployModel][google.cloud.automl.v1.AutoMl.DeployModel].
*
*
* Protobuf type {@code google.cloud.automl.v1.DeployModelRequest}
*/
public final class DeployModelRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.automl.v1.DeployModelRequest)
DeployModelRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use DeployModelRequest.newBuilder() to construct.
private DeployModelRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DeployModelRequest() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new DeployModelRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private DeployModelRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18:
{
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.Builder
subBuilder = null;
if (modelDeploymentMetadataCase_ == 2) {
subBuilder =
((com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_)
.toBuilder();
}
modelDeploymentMetadata_ =
input.readMessage(
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_);
modelDeploymentMetadata_ = subBuilder.buildPartial();
}
modelDeploymentMetadataCase_ = 2;
break;
}
case 34:
{
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.Builder
subBuilder = null;
if (modelDeploymentMetadataCase_ == 4) {
subBuilder =
((com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_)
.toBuilder();
}
modelDeploymentMetadata_ =
input.readMessage(
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_);
modelDeploymentMetadata_ = subBuilder.buildPartial();
}
modelDeploymentMetadataCase_ = 4;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.automl.v1.AutoMlProto
.internal_static_google_cloud_automl_v1_DeployModelRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.automl.v1.AutoMlProto
.internal_static_google_cloud_automl_v1_DeployModelRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.automl.v1.DeployModelRequest.class,
com.google.cloud.automl.v1.DeployModelRequest.Builder.class);
}
private int modelDeploymentMetadataCase_ = 0;
private java.lang.Object modelDeploymentMetadata_;
public enum ModelDeploymentMetadataCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA(2),
IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA(4),
MODELDEPLOYMENTMETADATA_NOT_SET(0);
private final int value;
private ModelDeploymentMetadataCase(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 ModelDeploymentMetadataCase valueOf(int value) {
return forNumber(value);
}
public static ModelDeploymentMetadataCase forNumber(int value) {
switch (value) {
case 2:
return IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA;
case 4:
return IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA;
case 0:
return MODELDEPLOYMENTMETADATA_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ModelDeploymentMetadataCase getModelDeploymentMetadataCase() {
return ModelDeploymentMetadataCase.forNumber(modelDeploymentMetadataCase_);
}
public static final int IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER = 2;
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*
* @return Whether the imageObjectDetectionModelDeploymentMetadata field is set.
*/
public boolean hasImageObjectDetectionModelDeploymentMetadata() {
return modelDeploymentMetadataCase_ == 2;
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*
* @return The imageObjectDetectionModelDeploymentMetadata.
*/
public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
getImageObjectDetectionModelDeploymentMetadata() {
if (modelDeploymentMetadataCase_ == 2) {
return (com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance();
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder
getImageObjectDetectionModelDeploymentMetadataOrBuilder() {
if (modelDeploymentMetadataCase_ == 2) {
return (com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance();
}
public static final int IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER = 4;
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*
* @return Whether the imageClassificationModelDeploymentMetadata field is set.
*/
public boolean hasImageClassificationModelDeploymentMetadata() {
return modelDeploymentMetadataCase_ == 4;
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*
* @return The imageClassificationModelDeploymentMetadata.
*/
public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
getImageClassificationModelDeploymentMetadata() {
if (modelDeploymentMetadataCase_ == 4) {
return (com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance();
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder
getImageClassificationModelDeploymentMetadataOrBuilder() {
if (modelDeploymentMetadataCase_ == 4) {
return (com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance();
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = 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 (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (modelDeploymentMetadataCase_ == 2) {
output.writeMessage(
2,
(com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_);
}
if (modelDeploymentMetadataCase_ == 4) {
output.writeMessage(
4,
(com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (modelDeploymentMetadataCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2,
(com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_);
}
if (modelDeploymentMetadataCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4,
(com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_);
}
size += unknownFields.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.automl.v1.DeployModelRequest)) {
return super.equals(obj);
}
com.google.cloud.automl.v1.DeployModelRequest other =
(com.google.cloud.automl.v1.DeployModelRequest) obj;
if (!getName().equals(other.getName())) return false;
if (!getModelDeploymentMetadataCase().equals(other.getModelDeploymentMetadataCase()))
return false;
switch (modelDeploymentMetadataCase_) {
case 2:
if (!getImageObjectDetectionModelDeploymentMetadata()
.equals(other.getImageObjectDetectionModelDeploymentMetadata())) return false;
break;
case 4:
if (!getImageClassificationModelDeploymentMetadata()
.equals(other.getImageClassificationModelDeploymentMetadata())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
switch (modelDeploymentMetadataCase_) {
case 2:
hash = (37 * hash) + IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getImageObjectDetectionModelDeploymentMetadata().hashCode();
break;
case 4:
hash = (37 * hash) + IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getImageClassificationModelDeploymentMetadata().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.automl.v1.DeployModelRequest parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1.DeployModelRequest 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.automl.v1.DeployModelRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1.DeployModelRequest 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.automl.v1.DeployModelRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1.DeployModelRequest parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1.DeployModelRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1.DeployModelRequest 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.automl.v1.DeployModelRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1.DeployModelRequest 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.automl.v1.DeployModelRequest parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1.DeployModelRequest 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.automl.v1.DeployModelRequest 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;
}
/**
*
*
*
* Request message for
* [AutoMl.DeployModel][google.cloud.automl.v1.AutoMl.DeployModel].
*
*
* Protobuf type {@code google.cloud.automl.v1.DeployModelRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.DeployModelRequest)
com.google.cloud.automl.v1.DeployModelRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.automl.v1.AutoMlProto
.internal_static_google_cloud_automl_v1_DeployModelRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.automl.v1.AutoMlProto
.internal_static_google_cloud_automl_v1_DeployModelRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.automl.v1.DeployModelRequest.class,
com.google.cloud.automl.v1.DeployModelRequest.Builder.class);
}
// Construct using com.google.cloud.automl.v1.DeployModelRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
modelDeploymentMetadataCase_ = 0;
modelDeploymentMetadata_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.automl.v1.AutoMlProto
.internal_static_google_cloud_automl_v1_DeployModelRequest_descriptor;
}
@java.lang.Override
public com.google.cloud.automl.v1.DeployModelRequest getDefaultInstanceForType() {
return com.google.cloud.automl.v1.DeployModelRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.automl.v1.DeployModelRequest build() {
com.google.cloud.automl.v1.DeployModelRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.automl.v1.DeployModelRequest buildPartial() {
com.google.cloud.automl.v1.DeployModelRequest result =
new com.google.cloud.automl.v1.DeployModelRequest(this);
if (modelDeploymentMetadataCase_ == 2) {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
result.modelDeploymentMetadata_ = modelDeploymentMetadata_;
} else {
result.modelDeploymentMetadata_ =
imageObjectDetectionModelDeploymentMetadataBuilder_.build();
}
}
if (modelDeploymentMetadataCase_ == 4) {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
result.modelDeploymentMetadata_ = modelDeploymentMetadata_;
} else {
result.modelDeploymentMetadata_ =
imageClassificationModelDeploymentMetadataBuilder_.build();
}
}
result.name_ = name_;
result.modelDeploymentMetadataCase_ = modelDeploymentMetadataCase_;
onBuilt();
return result;
}
@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.automl.v1.DeployModelRequest) {
return mergeFrom((com.google.cloud.automl.v1.DeployModelRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.automl.v1.DeployModelRequest other) {
if (other == com.google.cloud.automl.v1.DeployModelRequest.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
switch (other.getModelDeploymentMetadataCase()) {
case IMAGE_OBJECT_DETECTION_MODEL_DEPLOYMENT_METADATA:
{
mergeImageObjectDetectionModelDeploymentMetadata(
other.getImageObjectDetectionModelDeploymentMetadata());
break;
}
case IMAGE_CLASSIFICATION_MODEL_DEPLOYMENT_METADATA:
{
mergeImageClassificationModelDeploymentMetadata(
other.getImageClassificationModelDeploymentMetadata());
break;
}
case MODELDEPLOYMENTMETADATA_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.google.cloud.automl.v1.DeployModelRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.automl.v1.DeployModelRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int modelDeploymentMetadataCase_ = 0;
private java.lang.Object modelDeploymentMetadata_;
public ModelDeploymentMetadataCase getModelDeploymentMetadataCase() {
return ModelDeploymentMetadataCase.forNumber(modelDeploymentMetadataCase_);
}
public Builder clearModelDeploymentMetadata() {
modelDeploymentMetadataCase_ = 0;
modelDeploymentMetadata_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata,
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.Builder,
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder>
imageObjectDetectionModelDeploymentMetadataBuilder_;
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*
* @return Whether the imageObjectDetectionModelDeploymentMetadata field is set.
*/
public boolean hasImageObjectDetectionModelDeploymentMetadata() {
return modelDeploymentMetadataCase_ == 2;
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*
* @return The imageObjectDetectionModelDeploymentMetadata.
*/
public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
getImageObjectDetectionModelDeploymentMetadata() {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
if (modelDeploymentMetadataCase_ == 2) {
return (com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance();
} else {
if (modelDeploymentMetadataCase_ == 2) {
return imageObjectDetectionModelDeploymentMetadataBuilder_.getMessage();
}
return com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance();
}
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public Builder setImageObjectDetectionModelDeploymentMetadata(
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata value) {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modelDeploymentMetadata_ = value;
onChanged();
} else {
imageObjectDetectionModelDeploymentMetadataBuilder_.setMessage(value);
}
modelDeploymentMetadataCase_ = 2;
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public Builder setImageObjectDetectionModelDeploymentMetadata(
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.Builder
builderForValue) {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
modelDeploymentMetadata_ = builderForValue.build();
onChanged();
} else {
imageObjectDetectionModelDeploymentMetadataBuilder_.setMessage(builderForValue.build());
}
modelDeploymentMetadataCase_ = 2;
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public Builder mergeImageObjectDetectionModelDeploymentMetadata(
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata value) {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
if (modelDeploymentMetadataCase_ == 2
&& modelDeploymentMetadata_
!= com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance()) {
modelDeploymentMetadata_ =
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.newBuilder(
(com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_)
.mergeFrom(value)
.buildPartial();
} else {
modelDeploymentMetadata_ = value;
}
onChanged();
} else {
if (modelDeploymentMetadataCase_ == 2) {
imageObjectDetectionModelDeploymentMetadataBuilder_.mergeFrom(value);
}
imageObjectDetectionModelDeploymentMetadataBuilder_.setMessage(value);
}
modelDeploymentMetadataCase_ = 2;
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public Builder clearImageObjectDetectionModelDeploymentMetadata() {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
if (modelDeploymentMetadataCase_ == 2) {
modelDeploymentMetadataCase_ = 0;
modelDeploymentMetadata_ = null;
onChanged();
}
} else {
if (modelDeploymentMetadataCase_ == 2) {
modelDeploymentMetadataCase_ = 0;
modelDeploymentMetadata_ = null;
}
imageObjectDetectionModelDeploymentMetadataBuilder_.clear();
}
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.Builder
getImageObjectDetectionModelDeploymentMetadataBuilder() {
return getImageObjectDetectionModelDeploymentMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
public com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder
getImageObjectDetectionModelDeploymentMetadataOrBuilder() {
if ((modelDeploymentMetadataCase_ == 2)
&& (imageObjectDetectionModelDeploymentMetadataBuilder_ != null)) {
return imageObjectDetectionModelDeploymentMetadataBuilder_.getMessageOrBuilder();
} else {
if (modelDeploymentMetadataCase_ == 2) {
return (com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance();
}
}
/**
*
*
*
* Model deployment metadata specific to Image Object Detection.
*
*
*
* .google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata image_object_detection_model_deployment_metadata = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata,
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.Builder,
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder>
getImageObjectDetectionModelDeploymentMetadataFieldBuilder() {
if (imageObjectDetectionModelDeploymentMetadataBuilder_ == null) {
if (!(modelDeploymentMetadataCase_ == 2)) {
modelDeploymentMetadata_ =
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata
.getDefaultInstance();
}
imageObjectDetectionModelDeploymentMetadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata,
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.Builder,
com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadataOrBuilder>(
(com.google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata)
modelDeploymentMetadata_,
getParentForChildren(),
isClean());
modelDeploymentMetadata_ = null;
}
modelDeploymentMetadataCase_ = 2;
onChanged();
;
return imageObjectDetectionModelDeploymentMetadataBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata,
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.Builder,
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder>
imageClassificationModelDeploymentMetadataBuilder_;
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*
* @return Whether the imageClassificationModelDeploymentMetadata field is set.
*/
public boolean hasImageClassificationModelDeploymentMetadata() {
return modelDeploymentMetadataCase_ == 4;
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*
* @return The imageClassificationModelDeploymentMetadata.
*/
public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
getImageClassificationModelDeploymentMetadata() {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
if (modelDeploymentMetadataCase_ == 4) {
return (com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance();
} else {
if (modelDeploymentMetadataCase_ == 4) {
return imageClassificationModelDeploymentMetadataBuilder_.getMessage();
}
return com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance();
}
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public Builder setImageClassificationModelDeploymentMetadata(
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata value) {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modelDeploymentMetadata_ = value;
onChanged();
} else {
imageClassificationModelDeploymentMetadataBuilder_.setMessage(value);
}
modelDeploymentMetadataCase_ = 4;
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public Builder setImageClassificationModelDeploymentMetadata(
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.Builder
builderForValue) {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
modelDeploymentMetadata_ = builderForValue.build();
onChanged();
} else {
imageClassificationModelDeploymentMetadataBuilder_.setMessage(builderForValue.build());
}
modelDeploymentMetadataCase_ = 4;
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public Builder mergeImageClassificationModelDeploymentMetadata(
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata value) {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
if (modelDeploymentMetadataCase_ == 4
&& modelDeploymentMetadata_
!= com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance()) {
modelDeploymentMetadata_ =
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.newBuilder(
(com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_)
.mergeFrom(value)
.buildPartial();
} else {
modelDeploymentMetadata_ = value;
}
onChanged();
} else {
if (modelDeploymentMetadataCase_ == 4) {
imageClassificationModelDeploymentMetadataBuilder_.mergeFrom(value);
}
imageClassificationModelDeploymentMetadataBuilder_.setMessage(value);
}
modelDeploymentMetadataCase_ = 4;
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public Builder clearImageClassificationModelDeploymentMetadata() {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
if (modelDeploymentMetadataCase_ == 4) {
modelDeploymentMetadataCase_ = 0;
modelDeploymentMetadata_ = null;
onChanged();
}
} else {
if (modelDeploymentMetadataCase_ == 4) {
modelDeploymentMetadataCase_ = 0;
modelDeploymentMetadata_ = null;
}
imageClassificationModelDeploymentMetadataBuilder_.clear();
}
return this;
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.Builder
getImageClassificationModelDeploymentMetadataBuilder() {
return getImageClassificationModelDeploymentMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
public com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder
getImageClassificationModelDeploymentMetadataOrBuilder() {
if ((modelDeploymentMetadataCase_ == 4)
&& (imageClassificationModelDeploymentMetadataBuilder_ != null)) {
return imageClassificationModelDeploymentMetadataBuilder_.getMessageOrBuilder();
} else {
if (modelDeploymentMetadataCase_ == 4) {
return (com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_;
}
return com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance();
}
}
/**
*
*
*
* Model deployment metadata specific to Image Classification.
*
*
*
* .google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata image_classification_model_deployment_metadata = 4;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata,
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.Builder,
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder>
getImageClassificationModelDeploymentMetadataFieldBuilder() {
if (imageClassificationModelDeploymentMetadataBuilder_ == null) {
if (!(modelDeploymentMetadataCase_ == 4)) {
modelDeploymentMetadata_ =
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata
.getDefaultInstance();
}
imageClassificationModelDeploymentMetadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata,
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata.Builder,
com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadataOrBuilder>(
(com.google.cloud.automl.v1.ImageClassificationModelDeploymentMetadata)
modelDeploymentMetadata_,
getParentForChildren(),
isClean());
modelDeploymentMetadata_ = null;
}
modelDeploymentMetadataCase_ = 4;
onChanged();
;
return imageClassificationModelDeploymentMetadataBuilder_;
}
private java.lang.Object name_ = "";
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* Resource name of the model to deploy.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
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.automl.v1.DeployModelRequest)
}
// @@protoc_insertion_point(class_scope:google.cloud.automl.v1.DeployModelRequest)
private static final com.google.cloud.automl.v1.DeployModelRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.automl.v1.DeployModelRequest();
}
public static com.google.cloud.automl.v1.DeployModelRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DeployModelRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DeployModelRequest(input, extensionRegistry);
}
};
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.automl.v1.DeployModelRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}