All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarifai.grpc.api.Image 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;

/**
 * 
 * Image
 * 
* * Protobuf type {@code clarifai.api.Image} */ public final class Image extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.Image) ImageOrBuilder { private static final long serialVersionUID = 0L; // Use Image.newBuilder() to construct. private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Image() { url_ = ""; base64_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Image(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Image( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); url_ = s; break; } case 18: { base64_ = input.readBytes(); break; } case 32: { allowDuplicateUrl_ = input.readBool(); break; } case 42: { com.clarifai.grpc.api.HostedURL.Builder subBuilder = null; if (hosted_ != null) { subBuilder = hosted_.toBuilder(); } hosted_ = input.readMessage(com.clarifai.grpc.api.HostedURL.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(hosted_); hosted_ = subBuilder.buildPartial(); } break; } case 50: { com.clarifai.grpc.api.ImageInfo.Builder subBuilder = null; if (imageInfo_ != null) { subBuilder = imageInfo_.toBuilder(); } imageInfo_ = input.readMessage(com.clarifai.grpc.api.ImageInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(imageInfo_); imageInfo_ = subBuilder.buildPartial(); } 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Image_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Image.class, com.clarifai.grpc.api.Image.Builder.class); } public static final int URL_FIELD_NUMBER = 1; private volatile java.lang.Object url_; /** *
   * This is a URL to a publicly accessible image file. The platform will download this file server
   * side and then process.
   * 
* * string url = 1; * @return The url. */ @java.lang.Override public java.lang.String getUrl() { java.lang.Object ref = url_; 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(); url_ = s; return s; } } /** *
   * This is a URL to a publicly accessible image file. The platform will download this file server
   * side and then process.
   * 
* * string url = 1; * @return The bytes for url. */ @java.lang.Override public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int BASE64_FIELD_NUMBER = 2; private com.google.protobuf.ByteString base64_; /** *
   * The base64 field is using image file bytes directly in the request.
   * NOTE: if you're sending a json request, then this MUST be base64 encoded before sending (hence
   * the name here).
   * When using our grpc clients, you DO NOT need to base64 encode
   * it yourself since the clients know how to do this for you automatically and will avoid the
   * base64 encoding if they send a binary request.
   * 
* * bytes base64 = 2; * @return The base64. */ @java.lang.Override public com.google.protobuf.ByteString getBase64() { return base64_; } public static final int ALLOW_DUPLICATE_URL_FIELD_NUMBER = 4; private boolean allowDuplicateUrl_; /** * bool allow_duplicate_url = 4; * @return The allowDuplicateUrl. */ @java.lang.Override public boolean getAllowDuplicateUrl() { return allowDuplicateUrl_; } public static final int HOSTED_FIELD_NUMBER = 5; private com.clarifai.grpc.api.HostedURL hosted_; /** *
   * The hosted field lists images in different sizes hosted in Clarifai storage.
   * 
* * .clarifai.api.HostedURL hosted = 5; * @return Whether the hosted field is set. */ @java.lang.Override public boolean hasHosted() { return hosted_ != null; } /** *
   * The hosted field lists images in different sizes hosted in Clarifai storage.
   * 
* * .clarifai.api.HostedURL hosted = 5; * @return The hosted. */ @java.lang.Override public com.clarifai.grpc.api.HostedURL getHosted() { return hosted_ == null ? com.clarifai.grpc.api.HostedURL.getDefaultInstance() : hosted_; } /** *
   * The hosted field lists images in different sizes hosted in Clarifai storage.
   * 
* * .clarifai.api.HostedURL hosted = 5; */ @java.lang.Override public com.clarifai.grpc.api.HostedURLOrBuilder getHostedOrBuilder() { return getHosted(); } public static final int IMAGE_INFO_FIELD_NUMBER = 6; private com.clarifai.grpc.api.ImageInfo imageInfo_; /** *
   * image info
   * 
* * .clarifai.api.ImageInfo image_info = 6; * @return Whether the imageInfo field is set. */ @java.lang.Override public boolean hasImageInfo() { return imageInfo_ != null; } /** *
   * image info
   * 
* * .clarifai.api.ImageInfo image_info = 6; * @return The imageInfo. */ @java.lang.Override public com.clarifai.grpc.api.ImageInfo getImageInfo() { return imageInfo_ == null ? com.clarifai.grpc.api.ImageInfo.getDefaultInstance() : imageInfo_; } /** *
   * image info
   * 
* * .clarifai.api.ImageInfo image_info = 6; */ @java.lang.Override public com.clarifai.grpc.api.ImageInfoOrBuilder getImageInfoOrBuilder() { return getImageInfo(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); } if (!base64_.isEmpty()) { output.writeBytes(2, base64_); } if (allowDuplicateUrl_ != false) { output.writeBool(4, allowDuplicateUrl_); } if (hosted_ != null) { output.writeMessage(5, getHosted()); } if (imageInfo_ != null) { output.writeMessage(6, getImageInfo()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); } if (!base64_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, base64_); } if (allowDuplicateUrl_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, allowDuplicateUrl_); } if (hosted_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getHosted()); } if (imageInfo_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getImageInfo()); } 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.Image)) { return super.equals(obj); } com.clarifai.grpc.api.Image other = (com.clarifai.grpc.api.Image) obj; if (!getUrl() .equals(other.getUrl())) return false; if (!getBase64() .equals(other.getBase64())) return false; if (getAllowDuplicateUrl() != other.getAllowDuplicateUrl()) return false; if (hasHosted() != other.hasHosted()) return false; if (hasHosted()) { if (!getHosted() .equals(other.getHosted())) return false; } if (hasImageInfo() != other.hasImageInfo()) return false; if (hasImageInfo()) { if (!getImageInfo() .equals(other.getImageInfo())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); hash = (37 * hash) + BASE64_FIELD_NUMBER; hash = (53 * hash) + getBase64().hashCode(); hash = (37 * hash) + ALLOW_DUPLICATE_URL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getAllowDuplicateUrl()); if (hasHosted()) { hash = (37 * hash) + HOSTED_FIELD_NUMBER; hash = (53 * hash) + getHosted().hashCode(); } if (hasImageInfo()) { hash = (37 * hash) + IMAGE_INFO_FIELD_NUMBER; hash = (53 * hash) + getImageInfo().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.Image parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Image 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.Image parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Image 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.Image parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.Image parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.Image parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Image 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.Image parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Image 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.Image parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.Image 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.Image prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Image
   * 
* * Protobuf type {@code clarifai.api.Image} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.Image) com.clarifai.grpc.api.ImageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Image_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.Image.class, com.clarifai.grpc.api.Image.Builder.class); } // Construct using com.clarifai.grpc.api.Image.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(); url_ = ""; base64_ = com.google.protobuf.ByteString.EMPTY; allowDuplicateUrl_ = false; if (hostedBuilder_ == null) { hosted_ = null; } else { hosted_ = null; hostedBuilder_ = null; } if (imageInfoBuilder_ == null) { imageInfo_ = null; } else { imageInfo_ = null; imageInfoBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Image_descriptor; } @java.lang.Override public com.clarifai.grpc.api.Image getDefaultInstanceForType() { return com.clarifai.grpc.api.Image.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.Image build() { com.clarifai.grpc.api.Image result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.Image buildPartial() { com.clarifai.grpc.api.Image result = new com.clarifai.grpc.api.Image(this); result.url_ = url_; result.base64_ = base64_; result.allowDuplicateUrl_ = allowDuplicateUrl_; if (hostedBuilder_ == null) { result.hosted_ = hosted_; } else { result.hosted_ = hostedBuilder_.build(); } if (imageInfoBuilder_ == null) { result.imageInfo_ = imageInfo_; } else { result.imageInfo_ = imageInfoBuilder_.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.Image) { return mergeFrom((com.clarifai.grpc.api.Image)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.Image other) { if (other == com.clarifai.grpc.api.Image.getDefaultInstance()) return this; if (!other.getUrl().isEmpty()) { url_ = other.url_; onChanged(); } if (other.getBase64() != com.google.protobuf.ByteString.EMPTY) { setBase64(other.getBase64()); } if (other.getAllowDuplicateUrl() != false) { setAllowDuplicateUrl(other.getAllowDuplicateUrl()); } if (other.hasHosted()) { mergeHosted(other.getHosted()); } if (other.hasImageInfo()) { mergeImageInfo(other.getImageInfo()); } 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.Image parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.Image) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object url_ = ""; /** *
     * This is a URL to a publicly accessible image file. The platform will download this file server
     * side and then process.
     * 
* * string url = 1; * @return The url. */ public java.lang.String getUrl() { java.lang.Object ref = url_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); url_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * This is a URL to a publicly accessible image file. The platform will download this file server
     * side and then process.
     * 
* * string url = 1; * @return The bytes for url. */ public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * This is a URL to a publicly accessible image file. The platform will download this file server
     * side and then process.
     * 
* * string url = 1; * @param value The url to set. * @return This builder for chaining. */ public Builder setUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } url_ = value; onChanged(); return this; } /** *
     * This is a URL to a publicly accessible image file. The platform will download this file server
     * side and then process.
     * 
* * string url = 1; * @return This builder for chaining. */ public Builder clearUrl() { url_ = getDefaultInstance().getUrl(); onChanged(); return this; } /** *
     * This is a URL to a publicly accessible image file. The platform will download this file server
     * side and then process.
     * 
* * string url = 1; * @param value The bytes for url to set. * @return This builder for chaining. */ public Builder setUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); url_ = value; onChanged(); return this; } private com.google.protobuf.ByteString base64_ = com.google.protobuf.ByteString.EMPTY; /** *
     * The base64 field is using image file bytes directly in the request.
     * NOTE: if you're sending a json request, then this MUST be base64 encoded before sending (hence
     * the name here).
     * When using our grpc clients, you DO NOT need to base64 encode
     * it yourself since the clients know how to do this for you automatically and will avoid the
     * base64 encoding if they send a binary request.
     * 
* * bytes base64 = 2; * @return The base64. */ @java.lang.Override public com.google.protobuf.ByteString getBase64() { return base64_; } /** *
     * The base64 field is using image file bytes directly in the request.
     * NOTE: if you're sending a json request, then this MUST be base64 encoded before sending (hence
     * the name here).
     * When using our grpc clients, you DO NOT need to base64 encode
     * it yourself since the clients know how to do this for you automatically and will avoid the
     * base64 encoding if they send a binary request.
     * 
* * bytes base64 = 2; * @param value The base64 to set. * @return This builder for chaining. */ public Builder setBase64(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } base64_ = value; onChanged(); return this; } /** *
     * The base64 field is using image file bytes directly in the request.
     * NOTE: if you're sending a json request, then this MUST be base64 encoded before sending (hence
     * the name here).
     * When using our grpc clients, you DO NOT need to base64 encode
     * it yourself since the clients know how to do this for you automatically and will avoid the
     * base64 encoding if they send a binary request.
     * 
* * bytes base64 = 2; * @return This builder for chaining. */ public Builder clearBase64() { base64_ = getDefaultInstance().getBase64(); onChanged(); return this; } private boolean allowDuplicateUrl_ ; /** * bool allow_duplicate_url = 4; * @return The allowDuplicateUrl. */ @java.lang.Override public boolean getAllowDuplicateUrl() { return allowDuplicateUrl_; } /** * bool allow_duplicate_url = 4; * @param value The allowDuplicateUrl to set. * @return This builder for chaining. */ public Builder setAllowDuplicateUrl(boolean value) { allowDuplicateUrl_ = value; onChanged(); return this; } /** * bool allow_duplicate_url = 4; * @return This builder for chaining. */ public Builder clearAllowDuplicateUrl() { allowDuplicateUrl_ = false; onChanged(); return this; } private com.clarifai.grpc.api.HostedURL hosted_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.HostedURL, com.clarifai.grpc.api.HostedURL.Builder, com.clarifai.grpc.api.HostedURLOrBuilder> hostedBuilder_; /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; * @return Whether the hosted field is set. */ public boolean hasHosted() { return hostedBuilder_ != null || hosted_ != null; } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; * @return The hosted. */ public com.clarifai.grpc.api.HostedURL getHosted() { if (hostedBuilder_ == null) { return hosted_ == null ? com.clarifai.grpc.api.HostedURL.getDefaultInstance() : hosted_; } else { return hostedBuilder_.getMessage(); } } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ public Builder setHosted(com.clarifai.grpc.api.HostedURL value) { if (hostedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } hosted_ = value; onChanged(); } else { hostedBuilder_.setMessage(value); } return this; } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ public Builder setHosted( com.clarifai.grpc.api.HostedURL.Builder builderForValue) { if (hostedBuilder_ == null) { hosted_ = builderForValue.build(); onChanged(); } else { hostedBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ public Builder mergeHosted(com.clarifai.grpc.api.HostedURL value) { if (hostedBuilder_ == null) { if (hosted_ != null) { hosted_ = com.clarifai.grpc.api.HostedURL.newBuilder(hosted_).mergeFrom(value).buildPartial(); } else { hosted_ = value; } onChanged(); } else { hostedBuilder_.mergeFrom(value); } return this; } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ public Builder clearHosted() { if (hostedBuilder_ == null) { hosted_ = null; onChanged(); } else { hosted_ = null; hostedBuilder_ = null; } return this; } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ public com.clarifai.grpc.api.HostedURL.Builder getHostedBuilder() { onChanged(); return getHostedFieldBuilder().getBuilder(); } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ public com.clarifai.grpc.api.HostedURLOrBuilder getHostedOrBuilder() { if (hostedBuilder_ != null) { return hostedBuilder_.getMessageOrBuilder(); } else { return hosted_ == null ? com.clarifai.grpc.api.HostedURL.getDefaultInstance() : hosted_; } } /** *
     * The hosted field lists images in different sizes hosted in Clarifai storage.
     * 
* * .clarifai.api.HostedURL hosted = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.HostedURL, com.clarifai.grpc.api.HostedURL.Builder, com.clarifai.grpc.api.HostedURLOrBuilder> getHostedFieldBuilder() { if (hostedBuilder_ == null) { hostedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.HostedURL, com.clarifai.grpc.api.HostedURL.Builder, com.clarifai.grpc.api.HostedURLOrBuilder>( getHosted(), getParentForChildren(), isClean()); hosted_ = null; } return hostedBuilder_; } private com.clarifai.grpc.api.ImageInfo imageInfo_; private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.ImageInfo, com.clarifai.grpc.api.ImageInfo.Builder, com.clarifai.grpc.api.ImageInfoOrBuilder> imageInfoBuilder_; /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; * @return Whether the imageInfo field is set. */ public boolean hasImageInfo() { return imageInfoBuilder_ != null || imageInfo_ != null; } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; * @return The imageInfo. */ public com.clarifai.grpc.api.ImageInfo getImageInfo() { if (imageInfoBuilder_ == null) { return imageInfo_ == null ? com.clarifai.grpc.api.ImageInfo.getDefaultInstance() : imageInfo_; } else { return imageInfoBuilder_.getMessage(); } } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ public Builder setImageInfo(com.clarifai.grpc.api.ImageInfo value) { if (imageInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } imageInfo_ = value; onChanged(); } else { imageInfoBuilder_.setMessage(value); } return this; } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ public Builder setImageInfo( com.clarifai.grpc.api.ImageInfo.Builder builderForValue) { if (imageInfoBuilder_ == null) { imageInfo_ = builderForValue.build(); onChanged(); } else { imageInfoBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ public Builder mergeImageInfo(com.clarifai.grpc.api.ImageInfo value) { if (imageInfoBuilder_ == null) { if (imageInfo_ != null) { imageInfo_ = com.clarifai.grpc.api.ImageInfo.newBuilder(imageInfo_).mergeFrom(value).buildPartial(); } else { imageInfo_ = value; } onChanged(); } else { imageInfoBuilder_.mergeFrom(value); } return this; } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ public Builder clearImageInfo() { if (imageInfoBuilder_ == null) { imageInfo_ = null; onChanged(); } else { imageInfo_ = null; imageInfoBuilder_ = null; } return this; } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ public com.clarifai.grpc.api.ImageInfo.Builder getImageInfoBuilder() { onChanged(); return getImageInfoFieldBuilder().getBuilder(); } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ public com.clarifai.grpc.api.ImageInfoOrBuilder getImageInfoOrBuilder() { if (imageInfoBuilder_ != null) { return imageInfoBuilder_.getMessageOrBuilder(); } else { return imageInfo_ == null ? com.clarifai.grpc.api.ImageInfo.getDefaultInstance() : imageInfo_; } } /** *
     * image info
     * 
* * .clarifai.api.ImageInfo image_info = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.ImageInfo, com.clarifai.grpc.api.ImageInfo.Builder, com.clarifai.grpc.api.ImageInfoOrBuilder> getImageInfoFieldBuilder() { if (imageInfoBuilder_ == null) { imageInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.ImageInfo, com.clarifai.grpc.api.ImageInfo.Builder, com.clarifai.grpc.api.ImageInfoOrBuilder>( getImageInfo(), getParentForChildren(), isClean()); imageInfo_ = null; } return imageInfoBuilder_; } @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.Image) } // @@protoc_insertion_point(class_scope:clarifai.api.Image) private static final com.clarifai.grpc.api.Image DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.Image(); } public static com.clarifai.grpc.api.Image getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Image(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.Image getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy