
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult Maven / Gradle / Ivy
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/visionai/v1/annotations.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.visionai.v1;
/**
*
*
*
* Prediction output format for Generic Object Detection.
*
*
* Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult}
*/
public final class ObjectDetectionPredictionResult extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult)
ObjectDetectionPredictionResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use ObjectDetectionPredictionResult.newBuilder() to construct.
private ObjectDetectionPredictionResult(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ObjectDetectionPredictionResult() {
identifiedBoxes_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ObjectDetectionPredictionResult();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Builder.class);
}
public interface EntityOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Label id.
*
*
* int64 label_id = 1;
*
* @return The labelId.
*/
long getLabelId();
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return The labelString.
*/
java.lang.String getLabelString();
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return The bytes for labelString.
*/
com.google.protobuf.ByteString getLabelStringBytes();
}
/**
*
*
*
* The entity info for annotations from object detection prediction result.
*
*
* Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity}
*/
public static final class Entity extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity)
EntityOrBuilder {
private static final long serialVersionUID = 0L;
// Use Entity.newBuilder() to construct.
private Entity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Entity() {
labelString_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Entity();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder.class);
}
public static final int LABEL_ID_FIELD_NUMBER = 1;
private long labelId_ = 0L;
/**
*
*
*
* Label id.
*
*
* int64 label_id = 1;
*
* @return The labelId.
*/
@java.lang.Override
public long getLabelId() {
return labelId_;
}
public static final int LABEL_STRING_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object labelString_ = "";
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return The labelString.
*/
@java.lang.Override
public java.lang.String getLabelString() {
java.lang.Object ref = labelString_;
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();
labelString_ = s;
return s;
}
}
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return The bytes for labelString.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLabelStringBytes() {
java.lang.Object ref = labelString_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
labelString_ = 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 (labelId_ != 0L) {
output.writeInt64(1, labelId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelString_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, labelString_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (labelId_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, labelId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelString_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, labelString_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity other =
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) obj;
if (getLabelId() != other.getLabelId()) return false;
if (!getLabelString().equals(other.getLabelString())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + LABEL_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLabelId());
hash = (37 * hash) + LABEL_STRING_FIELD_NUMBER;
hash = (53 * hash) + getLabelString().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The entity info for annotations from object detection prediction result.
*
*
* Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity)
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder.class);
}
// Construct using
// com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
labelId_ = 0L;
labelString_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_Entity_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity build() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity buildPartial() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity result =
new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.labelId_ = labelId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.labelString_ = labelString_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) {
return mergeFrom(
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity other) {
if (other
== com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
.getDefaultInstance()) return this;
if (other.getLabelId() != 0L) {
setLabelId(other.getLabelId());
}
if (!other.getLabelString().isEmpty()) {
labelString_ = other.labelString_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
labelId_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
labelString_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long labelId_;
/**
*
*
*
* Label id.
*
*
* int64 label_id = 1;
*
* @return The labelId.
*/
@java.lang.Override
public long getLabelId() {
return labelId_;
}
/**
*
*
*
* Label id.
*
*
* int64 label_id = 1;
*
* @param value The labelId to set.
* @return This builder for chaining.
*/
public Builder setLabelId(long value) {
labelId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Label id.
*
*
* int64 label_id = 1;
*
* @return This builder for chaining.
*/
public Builder clearLabelId() {
bitField0_ = (bitField0_ & ~0x00000001);
labelId_ = 0L;
onChanged();
return this;
}
private java.lang.Object labelString_ = "";
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return The labelString.
*/
public java.lang.String getLabelString() {
java.lang.Object ref = labelString_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
labelString_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return The bytes for labelString.
*/
public com.google.protobuf.ByteString getLabelStringBytes() {
java.lang.Object ref = labelString_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
labelString_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @param value The labelString to set.
* @return This builder for chaining.
*/
public Builder setLabelString(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
labelString_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @return This builder for chaining.
*/
public Builder clearLabelString() {
labelString_ = getDefaultInstance().getLabelString();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Human readable string of the label.
*
*
* string label_string = 2;
*
* @param value The bytes for labelString to set.
* @return This builder for chaining.
*/
public Builder setLabelStringBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
labelString_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity)
private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity();
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Entity parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface IdentifiedBoxOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* An unique id for this box.
*
*
* int64 box_id = 1;
*
* @return The boxId.
*/
long getBoxId();
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*
* @return Whether the normalizedBoundingBox field is set.
*/
boolean hasNormalizedBoundingBox();
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*
* @return The normalizedBoundingBox.
*/
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox
getNormalizedBoundingBox();
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder
getNormalizedBoundingBoxOrBuilder();
/**
*
*
*
* Confidence score associated with this box.
*
*
* float confidence_score = 3;
*
* @return The confidenceScore.
*/
float getConfidenceScore();
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*
* @return Whether the entity field is set.
*/
boolean hasEntity();
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*
* @return The entity.
*/
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity getEntity();
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder
getEntityOrBuilder();
}
/**
*
*
*
* Identified box contains location and the entity of the object.
*
*
* Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox}
*/
public static final class IdentifiedBox extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)
IdentifiedBoxOrBuilder {
private static final long serialVersionUID = 0L;
// Use IdentifiedBox.newBuilder() to construct.
private IdentifiedBox(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private IdentifiedBox() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new IdentifiedBox();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
.class);
}
public interface NormalizedBoundingBoxOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Min in x coordinate.
*
*
* float xmin = 1;
*
* @return The xmin.
*/
float getXmin();
/**
*
*
*
* Min in y coordinate.
*
*
* float ymin = 2;
*
* @return The ymin.
*/
float getYmin();
/**
*
*
*
* Width of the bounding box.
*
*
* float width = 3;
*
* @return The width.
*/
float getWidth();
/**
*
*
*
* Height of the bounding box.
*
*
* float height = 4;
*
* @return The height.
*/
float getHeight();
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
* Protobuf type {@code
* google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox}
*/
public static final class NormalizedBoundingBox extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox)
NormalizedBoundingBoxOrBuilder {
private static final long serialVersionUID = 0L;
// Use NormalizedBoundingBox.newBuilder() to construct.
private NormalizedBoundingBox(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NormalizedBoundingBox() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new NormalizedBoundingBox();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder.class);
}
public static final int XMIN_FIELD_NUMBER = 1;
private float xmin_ = 0F;
/**
*
*
*
* Min in x coordinate.
*
*
* float xmin = 1;
*
* @return The xmin.
*/
@java.lang.Override
public float getXmin() {
return xmin_;
}
public static final int YMIN_FIELD_NUMBER = 2;
private float ymin_ = 0F;
/**
*
*
*
* Min in y coordinate.
*
*
* float ymin = 2;
*
* @return The ymin.
*/
@java.lang.Override
public float getYmin() {
return ymin_;
}
public static final int WIDTH_FIELD_NUMBER = 3;
private float width_ = 0F;
/**
*
*
*
* Width of the bounding box.
*
*
* float width = 3;
*
* @return The width.
*/
@java.lang.Override
public float getWidth() {
return width_;
}
public static final int HEIGHT_FIELD_NUMBER = 4;
private float height_ = 0F;
/**
*
*
*
* Height of the bounding box.
*
*
* float height = 4;
*
* @return The height.
*/
@java.lang.Override
public float getHeight() {
return height_;
}
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 (java.lang.Float.floatToRawIntBits(xmin_) != 0) {
output.writeFloat(1, xmin_);
}
if (java.lang.Float.floatToRawIntBits(ymin_) != 0) {
output.writeFloat(2, ymin_);
}
if (java.lang.Float.floatToRawIntBits(width_) != 0) {
output.writeFloat(3, width_);
}
if (java.lang.Float.floatToRawIntBits(height_) != 0) {
output.writeFloat(4, height_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Float.floatToRawIntBits(xmin_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, xmin_);
}
if (java.lang.Float.floatToRawIntBits(ymin_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, ymin_);
}
if (java.lang.Float.floatToRawIntBits(width_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, width_);
}
if (java.lang.Float.floatToRawIntBits(height_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, height_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
other =
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox)
obj;
if (java.lang.Float.floatToIntBits(getXmin())
!= java.lang.Float.floatToIntBits(other.getXmin())) return false;
if (java.lang.Float.floatToIntBits(getYmin())
!= java.lang.Float.floatToIntBits(other.getYmin())) return false;
if (java.lang.Float.floatToIntBits(getWidth())
!= java.lang.Float.floatToIntBits(other.getWidth())) return false;
if (java.lang.Float.floatToIntBits(getHeight())
!= java.lang.Float.floatToIntBits(other.getHeight())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + XMIN_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getXmin());
hash = (37 * hash) + YMIN_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getYmin());
hash = (37 * hash) + WIDTH_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getWidth());
hash = (37 * hash) + HEIGHT_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getHeight());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
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;
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
* Protobuf type {@code
* google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox)
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder.class);
}
// Construct using
// com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
xmin_ = 0F;
ymin_ = 0F;
width_ = 0F;
height_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_NormalizedBoundingBox_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
build() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
buildPartial() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
result =
new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.xmin_ = xmin_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.ymin_ = ymin_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.width_ = width_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.height_ = height_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox) {
return mergeFrom(
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
other) {
if (other
== com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance()) return this;
if (other.getXmin() != 0F) {
setXmin(other.getXmin());
}
if (other.getYmin() != 0F) {
setYmin(other.getYmin());
}
if (other.getWidth() != 0F) {
setWidth(other.getWidth());
}
if (other.getHeight() != 0F) {
setHeight(other.getHeight());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 13:
{
xmin_ = input.readFloat();
bitField0_ |= 0x00000001;
break;
} // case 13
case 21:
{
ymin_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
} // case 21
case 29:
{
width_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
case 37:
{
height_ = input.readFloat();
bitField0_ |= 0x00000008;
break;
} // case 37
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private float xmin_;
/**
*
*
*
* Min in x coordinate.
*
*
* float xmin = 1;
*
* @return The xmin.
*/
@java.lang.Override
public float getXmin() {
return xmin_;
}
/**
*
*
*
* Min in x coordinate.
*
*
* float xmin = 1;
*
* @param value The xmin to set.
* @return This builder for chaining.
*/
public Builder setXmin(float value) {
xmin_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Min in x coordinate.
*
*
* float xmin = 1;
*
* @return This builder for chaining.
*/
public Builder clearXmin() {
bitField0_ = (bitField0_ & ~0x00000001);
xmin_ = 0F;
onChanged();
return this;
}
private float ymin_;
/**
*
*
*
* Min in y coordinate.
*
*
* float ymin = 2;
*
* @return The ymin.
*/
@java.lang.Override
public float getYmin() {
return ymin_;
}
/**
*
*
*
* Min in y coordinate.
*
*
* float ymin = 2;
*
* @param value The ymin to set.
* @return This builder for chaining.
*/
public Builder setYmin(float value) {
ymin_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Min in y coordinate.
*
*
* float ymin = 2;
*
* @return This builder for chaining.
*/
public Builder clearYmin() {
bitField0_ = (bitField0_ & ~0x00000002);
ymin_ = 0F;
onChanged();
return this;
}
private float width_;
/**
*
*
*
* Width of the bounding box.
*
*
* float width = 3;
*
* @return The width.
*/
@java.lang.Override
public float getWidth() {
return width_;
}
/**
*
*
*
* Width of the bounding box.
*
*
* float width = 3;
*
* @param value The width to set.
* @return This builder for chaining.
*/
public Builder setWidth(float value) {
width_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Width of the bounding box.
*
*
* float width = 3;
*
* @return This builder for chaining.
*/
public Builder clearWidth() {
bitField0_ = (bitField0_ & ~0x00000004);
width_ = 0F;
onChanged();
return this;
}
private float height_;
/**
*
*
*
* Height of the bounding box.
*
*
* float height = 4;
*
* @return The height.
*/
@java.lang.Override
public float getHeight() {
return height_;
}
/**
*
*
*
* Height of the bounding box.
*
*
* float height = 4;
*
* @param value The height to set.
* @return This builder for chaining.
*/
public Builder setHeight(float value) {
height_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Height of the bounding box.
*
*
* float height = 4;
*
* @return This builder for chaining.
*/
public Builder clearHeight() {
bitField0_ = (bitField0_ & ~0x00000008);
height_ = 0F;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox)
private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult
.IdentifiedBox.NormalizedBoundingBox
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox();
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NormalizedBoundingBox parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int BOX_ID_FIELD_NUMBER = 1;
private long boxId_ = 0L;
/**
*
*
*
* An unique id for this box.
*
*
* int64 box_id = 1;
*
* @return The boxId.
*/
@java.lang.Override
public long getBoxId() {
return boxId_;
}
public static final int NORMALIZED_BOUNDING_BOX_FIELD_NUMBER = 2;
private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
normalizedBoundingBox_;
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*
* @return Whether the normalizedBoundingBox field is set.
*/
@java.lang.Override
public boolean hasNormalizedBoundingBox() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*
* @return The normalizedBoundingBox.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
getNormalizedBoundingBox() {
return normalizedBoundingBox_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance()
: normalizedBoundingBox_;
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder
getNormalizedBoundingBoxOrBuilder() {
return normalizedBoundingBox_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance()
: normalizedBoundingBox_;
}
public static final int CONFIDENCE_SCORE_FIELD_NUMBER = 3;
private float confidenceScore_ = 0F;
/**
*
*
*
* Confidence score associated with this box.
*
*
* float confidence_score = 3;
*
* @return The confidenceScore.
*/
@java.lang.Override
public float getConfidenceScore() {
return confidenceScore_;
}
public static final int ENTITY_FIELD_NUMBER = 4;
private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity_;
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*
* @return Whether the entity field is set.
*/
@java.lang.Override
public boolean hasEntity() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*
* @return The entity.
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity getEntity() {
return entity_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.getDefaultInstance()
: entity_;
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder
getEntityOrBuilder() {
return entity_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.getDefaultInstance()
: entity_;
}
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 (boxId_ != 0L) {
output.writeInt64(1, boxId_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getNormalizedBoundingBox());
}
if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) {
output.writeFloat(3, confidenceScore_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getEntity());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (boxId_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, boxId_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNormalizedBoundingBox());
}
if (java.lang.Float.floatToRawIntBits(confidenceScore_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, confidenceScore_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEntity());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox other =
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) obj;
if (getBoxId() != other.getBoxId()) return false;
if (hasNormalizedBoundingBox() != other.hasNormalizedBoundingBox()) return false;
if (hasNormalizedBoundingBox()) {
if (!getNormalizedBoundingBox().equals(other.getNormalizedBoundingBox())) return false;
}
if (java.lang.Float.floatToIntBits(getConfidenceScore())
!= java.lang.Float.floatToIntBits(other.getConfidenceScore())) return false;
if (hasEntity() != other.hasEntity()) return false;
if (hasEntity()) {
if (!getEntity().equals(other.getEntity())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BOX_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBoxId());
if (hasNormalizedBoundingBox()) {
hash = (37 * hash) + NORMALIZED_BOUNDING_BOX_FIELD_NUMBER;
hash = (53 * hash) + getNormalizedBoundingBox().hashCode();
}
hash = (37 * hash) + CONFIDENCE_SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getConfidenceScore());
if (hasEntity()) {
hash = (37 * hash) + ENTITY_FIELD_NUMBER;
hash = (53 * hash) + getEntity().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox 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;
}
/**
*
*
*
* Identified box contains location and the entity of the object.
*
*
* Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
.class);
}
// Construct using
// com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getNormalizedBoundingBoxFieldBuilder();
getEntityFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
boxId_ = 0L;
normalizedBoundingBox_ = null;
if (normalizedBoundingBoxBuilder_ != null) {
normalizedBoundingBoxBuilder_.dispose();
normalizedBoundingBoxBuilder_ = null;
}
confidenceScore_ = 0F;
entity_ = null;
if (entityBuilder_ != null) {
entityBuilder_.dispose();
entityBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_IdentifiedBox_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox build() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
buildPartial() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox result =
new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.boxId_ = boxId_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.normalizedBoundingBox_ =
normalizedBoundingBoxBuilder_ == null
? normalizedBoundingBox_
: normalizedBoundingBoxBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.confidenceScore_ = confidenceScore_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.entity_ = entityBuilder_ == null ? entity_ : entityBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) {
return mergeFrom(
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox other) {
if (other
== com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.getDefaultInstance()) return this;
if (other.getBoxId() != 0L) {
setBoxId(other.getBoxId());
}
if (other.hasNormalizedBoundingBox()) {
mergeNormalizedBoundingBox(other.getNormalizedBoundingBox());
}
if (other.getConfidenceScore() != 0F) {
setConfidenceScore(other.getConfidenceScore());
}
if (other.hasEntity()) {
mergeEntity(other.getEntity());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
boxId_ = input.readInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
input.readMessage(
getNormalizedBoundingBoxFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 29:
{
confidenceScore_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
case 34:
{
input.readMessage(getEntityFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private long boxId_;
/**
*
*
*
* An unique id for this box.
*
*
* int64 box_id = 1;
*
* @return The boxId.
*/
@java.lang.Override
public long getBoxId() {
return boxId_;
}
/**
*
*
*
* An unique id for this box.
*
*
* int64 box_id = 1;
*
* @param value The boxId to set.
* @return This builder for chaining.
*/
public Builder setBoxId(long value) {
boxId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* An unique id for this box.
*
*
* int64 box_id = 1;
*
* @return This builder for chaining.
*/
public Builder clearBoxId() {
bitField0_ = (bitField0_ & ~0x00000001);
boxId_ = 0L;
onChanged();
return this;
}
private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
normalizedBoundingBox_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder>
normalizedBoundingBoxBuilder_;
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*
* @return Whether the normalizedBoundingBox field is set.
*/
public boolean hasNormalizedBoundingBox() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*
* @return The normalizedBoundingBox.
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
getNormalizedBoundingBox() {
if (normalizedBoundingBoxBuilder_ == null) {
return normalizedBoundingBox_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance()
: normalizedBoundingBox_;
} else {
return normalizedBoundingBoxBuilder_.getMessage();
}
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
public Builder setNormalizedBoundingBox(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
value) {
if (normalizedBoundingBoxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
normalizedBoundingBox_ = value;
} else {
normalizedBoundingBoxBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
public Builder setNormalizedBoundingBox(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder
builderForValue) {
if (normalizedBoundingBoxBuilder_ == null) {
normalizedBoundingBox_ = builderForValue.build();
} else {
normalizedBoundingBoxBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
public Builder mergeNormalizedBoundingBox(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox
value) {
if (normalizedBoundingBoxBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& normalizedBoundingBox_ != null
&& normalizedBoundingBox_
!= com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance()) {
getNormalizedBoundingBoxBuilder().mergeFrom(value);
} else {
normalizedBoundingBox_ = value;
}
} else {
normalizedBoundingBoxBuilder_.mergeFrom(value);
}
if (normalizedBoundingBox_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
public Builder clearNormalizedBoundingBox() {
bitField0_ = (bitField0_ & ~0x00000002);
normalizedBoundingBox_ = null;
if (normalizedBoundingBoxBuilder_ != null) {
normalizedBoundingBoxBuilder_.dispose();
normalizedBoundingBoxBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder
getNormalizedBoundingBoxBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getNormalizedBoundingBoxFieldBuilder().getBuilder();
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder
getNormalizedBoundingBoxOrBuilder() {
if (normalizedBoundingBoxBuilder_ != null) {
return normalizedBoundingBoxBuilder_.getMessageOrBuilder();
} else {
return normalizedBoundingBox_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.getDefaultInstance()
: normalizedBoundingBox_;
}
}
/**
*
*
*
* Bounding Box in the normalized coordinates.
*
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder>
getNormalizedBoundingBoxFieldBuilder() {
if (normalizedBoundingBoxBuilder_ == null) {
normalizedBoundingBoxBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBox.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.NormalizedBoundingBoxOrBuilder>(
getNormalizedBoundingBox(), getParentForChildren(), isClean());
normalizedBoundingBox_ = null;
}
return normalizedBoundingBoxBuilder_;
}
private float confidenceScore_;
/**
*
*
*
* Confidence score associated with this box.
*
*
* float confidence_score = 3;
*
* @return The confidenceScore.
*/
@java.lang.Override
public float getConfidenceScore() {
return confidenceScore_;
}
/**
*
*
*
* Confidence score associated with this box.
*
*
* float confidence_score = 3;
*
* @param value The confidenceScore to set.
* @return This builder for chaining.
*/
public Builder setConfidenceScore(float value) {
confidenceScore_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Confidence score associated with this box.
*
*
* float confidence_score = 3;
*
* @return This builder for chaining.
*/
public Builder clearConfidenceScore() {
bitField0_ = (bitField0_ & ~0x00000004);
confidenceScore_ = 0F;
onChanged();
return this;
}
private com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder>
entityBuilder_;
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*
* @return Whether the entity field is set.
*/
public boolean hasEntity() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*
* @return The entity.
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity getEntity() {
if (entityBuilder_ == null) {
return entity_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
.getDefaultInstance()
: entity_;
} else {
return entityBuilder_.getMessage();
}
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
public Builder setEntity(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity value) {
if (entityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
entity_ = value;
} else {
entityBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
public Builder setEntity(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder
builderForValue) {
if (entityBuilder_ == null) {
entity_ = builderForValue.build();
} else {
entityBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
public Builder mergeEntity(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity value) {
if (entityBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& entity_ != null
&& entity_
!= com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
.getDefaultInstance()) {
getEntityBuilder().mergeFrom(value);
} else {
entity_ = value;
}
} else {
entityBuilder_.mergeFrom(value);
}
if (entity_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
public Builder clearEntity() {
bitField0_ = (bitField0_ & ~0x00000008);
entity_ = null;
if (entityBuilder_ != null) {
entityBuilder_.dispose();
entityBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder
getEntityBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getEntityFieldBuilder().getBuilder();
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder
getEntityOrBuilder() {
if (entityBuilder_ != null) {
return entityBuilder_.getMessageOrBuilder();
} else {
return entity_ == null
? com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity
.getDefaultInstance()
: entity_;
}
}
/**
*
*
*
* Entity of this box.
*
*
* .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder>
getEntityFieldBuilder() {
if (entityBuilder_ == null) {
entityBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.EntityOrBuilder>(
getEntity(), getParentForChildren(), isClean());
entity_ = null;
}
return entityBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox)
private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox();
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public IdentifiedBox parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int CURRENT_TIME_FIELD_NUMBER = 1;
private com.google.protobuf.Timestamp currentTime_;
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*
* @return Whether the currentTime field is set.
*/
@java.lang.Override
public boolean hasCurrentTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*
* @return The currentTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCurrentTime() {
return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_;
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() {
return currentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : currentTime_;
}
public static final int IDENTIFIED_BOXES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List
identifiedBoxes_;
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
@java.lang.Override
public java.util.List
getIdentifiedBoxesList() {
return identifiedBoxes_;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder>
getIdentifiedBoxesOrBuilderList() {
return identifiedBoxes_;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
@java.lang.Override
public int getIdentifiedBoxesCount() {
return identifiedBoxes_.size();
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
getIdentifiedBoxes(int index) {
return identifiedBoxes_.get(index);
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder
getIdentifiedBoxesOrBuilder(int index) {
return identifiedBoxes_.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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getCurrentTime());
}
for (int i = 0; i < identifiedBoxes_.size(); i++) {
output.writeMessage(2, identifiedBoxes_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCurrentTime());
}
for (int i = 0; i < identifiedBoxes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, identifiedBoxes_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult)) {
return super.equals(obj);
}
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult other =
(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult) obj;
if (hasCurrentTime() != other.hasCurrentTime()) return false;
if (hasCurrentTime()) {
if (!getCurrentTime().equals(other.getCurrentTime())) return false;
}
if (!getIdentifiedBoxesList().equals(other.getIdentifiedBoxesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasCurrentTime()) {
hash = (37 * hash) + CURRENT_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCurrentTime().hashCode();
}
if (getIdentifiedBoxesCount() > 0) {
hash = (37 * hash) + IDENTIFIED_BOXES_FIELD_NUMBER;
hash = (53 * hash) + getIdentifiedBoxesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult 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;
}
/**
*
*
*
* Prediction output format for Generic Object Detection.
*
*
* Protobuf type {@code google.cloud.visionai.v1.ObjectDetectionPredictionResult}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.visionai.v1.ObjectDetectionPredictionResult)
com.google.cloud.visionai.v1.ObjectDetectionPredictionResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.class,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Builder.class);
}
// Construct using com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCurrentTimeFieldBuilder();
getIdentifiedBoxesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
currentTime_ = null;
if (currentTimeBuilder_ != null) {
currentTimeBuilder_.dispose();
currentTimeBuilder_ = null;
}
if (identifiedBoxesBuilder_ == null) {
identifiedBoxes_ = java.util.Collections.emptyList();
} else {
identifiedBoxes_ = null;
identifiedBoxesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.visionai.v1.AnnotationsProto
.internal_static_google_cloud_visionai_v1_ObjectDetectionPredictionResult_descriptor;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult
getDefaultInstanceForType() {
return com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult build() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult buildPartial() {
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result =
new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result) {
if (identifiedBoxesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
identifiedBoxes_ = java.util.Collections.unmodifiableList(identifiedBoxes_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.identifiedBoxes_ = identifiedBoxes_;
} else {
result.identifiedBoxes_ = identifiedBoxesBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.currentTime_ =
currentTimeBuilder_ == null ? currentTime_ : currentTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.visionai.v1.ObjectDetectionPredictionResult) {
return mergeFrom((com.google.cloud.visionai.v1.ObjectDetectionPredictionResult) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.visionai.v1.ObjectDetectionPredictionResult other) {
if (other
== com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.getDefaultInstance())
return this;
if (other.hasCurrentTime()) {
mergeCurrentTime(other.getCurrentTime());
}
if (identifiedBoxesBuilder_ == null) {
if (!other.identifiedBoxes_.isEmpty()) {
if (identifiedBoxes_.isEmpty()) {
identifiedBoxes_ = other.identifiedBoxes_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.addAll(other.identifiedBoxes_);
}
onChanged();
}
} else {
if (!other.identifiedBoxes_.isEmpty()) {
if (identifiedBoxesBuilder_.isEmpty()) {
identifiedBoxesBuilder_.dispose();
identifiedBoxesBuilder_ = null;
identifiedBoxes_ = other.identifiedBoxes_;
bitField0_ = (bitField0_ & ~0x00000002);
identifiedBoxesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getIdentifiedBoxesFieldBuilder()
: null;
} else {
identifiedBoxesBuilder_.addAllMessages(other.identifiedBoxes_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(getCurrentTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox m =
input.readMessage(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.parser(),
extensionRegistry);
if (identifiedBoxesBuilder_ == null) {
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.add(m);
} else {
identifiedBoxesBuilder_.addMessage(m);
}
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.Timestamp currentTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
currentTimeBuilder_;
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*
* @return Whether the currentTime field is set.
*/
public boolean hasCurrentTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*
* @return The currentTime.
*/
public com.google.protobuf.Timestamp getCurrentTime() {
if (currentTimeBuilder_ == null) {
return currentTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: currentTime_;
} else {
return currentTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
public Builder setCurrentTime(com.google.protobuf.Timestamp value) {
if (currentTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentTime_ = value;
} else {
currentTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
public Builder setCurrentTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (currentTimeBuilder_ == null) {
currentTime_ = builderForValue.build();
} else {
currentTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
public Builder mergeCurrentTime(com.google.protobuf.Timestamp value) {
if (currentTimeBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& currentTime_ != null
&& currentTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCurrentTimeBuilder().mergeFrom(value);
} else {
currentTime_ = value;
}
} else {
currentTimeBuilder_.mergeFrom(value);
}
if (currentTime_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
public Builder clearCurrentTime() {
bitField0_ = (bitField0_ & ~0x00000001);
currentTime_ = null;
if (currentTimeBuilder_ != null) {
currentTimeBuilder_.dispose();
currentTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
public com.google.protobuf.Timestamp.Builder getCurrentTimeBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getCurrentTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
public com.google.protobuf.TimestampOrBuilder getCurrentTimeOrBuilder() {
if (currentTimeBuilder_ != null) {
return currentTimeBuilder_.getMessageOrBuilder();
} else {
return currentTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: currentTime_;
}
}
/**
*
*
*
* Current timestamp.
*
*
* .google.protobuf.Timestamp current_time = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCurrentTimeFieldBuilder() {
if (currentTimeBuilder_ == null) {
currentTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCurrentTime(), getParentForChildren(), isClean());
currentTime_ = null;
}
return currentTimeBuilder_;
}
private java.util.List<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox>
identifiedBoxes_ = java.util.Collections.emptyList();
private void ensureIdentifiedBoxesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
identifiedBoxes_ =
new java.util.ArrayList<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox>(
identifiedBoxes_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder>
identifiedBoxesBuilder_;
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public java.util.List<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox>
getIdentifiedBoxesList() {
if (identifiedBoxesBuilder_ == null) {
return java.util.Collections.unmodifiableList(identifiedBoxes_);
} else {
return identifiedBoxesBuilder_.getMessageList();
}
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public int getIdentifiedBoxesCount() {
if (identifiedBoxesBuilder_ == null) {
return identifiedBoxes_.size();
} else {
return identifiedBoxesBuilder_.getCount();
}
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
getIdentifiedBoxes(int index) {
if (identifiedBoxesBuilder_ == null) {
return identifiedBoxes_.get(index);
} else {
return identifiedBoxesBuilder_.getMessage(index);
}
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder setIdentifiedBoxes(
int index,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox value) {
if (identifiedBoxesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.set(index, value);
onChanged();
} else {
identifiedBoxesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder setIdentifiedBoxes(
int index,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
builderForValue) {
if (identifiedBoxesBuilder_ == null) {
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.set(index, builderForValue.build());
onChanged();
} else {
identifiedBoxesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder addIdentifiedBoxes(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox value) {
if (identifiedBoxesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.add(value);
onChanged();
} else {
identifiedBoxesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder addIdentifiedBoxes(
int index,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox value) {
if (identifiedBoxesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.add(index, value);
onChanged();
} else {
identifiedBoxesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder addIdentifiedBoxes(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
builderForValue) {
if (identifiedBoxesBuilder_ == null) {
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.add(builderForValue.build());
onChanged();
} else {
identifiedBoxesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder addIdentifiedBoxes(
int index,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
builderForValue) {
if (identifiedBoxesBuilder_ == null) {
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.add(index, builderForValue.build());
onChanged();
} else {
identifiedBoxesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder addAllIdentifiedBoxes(
java.lang.Iterable<
? extends
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox>
values) {
if (identifiedBoxesBuilder_ == null) {
ensureIdentifiedBoxesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identifiedBoxes_);
onChanged();
} else {
identifiedBoxesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder clearIdentifiedBoxes() {
if (identifiedBoxesBuilder_ == null) {
identifiedBoxes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
identifiedBoxesBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public Builder removeIdentifiedBoxes(int index) {
if (identifiedBoxesBuilder_ == null) {
ensureIdentifiedBoxesIsMutable();
identifiedBoxes_.remove(index);
onChanged();
} else {
identifiedBoxesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
getIdentifiedBoxesBuilder(int index) {
return getIdentifiedBoxesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder
getIdentifiedBoxesOrBuilder(int index) {
if (identifiedBoxesBuilder_ == null) {
return identifiedBoxes_.get(index);
} else {
return identifiedBoxesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public java.util.List<
? extends
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder>
getIdentifiedBoxesOrBuilderList() {
if (identifiedBoxesBuilder_ != null) {
return identifiedBoxesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(identifiedBoxes_);
}
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
addIdentifiedBoxesBuilder() {
return getIdentifiedBoxesFieldBuilder()
.addBuilder(
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.getDefaultInstance());
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder
addIdentifiedBoxesBuilder(int index) {
return getIdentifiedBoxesFieldBuilder()
.addBuilder(
index,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox
.getDefaultInstance());
}
/**
*
*
*
* A list of identified boxes.
*
*
*
* repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2;
*
*/
public java.util.List<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder>
getIdentifiedBoxesBuilderList() {
return getIdentifiedBoxesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBoxOrBuilder>
getIdentifiedBoxesFieldBuilder() {
if (identifiedBoxesBuilder_ == null) {
identifiedBoxesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.Builder,
com.google.cloud.visionai.v1.ObjectDetectionPredictionResult
.IdentifiedBoxOrBuilder>(
identifiedBoxes_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
identifiedBoxes_ = null;
}
return identifiedBoxesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult)
}
// @@protoc_insertion_point(class_scope:google.cloud.visionai.v1.ObjectDetectionPredictionResult)
private static final com.google.cloud.visionai.v1.ObjectDetectionPredictionResult
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.visionai.v1.ObjectDetectionPredictionResult();
}
public static com.google.cloud.visionai.v1.ObjectDetectionPredictionResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ObjectDetectionPredictionResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.visionai.v1.ObjectDetectionPredictionResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy