Class Image.Builder (2.50.0)

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

An image that is specified by a URL and can have an onClick action. For an example, see Add an image.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.Image

Implements

ImageOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Image.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Image.Builder
Overrides

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

clearAltText()

public Image.Builder clearAltText()

The alternative text of this image that's used for accessibility.

string alt_text = 3;

Returns
Type Description
Image.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Image.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Image.Builder
Overrides

clearImageUrl()

public Image.Builder clearImageUrl()

The HTTPS URL that hosts the image.

For example:

<code><code> https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Returns
Type Description
Image.Builder

This builder for chaining.

clearOnClick()

public Image.Builder clearOnClick()

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Returns
Type Description
Image.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Image.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Image.Builder
Overrides

clone()

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

getAltText()

public String getAltText()

The alternative text of this image that's used for accessibility.

string alt_text = 3;

Returns
Type Description
String

The altText.

getAltTextBytes()

public ByteString getAltTextBytes()

The alternative text of this image that's used for accessibility.

string alt_text = 3;

Returns
Type Description
ByteString

The bytes for altText.

getDefaultInstanceForType()

public Image getDefaultInstanceForType()
Returns
Type Description
Image

getDescriptorForType()

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

getImageUrl()

public String getImageUrl()

The HTTPS URL that hosts the image.

For example:

<code><code> https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Returns
Type Description
String

The imageUrl.

getImageUrlBytes()

public ByteString getImageUrlBytes()

The HTTPS URL that hosts the image.

For example:

<code><code> https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Returns
Type Description
ByteString

The bytes for imageUrl.

getOnClick()

public OnClick getOnClick()

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Returns
Type Description
OnClick

The onClick.

getOnClickBuilder()

public OnClick.Builder getOnClickBuilder()

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Returns
Type Description
OnClick.Builder

getOnClickOrBuilder()

public OnClickOrBuilder getOnClickOrBuilder()

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Returns
Type Description
OnClickOrBuilder

hasOnClick()

public boolean hasOnClick()

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Returns
Type Description
boolean

Whether the onClick field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.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

mergeOnClick(OnClick value)

public Image.Builder mergeOnClick(OnClick value)

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Parameter
Name Description
value OnClick
Returns
Type Description
Image.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Image.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Image.Builder
Overrides

setAltText(String value)

public Image.Builder setAltText(String value)

The alternative text of this image that's used for accessibility.

string alt_text = 3;

Parameter
Name Description
value String

The altText to set.

Returns
Type Description
Image.Builder

This builder for chaining.

setAltTextBytes(ByteString value)

public Image.Builder setAltTextBytes(ByteString value)

The alternative text of this image that's used for accessibility.

string alt_text = 3;

Parameter
Name Description
value ByteString

The bytes for altText to set.

Returns
Type Description
Image.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Image.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Image.Builder
Overrides

setImageUrl(String value)

public Image.Builder setImageUrl(String value)

The HTTPS URL that hosts the image.

For example:

<code><code> https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Parameter
Name Description
value String

The imageUrl to set.

Returns
Type Description
Image.Builder

This builder for chaining.

setImageUrlBytes(ByteString value)

public Image.Builder setImageUrlBytes(ByteString value)

The HTTPS URL that hosts the image.

For example:

<code><code> https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Parameter
Name Description
value ByteString

The bytes for imageUrl to set.

Returns
Type Description
Image.Builder

This builder for chaining.

setOnClick(OnClick value)

public Image.Builder setOnClick(OnClick value)

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Parameter
Name Description
value OnClick
Returns
Type Description
Image.Builder

setOnClick(OnClick.Builder builderForValue)

public Image.Builder setOnClick(OnClick.Builder builderForValue)

When a user clicks the image, the click triggers this action.

.google.apps.card.v1.OnClick on_click = 2;

Parameter
Name Description
builderForValue OnClick.Builder
Returns
Type Description
Image.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Image.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Image.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Image.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Image.Builder
Overrides