Class ImageSource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ImageSource.Builder>
com.google.cloud.vision.v1.ImageSource.Builder
All Implemented Interfaces:
ImageSourceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ImageSource

public static final class ImageSource.Builder extends com.google.protobuf.GeneratedMessage.Builder<ImageSource.Builder> implements ImageSourceOrBuilder
 External image source (Google Cloud Storage or web URL image location).
 
Protobuf type google.cloud.vision.v1.ImageSource
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    **Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`.
    The URI of the source image.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    **Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`.
    com.google.protobuf.ByteString
    **Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`.
    The URI of the source image.
    com.google.protobuf.ByteString
    The URI of the source image.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    **Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`.
    setGcsImageUriBytes(com.google.protobuf.ByteString value)
    **Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`.
    The URI of the source image.
    setImageUriBytes(com.google.protobuf.ByteString value)
    The URI of the source image.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<ImageSource.Builder>
    • clear

      public ImageSource.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<ImageSource.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<ImageSource.Builder>
    • getDefaultInstanceForType

      public ImageSource getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public ImageSource build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public ImageSource buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public ImageSource.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ImageSource.Builder>
    • mergeFrom

      public ImageSource.Builder mergeFrom(ImageSource other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<ImageSource.Builder>
    • mergeFrom

      public ImageSource.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ImageSource.Builder>
      Throws:
      IOException
    • getGcsImageUri

      public String getGcsImageUri()
       **Use `image_uri` instead.**
      
       The Google Cloud Storage  URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
       
      string gcs_image_uri = 1;
      Specified by:
      getGcsImageUri in interface ImageSourceOrBuilder
      Returns:
      The gcsImageUri.
    • getGcsImageUriBytes

      public com.google.protobuf.ByteString getGcsImageUriBytes()
       **Use `image_uri` instead.**
      
       The Google Cloud Storage  URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
       
      string gcs_image_uri = 1;
      Specified by:
      getGcsImageUriBytes in interface ImageSourceOrBuilder
      Returns:
      The bytes for gcsImageUri.
    • setGcsImageUri

      public ImageSource.Builder setGcsImageUri(String value)
       **Use `image_uri` instead.**
      
       The Google Cloud Storage  URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
       
      string gcs_image_uri = 1;
      Parameters:
      value - The gcsImageUri to set.
      Returns:
      This builder for chaining.
    • clearGcsImageUri

      public ImageSource.Builder clearGcsImageUri()
       **Use `image_uri` instead.**
      
       The Google Cloud Storage  URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
       
      string gcs_image_uri = 1;
      Returns:
      This builder for chaining.
    • setGcsImageUriBytes

      public ImageSource.Builder setGcsImageUriBytes(com.google.protobuf.ByteString value)
       **Use `image_uri` instead.**
      
       The Google Cloud Storage  URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
       
      string gcs_image_uri = 1;
      Parameters:
      value - The bytes for gcsImageUri to set.
      Returns:
      This builder for chaining.
    • getImageUri

      public String getImageUri()
       The URI of the source image. Can be either:
      
       1. A Google Cloud Storage URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more
       info.
      
       2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
       HTTP/HTTPS URLs, Google cannot guarantee that the request will be
       completed. Your request may fail if the specified host denies the
       request (e.g. due to request throttling or DOS prevention), or if Google
       throttles requests to the site for abuse prevention. You should not
       depend on externally-hosted images for production applications.
      
       When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
       precedence.
       
      string image_uri = 2;
      Specified by:
      getImageUri in interface ImageSourceOrBuilder
      Returns:
      The imageUri.
    • getImageUriBytes

      public com.google.protobuf.ByteString getImageUriBytes()
       The URI of the source image. Can be either:
      
       1. A Google Cloud Storage URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more
       info.
      
       2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
       HTTP/HTTPS URLs, Google cannot guarantee that the request will be
       completed. Your request may fail if the specified host denies the
       request (e.g. due to request throttling or DOS prevention), or if Google
       throttles requests to the site for abuse prevention. You should not
       depend on externally-hosted images for production applications.
      
       When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
       precedence.
       
      string image_uri = 2;
      Specified by:
      getImageUriBytes in interface ImageSourceOrBuilder
      Returns:
      The bytes for imageUri.
    • setImageUri

      public ImageSource.Builder setImageUri(String value)
       The URI of the source image. Can be either:
      
       1. A Google Cloud Storage URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more
       info.
      
       2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
       HTTP/HTTPS URLs, Google cannot guarantee that the request will be
       completed. Your request may fail if the specified host denies the
       request (e.g. due to request throttling or DOS prevention), or if Google
       throttles requests to the site for abuse prevention. You should not
       depend on externally-hosted images for production applications.
      
       When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
       precedence.
       
      string image_uri = 2;
      Parameters:
      value - The imageUri to set.
      Returns:
      This builder for chaining.
    • clearImageUri

      public ImageSource.Builder clearImageUri()
       The URI of the source image. Can be either:
      
       1. A Google Cloud Storage URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more
       info.
      
       2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
       HTTP/HTTPS URLs, Google cannot guarantee that the request will be
       completed. Your request may fail if the specified host denies the
       request (e.g. due to request throttling or DOS prevention), or if Google
       throttles requests to the site for abuse prevention. You should not
       depend on externally-hosted images for production applications.
      
       When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
       precedence.
       
      string image_uri = 2;
      Returns:
      This builder for chaining.
    • setImageUriBytes

      public ImageSource.Builder setImageUriBytes(com.google.protobuf.ByteString value)
       The URI of the source image. Can be either:
      
       1. A Google Cloud Storage URI of the form
       `gs://bucket_name/object_name`. Object versioning is not supported. See
       [Google Cloud Storage Request
       URIs](https://cloud.google.com/storage/docs/reference-uris) for more
       info.
      
       2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
       HTTP/HTTPS URLs, Google cannot guarantee that the request will be
       completed. Your request may fail if the specified host denies the
       request (e.g. due to request throttling or DOS prevention), or if Google
       throttles requests to the site for abuse prevention. You should not
       depend on externally-hosted images for production applications.
      
       When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
       precedence.
       
      string image_uri = 2;
      Parameters:
      value - The bytes for imageUri to set.
      Returns:
      This builder for chaining.