Class ElementsImage.Builder (0.67.0)

public static final class ElementsImage.Builder extends GeneratedMessage.Builder<ElementsImage.Builder> implements ElementsImageOrBuilder

An object encapsulating different ways of representing an image. Currently supported representations:

  • An image fetched from a URI.

    Additional representations might be supported in the future.

Protobuf type google.chat.v1.ElementsImage

Static Methods

getDescriptor()

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

Methods

build()

public ElementsImage build()
Returns
Type Description
ElementsImage

buildPartial()

public ElementsImage buildPartial()
Returns
Type Description
ElementsImage

clear()

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

clearImage()

public ElementsImage.Builder clearImage()
Returns
Type Description
ElementsImage.Builder

clearImageUri()

public ElementsImage.Builder clearImageUri()

Required. The URI of the image. Must be a publicly accessible URI so that Chat can fetch and display it.

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

Returns
Type Description
ElementsImage.Builder

This builder for chaining.

getDefaultInstanceForType()

public ElementsImage getDefaultInstanceForType()
Returns
Type Description
ElementsImage

getDescriptorForType()

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

getImageCase()

public ElementsImage.ImageCase getImageCase()
Returns
Type Description
ElementsImage.ImageCase

getImageUri()

public String getImageUri()

Required. The URI of the image. Must be a publicly accessible URI so that Chat can fetch and display it.

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

Returns
Type Description
String

The imageUri.

getImageUriBytes()

public ByteString getImageUriBytes()

Required. The URI of the image. Must be a publicly accessible URI so that Chat can fetch and display it.

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

Returns
Type Description
ByteString

The bytes for imageUri.

hasImageUri()

public boolean hasImageUri()

Required. The URI of the image. Must be a publicly accessible URI so that Chat can fetch and display it.

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

Returns
Type Description
boolean

Whether the imageUri field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ElementsImage other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setImageUri(String value)

public ElementsImage.Builder setImageUri(String value)

Required. The URI of the image. Must be a publicly accessible URI so that Chat can fetch and display it.

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

Parameter
Name Description
value String

The imageUri to set.

Returns
Type Description
ElementsImage.Builder

This builder for chaining.

setImageUriBytes(ByteString value)

public ElementsImage.Builder setImageUriBytes(ByteString value)

Required. The URI of the image. Must be a publicly accessible URI so that Chat can fetch and display it.

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

Parameter
Name Description
value ByteString

The bytes for imageUri to set.

Returns
Type Description
ElementsImage.Builder

This builder for chaining.