Class Image.Builder (0.1.0)

public static final class Image.Builder extends GeneratedMessage.Builder<Image.Builder> implements ImageOrBuilder

Represents an image input or output in the conversation.

Protobuf type google.cloud.ces.v1.Image

Implements

ImageOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public Image build()
Returns
Type Description
Image

buildPartial()

public Image buildPartial()
Returns
Type Description
Image

clear()

public Image.Builder clear()
Returns
Type Description
Image.Builder
Overrides

clearData()

public Image.Builder clearData()

Required. Raw bytes of the image.

bytes data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Image.Builder

This builder for chaining.

clearMimeType()

public Image.Builder clearMimeType()

Required. The IANA standard MIME type of the source data. Supported image types includes:

  • image/png
  • image/jpeg
  • image/webp

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Image.Builder

This builder for chaining.

getData()

public ByteString getData()

Required. Raw bytes of the image.

bytes data = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The data.

getDefaultInstanceForType()

public Image getDefaultInstanceForType()
Returns
Type Description
Image

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMimeType()

public String getMimeType()

Required. The IANA standard MIME type of the source data. Supported image types includes:

  • image/png
  • image/jpeg
  • image/webp

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

Required. The IANA standard MIME type of the source data. Supported image types includes:

  • image/png
  • image/jpeg
  • image/webp

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for mimeType.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Image other)

public Image.Builder mergeFrom(Image other)
Parameter
Name Description
other Image
Returns
Type Description
Image.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Image.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Image.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Image.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Image.Builder
Overrides

setData(ByteString value)

public Image.Builder setData(ByteString value)

Required. Raw bytes of the image.

bytes data = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The data to set.

Returns
Type Description
Image.Builder

This builder for chaining.

setMimeType(String value)

public Image.Builder setMimeType(String value)

Required. The IANA standard MIME type of the source data. Supported image types includes:

  • image/png
  • image/jpeg
  • image/webp

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The mimeType to set.

Returns
Type Description
Image.Builder

This builder for chaining.

setMimeTypeBytes(ByteString value)

public Image.Builder setMimeTypeBytes(ByteString value)

Required. The IANA standard MIME type of the source data. Supported image types includes:

  • image/png
  • image/jpeg
  • image/webp

string mime_type = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for mimeType to set.

Returns
Type Description
Image.Builder

This builder for chaining.