
com.google.cloud.visionai.v1.Instance Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/visionai/v1/platform.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;
/**
*
*
*
* Message describing Instance object
* Next ID: 12
*
*
* Protobuf type {@code google.cloud.visionai.v1.Instance}
*/
public final class Instance extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Instance)
InstanceOrBuilder {
private static final long serialVersionUID = 0L;
// Use Instance.newBuilder() to construct.
private Instance(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Instance() {
name_ = "";
displayName_ = "";
description_ = "";
instanceType_ = 0;
inputResources_ = java.util.Collections.emptyList();
outputResources_ = java.util.Collections.emptyList();
state_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Instance();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetLabels();
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_Instance_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.Instance.class,
com.google.cloud.visionai.v1.Instance.Builder.class);
}
/**
*
*
*
* All the supported instance types.
*
*
* Protobuf enum {@code google.cloud.visionai.v1.Instance.InstanceType}
*/
public enum InstanceType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified instance type.
* If the instance type is not specified, the default one is
* STREAMING_PREDICTION.
*
*
* INSTANCE_TYPE_UNSPECIFIED = 0;
*/
INSTANCE_TYPE_UNSPECIFIED(0),
/**
*
*
*
* Instance type for streaming prediction.
*
*
* STREAMING_PREDICTION = 1;
*/
STREAMING_PREDICTION(1),
/**
*
*
*
* Instance type for batch prediction.
*
*
* BATCH_PREDICTION = 2;
*/
BATCH_PREDICTION(2),
/**
*
*
*
* Instance type for online prediction.
*
*
* ONLINE_PREDICTION = 3;
*/
ONLINE_PREDICTION(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified instance type.
* If the instance type is not specified, the default one is
* STREAMING_PREDICTION.
*
*
* INSTANCE_TYPE_UNSPECIFIED = 0;
*/
public static final int INSTANCE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Instance type for streaming prediction.
*
*
* STREAMING_PREDICTION = 1;
*/
public static final int STREAMING_PREDICTION_VALUE = 1;
/**
*
*
*
* Instance type for batch prediction.
*
*
* BATCH_PREDICTION = 2;
*/
public static final int BATCH_PREDICTION_VALUE = 2;
/**
*
*
*
* Instance type for online prediction.
*
*
* ONLINE_PREDICTION = 3;
*/
public static final int ONLINE_PREDICTION_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 InstanceType 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 InstanceType forNumber(int value) {
switch (value) {
case 0:
return INSTANCE_TYPE_UNSPECIFIED;
case 1:
return STREAMING_PREDICTION;
case 2:
return BATCH_PREDICTION;
case 3:
return ONLINE_PREDICTION;
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 InstanceType findValueByNumber(int number) {
return InstanceType.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.Instance.getDescriptor().getEnumTypes().get(0);
}
private static final InstanceType[] VALUES = values();
public static InstanceType 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 InstanceType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Instance.InstanceType)
}
/**
*
*
*
* State of the Instance
*
*
* Protobuf enum {@code google.cloud.visionai.v1.Instance.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The default value. This value is used if the state is omitted.
*
*
* STATE_UNSPECIFIED = 0;
*/
STATE_UNSPECIFIED(0),
/**
*
*
*
* State CREATING.
*
*
* CREATING = 1;
*/
CREATING(1),
/**
*
*
*
* State CREATED.
*
*
* CREATED = 2;
*/
CREATED(2),
/**
*
*
*
* State DEPLOYING.
*
*
* DEPLOYING = 3;
*/
DEPLOYING(3),
/**
*
*
*
* State DEPLOYED.
*
*
* DEPLOYED = 4;
*/
DEPLOYED(4),
/**
*
*
*
* State UNDEPLOYING.
*
*
* UNDEPLOYING = 5;
*/
UNDEPLOYING(5),
/**
*
*
*
* State DELETED.
*
*
* DELETED = 6;
*/
DELETED(6),
/**
*
*
*
* State ERROR.
*
*
* ERROR = 7;
*/
ERROR(7),
/**
*
*
*
* State Updating
*
*
* UPDATING = 8;
*/
UPDATING(8),
/**
*
*
*
* State Deleting.
*
*
* DELETING = 9;
*/
DELETING(9),
/**
*
*
*
* State Fixing.
*
*
* FIXING = 10;
*/
FIXING(10),
/**
*
*
*
* State Finished.
*
*
* FINISHED = 11;
*/
FINISHED(11),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The default value. This value is used if the state is omitted.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* State CREATING.
*
*
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
*
*
*
* State CREATED.
*
*
* CREATED = 2;
*/
public static final int CREATED_VALUE = 2;
/**
*
*
*
* State DEPLOYING.
*
*
* DEPLOYING = 3;
*/
public static final int DEPLOYING_VALUE = 3;
/**
*
*
*
* State DEPLOYED.
*
*
* DEPLOYED = 4;
*/
public static final int DEPLOYED_VALUE = 4;
/**
*
*
*
* State UNDEPLOYING.
*
*
* UNDEPLOYING = 5;
*/
public static final int UNDEPLOYING_VALUE = 5;
/**
*
*
*
* State DELETED.
*
*
* DELETED = 6;
*/
public static final int DELETED_VALUE = 6;
/**
*
*
*
* State ERROR.
*
*
* ERROR = 7;
*/
public static final int ERROR_VALUE = 7;
/**
*
*
*
* State Updating
*
*
* UPDATING = 8;
*/
public static final int UPDATING_VALUE = 8;
/**
*
*
*
* State Deleting.
*
*
* DELETING = 9;
*/
public static final int DELETING_VALUE = 9;
/**
*
*
*
* State Fixing.
*
*
* FIXING = 10;
*/
public static final int FIXING_VALUE = 10;
/**
*
*
*
* State Finished.
*
*
* FINISHED = 11;
*/
public static final int FINISHED_VALUE = 11;
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 State 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 State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return CREATING;
case 2:
return CREATED;
case 3:
return DEPLOYING;
case 4:
return DEPLOYED;
case 5:
return UNDEPLOYING;
case 6:
return DELETED;
case 7:
return ERROR;
case 8:
return UPDATING;
case 9:
return DELETING;
case 10:
return FIXING;
case 11:
return FINISHED;
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 State findValueByNumber(int number) {
return State.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.Instance.getDescriptor().getEnumTypes().get(1);
}
private static final State[] VALUES = values();
public static State 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 State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.visionai.v1.Instance.State)
}
public interface InputResourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Instance.InputResource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return Whether the inputResource field is set.
*/
boolean hasInputResource();
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return The inputResource.
*/
java.lang.String getInputResource();
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return The bytes for inputResource.
*/
com.google.protobuf.ByteString getInputResourceBytes();
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*
* @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated.
* See google/cloud/visionai/v1/platform.proto;l=1508
* @return Whether the annotatedStream field is set.
*/
@java.lang.Deprecated
boolean hasAnnotatedStream();
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*
* @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated.
* See google/cloud/visionai/v1/platform.proto;l=1508
* @return The annotatedStream.
*/
@java.lang.Deprecated
com.google.cloud.visionai.v1.StreamWithAnnotation getAnnotatedStream();
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Deprecated
com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder getAnnotatedStreamOrBuilder();
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return The enum numeric value on the wire for dataType.
*/
int getDataTypeValue();
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return The dataType.
*/
com.google.cloud.visionai.v1.DataType getDataType();
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return The consumerNode.
*/
java.lang.String getConsumerNode();
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return The bytes for consumerNode.
*/
com.google.protobuf.ByteString getConsumerNodeBytes();
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return The inputResourceBinding.
*/
java.lang.String getInputResourceBinding();
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return The bytes for inputResourceBinding.
*/
com.google.protobuf.ByteString getInputResourceBindingBytes();
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*
* @return Whether the annotations field is set.
*/
boolean hasAnnotations();
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*
* @return The annotations.
*/
com.google.cloud.visionai.v1.ResourceAnnotations getAnnotations();
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder getAnnotationsOrBuilder();
com.google.cloud.visionai.v1.Instance.InputResource.InputResourceInformationCase
getInputResourceInformationCase();
}
/**
*
*
*
* Message of input resource used in one application instance.
*
*
* Protobuf type {@code google.cloud.visionai.v1.Instance.InputResource}
*/
public static final class InputResource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Instance.InputResource)
InputResourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use InputResource.newBuilder() to construct.
private InputResource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InputResource() {
dataType_ = 0;
consumerNode_ = "";
inputResourceBinding_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new InputResource();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_InputResource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_InputResource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.Instance.InputResource.class,
com.google.cloud.visionai.v1.Instance.InputResource.Builder.class);
}
private int bitField0_;
private int inputResourceInformationCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object inputResourceInformation_;
public enum InputResourceInformationCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INPUT_RESOURCE(1),
@java.lang.Deprecated
ANNOTATED_STREAM(4),
INPUTRESOURCEINFORMATION_NOT_SET(0);
private final int value;
private InputResourceInformationCase(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 InputResourceInformationCase valueOf(int value) {
return forNumber(value);
}
public static InputResourceInformationCase forNumber(int value) {
switch (value) {
case 1:
return INPUT_RESOURCE;
case 4:
return ANNOTATED_STREAM;
case 0:
return INPUTRESOURCEINFORMATION_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public InputResourceInformationCase getInputResourceInformationCase() {
return InputResourceInformationCase.forNumber(inputResourceInformationCase_);
}
public static final int INPUT_RESOURCE_FIELD_NUMBER = 1;
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return Whether the inputResource field is set.
*/
public boolean hasInputResource() {
return inputResourceInformationCase_ == 1;
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return The inputResource.
*/
public java.lang.String getInputResource() {
java.lang.Object ref = "";
if (inputResourceInformationCase_ == 1) {
ref = inputResourceInformation_;
}
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 (inputResourceInformationCase_ == 1) {
inputResourceInformation_ = s;
}
return s;
}
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return The bytes for inputResource.
*/
public com.google.protobuf.ByteString getInputResourceBytes() {
java.lang.Object ref = "";
if (inputResourceInformationCase_ == 1) {
ref = inputResourceInformation_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (inputResourceInformationCase_ == 1) {
inputResourceInformation_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANNOTATED_STREAM_FIELD_NUMBER = 4;
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*
* @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated.
* See google/cloud/visionai/v1/platform.proto;l=1508
* @return Whether the annotatedStream field is set.
*/
@java.lang.Override
@java.lang.Deprecated
public boolean hasAnnotatedStream() {
return inputResourceInformationCase_ == 4;
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*
* @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated.
* See google/cloud/visionai/v1/platform.proto;l=1508
* @return The annotatedStream.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.visionai.v1.StreamWithAnnotation getAnnotatedStream() {
if (inputResourceInformationCase_ == 4) {
return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_;
}
return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance();
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder
getAnnotatedStreamOrBuilder() {
if (inputResourceInformationCase_ == 4) {
return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_;
}
return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance();
}
public static final int DATA_TYPE_FIELD_NUMBER = 6;
private int dataType_ = 0;
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return The enum numeric value on the wire for dataType.
*/
@java.lang.Override
public int getDataTypeValue() {
return dataType_;
}
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return The dataType.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.DataType getDataType() {
com.google.cloud.visionai.v1.DataType result =
com.google.cloud.visionai.v1.DataType.forNumber(dataType_);
return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result;
}
public static final int CONSUMER_NODE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object consumerNode_ = "";
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return The consumerNode.
*/
@java.lang.Override
public java.lang.String getConsumerNode() {
java.lang.Object ref = consumerNode_;
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();
consumerNode_ = s;
return s;
}
}
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return The bytes for consumerNode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getConsumerNodeBytes() {
java.lang.Object ref = consumerNode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
consumerNode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INPUT_RESOURCE_BINDING_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object inputResourceBinding_ = "";
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return The inputResourceBinding.
*/
@java.lang.Override
public java.lang.String getInputResourceBinding() {
java.lang.Object ref = inputResourceBinding_;
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();
inputResourceBinding_ = s;
return s;
}
}
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return The bytes for inputResourceBinding.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInputResourceBindingBytes() {
java.lang.Object ref = inputResourceBinding_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
inputResourceBinding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ANNOTATIONS_FIELD_NUMBER = 5;
private com.google.cloud.visionai.v1.ResourceAnnotations annotations_;
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*
* @return Whether the annotations field is set.
*/
@java.lang.Override
public boolean hasAnnotations() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*
* @return The annotations.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ResourceAnnotations getAnnotations() {
return annotations_ == null
? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()
: annotations_;
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder getAnnotationsOrBuilder() {
return annotations_ == null
? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()
: annotations_;
}
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 (inputResourceInformationCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputResourceInformation_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerNode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consumerNode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputResourceBinding_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, inputResourceBinding_);
}
if (inputResourceInformationCase_ == 4) {
output.writeMessage(
4, (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getAnnotations());
}
if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(6, dataType_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (inputResourceInformationCase_ == 1) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputResourceInformation_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(consumerNode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consumerNode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(inputResourceBinding_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, inputResourceBinding_);
}
if (inputResourceInformationCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAnnotations());
}
if (dataType_ != com.google.cloud.visionai.v1.DataType.DATA_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, dataType_);
}
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.Instance.InputResource)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.Instance.InputResource other =
(com.google.cloud.visionai.v1.Instance.InputResource) obj;
if (dataType_ != other.dataType_) return false;
if (!getConsumerNode().equals(other.getConsumerNode())) return false;
if (!getInputResourceBinding().equals(other.getInputResourceBinding())) return false;
if (hasAnnotations() != other.hasAnnotations()) return false;
if (hasAnnotations()) {
if (!getAnnotations().equals(other.getAnnotations())) return false;
}
if (!getInputResourceInformationCase().equals(other.getInputResourceInformationCase()))
return false;
switch (inputResourceInformationCase_) {
case 1:
if (!getInputResource().equals(other.getInputResource())) return false;
break;
case 4:
if (!getAnnotatedStream().equals(other.getAnnotatedStream())) 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) + DATA_TYPE_FIELD_NUMBER;
hash = (53 * hash) + dataType_;
hash = (37 * hash) + CONSUMER_NODE_FIELD_NUMBER;
hash = (53 * hash) + getConsumerNode().hashCode();
hash = (37 * hash) + INPUT_RESOURCE_BINDING_FIELD_NUMBER;
hash = (53 * hash) + getInputResourceBinding().hashCode();
if (hasAnnotations()) {
hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getAnnotations().hashCode();
}
switch (inputResourceInformationCase_) {
case 1:
hash = (37 * hash) + INPUT_RESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getInputResource().hashCode();
break;
case 4:
hash = (37 * hash) + ANNOTATED_STREAM_FIELD_NUMBER;
hash = (53 * hash) + getAnnotatedStream().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.Instance.InputResource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance.InputResource 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.Instance.InputResource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance.InputResource 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.Instance.InputResource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance.InputResource 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.Instance.InputResource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.Instance.InputResource 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.Instance.InputResource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.Instance.InputResource 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.Instance.InputResource 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.Instance.InputResource 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.Instance.InputResource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Message of input resource used in one application instance.
*
*
* Protobuf type {@code google.cloud.visionai.v1.Instance.InputResource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Instance.InputResource)
com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_InputResource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_InputResource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.Instance.InputResource.class,
com.google.cloud.visionai.v1.Instance.InputResource.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.Instance.InputResource.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getAnnotationsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (annotatedStreamBuilder_ != null) {
annotatedStreamBuilder_.clear();
}
dataType_ = 0;
consumerNode_ = "";
inputResourceBinding_ = "";
annotations_ = null;
if (annotationsBuilder_ != null) {
annotationsBuilder_.dispose();
annotationsBuilder_ = null;
}
inputResourceInformationCase_ = 0;
inputResourceInformation_ = 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_Instance_InputResource_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InputResource getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InputResource build() {
com.google.cloud.visionai.v1.Instance.InputResource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InputResource buildPartial() {
com.google.cloud.visionai.v1.Instance.InputResource result =
new com.google.cloud.visionai.v1.Instance.InputResource(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.visionai.v1.Instance.InputResource result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.dataType_ = dataType_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.consumerNode_ = consumerNode_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.inputResourceBinding_ = inputResourceBinding_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.annotations_ =
annotationsBuilder_ == null ? annotations_ : annotationsBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.visionai.v1.Instance.InputResource result) {
result.inputResourceInformationCase_ = inputResourceInformationCase_;
result.inputResourceInformation_ = this.inputResourceInformation_;
if (inputResourceInformationCase_ == 4 && annotatedStreamBuilder_ != null) {
result.inputResourceInformation_ = annotatedStreamBuilder_.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.Instance.InputResource) {
return mergeFrom((com.google.cloud.visionai.v1.Instance.InputResource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.Instance.InputResource other) {
if (other == com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance())
return this;
if (other.dataType_ != 0) {
setDataTypeValue(other.getDataTypeValue());
}
if (!other.getConsumerNode().isEmpty()) {
consumerNode_ = other.consumerNode_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getInputResourceBinding().isEmpty()) {
inputResourceBinding_ = other.inputResourceBinding_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasAnnotations()) {
mergeAnnotations(other.getAnnotations());
}
switch (other.getInputResourceInformationCase()) {
case INPUT_RESOURCE:
{
inputResourceInformationCase_ = 1;
inputResourceInformation_ = other.inputResourceInformation_;
onChanged();
break;
}
case ANNOTATED_STREAM:
{
mergeAnnotatedStream(other.getAnnotatedStream());
break;
}
case INPUTRESOURCEINFORMATION_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 10:
{
java.lang.String s = input.readStringRequireUtf8();
inputResourceInformationCase_ = 1;
inputResourceInformation_ = s;
break;
} // case 10
case 18:
{
consumerNode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 18
case 26:
{
inputResourceBinding_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 26
case 34:
{
input.readMessage(
getAnnotatedStreamFieldBuilder().getBuilder(), extensionRegistry);
inputResourceInformationCase_ = 4;
break;
} // case 34
case 42:
{
input.readMessage(getAnnotationsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 42
case 48:
{
dataType_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 48
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 inputResourceInformationCase_ = 0;
private java.lang.Object inputResourceInformation_;
public InputResourceInformationCase getInputResourceInformationCase() {
return InputResourceInformationCase.forNumber(inputResourceInformationCase_);
}
public Builder clearInputResourceInformation() {
inputResourceInformationCase_ = 0;
inputResourceInformation_ = null;
onChanged();
return this;
}
private int bitField0_;
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return Whether the inputResource field is set.
*/
@java.lang.Override
public boolean hasInputResource() {
return inputResourceInformationCase_ == 1;
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return The inputResource.
*/
@java.lang.Override
public java.lang.String getInputResource() {
java.lang.Object ref = "";
if (inputResourceInformationCase_ == 1) {
ref = inputResourceInformation_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (inputResourceInformationCase_ == 1) {
inputResourceInformation_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return The bytes for inputResource.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInputResourceBytes() {
java.lang.Object ref = "";
if (inputResourceInformationCase_ == 1) {
ref = inputResourceInformation_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (inputResourceInformationCase_ == 1) {
inputResourceInformation_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @param value The inputResource to set.
* @return This builder for chaining.
*/
public Builder setInputResource(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
inputResourceInformationCase_ = 1;
inputResourceInformation_ = value;
onChanged();
return this;
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @return This builder for chaining.
*/
public Builder clearInputResource() {
if (inputResourceInformationCase_ == 1) {
inputResourceInformationCase_ = 0;
inputResourceInformation_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The direct input resource name.
* If the instance type is STREAMING_PREDICTION, the input resource is in
* format of
* "projects/123/locations/us-central1/clusters/456/streams/stream-a".
* If the instance type is BATCH_PREDICTION from Cloud Storage input
* container, the input resource is in format of "gs://bucket-a".
*
*
* string input_resource = 1;
*
* @param value The bytes for inputResource to set.
* @return This builder for chaining.
*/
public Builder setInputResourceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
inputResourceInformationCase_ = 1;
inputResourceInformation_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.StreamWithAnnotation,
com.google.cloud.visionai.v1.StreamWithAnnotation.Builder,
com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder>
annotatedStreamBuilder_;
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*
* @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated.
* See google/cloud/visionai/v1/platform.proto;l=1508
* @return Whether the annotatedStream field is set.
*/
@java.lang.Override
@java.lang.Deprecated
public boolean hasAnnotatedStream() {
return inputResourceInformationCase_ == 4;
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*
* @deprecated google.cloud.visionai.v1.Instance.InputResource.annotated_stream is deprecated.
* See google/cloud/visionai/v1/platform.proto;l=1508
* @return The annotatedStream.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.visionai.v1.StreamWithAnnotation getAnnotatedStream() {
if (annotatedStreamBuilder_ == null) {
if (inputResourceInformationCase_ == 4) {
return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_;
}
return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance();
} else {
if (inputResourceInformationCase_ == 4) {
return annotatedStreamBuilder_.getMessage();
}
return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance();
}
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setAnnotatedStream(com.google.cloud.visionai.v1.StreamWithAnnotation value) {
if (annotatedStreamBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputResourceInformation_ = value;
onChanged();
} else {
annotatedStreamBuilder_.setMessage(value);
}
inputResourceInformationCase_ = 4;
return this;
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setAnnotatedStream(
com.google.cloud.visionai.v1.StreamWithAnnotation.Builder builderForValue) {
if (annotatedStreamBuilder_ == null) {
inputResourceInformation_ = builderForValue.build();
onChanged();
} else {
annotatedStreamBuilder_.setMessage(builderForValue.build());
}
inputResourceInformationCase_ = 4;
return this;
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder mergeAnnotatedStream(com.google.cloud.visionai.v1.StreamWithAnnotation value) {
if (annotatedStreamBuilder_ == null) {
if (inputResourceInformationCase_ == 4
&& inputResourceInformation_
!= com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance()) {
inputResourceInformation_ =
com.google.cloud.visionai.v1.StreamWithAnnotation.newBuilder(
(com.google.cloud.visionai.v1.StreamWithAnnotation)
inputResourceInformation_)
.mergeFrom(value)
.buildPartial();
} else {
inputResourceInformation_ = value;
}
onChanged();
} else {
if (inputResourceInformationCase_ == 4) {
annotatedStreamBuilder_.mergeFrom(value);
} else {
annotatedStreamBuilder_.setMessage(value);
}
}
inputResourceInformationCase_ = 4;
return this;
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder clearAnnotatedStream() {
if (annotatedStreamBuilder_ == null) {
if (inputResourceInformationCase_ == 4) {
inputResourceInformationCase_ = 0;
inputResourceInformation_ = null;
onChanged();
}
} else {
if (inputResourceInformationCase_ == 4) {
inputResourceInformationCase_ = 0;
inputResourceInformation_ = null;
}
annotatedStreamBuilder_.clear();
}
return this;
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.visionai.v1.StreamWithAnnotation.Builder getAnnotatedStreamBuilder() {
return getAnnotatedStreamFieldBuilder().getBuilder();
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder
getAnnotatedStreamOrBuilder() {
if ((inputResourceInformationCase_ == 4) && (annotatedStreamBuilder_ != null)) {
return annotatedStreamBuilder_.getMessageOrBuilder();
} else {
if (inputResourceInformationCase_ == 4) {
return (com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_;
}
return com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance();
}
}
/**
*
*
*
* If the input resource is VisionAI Stream, the associated annotations
* can be specified using annotated_stream instead.
*
*
*
* .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.StreamWithAnnotation,
com.google.cloud.visionai.v1.StreamWithAnnotation.Builder,
com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder>
getAnnotatedStreamFieldBuilder() {
if (annotatedStreamBuilder_ == null) {
if (!(inputResourceInformationCase_ == 4)) {
inputResourceInformation_ =
com.google.cloud.visionai.v1.StreamWithAnnotation.getDefaultInstance();
}
annotatedStreamBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.StreamWithAnnotation,
com.google.cloud.visionai.v1.StreamWithAnnotation.Builder,
com.google.cloud.visionai.v1.StreamWithAnnotationOrBuilder>(
(com.google.cloud.visionai.v1.StreamWithAnnotation) inputResourceInformation_,
getParentForChildren(),
isClean());
inputResourceInformation_ = null;
}
inputResourceInformationCase_ = 4;
onChanged();
return annotatedStreamBuilder_;
}
private int dataType_ = 0;
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return The enum numeric value on the wire for dataType.
*/
@java.lang.Override
public int getDataTypeValue() {
return dataType_;
}
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @param value The enum numeric value on the wire for dataType to set.
* @return This builder for chaining.
*/
public Builder setDataTypeValue(int value) {
dataType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return The dataType.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.DataType getDataType() {
com.google.cloud.visionai.v1.DataType result =
com.google.cloud.visionai.v1.DataType.forNumber(dataType_);
return result == null ? com.google.cloud.visionai.v1.DataType.UNRECOGNIZED : result;
}
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @param value The dataType to set.
* @return This builder for chaining.
*/
public Builder setDataType(com.google.cloud.visionai.v1.DataType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
dataType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Data type for the current input resource.
*
*
* .google.cloud.visionai.v1.DataType data_type = 6;
*
* @return This builder for chaining.
*/
public Builder clearDataType() {
bitField0_ = (bitField0_ & ~0x00000004);
dataType_ = 0;
onChanged();
return this;
}
private java.lang.Object consumerNode_ = "";
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return The consumerNode.
*/
public java.lang.String getConsumerNode() {
java.lang.Object ref = consumerNode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
consumerNode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return The bytes for consumerNode.
*/
public com.google.protobuf.ByteString getConsumerNodeBytes() {
java.lang.Object ref = consumerNode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
consumerNode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @param value The consumerNode to set.
* @return This builder for chaining.
*/
public Builder setConsumerNode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
consumerNode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @return This builder for chaining.
*/
public Builder clearConsumerNode() {
consumerNode_ = getDefaultInstance().getConsumerNode();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* The name of graph node who receives the input resource.
* For example:
* input_resource:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a
* consumer_node: stream-input
*
*
* string consumer_node = 2;
*
* @param value The bytes for consumerNode to set.
* @return This builder for chaining.
*/
public Builder setConsumerNodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
consumerNode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object inputResourceBinding_ = "";
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return The inputResourceBinding.
*/
public java.lang.String getInputResourceBinding() {
java.lang.Object ref = inputResourceBinding_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
inputResourceBinding_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return The bytes for inputResourceBinding.
*/
public com.google.protobuf.ByteString getInputResourceBindingBytes() {
java.lang.Object ref = inputResourceBinding_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
inputResourceBinding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @param value The inputResourceBinding to set.
* @return This builder for chaining.
*/
public Builder setInputResourceBinding(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
inputResourceBinding_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @return This builder for chaining.
*/
public Builder clearInputResourceBinding() {
inputResourceBinding_ = getDefaultInstance().getInputResourceBinding();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* The specific input resource binding which will consume the current Input
* Resource, can be ignored is there is only 1 input binding.
*
*
* string input_resource_binding = 3;
*
* @param value The bytes for inputResourceBinding to set.
* @return This builder for chaining.
*/
public Builder setInputResourceBindingBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
inputResourceBinding_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.cloud.visionai.v1.ResourceAnnotations annotations_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ResourceAnnotations,
com.google.cloud.visionai.v1.ResourceAnnotations.Builder,
com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder>
annotationsBuilder_;
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*
* @return Whether the annotations field is set.
*/
public boolean hasAnnotations() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*
* @return The annotations.
*/
public com.google.cloud.visionai.v1.ResourceAnnotations getAnnotations() {
if (annotationsBuilder_ == null) {
return annotations_ == null
? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()
: annotations_;
} else {
return annotationsBuilder_.getMessage();
}
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
public Builder setAnnotations(com.google.cloud.visionai.v1.ResourceAnnotations value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
annotations_ = value;
} else {
annotationsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
public Builder setAnnotations(
com.google.cloud.visionai.v1.ResourceAnnotations.Builder builderForValue) {
if (annotationsBuilder_ == null) {
annotations_ = builderForValue.build();
} else {
annotationsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
public Builder mergeAnnotations(com.google.cloud.visionai.v1.ResourceAnnotations value) {
if (annotationsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& annotations_ != null
&& annotations_
!= com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()) {
getAnnotationsBuilder().mergeFrom(value);
} else {
annotations_ = value;
}
} else {
annotationsBuilder_.mergeFrom(value);
}
if (annotations_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
public Builder clearAnnotations() {
bitField0_ = (bitField0_ & ~0x00000020);
annotations_ = null;
if (annotationsBuilder_ != null) {
annotationsBuilder_.dispose();
annotationsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
public com.google.cloud.visionai.v1.ResourceAnnotations.Builder getAnnotationsBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getAnnotationsFieldBuilder().getBuilder();
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
public com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder getAnnotationsOrBuilder() {
if (annotationsBuilder_ != null) {
return annotationsBuilder_.getMessageOrBuilder();
} else {
return annotations_ == null
? com.google.cloud.visionai.v1.ResourceAnnotations.getDefaultInstance()
: annotations_;
}
}
/**
*
*
*
* Contains resource annotations.
*
*
* .google.cloud.visionai.v1.ResourceAnnotations annotations = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ResourceAnnotations,
com.google.cloud.visionai.v1.ResourceAnnotations.Builder,
com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder>
getAnnotationsFieldBuilder() {
if (annotationsBuilder_ == null) {
annotationsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ResourceAnnotations,
com.google.cloud.visionai.v1.ResourceAnnotations.Builder,
com.google.cloud.visionai.v1.ResourceAnnotationsOrBuilder>(
getAnnotations(), getParentForChildren(), isClean());
annotations_ = null;
}
return annotationsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.Instance.InputResource)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Instance.InputResource)
private static final com.google.cloud.visionai.v1.Instance.InputResource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Instance.InputResource();
}
public static com.google.cloud.visionai.v1.Instance.InputResource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InputResource 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.Instance.InputResource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OutputResourceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.Instance.OutputResource)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return The outputResource.
*/
java.lang.String getOutputResource();
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return The bytes for outputResource.
*/
com.google.protobuf.ByteString getOutputResourceBytes();
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return The producerNode.
*/
java.lang.String getProducerNode();
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return The bytes for producerNode.
*/
com.google.protobuf.ByteString getProducerNodeBytes();
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return The outputResourceBinding.
*/
java.lang.String getOutputResourceBinding();
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return The bytes for outputResourceBinding.
*/
com.google.protobuf.ByteString getOutputResourceBindingBytes();
/**
*
*
*
* Output only. Whether the output resource is temporary which means the
* resource is generated during the deployment of the application. Temporary
* resource will be deleted during the undeployment of the application.
*
*
* bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The isTemporary.
*/
boolean getIsTemporary();
/**
*
*
*
* Output only. Whether the output resource is created automatically by the
* Vision AI App Platform.
*
*
* bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The autogen.
*/
boolean getAutogen();
}
/**
*
*
*
* Message of output resource used in one application instance.
*
*
* Protobuf type {@code google.cloud.visionai.v1.Instance.OutputResource}
*/
public static final class OutputResource extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.Instance.OutputResource)
OutputResourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use OutputResource.newBuilder() to construct.
private OutputResource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OutputResource() {
outputResource_ = "";
producerNode_ = "";
outputResourceBinding_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OutputResource();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_OutputResource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.Instance.OutputResource.class,
com.google.cloud.visionai.v1.Instance.OutputResource.Builder.class);
}
public static final int OUTPUT_RESOURCE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object outputResource_ = "";
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return The outputResource.
*/
@java.lang.Override
public java.lang.String getOutputResource() {
java.lang.Object ref = outputResource_;
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();
outputResource_ = s;
return s;
}
}
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return The bytes for outputResource.
*/
@java.lang.Override
public com.google.protobuf.ByteString getOutputResourceBytes() {
java.lang.Object ref = outputResource_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
outputResource_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRODUCER_NODE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object producerNode_ = "";
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return The producerNode.
*/
@java.lang.Override
public java.lang.String getProducerNode() {
java.lang.Object ref = producerNode_;
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();
producerNode_ = s;
return s;
}
}
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return The bytes for producerNode.
*/
@java.lang.Override
public com.google.protobuf.ByteString getProducerNodeBytes() {
java.lang.Object ref = producerNode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
producerNode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OUTPUT_RESOURCE_BINDING_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object outputResourceBinding_ = "";
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return The outputResourceBinding.
*/
@java.lang.Override
public java.lang.String getOutputResourceBinding() {
java.lang.Object ref = outputResourceBinding_;
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();
outputResourceBinding_ = s;
return s;
}
}
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return The bytes for outputResourceBinding.
*/
@java.lang.Override
public com.google.protobuf.ByteString getOutputResourceBindingBytes() {
java.lang.Object ref = outputResourceBinding_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
outputResourceBinding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IS_TEMPORARY_FIELD_NUMBER = 3;
private boolean isTemporary_ = false;
/**
*
*
*
* Output only. Whether the output resource is temporary which means the
* resource is generated during the deployment of the application. Temporary
* resource will be deleted during the undeployment of the application.
*
*
* bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The isTemporary.
*/
@java.lang.Override
public boolean getIsTemporary() {
return isTemporary_;
}
public static final int AUTOGEN_FIELD_NUMBER = 5;
private boolean autogen_ = false;
/**
*
*
*
* Output only. Whether the output resource is created automatically by the
* Vision AI App Platform.
*
*
* bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The autogen.
*/
@java.lang.Override
public boolean getAutogen() {
return autogen_;
}
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(outputResource_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, outputResource_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producerNode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, producerNode_);
}
if (isTemporary_ != false) {
output.writeBool(3, isTemporary_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResourceBinding_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, outputResourceBinding_);
}
if (autogen_ != false) {
output.writeBool(5, autogen_);
}
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(outputResource_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, outputResource_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(producerNode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, producerNode_);
}
if (isTemporary_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isTemporary_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputResourceBinding_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, outputResourceBinding_);
}
if (autogen_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, autogen_);
}
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.Instance.OutputResource)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.Instance.OutputResource other =
(com.google.cloud.visionai.v1.Instance.OutputResource) obj;
if (!getOutputResource().equals(other.getOutputResource())) return false;
if (!getProducerNode().equals(other.getProducerNode())) return false;
if (!getOutputResourceBinding().equals(other.getOutputResourceBinding())) return false;
if (getIsTemporary() != other.getIsTemporary()) return false;
if (getAutogen() != other.getAutogen()) 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) + OUTPUT_RESOURCE_FIELD_NUMBER;
hash = (53 * hash) + getOutputResource().hashCode();
hash = (37 * hash) + PRODUCER_NODE_FIELD_NUMBER;
hash = (53 * hash) + getProducerNode().hashCode();
hash = (37 * hash) + OUTPUT_RESOURCE_BINDING_FIELD_NUMBER;
hash = (53 * hash) + getOutputResourceBinding().hashCode();
hash = (37 * hash) + IS_TEMPORARY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsTemporary());
hash = (37 * hash) + AUTOGEN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAutogen());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.Instance.OutputResource parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance.OutputResource 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.Instance.OutputResource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance.OutputResource 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.Instance.OutputResource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance.OutputResource 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.Instance.OutputResource parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.Instance.OutputResource 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.Instance.OutputResource parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.Instance.OutputResource 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.Instance.OutputResource 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.Instance.OutputResource 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.Instance.OutputResource prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Message of output resource used in one application instance.
*
*
* Protobuf type {@code google.cloud.visionai.v1.Instance.OutputResource}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Instance.OutputResource)
com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_OutputResource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.Instance.OutputResource.class,
com.google.cloud.visionai.v1.Instance.OutputResource.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.Instance.OutputResource.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
outputResource_ = "";
producerNode_ = "";
outputResourceBinding_ = "";
isTemporary_ = false;
autogen_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_OutputResource_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.OutputResource getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.OutputResource build() {
com.google.cloud.visionai.v1.Instance.OutputResource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.OutputResource buildPartial() {
com.google.cloud.visionai.v1.Instance.OutputResource result =
new com.google.cloud.visionai.v1.Instance.OutputResource(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.visionai.v1.Instance.OutputResource result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.outputResource_ = outputResource_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.producerNode_ = producerNode_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.outputResourceBinding_ = outputResourceBinding_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.isTemporary_ = isTemporary_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.autogen_ = autogen_;
}
}
@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.Instance.OutputResource) {
return mergeFrom((com.google.cloud.visionai.v1.Instance.OutputResource) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.Instance.OutputResource other) {
if (other == com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance())
return this;
if (!other.getOutputResource().isEmpty()) {
outputResource_ = other.outputResource_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getProducerNode().isEmpty()) {
producerNode_ = other.producerNode_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getOutputResourceBinding().isEmpty()) {
outputResourceBinding_ = other.outputResourceBinding_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getIsTemporary() != false) {
setIsTemporary(other.getIsTemporary());
}
if (other.getAutogen() != false) {
setAutogen(other.getAutogen());
}
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:
{
outputResource_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
producerNode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
isTemporary_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 24
case 34:
{
outputResourceBinding_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 34
case 40:
{
autogen_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
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 outputResource_ = "";
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return The outputResource.
*/
public java.lang.String getOutputResource() {
java.lang.Object ref = outputResource_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
outputResource_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return The bytes for outputResource.
*/
public com.google.protobuf.ByteString getOutputResourceBytes() {
java.lang.Object ref = outputResource_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
outputResource_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @param value The outputResource to set.
* @return This builder for chaining.
*/
public Builder setOutputResource(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
outputResource_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @return This builder for chaining.
*/
public Builder clearOutputResource() {
outputResource_ = getDefaultInstance().getOutputResource();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The output resource name for the current application instance.
*
*
* string output_resource = 1;
*
* @param value The bytes for outputResource to set.
* @return This builder for chaining.
*/
public Builder setOutputResourceBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
outputResource_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object producerNode_ = "";
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return The producerNode.
*/
public java.lang.String getProducerNode() {
java.lang.Object ref = producerNode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
producerNode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return The bytes for producerNode.
*/
public com.google.protobuf.ByteString getProducerNodeBytes() {
java.lang.Object ref = producerNode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
producerNode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @param value The producerNode to set.
* @return This builder for chaining.
*/
public Builder setProducerNode(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
producerNode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @return This builder for chaining.
*/
public Builder clearProducerNode() {
producerNode_ = getDefaultInstance().getProducerNode();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The name of graph node who produces the output resource name.
* For example:
* output_resource:
* /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting
* producer_node: occupancy-counting
*
*
* string producer_node = 2;
*
* @param value The bytes for producerNode to set.
* @return This builder for chaining.
*/
public Builder setProducerNodeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
producerNode_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object outputResourceBinding_ = "";
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return The outputResourceBinding.
*/
public java.lang.String getOutputResourceBinding() {
java.lang.Object ref = outputResourceBinding_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
outputResourceBinding_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return The bytes for outputResourceBinding.
*/
public com.google.protobuf.ByteString getOutputResourceBindingBytes() {
java.lang.Object ref = outputResourceBinding_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
outputResourceBinding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @param value The outputResourceBinding to set.
* @return This builder for chaining.
*/
public Builder setOutputResourceBinding(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
outputResourceBinding_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @return This builder for chaining.
*/
public Builder clearOutputResourceBinding() {
outputResourceBinding_ = getDefaultInstance().getOutputResourceBinding();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The specific output resource binding which produces the current
* OutputResource.
*
*
* string output_resource_binding = 4;
*
* @param value The bytes for outputResourceBinding to set.
* @return This builder for chaining.
*/
public Builder setOutputResourceBindingBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
outputResourceBinding_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private boolean isTemporary_;
/**
*
*
*
* Output only. Whether the output resource is temporary which means the
* resource is generated during the deployment of the application. Temporary
* resource will be deleted during the undeployment of the application.
*
*
* bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The isTemporary.
*/
@java.lang.Override
public boolean getIsTemporary() {
return isTemporary_;
}
/**
*
*
*
* Output only. Whether the output resource is temporary which means the
* resource is generated during the deployment of the application. Temporary
* resource will be deleted during the undeployment of the application.
*
*
* bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The isTemporary to set.
* @return This builder for chaining.
*/
public Builder setIsTemporary(boolean value) {
isTemporary_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. Whether the output resource is temporary which means the
* resource is generated during the deployment of the application. Temporary
* resource will be deleted during the undeployment of the application.
*
*
* bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearIsTemporary() {
bitField0_ = (bitField0_ & ~0x00000008);
isTemporary_ = false;
onChanged();
return this;
}
private boolean autogen_;
/**
*
*
*
* Output only. Whether the output resource is created automatically by the
* Vision AI App Platform.
*
*
* bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The autogen.
*/
@java.lang.Override
public boolean getAutogen() {
return autogen_;
}
/**
*
*
*
* Output only. Whether the output resource is created automatically by the
* Vision AI App Platform.
*
*
* bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The autogen to set.
* @return This builder for chaining.
*/
public Builder setAutogen(boolean value) {
autogen_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Output only. Whether the output resource is created automatically by the
* Vision AI App Platform.
*
*
* bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearAutogen() {
bitField0_ = (bitField0_ & ~0x00000010);
autogen_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.Instance.OutputResource)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Instance.OutputResource)
private static final com.google.cloud.visionai.v1.Instance.OutputResource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Instance.OutputResource();
}
public static com.google.cloud.visionai.v1.Instance.OutputResource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OutputResource 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.Instance.OutputResource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
@java.lang.Override
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;
}
}
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
@java.lang.Override
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;
}
}
public static final int CREATE_TIME_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreateTime() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
public static final int UPDATE_TIME_FIELD_NUMBER = 8;
private com.google.protobuf.Timestamp updateTime_;
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
@java.lang.Override
public boolean hasUpdateTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdateTime() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
public static final int LABELS_FIELD_NUMBER = 3;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField labels_;
private com.google.protobuf.MapField internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
/** Use {@link #getLabelsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public /* nullable */ java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTANCE_TYPE_FIELD_NUMBER = 10;
private int instanceType_ = 0;
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @return The enum numeric value on the wire for instanceType.
*/
@java.lang.Override
public int getInstanceTypeValue() {
return instanceType_;
}
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @return The instanceType.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InstanceType getInstanceType() {
com.google.cloud.visionai.v1.Instance.InstanceType result =
com.google.cloud.visionai.v1.Instance.InstanceType.forNumber(instanceType_);
return result == null
? com.google.cloud.visionai.v1.Instance.InstanceType.UNRECOGNIZED
: result;
}
public static final int INPUT_RESOURCES_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List inputResources_;
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
@java.lang.Override
public java.util.List
getInputResourcesList() {
return inputResources_;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder>
getInputResourcesOrBuilderList() {
return inputResources_;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
@java.lang.Override
public int getInputResourcesCount() {
return inputResources_.size();
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InputResource getInputResources(int index) {
return inputResources_.get(index);
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder getInputResourcesOrBuilder(
int index) {
return inputResources_.get(index);
}
public static final int OUTPUT_RESOURCES_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List outputResources_;
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
@java.lang.Override
public java.util.List
getOutputResourcesList() {
return outputResources_;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder>
getOutputResourcesOrBuilderList() {
return outputResources_;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
@java.lang.Override
public int getOutputResourcesCount() {
return outputResources_.size();
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.OutputResource getOutputResources(int index) {
return outputResources_.get(index);
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder getOutputResourcesOrBuilder(
int index) {
return outputResources_.get(index);
}
public static final int STATE_FIELD_NUMBER = 9;
private int state_ = 0;
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.State getState() {
com.google.cloud.visionai.v1.Instance.State result =
com.google.cloud.visionai.v1.Instance.State.forNumber(state_);
return result == null ? com.google.cloud.visionai.v1.Instance.State.UNRECOGNIZED : result;
}
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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getCreateTime());
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
}
for (int i = 0; i < inputResources_.size(); i++) {
output.writeMessage(6, inputResources_.get(i));
}
for (int i = 0; i < outputResources_.size(); i++) {
output.writeMessage(7, outputResources_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(8, getUpdateTime());
}
if (state_ != com.google.cloud.visionai.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(9, state_);
}
if (instanceType_
!= com.google.cloud.visionai.v1.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(10, instanceType_);
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime());
}
for (java.util.Map.Entry entry :
internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry labels__ =
LabelsDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
}
for (int i = 0; i < inputResources_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, inputResources_.get(i));
}
for (int i = 0; i < outputResources_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, outputResources_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime());
}
if (state_ != com.google.cloud.visionai.v1.Instance.State.STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, state_);
}
if (instanceType_
!= com.google.cloud.visionai.v1.Instance.InstanceType.INSTANCE_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, instanceType_);
}
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.Instance)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.Instance other = (com.google.cloud.visionai.v1.Instance) obj;
if (!getName().equals(other.getName())) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (!internalGetLabels().equals(other.internalGetLabels())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (instanceType_ != other.instanceType_) return false;
if (!getInputResourcesList().equals(other.getInputResourcesList())) return false;
if (!getOutputResourcesList().equals(other.getOutputResourcesList())) return false;
if (state_ != other.state_) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + INSTANCE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + instanceType_;
if (getInputResourcesCount() > 0) {
hash = (37 * hash) + INPUT_RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + getInputResourcesList().hashCode();
}
if (getOutputResourcesCount() > 0) {
hash = (37 * hash) + OUTPUT_RESOURCES_FIELD_NUMBER;
hash = (53 * hash) + getOutputResourcesList().hashCode();
}
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.Instance parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance 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.Instance parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance 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.Instance parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.Instance 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.Instance parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.Instance 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.Instance parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.Instance 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.Instance 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.Instance 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.Instance 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 describing Instance object
* Next ID: 12
*
*
* Protobuf type {@code google.cloud.visionai.v1.Instance}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.Instance)
com.google.cloud.visionai.v1.InstanceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.PlatformProto
.internal_static_google_cloud_visionai_v1_Instance_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetMutableLabels();
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_Instance_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.Instance.class,
com.google.cloud.visionai.v1.Instance.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.Instance.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCreateTimeFieldBuilder();
getUpdateTimeFieldBuilder();
getInputResourcesFieldBuilder();
getOutputResourcesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
internalGetMutableLabels().clear();
displayName_ = "";
description_ = "";
instanceType_ = 0;
if (inputResourcesBuilder_ == null) {
inputResources_ = java.util.Collections.emptyList();
} else {
inputResources_ = null;
inputResourcesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000080);
if (outputResourcesBuilder_ == null) {
outputResources_ = java.util.Collections.emptyList();
} else {
outputResources_ = null;
outputResourcesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000100);
state_ = 0;
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_Instance_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.Instance.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance build() {
com.google.cloud.visionai.v1.Instance result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.Instance buildPartial() {
com.google.cloud.visionai.v1.Instance result =
new com.google.cloud.visionai.v1.Instance(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.visionai.v1.Instance result) {
if (inputResourcesBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)) {
inputResources_ = java.util.Collections.unmodifiableList(inputResources_);
bitField0_ = (bitField0_ & ~0x00000080);
}
result.inputResources_ = inputResources_;
} else {
result.inputResources_ = inputResourcesBuilder_.build();
}
if (outputResourcesBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)) {
outputResources_ = java.util.Collections.unmodifiableList(outputResources_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.outputResources_ = outputResources_;
} else {
result.outputResources_ = outputResourcesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.visionai.v1.Instance result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.instanceType_ = instanceType_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.state_ = state_;
}
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.Instance) {
return mergeFrom((com.google.cloud.visionai.v1.Instance) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.Instance other) {
if (other == com.google.cloud.visionai.v1.Instance.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000008;
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000010;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.instanceType_ != 0) {
setInstanceTypeValue(other.getInstanceTypeValue());
}
if (inputResourcesBuilder_ == null) {
if (!other.inputResources_.isEmpty()) {
if (inputResources_.isEmpty()) {
inputResources_ = other.inputResources_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureInputResourcesIsMutable();
inputResources_.addAll(other.inputResources_);
}
onChanged();
}
} else {
if (!other.inputResources_.isEmpty()) {
if (inputResourcesBuilder_.isEmpty()) {
inputResourcesBuilder_.dispose();
inputResourcesBuilder_ = null;
inputResources_ = other.inputResources_;
bitField0_ = (bitField0_ & ~0x00000080);
inputResourcesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getInputResourcesFieldBuilder()
: null;
} else {
inputResourcesBuilder_.addAllMessages(other.inputResources_);
}
}
}
if (outputResourcesBuilder_ == null) {
if (!other.outputResources_.isEmpty()) {
if (outputResources_.isEmpty()) {
outputResources_ = other.outputResources_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureOutputResourcesIsMutable();
outputResources_.addAll(other.outputResources_);
}
onChanged();
}
} else {
if (!other.outputResources_.isEmpty()) {
if (outputResourcesBuilder_.isEmpty()) {
outputResourcesBuilder_.dispose();
outputResourcesBuilder_ = null;
outputResources_ = other.outputResources_;
bitField0_ = (bitField0_ & ~0x00000100);
outputResourcesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getOutputResourcesFieldBuilder()
: null;
} else {
outputResourcesBuilder_.addAllMessages(other.outputResources_);
}
}
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000008;
break;
} // case 26
case 34:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 34
case 42:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 42
case 50:
{
com.google.cloud.visionai.v1.Instance.InputResource m =
input.readMessage(
com.google.cloud.visionai.v1.Instance.InputResource.parser(),
extensionRegistry);
if (inputResourcesBuilder_ == null) {
ensureInputResourcesIsMutable();
inputResources_.add(m);
} else {
inputResourcesBuilder_.addMessage(m);
}
break;
} // case 50
case 58:
{
com.google.cloud.visionai.v1.Instance.OutputResource m =
input.readMessage(
com.google.cloud.visionai.v1.Instance.OutputResource.parser(),
extensionRegistry);
if (outputResourcesBuilder_ == null) {
ensureOutputResourcesIsMutable();
outputResources_.add(m);
} else {
outputResourcesBuilder_.addMessage(m);
}
break;
} // case 58
case 66:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 66
case 72:
{
state_ = input.readEnum();
bitField0_ |= 0x00000200;
break;
} // case 72
case 80:
{
instanceType_ = input.readEnum();
bitField0_ |= 0x00000040;
break;
} // case 80
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 name_ = "";
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. name of resource
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
createTimeBuilder_;
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
public com.google.protobuf.Timestamp getCreateTime() {
if (createTimeBuilder_ == null) {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
} else {
return createTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createTime_ = value;
} else {
createTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (createTimeBuilder_ == null) {
createTime_ = builderForValue.build();
} else {
createTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& createTime_ != null
&& createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCreateTimeBuilder().mergeFrom(value);
} else {
createTime_ = value;
}
} else {
createTimeBuilder_.mergeFrom(value);
}
if (createTime_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearCreateTime() {
bitField0_ = (bitField0_ & ~0x00000002);
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getCreateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
if (createTimeBuilder_ != null) {
return createTimeBuilder_.getMessageOrBuilder();
} else {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
}
}
/**
*
*
*
* Output only. [Output only] Create timestamp
*
*
*
* .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder() {
if (createTimeBuilder_ == null) {
createTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCreateTime(), getParentForChildren(), isClean());
createTime_ = null;
}
return createTimeBuilder_;
}
private com.google.protobuf.Timestamp updateTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
updateTimeBuilder_;
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
public boolean hasUpdateTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
public com.google.protobuf.Timestamp getUpdateTime() {
if (updateTimeBuilder_ == null) {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
} else {
return updateTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updateTime_ = value;
} else {
updateTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (updateTimeBuilder_ == null) {
updateTime_ = builderForValue.build();
} else {
updateTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& updateTime_ != null
&& updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getUpdateTimeBuilder().mergeFrom(value);
} else {
updateTime_ = value;
}
} else {
updateTimeBuilder_.mergeFrom(value);
}
if (updateTime_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearUpdateTime() {
bitField0_ = (bitField0_ & ~0x00000004);
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getUpdateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
if (updateTimeBuilder_ != null) {
return updateTimeBuilder_.getMessageOrBuilder();
} else {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
}
}
/**
*
*
*
* Output only. [Output only] Update timestamp
*
*
*
* .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder() {
if (updateTimeBuilder_ == null) {
updateTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getUpdateTime(), getParentForChildren(), isClean());
updateTime_ = null;
}
return updateTimeBuilder_;
}
private com.google.protobuf.MapField labels_;
private com.google.protobuf.MapField internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
bitField0_ |= 0x00000008;
onChanged();
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public boolean containsLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetLabels().getMap().containsKey(key);
}
/** Use {@link #getLabelsMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public /* nullable */ java.lang.String getLabelsOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
bitField0_ = (bitField0_ & ~0x00000008);
internalGetMutableLabels().getMutableMap().clear();
return this;
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
public Builder removeLabels(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableLabels().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableLabels() {
bitField0_ |= 0x00000008;
return internalGetMutableLabels().getMutableMap();
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
public Builder putLabels(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap().put(key, value);
bitField0_ |= 0x00000008;
return this;
}
/**
*
*
*
* Labels as key value pairs
*
*
* map<string, string> labels = 3;
*/
public Builder putAllLabels(java.util.Map values) {
internalGetMutableLabels().getMutableMap().putAll(values);
bitField0_ |= 0x00000008;
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Required. A user friendly display name for the solution.
*
*
* string display_name = 4 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @return The bytes for description.
*/
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*
*
* A description for this instance.
*
*
* string description = 5;
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private int instanceType_ = 0;
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @return The enum numeric value on the wire for instanceType.
*/
@java.lang.Override
public int getInstanceTypeValue() {
return instanceType_;
}
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @param value The enum numeric value on the wire for instanceType to set.
* @return This builder for chaining.
*/
public Builder setInstanceTypeValue(int value) {
instanceType_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @return The instanceType.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.InstanceType getInstanceType() {
com.google.cloud.visionai.v1.Instance.InstanceType result =
com.google.cloud.visionai.v1.Instance.InstanceType.forNumber(instanceType_);
return result == null
? com.google.cloud.visionai.v1.Instance.InstanceType.UNRECOGNIZED
: result;
}
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @param value The instanceType to set.
* @return This builder for chaining.
*/
public Builder setInstanceType(com.google.cloud.visionai.v1.Instance.InstanceType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
instanceType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The instance type for the current instance.
*
*
* .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10;
*
* @return This builder for chaining.
*/
public Builder clearInstanceType() {
bitField0_ = (bitField0_ & ~0x00000040);
instanceType_ = 0;
onChanged();
return this;
}
private java.util.List inputResources_ =
java.util.Collections.emptyList();
private void ensureInputResourcesIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
inputResources_ =
new java.util.ArrayList(
inputResources_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Instance.InputResource,
com.google.cloud.visionai.v1.Instance.InputResource.Builder,
com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder>
inputResourcesBuilder_;
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public java.util.List
getInputResourcesList() {
if (inputResourcesBuilder_ == null) {
return java.util.Collections.unmodifiableList(inputResources_);
} else {
return inputResourcesBuilder_.getMessageList();
}
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public int getInputResourcesCount() {
if (inputResourcesBuilder_ == null) {
return inputResources_.size();
} else {
return inputResourcesBuilder_.getCount();
}
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public com.google.cloud.visionai.v1.Instance.InputResource getInputResources(int index) {
if (inputResourcesBuilder_ == null) {
return inputResources_.get(index);
} else {
return inputResourcesBuilder_.getMessage(index);
}
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder setInputResources(
int index, com.google.cloud.visionai.v1.Instance.InputResource value) {
if (inputResourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputResourcesIsMutable();
inputResources_.set(index, value);
onChanged();
} else {
inputResourcesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder setInputResources(
int index, com.google.cloud.visionai.v1.Instance.InputResource.Builder builderForValue) {
if (inputResourcesBuilder_ == null) {
ensureInputResourcesIsMutable();
inputResources_.set(index, builderForValue.build());
onChanged();
} else {
inputResourcesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder addInputResources(com.google.cloud.visionai.v1.Instance.InputResource value) {
if (inputResourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputResourcesIsMutable();
inputResources_.add(value);
onChanged();
} else {
inputResourcesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder addInputResources(
int index, com.google.cloud.visionai.v1.Instance.InputResource value) {
if (inputResourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInputResourcesIsMutable();
inputResources_.add(index, value);
onChanged();
} else {
inputResourcesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder addInputResources(
com.google.cloud.visionai.v1.Instance.InputResource.Builder builderForValue) {
if (inputResourcesBuilder_ == null) {
ensureInputResourcesIsMutable();
inputResources_.add(builderForValue.build());
onChanged();
} else {
inputResourcesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder addInputResources(
int index, com.google.cloud.visionai.v1.Instance.InputResource.Builder builderForValue) {
if (inputResourcesBuilder_ == null) {
ensureInputResourcesIsMutable();
inputResources_.add(index, builderForValue.build());
onChanged();
} else {
inputResourcesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder addAllInputResources(
java.lang.Iterable extends com.google.cloud.visionai.v1.Instance.InputResource> values) {
if (inputResourcesBuilder_ == null) {
ensureInputResourcesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputResources_);
onChanged();
} else {
inputResourcesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder clearInputResources() {
if (inputResourcesBuilder_ == null) {
inputResources_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
} else {
inputResourcesBuilder_.clear();
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public Builder removeInputResources(int index) {
if (inputResourcesBuilder_ == null) {
ensureInputResourcesIsMutable();
inputResources_.remove(index);
onChanged();
} else {
inputResourcesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public com.google.cloud.visionai.v1.Instance.InputResource.Builder getInputResourcesBuilder(
int index) {
return getInputResourcesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder getInputResourcesOrBuilder(
int index) {
if (inputResourcesBuilder_ == null) {
return inputResources_.get(index);
} else {
return inputResourcesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public java.util.List extends com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder>
getInputResourcesOrBuilderList() {
if (inputResourcesBuilder_ != null) {
return inputResourcesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(inputResources_);
}
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public com.google.cloud.visionai.v1.Instance.InputResource.Builder addInputResourcesBuilder() {
return getInputResourcesFieldBuilder()
.addBuilder(com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance());
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public com.google.cloud.visionai.v1.Instance.InputResource.Builder addInputResourcesBuilder(
int index) {
return getInputResourcesFieldBuilder()
.addBuilder(
index, com.google.cloud.visionai.v1.Instance.InputResource.getDefaultInstance());
}
/**
*
*
*
* The input resources for the current application instance.
* For example:
* input_resources:
* visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a
*
*
* repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6;
*/
public java.util.List
getInputResourcesBuilderList() {
return getInputResourcesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Instance.InputResource,
com.google.cloud.visionai.v1.Instance.InputResource.Builder,
com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder>
getInputResourcesFieldBuilder() {
if (inputResourcesBuilder_ == null) {
inputResourcesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Instance.InputResource,
com.google.cloud.visionai.v1.Instance.InputResource.Builder,
com.google.cloud.visionai.v1.Instance.InputResourceOrBuilder>(
inputResources_,
((bitField0_ & 0x00000080) != 0),
getParentForChildren(),
isClean());
inputResources_ = null;
}
return inputResourcesBuilder_;
}
private java.util.List outputResources_ =
java.util.Collections.emptyList();
private void ensureOutputResourcesIsMutable() {
if (!((bitField0_ & 0x00000100) != 0)) {
outputResources_ =
new java.util.ArrayList(
outputResources_);
bitField0_ |= 0x00000100;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Instance.OutputResource,
com.google.cloud.visionai.v1.Instance.OutputResource.Builder,
com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder>
outputResourcesBuilder_;
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public java.util.List
getOutputResourcesList() {
if (outputResourcesBuilder_ == null) {
return java.util.Collections.unmodifiableList(outputResources_);
} else {
return outputResourcesBuilder_.getMessageList();
}
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public int getOutputResourcesCount() {
if (outputResourcesBuilder_ == null) {
return outputResources_.size();
} else {
return outputResourcesBuilder_.getCount();
}
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public com.google.cloud.visionai.v1.Instance.OutputResource getOutputResources(int index) {
if (outputResourcesBuilder_ == null) {
return outputResources_.get(index);
} else {
return outputResourcesBuilder_.getMessage(index);
}
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder setOutputResources(
int index, com.google.cloud.visionai.v1.Instance.OutputResource value) {
if (outputResourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputResourcesIsMutable();
outputResources_.set(index, value);
onChanged();
} else {
outputResourcesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder setOutputResources(
int index, com.google.cloud.visionai.v1.Instance.OutputResource.Builder builderForValue) {
if (outputResourcesBuilder_ == null) {
ensureOutputResourcesIsMutable();
outputResources_.set(index, builderForValue.build());
onChanged();
} else {
outputResourcesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder addOutputResources(com.google.cloud.visionai.v1.Instance.OutputResource value) {
if (outputResourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputResourcesIsMutable();
outputResources_.add(value);
onChanged();
} else {
outputResourcesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder addOutputResources(
int index, com.google.cloud.visionai.v1.Instance.OutputResource value) {
if (outputResourcesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputResourcesIsMutable();
outputResources_.add(index, value);
onChanged();
} else {
outputResourcesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder addOutputResources(
com.google.cloud.visionai.v1.Instance.OutputResource.Builder builderForValue) {
if (outputResourcesBuilder_ == null) {
ensureOutputResourcesIsMutable();
outputResources_.add(builderForValue.build());
onChanged();
} else {
outputResourcesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder addOutputResources(
int index, com.google.cloud.visionai.v1.Instance.OutputResource.Builder builderForValue) {
if (outputResourcesBuilder_ == null) {
ensureOutputResourcesIsMutable();
outputResources_.add(index, builderForValue.build());
onChanged();
} else {
outputResourcesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder addAllOutputResources(
java.lang.Iterable extends com.google.cloud.visionai.v1.Instance.OutputResource> values) {
if (outputResourcesBuilder_ == null) {
ensureOutputResourcesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputResources_);
onChanged();
} else {
outputResourcesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder clearOutputResources() {
if (outputResourcesBuilder_ == null) {
outputResources_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
} else {
outputResourcesBuilder_.clear();
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public Builder removeOutputResources(int index) {
if (outputResourcesBuilder_ == null) {
ensureOutputResourcesIsMutable();
outputResources_.remove(index);
onChanged();
} else {
outputResourcesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public com.google.cloud.visionai.v1.Instance.OutputResource.Builder getOutputResourcesBuilder(
int index) {
return getOutputResourcesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder
getOutputResourcesOrBuilder(int index) {
if (outputResourcesBuilder_ == null) {
return outputResources_.get(index);
} else {
return outputResourcesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public java.util.List extends com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder>
getOutputResourcesOrBuilderList() {
if (outputResourcesBuilder_ != null) {
return outputResourcesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outputResources_);
}
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public com.google.cloud.visionai.v1.Instance.OutputResource.Builder
addOutputResourcesBuilder() {
return getOutputResourcesFieldBuilder()
.addBuilder(com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance());
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public com.google.cloud.visionai.v1.Instance.OutputResource.Builder addOutputResourcesBuilder(
int index) {
return getOutputResourcesFieldBuilder()
.addBuilder(
index, com.google.cloud.visionai.v1.Instance.OutputResource.getDefaultInstance());
}
/**
*
*
*
* All the output resources associated to one application instance.
*
*
* repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7;
*/
public java.util.List
getOutputResourcesBuilderList() {
return getOutputResourcesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Instance.OutputResource,
com.google.cloud.visionai.v1.Instance.OutputResource.Builder,
com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder>
getOutputResourcesFieldBuilder() {
if (outputResourcesBuilder_ == null) {
outputResourcesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.Instance.OutputResource,
com.google.cloud.visionai.v1.Instance.OutputResource.Builder,
com.google.cloud.visionai.v1.Instance.OutputResourceOrBuilder>(
outputResources_,
((bitField0_ & 0x00000100) != 0),
getParentForChildren(),
isClean());
outputResources_ = null;
}
return outputResourcesBuilder_;
}
private int state_ = 0;
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.Instance.State getState() {
com.google.cloud.visionai.v1.Instance.State result =
com.google.cloud.visionai.v1.Instance.State.forNumber(state_);
return result == null ? com.google.cloud.visionai.v1.Instance.State.UNRECOGNIZED : result;
}
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.visionai.v1.Instance.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* State of the instance.
*
*
* .google.cloud.visionai.v1.Instance.State state = 9;
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000200);
state_ = 0;
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.Instance)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.Instance)
private static final com.google.cloud.visionai.v1.Instance DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.Instance();
}
public static com.google.cloud.visionai.v1.Instance getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Instance 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.Instance getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy