
com.clarifai.grpc.api.RegionInfo Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* The information of the location of the Region.
*
*
* Protobuf type {@code clarifai.api.RegionInfo}
*/
public final class RegionInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.RegionInfo)
RegionInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use RegionInfo.newBuilder() to construct.
private RegionInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RegionInfo() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RegionInfo();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RegionInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.clarifai.grpc.api.BoundingBox.Builder subBuilder = null;
if (boundingBox_ != null) {
subBuilder = boundingBox_.toBuilder();
}
boundingBox_ = input.readMessage(com.clarifai.grpc.api.BoundingBox.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(boundingBox_);
boundingBox_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.clarifai.grpc.api.Mask.Builder subBuilder = null;
if (mask_ != null) {
subBuilder = mask_.toBuilder();
}
mask_ = input.readMessage(com.clarifai.grpc.api.Mask.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(mask_);
mask_ = subBuilder.buildPartial();
}
break;
}
case 42: {
com.clarifai.grpc.api.Polygon.Builder subBuilder = null;
if (polygon_ != null) {
subBuilder = polygon_.toBuilder();
}
polygon_ = input.readMessage(com.clarifai.grpc.api.Polygon.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(polygon_);
polygon_ = subBuilder.buildPartial();
}
break;
}
case 50: {
com.clarifai.grpc.api.Point.Builder subBuilder = null;
if (point_ != null) {
subBuilder = point_.toBuilder();
}
point_ = input.readMessage(com.clarifai.grpc.api.Point.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(point_);
point_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_RegionInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_RegionInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.RegionInfo.class, com.clarifai.grpc.api.RegionInfo.Builder.class);
}
public static final int BOUNDING_BOX_FIELD_NUMBER = 1;
private com.clarifai.grpc.api.BoundingBox boundingBox_;
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
public boolean hasBoundingBox() {
return boundingBox_ != null;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
* @return The boundingBox.
*/
public com.clarifai.grpc.api.BoundingBox getBoundingBox() {
return boundingBox_ == null ? com.clarifai.grpc.api.BoundingBox.getDefaultInstance() : boundingBox_;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public com.clarifai.grpc.api.BoundingBoxOrBuilder getBoundingBoxOrBuilder() {
return getBoundingBox();
}
public static final int MASK_FIELD_NUMBER = 4;
private com.clarifai.grpc.api.Mask mask_;
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
* @return Whether the mask field is set.
*/
public boolean hasMask() {
return mask_ != null;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
* @return The mask.
*/
public com.clarifai.grpc.api.Mask getMask() {
return mask_ == null ? com.clarifai.grpc.api.Mask.getDefaultInstance() : mask_;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public com.clarifai.grpc.api.MaskOrBuilder getMaskOrBuilder() {
return getMask();
}
public static final int POLYGON_FIELD_NUMBER = 5;
private com.clarifai.grpc.api.Polygon polygon_;
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
* @return Whether the polygon field is set.
*/
public boolean hasPolygon() {
return polygon_ != null;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
* @return The polygon.
*/
public com.clarifai.grpc.api.Polygon getPolygon() {
return polygon_ == null ? com.clarifai.grpc.api.Polygon.getDefaultInstance() : polygon_;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public com.clarifai.grpc.api.PolygonOrBuilder getPolygonOrBuilder() {
return getPolygon();
}
public static final int POINT_FIELD_NUMBER = 6;
private com.clarifai.grpc.api.Point point_;
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
* @return Whether the point field is set.
*/
public boolean hasPoint() {
return point_ != null;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
* @return The point.
*/
public com.clarifai.grpc.api.Point getPoint() {
return point_ == null ? com.clarifai.grpc.api.Point.getDefaultInstance() : point_;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public com.clarifai.grpc.api.PointOrBuilder getPointOrBuilder() {
return getPoint();
}
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 (boundingBox_ != null) {
output.writeMessage(1, getBoundingBox());
}
if (mask_ != null) {
output.writeMessage(4, getMask());
}
if (polygon_ != null) {
output.writeMessage(5, getPolygon());
}
if (point_ != null) {
output.writeMessage(6, getPoint());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (boundingBox_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getBoundingBox());
}
if (mask_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMask());
}
if (polygon_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getPolygon());
}
if (point_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getPoint());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.clarifai.grpc.api.RegionInfo)) {
return super.equals(obj);
}
com.clarifai.grpc.api.RegionInfo other = (com.clarifai.grpc.api.RegionInfo) obj;
if (hasBoundingBox() != other.hasBoundingBox()) return false;
if (hasBoundingBox()) {
if (!getBoundingBox()
.equals(other.getBoundingBox())) return false;
}
if (hasMask() != other.hasMask()) return false;
if (hasMask()) {
if (!getMask()
.equals(other.getMask())) return false;
}
if (hasPolygon() != other.hasPolygon()) return false;
if (hasPolygon()) {
if (!getPolygon()
.equals(other.getPolygon())) return false;
}
if (hasPoint() != other.hasPoint()) return false;
if (hasPoint()) {
if (!getPoint()
.equals(other.getPoint())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasBoundingBox()) {
hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER;
hash = (53 * hash) + getBoundingBox().hashCode();
}
if (hasMask()) {
hash = (37 * hash) + MASK_FIELD_NUMBER;
hash = (53 * hash) + getMask().hashCode();
}
if (hasPolygon()) {
hash = (37 * hash) + POLYGON_FIELD_NUMBER;
hash = (53 * hash) + getPolygon().hashCode();
}
if (hasPoint()) {
hash = (37 * hash) + POINT_FIELD_NUMBER;
hash = (53 * hash) + getPoint().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.RegionInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.RegionInfo 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.clarifai.grpc.api.RegionInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.RegionInfo 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.clarifai.grpc.api.RegionInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.RegionInfo 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.clarifai.grpc.api.RegionInfo 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 information of the location of the Region.
*
*
* Protobuf type {@code clarifai.api.RegionInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.RegionInfo)
com.clarifai.grpc.api.RegionInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_RegionInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_RegionInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.RegionInfo.class, com.clarifai.grpc.api.RegionInfo.Builder.class);
}
// Construct using com.clarifai.grpc.api.RegionInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
if (maskBuilder_ == null) {
mask_ = null;
} else {
mask_ = null;
maskBuilder_ = null;
}
if (polygonBuilder_ == null) {
polygon_ = null;
} else {
polygon_ = null;
polygonBuilder_ = null;
}
if (pointBuilder_ == null) {
point_ = null;
} else {
point_ = null;
pointBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_RegionInfo_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.RegionInfo getDefaultInstanceForType() {
return com.clarifai.grpc.api.RegionInfo.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.RegionInfo build() {
com.clarifai.grpc.api.RegionInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.RegionInfo buildPartial() {
com.clarifai.grpc.api.RegionInfo result = new com.clarifai.grpc.api.RegionInfo(this);
if (boundingBoxBuilder_ == null) {
result.boundingBox_ = boundingBox_;
} else {
result.boundingBox_ = boundingBoxBuilder_.build();
}
if (maskBuilder_ == null) {
result.mask_ = mask_;
} else {
result.mask_ = maskBuilder_.build();
}
if (polygonBuilder_ == null) {
result.polygon_ = polygon_;
} else {
result.polygon_ = polygonBuilder_.build();
}
if (pointBuilder_ == null) {
result.point_ = point_;
} else {
result.point_ = pointBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.clarifai.grpc.api.RegionInfo) {
return mergeFrom((com.clarifai.grpc.api.RegionInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.RegionInfo other) {
if (other == com.clarifai.grpc.api.RegionInfo.getDefaultInstance()) return this;
if (other.hasBoundingBox()) {
mergeBoundingBox(other.getBoundingBox());
}
if (other.hasMask()) {
mergeMask(other.getMask());
}
if (other.hasPolygon()) {
mergePolygon(other.getPolygon());
}
if (other.hasPoint()) {
mergePoint(other.getPoint());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.clarifai.grpc.api.RegionInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.RegionInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.clarifai.grpc.api.BoundingBox boundingBox_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.BoundingBox, com.clarifai.grpc.api.BoundingBox.Builder, com.clarifai.grpc.api.BoundingBoxOrBuilder> boundingBoxBuilder_;
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
public boolean hasBoundingBox() {
return boundingBoxBuilder_ != null || boundingBox_ != null;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
* @return The boundingBox.
*/
public com.clarifai.grpc.api.BoundingBox getBoundingBox() {
if (boundingBoxBuilder_ == null) {
return boundingBox_ == null ? com.clarifai.grpc.api.BoundingBox.getDefaultInstance() : boundingBox_;
} else {
return boundingBoxBuilder_.getMessage();
}
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public Builder setBoundingBox(com.clarifai.grpc.api.BoundingBox value) {
if (boundingBoxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundingBox_ = value;
onChanged();
} else {
boundingBoxBuilder_.setMessage(value);
}
return this;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public Builder setBoundingBox(
com.clarifai.grpc.api.BoundingBox.Builder builderForValue) {
if (boundingBoxBuilder_ == null) {
boundingBox_ = builderForValue.build();
onChanged();
} else {
boundingBoxBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public Builder mergeBoundingBox(com.clarifai.grpc.api.BoundingBox value) {
if (boundingBoxBuilder_ == null) {
if (boundingBox_ != null) {
boundingBox_ =
com.clarifai.grpc.api.BoundingBox.newBuilder(boundingBox_).mergeFrom(value).buildPartial();
} else {
boundingBox_ = value;
}
onChanged();
} else {
boundingBoxBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public Builder clearBoundingBox() {
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
onChanged();
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
return this;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public com.clarifai.grpc.api.BoundingBox.Builder getBoundingBoxBuilder() {
onChanged();
return getBoundingBoxFieldBuilder().getBuilder();
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
public com.clarifai.grpc.api.BoundingBoxOrBuilder getBoundingBoxOrBuilder() {
if (boundingBoxBuilder_ != null) {
return boundingBoxBuilder_.getMessageOrBuilder();
} else {
return boundingBox_ == null ?
com.clarifai.grpc.api.BoundingBox.getDefaultInstance() : boundingBox_;
}
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.BoundingBox, com.clarifai.grpc.api.BoundingBox.Builder, com.clarifai.grpc.api.BoundingBoxOrBuilder>
getBoundingBoxFieldBuilder() {
if (boundingBoxBuilder_ == null) {
boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.BoundingBox, com.clarifai.grpc.api.BoundingBox.Builder, com.clarifai.grpc.api.BoundingBoxOrBuilder>(
getBoundingBox(),
getParentForChildren(),
isClean());
boundingBox_ = null;
}
return boundingBoxBuilder_;
}
private com.clarifai.grpc.api.Mask mask_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Mask, com.clarifai.grpc.api.Mask.Builder, com.clarifai.grpc.api.MaskOrBuilder> maskBuilder_;
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
* @return Whether the mask field is set.
*/
public boolean hasMask() {
return maskBuilder_ != null || mask_ != null;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
* @return The mask.
*/
public com.clarifai.grpc.api.Mask getMask() {
if (maskBuilder_ == null) {
return mask_ == null ? com.clarifai.grpc.api.Mask.getDefaultInstance() : mask_;
} else {
return maskBuilder_.getMessage();
}
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public Builder setMask(com.clarifai.grpc.api.Mask value) {
if (maskBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mask_ = value;
onChanged();
} else {
maskBuilder_.setMessage(value);
}
return this;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public Builder setMask(
com.clarifai.grpc.api.Mask.Builder builderForValue) {
if (maskBuilder_ == null) {
mask_ = builderForValue.build();
onChanged();
} else {
maskBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public Builder mergeMask(com.clarifai.grpc.api.Mask value) {
if (maskBuilder_ == null) {
if (mask_ != null) {
mask_ =
com.clarifai.grpc.api.Mask.newBuilder(mask_).mergeFrom(value).buildPartial();
} else {
mask_ = value;
}
onChanged();
} else {
maskBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public Builder clearMask() {
if (maskBuilder_ == null) {
mask_ = null;
onChanged();
} else {
mask_ = null;
maskBuilder_ = null;
}
return this;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public com.clarifai.grpc.api.Mask.Builder getMaskBuilder() {
onChanged();
return getMaskFieldBuilder().getBuilder();
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
public com.clarifai.grpc.api.MaskOrBuilder getMaskOrBuilder() {
if (maskBuilder_ != null) {
return maskBuilder_.getMessageOrBuilder();
} else {
return mask_ == null ?
com.clarifai.grpc.api.Mask.getDefaultInstance() : mask_;
}
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Mask, com.clarifai.grpc.api.Mask.Builder, com.clarifai.grpc.api.MaskOrBuilder>
getMaskFieldBuilder() {
if (maskBuilder_ == null) {
maskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Mask, com.clarifai.grpc.api.Mask.Builder, com.clarifai.grpc.api.MaskOrBuilder>(
getMask(),
getParentForChildren(),
isClean());
mask_ = null;
}
return maskBuilder_;
}
private com.clarifai.grpc.api.Polygon polygon_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Polygon, com.clarifai.grpc.api.Polygon.Builder, com.clarifai.grpc.api.PolygonOrBuilder> polygonBuilder_;
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
* @return Whether the polygon field is set.
*/
public boolean hasPolygon() {
return polygonBuilder_ != null || polygon_ != null;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
* @return The polygon.
*/
public com.clarifai.grpc.api.Polygon getPolygon() {
if (polygonBuilder_ == null) {
return polygon_ == null ? com.clarifai.grpc.api.Polygon.getDefaultInstance() : polygon_;
} else {
return polygonBuilder_.getMessage();
}
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public Builder setPolygon(com.clarifai.grpc.api.Polygon value) {
if (polygonBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
polygon_ = value;
onChanged();
} else {
polygonBuilder_.setMessage(value);
}
return this;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public Builder setPolygon(
com.clarifai.grpc.api.Polygon.Builder builderForValue) {
if (polygonBuilder_ == null) {
polygon_ = builderForValue.build();
onChanged();
} else {
polygonBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public Builder mergePolygon(com.clarifai.grpc.api.Polygon value) {
if (polygonBuilder_ == null) {
if (polygon_ != null) {
polygon_ =
com.clarifai.grpc.api.Polygon.newBuilder(polygon_).mergeFrom(value).buildPartial();
} else {
polygon_ = value;
}
onChanged();
} else {
polygonBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public Builder clearPolygon() {
if (polygonBuilder_ == null) {
polygon_ = null;
onChanged();
} else {
polygon_ = null;
polygonBuilder_ = null;
}
return this;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public com.clarifai.grpc.api.Polygon.Builder getPolygonBuilder() {
onChanged();
return getPolygonFieldBuilder().getBuilder();
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
public com.clarifai.grpc.api.PolygonOrBuilder getPolygonOrBuilder() {
if (polygonBuilder_ != null) {
return polygonBuilder_.getMessageOrBuilder();
} else {
return polygon_ == null ?
com.clarifai.grpc.api.Polygon.getDefaultInstance() : polygon_;
}
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Polygon, com.clarifai.grpc.api.Polygon.Builder, com.clarifai.grpc.api.PolygonOrBuilder>
getPolygonFieldBuilder() {
if (polygonBuilder_ == null) {
polygonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Polygon, com.clarifai.grpc.api.Polygon.Builder, com.clarifai.grpc.api.PolygonOrBuilder>(
getPolygon(),
getParentForChildren(),
isClean());
polygon_ = null;
}
return polygonBuilder_;
}
private com.clarifai.grpc.api.Point point_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Point, com.clarifai.grpc.api.Point.Builder, com.clarifai.grpc.api.PointOrBuilder> pointBuilder_;
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
* @return Whether the point field is set.
*/
public boolean hasPoint() {
return pointBuilder_ != null || point_ != null;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
* @return The point.
*/
public com.clarifai.grpc.api.Point getPoint() {
if (pointBuilder_ == null) {
return point_ == null ? com.clarifai.grpc.api.Point.getDefaultInstance() : point_;
} else {
return pointBuilder_.getMessage();
}
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public Builder setPoint(com.clarifai.grpc.api.Point value) {
if (pointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
point_ = value;
onChanged();
} else {
pointBuilder_.setMessage(value);
}
return this;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public Builder setPoint(
com.clarifai.grpc.api.Point.Builder builderForValue) {
if (pointBuilder_ == null) {
point_ = builderForValue.build();
onChanged();
} else {
pointBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public Builder mergePoint(com.clarifai.grpc.api.Point value) {
if (pointBuilder_ == null) {
if (point_ != null) {
point_ =
com.clarifai.grpc.api.Point.newBuilder(point_).mergeFrom(value).buildPartial();
} else {
point_ = value;
}
onChanged();
} else {
pointBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public Builder clearPoint() {
if (pointBuilder_ == null) {
point_ = null;
onChanged();
} else {
point_ = null;
pointBuilder_ = null;
}
return this;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public com.clarifai.grpc.api.Point.Builder getPointBuilder() {
onChanged();
return getPointFieldBuilder().getBuilder();
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
public com.clarifai.grpc.api.PointOrBuilder getPointOrBuilder() {
if (pointBuilder_ != null) {
return pointBuilder_.getMessageOrBuilder();
} else {
return point_ == null ?
com.clarifai.grpc.api.Point.getDefaultInstance() : point_;
}
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Point, com.clarifai.grpc.api.Point.Builder, com.clarifai.grpc.api.PointOrBuilder>
getPointFieldBuilder() {
if (pointBuilder_ == null) {
pointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Point, com.clarifai.grpc.api.Point.Builder, com.clarifai.grpc.api.PointOrBuilder>(
getPoint(),
getParentForChildren(),
isClean());
point_ = null;
}
return pointBuilder_;
}
@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:clarifai.api.RegionInfo)
}
// @@protoc_insertion_point(class_scope:clarifai.api.RegionInfo)
private static final com.clarifai.grpc.api.RegionInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.RegionInfo();
}
public static com.clarifai.grpc.api.RegionInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RegionInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RegionInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.clarifai.grpc.api.RegionInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy