public static final class Image.Builder extends GeneratedMessage.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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Image.BuilderImplements
ImageOrBuilderStatic 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 |
|
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. |
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 |
|
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 |
|
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 GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Image.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Image.Builder |
|
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 |
|
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 |
StringThe 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 |
ByteStringThe bytes for altText to set. |
| Returns | |
|---|---|
| Type | Description |
Image.Builder |
This builder for chaining. |
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 |
StringThe 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 |
ByteStringThe 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 |
|