Class WidgetMarkup.Image.Builder (0.4.0)

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

An image that's specified by a URL and can have an onclick action.

Protobuf type google.chat.v1.WidgetMarkup.Image

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public WidgetMarkup.Image build()
Returns
TypeDescription
WidgetMarkup.Image

buildPartial()

public WidgetMarkup.Image buildPartial()
Returns
TypeDescription
WidgetMarkup.Image

clear()

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

clearAspectRatio()

public WidgetMarkup.Image.Builder clearAspectRatio()

The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image.

double aspect_ratio = 3;

Returns
TypeDescription
WidgetMarkup.Image.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearImageUrl()

public WidgetMarkup.Image.Builder clearImageUrl()

The URL of the image.

string image_url = 1;

Returns
TypeDescription
WidgetMarkup.Image.Builder

This builder for chaining.

clearOnClick()

public WidgetMarkup.Image.Builder clearOnClick()

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Returns
TypeDescription
WidgetMarkup.Image.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getAspectRatio()

public double getAspectRatio()

The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image.

double aspect_ratio = 3;

Returns
TypeDescription
double

The aspectRatio.

getDefaultInstanceForType()

public WidgetMarkup.Image getDefaultInstanceForType()
Returns
TypeDescription
WidgetMarkup.Image

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getImageUrl()

public String getImageUrl()

The URL of the image.

string image_url = 1;

Returns
TypeDescription
String

The imageUrl.

getImageUrlBytes()

public ByteString getImageUrlBytes()

The URL of the image.

string image_url = 1;

Returns
TypeDescription
ByteString

The bytes for imageUrl.

getOnClick()

public WidgetMarkup.OnClick getOnClick()

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Returns
TypeDescription
WidgetMarkup.OnClick

The onClick.

getOnClickBuilder()

public WidgetMarkup.OnClick.Builder getOnClickBuilder()

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Returns
TypeDescription
WidgetMarkup.OnClick.Builder

getOnClickOrBuilder()

public WidgetMarkup.OnClickOrBuilder getOnClickOrBuilder()

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Returns
TypeDescription
WidgetMarkup.OnClickOrBuilder

hasOnClick()

public boolean hasOnClick()

The onclick action.

.google.chat.v1.WidgetMarkup.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(WidgetMarkup.Image other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public WidgetMarkup.Image.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
WidgetMarkup.Image.Builder
Overrides

mergeOnClick(WidgetMarkup.OnClick value)

public WidgetMarkup.Image.Builder mergeOnClick(WidgetMarkup.OnClick value)

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Parameter
NameDescription
valueWidgetMarkup.OnClick
Returns
TypeDescription
WidgetMarkup.Image.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAspectRatio(double value)

public WidgetMarkup.Image.Builder setAspectRatio(double value)

The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image.

double aspect_ratio = 3;

Parameter
NameDescription
valuedouble

The aspectRatio to set.

Returns
TypeDescription
WidgetMarkup.Image.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setImageUrl(String value)

public WidgetMarkup.Image.Builder setImageUrl(String value)

The URL of the image.

string image_url = 1;

Parameter
NameDescription
valueString

The imageUrl to set.

Returns
TypeDescription
WidgetMarkup.Image.Builder

This builder for chaining.

setImageUrlBytes(ByteString value)

public WidgetMarkup.Image.Builder setImageUrlBytes(ByteString value)

The URL of the image.

string image_url = 1;

Parameter
NameDescription
valueByteString

The bytes for imageUrl to set.

Returns
TypeDescription
WidgetMarkup.Image.Builder

This builder for chaining.

setOnClick(WidgetMarkup.OnClick value)

public WidgetMarkup.Image.Builder setOnClick(WidgetMarkup.OnClick value)

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Parameter
NameDescription
valueWidgetMarkup.OnClick
Returns
TypeDescription
WidgetMarkup.Image.Builder

setOnClick(WidgetMarkup.OnClick.Builder builderForValue)

public WidgetMarkup.Image.Builder setOnClick(WidgetMarkup.OnClick.Builder builderForValue)

The onclick action.

.google.chat.v1.WidgetMarkup.OnClick on_click = 2;

Parameter
NameDescription
builderForValueWidgetMarkup.OnClick.Builder
Returns
TypeDescription
WidgetMarkup.Image.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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