Class Image


public abstract class Image extends JsonSerializable
An image.
  • Constructor Details

    • Image

      public Image()
  • Method Details

    • gcsUri

      public abstract Optional<String> gcsUri()
      The Cloud Storage URI of the image. ``Image`` can contain a value for this field or the ``image_bytes`` field but not both.
    • imageBytes

      public abstract Optional<byte[]> imageBytes()
      The image bytes data. ``Image`` can contain a value for this field or the ``gcs_uri`` field but not both.
    • mimeType

      public abstract Optional<String> mimeType()
      The MIME type of the image.
    • builder

      public static Image.Builder builder()
      Instantiates a builder for Image.
    • toBuilder

      public abstract Image.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static Image fromJson(String jsonString)
      Deserializes a JSON string to a Image object.
    • fromFile

      public static Image fromFile(String location)
      Creates an Image object from a local file.

      If mimeType is not specified, it will be inferred from the file extension.

    • fromFile

      public static Image fromFile(String location, String mimeType)
      Creates an Image object from a local file and mime type.