Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
yandex.cloud.api.ai.vision.v2.ImageClassifier Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/ai/vision/v2/image_classifier.proto
package yandex.cloud.api.ai.vision.v2;
public final class ImageClassifier {
private ImageClassifier() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface LabelOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v2.Label)
com.google.protobuf.MessageOrBuilder {
/**
*
* Label name
*
*
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Label name
*
*
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* human readable description of label
*
*
* string description = 2;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* human readable description of label
*
*
* string description = 2;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
}
/**
*
*Description of single label
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.Label}
*/
public static final class Label extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v2.Label)
LabelOrBuilder {
private static final long serialVersionUID = 0L;
// Use Label.newBuilder() to construct.
private Label(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Label() {
name_ = "";
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Label();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Label(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_Label_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_Label_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Label name
*
*
* string name = 1;
* @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;
}
}
/**
*
* Label name
*
*
* string name = 1;
* @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 DESCRIPTION_FIELD_NUMBER = 2;
private volatile java.lang.Object description_;
/**
*
* human readable description of label
*
*
* string description = 2;
* @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;
}
}
/**
*
* human readable description of label
*
*
* string description = 2;
* @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;
}
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
unknownFields.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.Label)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label other = (yandex.cloud.api.ai.vision.v2.ImageClassifier.Label) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label 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(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label 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;
}
/**
*
*Description of single label
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.Label}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v2.Label)
yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_Label_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_Label_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
description_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_Label_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label build() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label buildPartial() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label result = new yandex.cloud.api.ai.vision.v2.ImageClassifier.Label(this);
result.name_ = name_;
result.description_ = description_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.Label) {
return mergeFrom((yandex.cloud.api.ai.vision.v2.ImageClassifier.Label)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label other) {
if (other == yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v2.ImageClassifier.Label) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* Label name
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Label name
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Label name
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Label name
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Label name
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* human readable description of label
*
*
* string description = 2;
* @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;
}
}
/**
*
* human readable description of label
*
*
* string description = 2;
* @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;
}
}
/**
*
* human readable description of label
*
*
* string description = 2;
* @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;
onChanged();
return this;
}
/**
*
* human readable description of label
*
*
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* human readable description of label
*
*
* string description = 2;
* @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;
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:yandex.cloud.ai.vision.v2.Label)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v2.Label)
private static final yandex.cloud.api.ai.vision.v2.ImageClassifier.Label DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v2.ImageClassifier.Label();
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Label parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Label(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ClassAnnotationOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v2.ClassAnnotation)
com.google.protobuf.MessageOrBuilder {
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
* @return Whether the label field is set.
*/
boolean hasLabel();
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
* @return The label.
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getLabel();
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder getLabelOrBuilder();
/**
*
* confidence for each label
*
*
* double confidence = 2;
* @return The confidence.
*/
double getConfidence();
}
/**
*
*Image annotation for specific label
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.ClassAnnotation}
*/
public static final class ClassAnnotation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v2.ClassAnnotation)
ClassAnnotationOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClassAnnotation.newBuilder() to construct.
private ClassAnnotation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClassAnnotation() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClassAnnotation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClassAnnotation(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder subBuilder = null;
if (label_ != null) {
subBuilder = label_.toBuilder();
}
label_ = input.readMessage(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(label_);
label_ = subBuilder.buildPartial();
}
break;
}
case 17: {
confidence_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder.class);
}
public static final int LABEL_FIELD_NUMBER = 1;
private yandex.cloud.api.ai.vision.v2.ImageClassifier.Label label_;
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
* @return Whether the label field is set.
*/
@java.lang.Override
public boolean hasLabel() {
return label_ != null;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
* @return The label.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getLabel() {
return label_ == null ? yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance() : label_;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder getLabelOrBuilder() {
return getLabel();
}
public static final int CONFIDENCE_FIELD_NUMBER = 2;
private double confidence_;
/**
*
* confidence for each label
*
*
* double confidence = 2;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
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 (label_ != null) {
output.writeMessage(1, getLabel());
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
output.writeDouble(2, confidence_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (label_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getLabel());
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, confidence_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation other = (yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation) obj;
if (hasLabel() != other.hasLabel()) return false;
if (hasLabel()) {
if (!getLabel()
.equals(other.getLabel())) return false;
}
if (java.lang.Double.doubleToLongBits(getConfidence())
!= java.lang.Double.doubleToLongBits(
other.getConfidence())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasLabel()) {
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabel().hashCode();
}
hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConfidence()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation 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(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation 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;
}
/**
*
*Image annotation for specific label
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.ClassAnnotation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v2.ClassAnnotation)
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (labelBuilder_ == null) {
label_ = null;
} else {
label_ = null;
labelBuilder_ = null;
}
confidence_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation build() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation buildPartial() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation result = new yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation(this);
if (labelBuilder_ == null) {
result.label_ = label_;
} else {
result.label_ = labelBuilder_.build();
}
result.confidence_ = confidence_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation) {
return mergeFrom((yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation other) {
if (other == yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.getDefaultInstance()) return this;
if (other.hasLabel()) {
mergeLabel(other.getLabel());
}
if (other.getConfidence() != 0D) {
setConfidence(other.getConfidence());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private yandex.cloud.api.ai.vision.v2.ImageClassifier.Label label_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder> labelBuilder_;
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
* @return Whether the label field is set.
*/
public boolean hasLabel() {
return labelBuilder_ != null || label_ != null;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
* @return The label.
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getLabel() {
if (labelBuilder_ == null) {
return label_ == null ? yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance() : label_;
} else {
return labelBuilder_.getMessage();
}
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
public Builder setLabel(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
label_ = value;
onChanged();
} else {
labelBuilder_.setMessage(value);
}
return this;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
public Builder setLabel(
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder builderForValue) {
if (labelBuilder_ == null) {
label_ = builderForValue.build();
onChanged();
} else {
labelBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
public Builder mergeLabel(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label value) {
if (labelBuilder_ == null) {
if (label_ != null) {
label_ =
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.newBuilder(label_).mergeFrom(value).buildPartial();
} else {
label_ = value;
}
onChanged();
} else {
labelBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
public Builder clearLabel() {
if (labelBuilder_ == null) {
label_ = null;
onChanged();
} else {
label_ = null;
labelBuilder_ = null;
}
return this;
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder getLabelBuilder() {
onChanged();
return getLabelFieldBuilder().getBuilder();
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder getLabelOrBuilder() {
if (labelBuilder_ != null) {
return labelBuilder_.getMessageOrBuilder();
} else {
return label_ == null ?
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance() : label_;
}
}
/**
*
* list of annotated labels
*
*
* .yandex.cloud.ai.vision.v2.Label label = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>
getLabelFieldBuilder() {
if (labelBuilder_ == null) {
labelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>(
getLabel(),
getParentForChildren(),
isClean());
label_ = null;
}
return labelBuilder_;
}
private double confidence_ ;
/**
*
* confidence for each label
*
*
* double confidence = 2;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
/**
*
* confidence for each label
*
*
* double confidence = 2;
* @param value The confidence to set.
* @return This builder for chaining.
*/
public Builder setConfidence(double value) {
confidence_ = value;
onChanged();
return this;
}
/**
*
* confidence for each label
*
*
* double confidence = 2;
* @return This builder for chaining.
*/
public Builder clearConfidence() {
confidence_ = 0D;
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:yandex.cloud.ai.vision.v2.ClassAnnotation)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v2.ClassAnnotation)
private static final yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation();
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClassAnnotation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ClassAnnotation(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ClassifierSpecificationOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v2.ClassifierSpecification)
com.google.protobuf.MessageOrBuilder {
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
java.util.List
getLabelsList();
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getLabels(int index);
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
int getLabelsCount();
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
java.util.List extends yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>
getLabelsOrBuilderList();
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder getLabelsOrBuilder(
int index);
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return The enum numeric value on the wire for classificationType.
*/
int getClassificationTypeValue();
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return The classificationType.
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType getClassificationType();
}
/**
*
*Specification of model used for annotation
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.ClassifierSpecification}
*/
public static final class ClassifierSpecification extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v2.ClassifierSpecification)
ClassifierSpecificationOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClassifierSpecification.newBuilder() to construct.
private ClassifierSpecification(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClassifierSpecification() {
labels_ = java.util.Collections.emptyList();
classificationType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClassifierSpecification();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClassifierSpecification(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
labels_.add(
input.readMessage(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.parser(), extensionRegistry));
break;
}
case 16: {
int rawValue = input.readEnum();
classificationType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = java.util.Collections.unmodifiableList(labels_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType}
*/
public enum ClassificationType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* CLASSIFICATION_TYPE_UNSPECIFIED = 0;
*/
CLASSIFICATION_TYPE_UNSPECIFIED(0),
/**
* MULTI_LABEL = 1;
*/
MULTI_LABEL(1),
/**
* MULTI_CLASS = 2;
*/
MULTI_CLASS(2),
UNRECOGNIZED(-1),
;
/**
* CLASSIFICATION_TYPE_UNSPECIFIED = 0;
*/
public static final int CLASSIFICATION_TYPE_UNSPECIFIED_VALUE = 0;
/**
* MULTI_LABEL = 1;
*/
public static final int MULTI_LABEL_VALUE = 1;
/**
* MULTI_CLASS = 2;
*/
public static final int MULTI_CLASS_VALUE = 2;
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 ClassificationType 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 ClassificationType forNumber(int value) {
switch (value) {
case 0: return CLASSIFICATION_TYPE_UNSPECIFIED;
case 1: return MULTI_LABEL;
case 2: return MULTI_CLASS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ClassificationType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ClassificationType findValueByNumber(int number) {
return ClassificationType.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 yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.getDescriptor().getEnumTypes().get(0);
}
private static final ClassificationType[] VALUES = values();
public static ClassificationType 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 ClassificationType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType)
}
public static final int LABELS_FIELD_NUMBER = 1;
private java.util.List labels_;
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
@java.lang.Override
public java.util.List getLabelsList() {
return labels_;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>
getLabelsOrBuilderList() {
return labels_;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
@java.lang.Override
public int getLabelsCount() {
return labels_.size();
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getLabels(int index) {
return labels_.get(index);
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder getLabelsOrBuilder(
int index) {
return labels_.get(index);
}
public static final int CLASSIFICATION_TYPE_FIELD_NUMBER = 2;
private int classificationType_;
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return The enum numeric value on the wire for classificationType.
*/
@java.lang.Override public int getClassificationTypeValue() {
return classificationType_;
}
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return The classificationType.
*/
@java.lang.Override public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType getClassificationType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType result = yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType.valueOf(classificationType_);
return result == null ? yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType.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 {
for (int i = 0; i < labels_.size(); i++) {
output.writeMessage(1, labels_.get(i));
}
if (classificationType_ != yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType.CLASSIFICATION_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, classificationType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < labels_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, labels_.get(i));
}
if (classificationType_ != yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType.CLASSIFICATION_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, classificationType_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification other = (yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification) obj;
if (!getLabelsList()
.equals(other.getLabelsList())) return false;
if (classificationType_ != other.classificationType_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getLabelsCount() > 0) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + getLabelsList().hashCode();
}
hash = (37 * hash) + CLASSIFICATION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + classificationType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification 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(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification 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;
}
/**
*
*Specification of model used for annotation
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.ClassifierSpecification}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v2.ClassifierSpecification)
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLabelsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (labelsBuilder_ == null) {
labels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
labelsBuilder_.clear();
}
classificationType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification build() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification buildPartial() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification result = new yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification(this);
int from_bitField0_ = bitField0_;
if (labelsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
labels_ = java.util.Collections.unmodifiableList(labels_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.labels_ = labels_;
} else {
result.labels_ = labelsBuilder_.build();
}
result.classificationType_ = classificationType_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification) {
return mergeFrom((yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification other) {
if (other == yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.getDefaultInstance()) return this;
if (labelsBuilder_ == null) {
if (!other.labels_.isEmpty()) {
if (labels_.isEmpty()) {
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLabelsIsMutable();
labels_.addAll(other.labels_);
}
onChanged();
}
} else {
if (!other.labels_.isEmpty()) {
if (labelsBuilder_.isEmpty()) {
labelsBuilder_.dispose();
labelsBuilder_ = null;
labels_ = other.labels_;
bitField0_ = (bitField0_ & ~0x00000001);
labelsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLabelsFieldBuilder() : null;
} else {
labelsBuilder_.addAllMessages(other.labels_);
}
}
}
if (other.classificationType_ != 0) {
setClassificationTypeValue(other.getClassificationTypeValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List labels_ =
java.util.Collections.emptyList();
private void ensureLabelsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
labels_ = new java.util.ArrayList(labels_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder> labelsBuilder_;
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public java.util.List getLabelsList() {
if (labelsBuilder_ == null) {
return java.util.Collections.unmodifiableList(labels_);
} else {
return labelsBuilder_.getMessageList();
}
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public int getLabelsCount() {
if (labelsBuilder_ == null) {
return labels_.size();
} else {
return labelsBuilder_.getCount();
}
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label getLabels(int index) {
if (labelsBuilder_ == null) {
return labels_.get(index);
} else {
return labelsBuilder_.getMessage(index);
}
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder setLabels(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.set(index, value);
onChanged();
} else {
labelsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder setLabels(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.set(index, builderForValue.build());
onChanged();
} else {
labelsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder addLabels(yandex.cloud.api.ai.vision.v2.ImageClassifier.Label value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(value);
onChanged();
} else {
labelsBuilder_.addMessage(value);
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder addLabels(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label value) {
if (labelsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelsIsMutable();
labels_.add(index, value);
onChanged();
} else {
labelsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder addLabels(
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.add(builderForValue.build());
onChanged();
} else {
labelsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder addLabels(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder builderForValue) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.add(index, builderForValue.build());
onChanged();
} else {
labelsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder addAllLabels(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v2.ImageClassifier.Label> values) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, labels_);
onChanged();
} else {
labelsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder clearLabels() {
if (labelsBuilder_ == null) {
labels_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
labelsBuilder_.clear();
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public Builder removeLabels(int index) {
if (labelsBuilder_ == null) {
ensureLabelsIsMutable();
labels_.remove(index);
onChanged();
} else {
labelsBuilder_.remove(index);
}
return this;
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder getLabelsBuilder(
int index) {
return getLabelsFieldBuilder().getBuilder(index);
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder getLabelsOrBuilder(
int index) {
if (labelsBuilder_ == null) {
return labels_.get(index); } else {
return labelsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>
getLabelsOrBuilderList() {
if (labelsBuilder_ != null) {
return labelsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(labels_);
}
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder addLabelsBuilder() {
return getLabelsFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance());
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder addLabelsBuilder(
int index) {
return getLabelsFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.getDefaultInstance());
}
/**
*
* List of labels, annotated by service
*
*
* repeated .yandex.cloud.ai.vision.v2.Label labels = 1;
*/
public java.util.List
getLabelsBuilderList() {
return getLabelsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>
getLabelsFieldBuilder() {
if (labelsBuilder_ == null) {
labelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.Label, yandex.cloud.api.ai.vision.v2.ImageClassifier.Label.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.LabelOrBuilder>(
labels_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
labels_ = null;
}
return labelsBuilder_;
}
private int classificationType_ = 0;
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return The enum numeric value on the wire for classificationType.
*/
@java.lang.Override public int getClassificationTypeValue() {
return classificationType_;
}
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @param value The enum numeric value on the wire for classificationType to set.
* @return This builder for chaining.
*/
public Builder setClassificationTypeValue(int value) {
classificationType_ = value;
onChanged();
return this;
}
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return The classificationType.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType getClassificationType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType result = yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType.valueOf(classificationType_);
return result == null ? yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType.UNRECOGNIZED : result;
}
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @param value The classificationType to set.
* @return This builder for chaining.
*/
public Builder setClassificationType(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.ClassificationType value) {
if (value == null) {
throw new NullPointerException();
}
classificationType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* type of annotation: exclusive (multi-class) or non-exclusive (multi-label)
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification.ClassificationType classification_type = 2;
* @return This builder for chaining.
*/
public Builder clearClassificationType() {
classificationType_ = 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:yandex.cloud.ai.vision.v2.ClassifierSpecification)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v2.ClassifierSpecification)
private static final yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification();
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClassifierSpecification parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ClassifierSpecification(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AnnotationResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v2.AnnotationResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return The requestId.
*/
java.lang.String getRequestId();
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return The bytes for requestId.
*/
com.google.protobuf.ByteString
getRequestIdBytes();
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
* @return Whether the classifierSpecification field is set.
*/
boolean hasClassifierSpecification();
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
* @return The classifierSpecification.
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification getClassifierSpecification();
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder getClassifierSpecificationOrBuilder();
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
java.util.List
getAnnotationsList();
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation getAnnotations(int index);
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
int getAnnotationsCount();
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
java.util.List extends yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder>
getAnnotationsOrBuilderList();
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder getAnnotationsOrBuilder(
int index);
}
/**
*
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.AnnotationResponse}
*/
public static final class AnnotationResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v2.AnnotationResponse)
AnnotationResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnnotationResponse.newBuilder() to construct.
private AnnotationResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnnotationResponse() {
requestId_ = "";
annotations_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AnnotationResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnnotationResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
requestId_ = s;
break;
}
case 18: {
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder subBuilder = null;
if (classifierSpecification_ != null) {
subBuilder = classifierSpecification_.toBuilder();
}
classifierSpecification_ = input.readMessage(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(classifierSpecification_);
classifierSpecification_ = subBuilder.buildPartial();
}
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
annotations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
annotations_.add(
input.readMessage(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
annotations_ = java.util.Collections.unmodifiableList(annotations_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.Builder.class);
}
public static final int REQUEST_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object requestId_;
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return The requestId.
*/
@java.lang.Override
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
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();
requestId_ = s;
return s;
}
}
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return The bytes for requestId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLASSIFIER_SPECIFICATION_FIELD_NUMBER = 2;
private yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification classifierSpecification_;
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
* @return Whether the classifierSpecification field is set.
*/
@java.lang.Override
public boolean hasClassifierSpecification() {
return classifierSpecification_ != null;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
* @return The classifierSpecification.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification getClassifierSpecification() {
return classifierSpecification_ == null ? yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.getDefaultInstance() : classifierSpecification_;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder getClassifierSpecificationOrBuilder() {
return getClassifierSpecification();
}
public static final int ANNOTATIONS_FIELD_NUMBER = 3;
private java.util.List annotations_;
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
@java.lang.Override
public java.util.List getAnnotationsList() {
return annotations_;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder>
getAnnotationsOrBuilderList() {
return annotations_;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
@java.lang.Override
public int getAnnotationsCount() {
return annotations_.size();
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation getAnnotations(int index) {
return annotations_.get(index);
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder getAnnotationsOrBuilder(
int index) {
return annotations_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, requestId_);
}
if (classifierSpecification_ != null) {
output.writeMessage(2, getClassifierSpecification());
}
for (int i = 0; i < annotations_.size(); i++) {
output.writeMessage(3, annotations_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, requestId_);
}
if (classifierSpecification_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getClassifierSpecification());
}
for (int i = 0; i < annotations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, annotations_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse other = (yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse) obj;
if (!getRequestId()
.equals(other.getRequestId())) return false;
if (hasClassifierSpecification() != other.hasClassifierSpecification()) return false;
if (hasClassifierSpecification()) {
if (!getClassifierSpecification()
.equals(other.getClassifierSpecification())) return false;
}
if (!getAnnotationsList()
.equals(other.getAnnotationsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER;
hash = (53 * hash) + getRequestId().hashCode();
if (hasClassifierSpecification()) {
hash = (37 * hash) + CLASSIFIER_SPECIFICATION_FIELD_NUMBER;
hash = (53 * hash) + getClassifierSpecification().hashCode();
}
if (getAnnotationsCount() > 0) {
hash = (37 * hash) + ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + getAnnotationsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse 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(yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse 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;
}
/**
*
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.AnnotationResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v2.AnnotationResponse)
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.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();
requestId_ = "";
if (classifierSpecificationBuilder_ == null) {
classifierSpecification_ = null;
} else {
classifierSpecification_ = null;
classifierSpecificationBuilder_ = null;
}
if (annotationsBuilder_ == null) {
annotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
annotationsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse build() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse buildPartial() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse result = new yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse(this);
int from_bitField0_ = bitField0_;
result.requestId_ = requestId_;
if (classifierSpecificationBuilder_ == null) {
result.classifierSpecification_ = classifierSpecification_;
} else {
result.classifierSpecification_ = classifierSpecificationBuilder_.build();
}
if (annotationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
annotations_ = java.util.Collections.unmodifiableList(annotations_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.annotations_ = annotations_;
} else {
result.annotations_ = annotationsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse) {
return mergeFrom((yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse other) {
if (other == yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse.getDefaultInstance()) return this;
if (!other.getRequestId().isEmpty()) {
requestId_ = other.requestId_;
onChanged();
}
if (other.hasClassifierSpecification()) {
mergeClassifierSpecification(other.getClassifierSpecification());
}
if (annotationsBuilder_ == null) {
if (!other.annotations_.isEmpty()) {
if (annotations_.isEmpty()) {
annotations_ = other.annotations_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnnotationsIsMutable();
annotations_.addAll(other.annotations_);
}
onChanged();
}
} else {
if (!other.annotations_.isEmpty()) {
if (annotationsBuilder_.isEmpty()) {
annotationsBuilder_.dispose();
annotationsBuilder_ = null;
annotations_ = other.annotations_;
bitField0_ = (bitField0_ & ~0x00000001);
annotationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAnnotationsFieldBuilder() : null;
} else {
annotationsBuilder_.addAllMessages(other.annotations_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object requestId_ = "";
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return The requestId.
*/
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return The bytes for requestId.
*/
public com.google.protobuf.ByteString
getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @param value The requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
requestId_ = value;
onChanged();
return this;
}
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @return This builder for chaining.
*/
public Builder clearRequestId() {
requestId_ = getDefaultInstance().getRequestId();
onChanged();
return this;
}
/**
*
* internal service requestId
*
*
* string request_id = 1;
* @param value The bytes for requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
requestId_ = value;
onChanged();
return this;
}
private yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification classifierSpecification_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder> classifierSpecificationBuilder_;
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
* @return Whether the classifierSpecification field is set.
*/
public boolean hasClassifierSpecification() {
return classifierSpecificationBuilder_ != null || classifierSpecification_ != null;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
* @return The classifierSpecification.
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification getClassifierSpecification() {
if (classifierSpecificationBuilder_ == null) {
return classifierSpecification_ == null ? yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.getDefaultInstance() : classifierSpecification_;
} else {
return classifierSpecificationBuilder_.getMessage();
}
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
public Builder setClassifierSpecification(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification value) {
if (classifierSpecificationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
classifierSpecification_ = value;
onChanged();
} else {
classifierSpecificationBuilder_.setMessage(value);
}
return this;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
public Builder setClassifierSpecification(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder builderForValue) {
if (classifierSpecificationBuilder_ == null) {
classifierSpecification_ = builderForValue.build();
onChanged();
} else {
classifierSpecificationBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
public Builder mergeClassifierSpecification(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification value) {
if (classifierSpecificationBuilder_ == null) {
if (classifierSpecification_ != null) {
classifierSpecification_ =
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.newBuilder(classifierSpecification_).mergeFrom(value).buildPartial();
} else {
classifierSpecification_ = value;
}
onChanged();
} else {
classifierSpecificationBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
public Builder clearClassifierSpecification() {
if (classifierSpecificationBuilder_ == null) {
classifierSpecification_ = null;
onChanged();
} else {
classifierSpecification_ = null;
classifierSpecificationBuilder_ = null;
}
return this;
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder getClassifierSpecificationBuilder() {
onChanged();
return getClassifierSpecificationFieldBuilder().getBuilder();
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder getClassifierSpecificationOrBuilder() {
if (classifierSpecificationBuilder_ != null) {
return classifierSpecificationBuilder_.getMessageOrBuilder();
} else {
return classifierSpecification_ == null ?
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.getDefaultInstance() : classifierSpecification_;
}
}
/**
*
* class specification
*
*
* .yandex.cloud.ai.vision.v2.ClassifierSpecification classifier_specification = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder>
getClassifierSpecificationFieldBuilder() {
if (classifierSpecificationBuilder_ == null) {
classifierSpecificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecification.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassifierSpecificationOrBuilder>(
getClassifierSpecification(),
getParentForChildren(),
isClean());
classifierSpecification_ = null;
}
return classifierSpecificationBuilder_;
}
private java.util.List annotations_ =
java.util.Collections.emptyList();
private void ensureAnnotationsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
annotations_ = new java.util.ArrayList(annotations_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder> annotationsBuilder_;
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public java.util.List getAnnotationsList() {
if (annotationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(annotations_);
} else {
return annotationsBuilder_.getMessageList();
}
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public int getAnnotationsCount() {
if (annotationsBuilder_ == null) {
return annotations_.size();
} else {
return annotationsBuilder_.getCount();
}
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation getAnnotations(int index) {
if (annotationsBuilder_ == null) {
return annotations_.get(index);
} else {
return annotationsBuilder_.getMessage(index);
}
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder setAnnotations(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationsIsMutable();
annotations_.set(index, value);
onChanged();
} else {
annotationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder setAnnotations(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder builderForValue) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.set(index, builderForValue.build());
onChanged();
} else {
annotationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder addAnnotations(yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationsIsMutable();
annotations_.add(value);
onChanged();
} else {
annotationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder addAnnotations(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation value) {
if (annotationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationsIsMutable();
annotations_.add(index, value);
onChanged();
} else {
annotationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder addAnnotations(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder builderForValue) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.add(builderForValue.build());
onChanged();
} else {
annotationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder addAnnotations(
int index, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder builderForValue) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.add(index, builderForValue.build());
onChanged();
} else {
annotationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder addAllAnnotations(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation> values) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, annotations_);
onChanged();
} else {
annotationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder clearAnnotations() {
if (annotationsBuilder_ == null) {
annotations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
annotationsBuilder_.clear();
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public Builder removeAnnotations(int index) {
if (annotationsBuilder_ == null) {
ensureAnnotationsIsMutable();
annotations_.remove(index);
onChanged();
} else {
annotationsBuilder_.remove(index);
}
return this;
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder getAnnotationsBuilder(
int index) {
return getAnnotationsFieldBuilder().getBuilder(index);
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder getAnnotationsOrBuilder(
int index) {
if (annotationsBuilder_ == null) {
return annotations_.get(index); } else {
return annotationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder>
getAnnotationsOrBuilderList() {
if (annotationsBuilder_ != null) {
return annotationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(annotations_);
}
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder addAnnotationsBuilder() {
return getAnnotationsFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.getDefaultInstance());
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder addAnnotationsBuilder(
int index) {
return getAnnotationsFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.getDefaultInstance());
}
/**
*
* annotations for each class
*
*
* repeated .yandex.cloud.ai.vision.v2.ClassAnnotation annotations = 3;
*/
public java.util.List
getAnnotationsBuilderList() {
return getAnnotationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder>
getAnnotationsFieldBuilder() {
if (annotationsBuilder_ == null) {
annotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotation.Builder, yandex.cloud.api.ai.vision.v2.ImageClassifier.ClassAnnotationOrBuilder>(
annotations_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
annotations_ = null;
}
return annotationsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.ai.vision.v2.AnnotationResponse)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v2.AnnotationResponse)
private static final yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse();
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AnnotationResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnnotationResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AnnotationRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v2.AnnotationRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
* @return The image.
*/
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image getImage();
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
yandex.cloud.api.ai.vision.v2.ImageOuterClass.ImageOrBuilder getImageOrBuilder();
}
/**
*
*request for annotation
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.AnnotationRequest}
*/
public static final class AnnotationRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v2.AnnotationRequest)
AnnotationRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnnotationRequest.newBuilder() to construct.
private AnnotationRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnnotationRequest() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AnnotationRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnnotationRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.Builder subBuilder = null;
if (image_ != null) {
subBuilder = image_.toBuilder();
}
image_ = input.readMessage(yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(image_);
image_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.Builder.class);
}
public static final int IMAGE_FIELD_NUMBER = 1;
private yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image image_;
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return image_ != null;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
* @return The image.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image getImage() {
return image_ == null ? yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.getDefaultInstance() : image_;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageOuterClass.ImageOrBuilder getImageOrBuilder() {
return getImage();
}
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 (image_ != null) {
output.writeMessage(1, getImage());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (image_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getImage());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest other = (yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest) obj;
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage()
.equals(other.getImage())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasImage()) {
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest 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 yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest 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(yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*request for annotation
*
*
* Protobuf type {@code yandex.cloud.ai.vision.v2.AnnotationRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v2.AnnotationRequest)
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.class, yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (imageBuilder_ == null) {
image_ = null;
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest build() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest buildPartial() {
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest result = new yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest(this);
if (imageBuilder_ == null) {
result.image_ = image_;
} else {
result.image_ = imageBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest) {
return mergeFrom((yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest other) {
if (other == yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest.getDefaultInstance()) return this;
if (other.hasImage()) {
mergeImage(other.getImage());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image image_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image, yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.Builder, yandex.cloud.api.ai.vision.v2.ImageOuterClass.ImageOrBuilder> imageBuilder_;
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
* @return Whether the image field is set.
*/
public boolean hasImage() {
return imageBuilder_ != null || image_ != null;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
* @return The image.
*/
public yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image getImage() {
if (imageBuilder_ == null) {
return image_ == null ? yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.getDefaultInstance() : image_;
} else {
return imageBuilder_.getMessage();
}
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
public Builder setImage(yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
onChanged();
} else {
imageBuilder_.setMessage(value);
}
return this;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
public Builder setImage(
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
onChanged();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
public Builder mergeImage(yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image value) {
if (imageBuilder_ == null) {
if (image_ != null) {
image_ =
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.newBuilder(image_).mergeFrom(value).buildPartial();
} else {
image_ = value;
}
onChanged();
} else {
imageBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
public Builder clearImage() {
if (imageBuilder_ == null) {
image_ = null;
onChanged();
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.Builder getImageBuilder() {
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
public yandex.cloud.api.ai.vision.v2.ImageOuterClass.ImageOrBuilder getImageOrBuilder() {
if (imageBuilder_ != null) {
return imageBuilder_.getMessageOrBuilder();
} else {
return image_ == null ?
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.getDefaultInstance() : image_;
}
}
/**
*
* image to annotate
*
*
* .yandex.cloud.ai.vision.v2.Image image = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image, yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.Builder, yandex.cloud.api.ai.vision.v2.ImageOuterClass.ImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image, yandex.cloud.api.ai.vision.v2.ImageOuterClass.Image.Builder, yandex.cloud.api.ai.vision.v2.ImageOuterClass.ImageOrBuilder>(
getImage(),
getParentForChildren(),
isClean());
image_ = null;
}
return imageBuilder_;
}
@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:yandex.cloud.ai.vision.v2.AnnotationRequest)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v2.AnnotationRequest)
private static final yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest();
}
public static yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AnnotationRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnnotationRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v2.ImageClassifier.AnnotationRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v2_Label_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v2_Label_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n0yandex/cloud/ai/vision/v2/image_classi" +
"fier.proto\022\031yandex.cloud.ai.vision.v2\032%y" +
"andex/cloud/ai/vision/v2/image.proto\"*\n\005" +
"Label\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t" +
"\"V\n\017ClassAnnotation\022/\n\005label\030\001 \001(\0132 .yan" +
"dex.cloud.ai.vision.v2.Label\022\022\n\nconfiden" +
"ce\030\002 \001(\001\"\214\002\n\027ClassifierSpecification\0220\n\006" +
"labels\030\001 \003(\0132 .yandex.cloud.ai.vision.v2" +
".Label\022b\n\023classification_type\030\002 \001(\0162E.ya" +
"ndex.cloud.ai.vision.v2.ClassifierSpecif" +
"ication.ClassificationType\"[\n\022Classifica" +
"tionType\022#\n\037CLASSIFICATION_TYPE_UNSPECIF" +
"IED\020\000\022\017\n\013MULTI_LABEL\020\001\022\017\n\013MULTI_CLASS\020\002\"" +
"\277\001\n\022AnnotationResponse\022\022\n\nrequest_id\030\001 \001" +
"(\t\022T\n\030classifier_specification\030\002 \001(\01322.y" +
"andex.cloud.ai.vision.v2.ClassifierSpeci" +
"fication\022?\n\013annotations\030\003 \003(\0132*.yandex.c" +
"loud.ai.vision.v2.ClassAnnotation\"D\n\021Ann" +
"otationRequest\022/\n\005image\030\001 \001(\0132 .yandex.c" +
"loud.ai.vision.v2.ImageBe\n\035yandex.cloud." +
"api.ai.vision.v2ZDgithub.com/yandex-clou" +
"d/go-genproto/yandex/cloud/ai/vision/v2;" +
"visionb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
yandex.cloud.api.ai.vision.v2.ImageOuterClass.getDescriptor(),
});
internal_static_yandex_cloud_ai_vision_v2_Label_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_ai_vision_v2_Label_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v2_Label_descriptor,
new java.lang.String[] { "Name", "Description", });
internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v2_ClassAnnotation_descriptor,
new java.lang.String[] { "Label", "Confidence", });
internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v2_ClassifierSpecification_descriptor,
new java.lang.String[] { "Labels", "ClassificationType", });
internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v2_AnnotationResponse_descriptor,
new java.lang.String[] { "RequestId", "ClassifierSpecification", "Annotations", });
internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v2_AnnotationRequest_descriptor,
new java.lang.String[] { "Image", });
yandex.cloud.api.ai.vision.v2.ImageOuterClass.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}