com.clarifai.grpc.api.RegionInfo Maven / Gradle / Ivy
The newest version!
// 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() {
keypointLocations_ = java.util.Collections.emptyList();
}
@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();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
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;
}
case 58: {
com.clarifai.grpc.api.Span.Builder subBuilder = null;
if (span_ != null) {
subBuilder = span_.toBuilder();
}
span_ = input.readMessage(com.clarifai.grpc.api.Span.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(span_);
span_ = subBuilder.buildPartial();
}
break;
}
case 66: {
com.clarifai.grpc.api.Token.Builder subBuilder = null;
if (token_ != null) {
subBuilder = token_.toBuilder();
}
token_ = input.readMessage(com.clarifai.grpc.api.Token.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(token_);
token_ = subBuilder.buildPartial();
}
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
keypointLocations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
keypointLocations_.add(
input.readMessage(com.clarifai.grpc.api.Point.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
keypointLocations_ = java.util.Collections.unmodifiableList(keypointLocations_);
}
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.
*/
@java.lang.Override
public boolean hasBoundingBox() {
return boundingBox_ != null;
}
/**
*
* Details of the region's rectangular bounding box.
*
*
* .clarifai.api.BoundingBox bounding_box = 1;
* @return The boundingBox.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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.
*/
@java.lang.Override
public boolean hasMask() {
return mask_ != null;
}
/**
*
* Details of the region's segmentation mask.
*
*
* .clarifai.api.Mask mask = 4;
* @return The mask.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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.
*/
@java.lang.Override
public boolean hasPolygon() {
return polygon_ != null;
}
/**
*
* A polygon of points.
*
*
* .clarifai.api.Polygon polygon = 5;
* @return The polygon.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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.
*/
@java.lang.Override
public boolean hasPoint() {
return point_ != null;
}
/**
*
* A landmark point location.
*
*
* .clarifai.api.Point point = 6;
* @return The point.
*/
@java.lang.Override
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;
*/
@java.lang.Override
public com.clarifai.grpc.api.PointOrBuilder getPointOrBuilder() {
return getPoint();
}
public static final int SPAN_FIELD_NUMBER = 7;
private com.clarifai.grpc.api.Span span_;
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
* @return Whether the span field is set.
*/
@java.lang.Override
public boolean hasSpan() {
return span_ != null;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
* @return The span.
*/
@java.lang.Override
public com.clarifai.grpc.api.Span getSpan() {
return span_ == null ? com.clarifai.grpc.api.Span.getDefaultInstance() : span_;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
@java.lang.Override
public com.clarifai.grpc.api.SpanOrBuilder getSpanOrBuilder() {
return getSpan();
}
public static final int TOKEN_FIELD_NUMBER = 8;
private com.clarifai.grpc.api.Token token_;
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
* @return Whether the token field is set.
*/
@java.lang.Override
public boolean hasToken() {
return token_ != null;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
* @return The token.
*/
@java.lang.Override
public com.clarifai.grpc.api.Token getToken() {
return token_ == null ? com.clarifai.grpc.api.Token.getDefaultInstance() : token_;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
@java.lang.Override
public com.clarifai.grpc.api.TokenOrBuilder getTokenOrBuilder() {
return getToken();
}
public static final int KEYPOINT_LOCATIONS_FIELD_NUMBER = 9;
private java.util.List keypointLocations_;
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
@java.lang.Override
public java.util.List getKeypointLocationsList() {
return keypointLocations_;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.PointOrBuilder>
getKeypointLocationsOrBuilderList() {
return keypointLocations_;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
@java.lang.Override
public int getKeypointLocationsCount() {
return keypointLocations_.size();
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
@java.lang.Override
public com.clarifai.grpc.api.Point getKeypointLocations(int index) {
return keypointLocations_.get(index);
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
@java.lang.Override
public com.clarifai.grpc.api.PointOrBuilder getKeypointLocationsOrBuilder(
int index) {
return keypointLocations_.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 (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());
}
if (span_ != null) {
output.writeMessage(7, getSpan());
}
if (token_ != null) {
output.writeMessage(8, getToken());
}
for (int i = 0; i < keypointLocations_.size(); i++) {
output.writeMessage(9, keypointLocations_.get(i));
}
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());
}
if (span_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getSpan());
}
if (token_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getToken());
}
for (int i = 0; i < keypointLocations_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, keypointLocations_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof 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 (hasSpan() != other.hasSpan()) return false;
if (hasSpan()) {
if (!getSpan()
.equals(other.getSpan())) return false;
}
if (hasToken() != other.hasToken()) return false;
if (hasToken()) {
if (!getToken()
.equals(other.getToken())) return false;
}
if (!getKeypointLocationsList()
.equals(other.getKeypointLocationsList())) 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();
}
if (hasSpan()) {
hash = (37 * hash) + SPAN_FIELD_NUMBER;
hash = (53 * hash) + getSpan().hashCode();
}
if (hasToken()) {
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
}
if (getKeypointLocationsCount() > 0) {
hash = (37 * hash) + KEYPOINT_LOCATIONS_FIELD_NUMBER;
hash = (53 * hash) + getKeypointLocationsList().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) {
getKeypointLocationsFieldBuilder();
}
}
@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;
}
if (spanBuilder_ == null) {
span_ = null;
} else {
span_ = null;
spanBuilder_ = null;
}
if (tokenBuilder_ == null) {
token_ = null;
} else {
token_ = null;
tokenBuilder_ = null;
}
if (keypointLocationsBuilder_ == null) {
keypointLocations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
keypointLocationsBuilder_.clear();
}
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);
int from_bitField0_ = bitField0_;
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();
}
if (spanBuilder_ == null) {
result.span_ = span_;
} else {
result.span_ = spanBuilder_.build();
}
if (tokenBuilder_ == null) {
result.token_ = token_;
} else {
result.token_ = tokenBuilder_.build();
}
if (keypointLocationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
keypointLocations_ = java.util.Collections.unmodifiableList(keypointLocations_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.keypointLocations_ = keypointLocations_;
} else {
result.keypointLocations_ = keypointLocationsBuilder_.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());
}
if (other.hasSpan()) {
mergeSpan(other.getSpan());
}
if (other.hasToken()) {
mergeToken(other.getToken());
}
if (keypointLocationsBuilder_ == null) {
if (!other.keypointLocations_.isEmpty()) {
if (keypointLocations_.isEmpty()) {
keypointLocations_ = other.keypointLocations_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureKeypointLocationsIsMutable();
keypointLocations_.addAll(other.keypointLocations_);
}
onChanged();
}
} else {
if (!other.keypointLocations_.isEmpty()) {
if (keypointLocationsBuilder_.isEmpty()) {
keypointLocationsBuilder_.dispose();
keypointLocationsBuilder_ = null;
keypointLocations_ = other.keypointLocations_;
bitField0_ = (bitField0_ & ~0x00000001);
keypointLocationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getKeypointLocationsFieldBuilder() : null;
} else {
keypointLocationsBuilder_.addAllMessages(other.keypointLocations_);
}
}
}
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 int bitField0_;
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_;
}
private com.clarifai.grpc.api.Span span_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Span, com.clarifai.grpc.api.Span.Builder, com.clarifai.grpc.api.SpanOrBuilder> spanBuilder_;
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
* @return Whether the span field is set.
*/
public boolean hasSpan() {
return spanBuilder_ != null || span_ != null;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
* @return The span.
*/
public com.clarifai.grpc.api.Span getSpan() {
if (spanBuilder_ == null) {
return span_ == null ? com.clarifai.grpc.api.Span.getDefaultInstance() : span_;
} else {
return spanBuilder_.getMessage();
}
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
public Builder setSpan(com.clarifai.grpc.api.Span value) {
if (spanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
span_ = value;
onChanged();
} else {
spanBuilder_.setMessage(value);
}
return this;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
public Builder setSpan(
com.clarifai.grpc.api.Span.Builder builderForValue) {
if (spanBuilder_ == null) {
span_ = builderForValue.build();
onChanged();
} else {
spanBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
public Builder mergeSpan(com.clarifai.grpc.api.Span value) {
if (spanBuilder_ == null) {
if (span_ != null) {
span_ =
com.clarifai.grpc.api.Span.newBuilder(span_).mergeFrom(value).buildPartial();
} else {
span_ = value;
}
onChanged();
} else {
spanBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
public Builder clearSpan() {
if (spanBuilder_ == null) {
span_ = null;
onChanged();
} else {
span_ = null;
spanBuilder_ = null;
}
return this;
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
public com.clarifai.grpc.api.Span.Builder getSpanBuilder() {
onChanged();
return getSpanFieldBuilder().getBuilder();
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
public com.clarifai.grpc.api.SpanOrBuilder getSpanOrBuilder() {
if (spanBuilder_ != null) {
return spanBuilder_.getMessageOrBuilder();
} else {
return span_ == null ?
com.clarifai.grpc.api.Span.getDefaultInstance() : span_;
}
}
/**
*
* Span char sequence for NLP.
*
*
* .clarifai.api.Span span = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Span, com.clarifai.grpc.api.Span.Builder, com.clarifai.grpc.api.SpanOrBuilder>
getSpanFieldBuilder() {
if (spanBuilder_ == null) {
spanBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Span, com.clarifai.grpc.api.Span.Builder, com.clarifai.grpc.api.SpanOrBuilder>(
getSpan(),
getParentForChildren(),
isClean());
span_ = null;
}
return spanBuilder_;
}
private com.clarifai.grpc.api.Token token_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Token, com.clarifai.grpc.api.Token.Builder, com.clarifai.grpc.api.TokenOrBuilder> tokenBuilder_;
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
* @return Whether the token field is set.
*/
public boolean hasToken() {
return tokenBuilder_ != null || token_ != null;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
* @return The token.
*/
public com.clarifai.grpc.api.Token getToken() {
if (tokenBuilder_ == null) {
return token_ == null ? com.clarifai.grpc.api.Token.getDefaultInstance() : token_;
} else {
return tokenBuilder_.getMessage();
}
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
public Builder setToken(com.clarifai.grpc.api.Token value) {
if (tokenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
token_ = value;
onChanged();
} else {
tokenBuilder_.setMessage(value);
}
return this;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
public Builder setToken(
com.clarifai.grpc.api.Token.Builder builderForValue) {
if (tokenBuilder_ == null) {
token_ = builderForValue.build();
onChanged();
} else {
tokenBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
public Builder mergeToken(com.clarifai.grpc.api.Token value) {
if (tokenBuilder_ == null) {
if (token_ != null) {
token_ =
com.clarifai.grpc.api.Token.newBuilder(token_).mergeFrom(value).buildPartial();
} else {
token_ = value;
}
onChanged();
} else {
tokenBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
public Builder clearToken() {
if (tokenBuilder_ == null) {
token_ = null;
onChanged();
} else {
token_ = null;
tokenBuilder_ = null;
}
return this;
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
public com.clarifai.grpc.api.Token.Builder getTokenBuilder() {
onChanged();
return getTokenFieldBuilder().getBuilder();
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
public com.clarifai.grpc.api.TokenOrBuilder getTokenOrBuilder() {
if (tokenBuilder_ != null) {
return tokenBuilder_.getMessageOrBuilder();
} else {
return token_ == null ?
com.clarifai.grpc.api.Token.getDefaultInstance() : token_;
}
}
/**
*
* Token char sequence for NLP.
*
*
* .clarifai.api.Token token = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Token, com.clarifai.grpc.api.Token.Builder, com.clarifai.grpc.api.TokenOrBuilder>
getTokenFieldBuilder() {
if (tokenBuilder_ == null) {
tokenBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Token, com.clarifai.grpc.api.Token.Builder, com.clarifai.grpc.api.TokenOrBuilder>(
getToken(),
getParentForChildren(),
isClean());
token_ = null;
}
return tokenBuilder_;
}
private java.util.List keypointLocations_ =
java.util.Collections.emptyList();
private void ensureKeypointLocationsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
keypointLocations_ = new java.util.ArrayList(keypointLocations_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Point, com.clarifai.grpc.api.Point.Builder, com.clarifai.grpc.api.PointOrBuilder> keypointLocationsBuilder_;
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public java.util.List getKeypointLocationsList() {
if (keypointLocationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(keypointLocations_);
} else {
return keypointLocationsBuilder_.getMessageList();
}
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public int getKeypointLocationsCount() {
if (keypointLocationsBuilder_ == null) {
return keypointLocations_.size();
} else {
return keypointLocationsBuilder_.getCount();
}
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public com.clarifai.grpc.api.Point getKeypointLocations(int index) {
if (keypointLocationsBuilder_ == null) {
return keypointLocations_.get(index);
} else {
return keypointLocationsBuilder_.getMessage(index);
}
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder setKeypointLocations(
int index, com.clarifai.grpc.api.Point value) {
if (keypointLocationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureKeypointLocationsIsMutable();
keypointLocations_.set(index, value);
onChanged();
} else {
keypointLocationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder setKeypointLocations(
int index, com.clarifai.grpc.api.Point.Builder builderForValue) {
if (keypointLocationsBuilder_ == null) {
ensureKeypointLocationsIsMutable();
keypointLocations_.set(index, builderForValue.build());
onChanged();
} else {
keypointLocationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder addKeypointLocations(com.clarifai.grpc.api.Point value) {
if (keypointLocationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureKeypointLocationsIsMutable();
keypointLocations_.add(value);
onChanged();
} else {
keypointLocationsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder addKeypointLocations(
int index, com.clarifai.grpc.api.Point value) {
if (keypointLocationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureKeypointLocationsIsMutable();
keypointLocations_.add(index, value);
onChanged();
} else {
keypointLocationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder addKeypointLocations(
com.clarifai.grpc.api.Point.Builder builderForValue) {
if (keypointLocationsBuilder_ == null) {
ensureKeypointLocationsIsMutable();
keypointLocations_.add(builderForValue.build());
onChanged();
} else {
keypointLocationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder addKeypointLocations(
int index, com.clarifai.grpc.api.Point.Builder builderForValue) {
if (keypointLocationsBuilder_ == null) {
ensureKeypointLocationsIsMutable();
keypointLocations_.add(index, builderForValue.build());
onChanged();
} else {
keypointLocationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder addAllKeypointLocations(
java.lang.Iterable extends com.clarifai.grpc.api.Point> values) {
if (keypointLocationsBuilder_ == null) {
ensureKeypointLocationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, keypointLocations_);
onChanged();
} else {
keypointLocationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder clearKeypointLocations() {
if (keypointLocationsBuilder_ == null) {
keypointLocations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
keypointLocationsBuilder_.clear();
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public Builder removeKeypointLocations(int index) {
if (keypointLocationsBuilder_ == null) {
ensureKeypointLocationsIsMutable();
keypointLocations_.remove(index);
onChanged();
} else {
keypointLocationsBuilder_.remove(index);
}
return this;
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public com.clarifai.grpc.api.Point.Builder getKeypointLocationsBuilder(
int index) {
return getKeypointLocationsFieldBuilder().getBuilder(index);
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public com.clarifai.grpc.api.PointOrBuilder getKeypointLocationsOrBuilder(
int index) {
if (keypointLocationsBuilder_ == null) {
return keypointLocations_.get(index); } else {
return keypointLocationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public java.util.List extends com.clarifai.grpc.api.PointOrBuilder>
getKeypointLocationsOrBuilderList() {
if (keypointLocationsBuilder_ != null) {
return keypointLocationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(keypointLocations_);
}
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public com.clarifai.grpc.api.Point.Builder addKeypointLocationsBuilder() {
return getKeypointLocationsFieldBuilder().addBuilder(
com.clarifai.grpc.api.Point.getDefaultInstance());
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public com.clarifai.grpc.api.Point.Builder addKeypointLocationsBuilder(
int index) {
return getKeypointLocationsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.Point.getDefaultInstance());
}
/**
*
* The locations of detected keypoints, which are to be used in conjunction with the detected concept's skeleton to connect the keypoint locations.
* These will be in the same order as the respective keypoint_names inside the concept.
*
*
* repeated .clarifai.api.Point keypoint_locations = 9;
*/
public java.util.List
getKeypointLocationsBuilderList() {
return getKeypointLocationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Point, com.clarifai.grpc.api.Point.Builder, com.clarifai.grpc.api.PointOrBuilder>
getKeypointLocationsFieldBuilder() {
if (keypointLocationsBuilder_ == null) {
keypointLocationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Point, com.clarifai.grpc.api.Point.Builder, com.clarifai.grpc.api.PointOrBuilder>(
keypointLocations_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
keypointLocations_ = null;
}
return keypointLocationsBuilder_;
}
@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;
}
}