Class Image.Builder (2.37.1)

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 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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Image.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Image.Builder
Overrides

build()

public Image build()
Returns
TypeDescription
Image

buildPartial()

public Image buildPartial()
Returns
TypeDescription
Image

clear()

public Image.Builder clear()
Returns
TypeDescription
Image.Builder
Overrides

clearAltText()

public Image.Builder clearAltText()

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

string alt_text = 3;

Returns
TypeDescription
Image.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Image.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Image.Builder
Overrides

clearImageUrl()

public Image.Builder clearImageUrl()

The HTTPS URL that hosts the image.

For example:

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

string image_url = 1;

Returns
TypeDescription
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
TypeDescription
Image.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Image.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Image.Builder
Overrides

clone()

public Image.Builder clone()
Returns
TypeDescription
Image.Builder
Overrides

getAltText()

public String getAltText()

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

string alt_text = 3;

Returns
TypeDescription
String

The altText.

getAltTextBytes()

public ByteString getAltTextBytes()

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

string alt_text = 3;

Returns
TypeDescription
ByteString

The bytes for altText.

getDefaultInstanceForType()

public Image getDefaultInstanceForType()
Returns
TypeDescription
Image

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getImageUrl()

public String getImageUrl()

The HTTPS URL that hosts the image.

For example:

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

string image_url = 1;

Returns
TypeDescription
String

The imageUrl.

getImageUrlBytes()

public ByteString getImageUrlBytes()

The HTTPS URL that hosts the image.

For example:

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

string image_url = 1;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the onClick field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Image other)

public Image.Builder mergeFrom(Image other)
Parameter
NameDescription
otherImage
Returns
TypeDescription
Image.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Image.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Image.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Image.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueOnClick
Returns
TypeDescription
Image.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Image.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The altText to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for altText to set.

Returns
TypeDescription
Image.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Image.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Parameter
NameDescription
valueString

The imageUrl to set.

Returns
TypeDescription
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/chat/images/quickstart-app-avatar.png </code></code>

string image_url = 1;

Parameter
NameDescription
valueByteString

The bytes for imageUrl to set.

Returns
TypeDescription
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
NameDescription
valueOnClick
Returns
TypeDescription
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
NameDescription
builderForValueOnClick.Builder
Returns
TypeDescription
Image.Builder

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

public Image.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Image.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Image.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Image.Builder
Overrides