Class WidgetMarkup.Builder (0.18.0)

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

A widget is a UI element that presents text and images.

Protobuf type google.chat.v1.WidgetMarkup

Static Methods

getDescriptor()

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

Methods

addAllButtons(Iterable<? extends WidgetMarkup.Button> values)

public WidgetMarkup.Builder addAllButtons(Iterable<? extends WidgetMarkup.Button> values)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
values Iterable<? extends com.google.chat.v1.WidgetMarkup.Button>
Returns
Type Description
WidgetMarkup.Builder

addButtons(WidgetMarkup.Button value)

public WidgetMarkup.Builder addButtons(WidgetMarkup.Button value)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
value WidgetMarkup.Button
Returns
Type Description
WidgetMarkup.Builder

addButtons(WidgetMarkup.Button.Builder builderForValue)

public WidgetMarkup.Builder addButtons(WidgetMarkup.Button.Builder builderForValue)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
builderForValue WidgetMarkup.Button.Builder
Returns
Type Description
WidgetMarkup.Builder

addButtons(int index, WidgetMarkup.Button value)

public WidgetMarkup.Builder addButtons(int index, WidgetMarkup.Button value)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameters
Name Description
index int
value WidgetMarkup.Button
Returns
Type Description
WidgetMarkup.Builder

addButtons(int index, WidgetMarkup.Button.Builder builderForValue)

public WidgetMarkup.Builder addButtons(int index, WidgetMarkup.Button.Builder builderForValue)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameters
Name Description
index int
builderForValue WidgetMarkup.Button.Builder
Returns
Type Description
WidgetMarkup.Builder

addButtonsBuilder()

public WidgetMarkup.Button.Builder addButtonsBuilder()

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Returns
Type Description
WidgetMarkup.Button.Builder

addButtonsBuilder(int index)

public WidgetMarkup.Button.Builder addButtonsBuilder(int index)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.Button.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public WidgetMarkup build()
Returns
Type Description
WidgetMarkup

buildPartial()

public WidgetMarkup buildPartial()
Returns
Type Description
WidgetMarkup

clear()

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

clearButtons()

public WidgetMarkup.Builder clearButtons()

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Returns
Type Description
WidgetMarkup.Builder

clearData()

public WidgetMarkup.Builder clearData()
Returns
Type Description
WidgetMarkup.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearImage()

public WidgetMarkup.Builder clearImage()

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Returns
Type Description
WidgetMarkup.Builder

clearKeyValue()

public WidgetMarkup.Builder clearKeyValue()

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Returns
Type Description
WidgetMarkup.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTextParagraph()

public WidgetMarkup.Builder clearTextParagraph()

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Returns
Type Description
WidgetMarkup.Builder

clone()

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

getButtons(int index)

public WidgetMarkup.Button getButtons(int index)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.Button

getButtonsBuilder(int index)

public WidgetMarkup.Button.Builder getButtonsBuilder(int index)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.Button.Builder

getButtonsBuilderList()

public List<WidgetMarkup.Button.Builder> getButtonsBuilderList()

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Returns
Type Description
List<Builder>

getButtonsCount()

public int getButtonsCount()

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Returns
Type Description
int

getButtonsList()

public List<WidgetMarkup.Button> getButtonsList()

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Returns
Type Description
List<Button>

getButtonsOrBuilder(int index)

public WidgetMarkup.ButtonOrBuilder getButtonsOrBuilder(int index)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.ButtonOrBuilder

getButtonsOrBuilderList()

public List<? extends WidgetMarkup.ButtonOrBuilder> getButtonsOrBuilderList()

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Returns
Type Description
List<? extends com.google.chat.v1.WidgetMarkup.ButtonOrBuilder>

getDataCase()

public WidgetMarkup.DataCase getDataCase()
Returns
Type Description
WidgetMarkup.DataCase

getDefaultInstanceForType()

public WidgetMarkup getDefaultInstanceForType()
Returns
Type Description
WidgetMarkup

getDescriptorForType()

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

getImage()

public WidgetMarkup.Image getImage()

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Returns
Type Description
WidgetMarkup.Image

The image.

getImageBuilder()

public WidgetMarkup.Image.Builder getImageBuilder()

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Returns
Type Description
WidgetMarkup.Image.Builder

getImageOrBuilder()

public WidgetMarkup.ImageOrBuilder getImageOrBuilder()

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Returns
Type Description
WidgetMarkup.ImageOrBuilder

getKeyValue()

public WidgetMarkup.KeyValue getKeyValue()

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Returns
Type Description
WidgetMarkup.KeyValue

The keyValue.

getKeyValueBuilder()

public WidgetMarkup.KeyValue.Builder getKeyValueBuilder()

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Returns
Type Description
WidgetMarkup.KeyValue.Builder

getKeyValueOrBuilder()

public WidgetMarkup.KeyValueOrBuilder getKeyValueOrBuilder()

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Returns
Type Description
WidgetMarkup.KeyValueOrBuilder

getTextParagraph()

public WidgetMarkup.TextParagraph getTextParagraph()

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Returns
Type Description
WidgetMarkup.TextParagraph

The textParagraph.

getTextParagraphBuilder()

public WidgetMarkup.TextParagraph.Builder getTextParagraphBuilder()

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Returns
Type Description
WidgetMarkup.TextParagraph.Builder

getTextParagraphOrBuilder()

public WidgetMarkup.TextParagraphOrBuilder getTextParagraphOrBuilder()

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Returns
Type Description
WidgetMarkup.TextParagraphOrBuilder

hasImage()

public boolean hasImage()

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Returns
Type Description
boolean

Whether the image field is set.

hasKeyValue()

public boolean hasKeyValue()

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Returns
Type Description
boolean

Whether the keyValue field is set.

hasTextParagraph()

public boolean hasTextParagraph()

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Returns
Type Description
boolean

Whether the textParagraph field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(WidgetMarkup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeImage(WidgetMarkup.Image value)

public WidgetMarkup.Builder mergeImage(WidgetMarkup.Image value)

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Parameter
Name Description
value WidgetMarkup.Image
Returns
Type Description
WidgetMarkup.Builder

mergeKeyValue(WidgetMarkup.KeyValue value)

public WidgetMarkup.Builder mergeKeyValue(WidgetMarkup.KeyValue value)

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Parameter
Name Description
value WidgetMarkup.KeyValue
Returns
Type Description
WidgetMarkup.Builder

mergeTextParagraph(WidgetMarkup.TextParagraph value)

public WidgetMarkup.Builder mergeTextParagraph(WidgetMarkup.TextParagraph value)

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Parameter
Name Description
value WidgetMarkup.TextParagraph
Returns
Type Description
WidgetMarkup.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeButtons(int index)

public WidgetMarkup.Builder removeButtons(int index)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameter
Name Description
index int
Returns
Type Description
WidgetMarkup.Builder

setButtons(int index, WidgetMarkup.Button value)

public WidgetMarkup.Builder setButtons(int index, WidgetMarkup.Button value)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameters
Name Description
index int
value WidgetMarkup.Button
Returns
Type Description
WidgetMarkup.Builder

setButtons(int index, WidgetMarkup.Button.Builder builderForValue)

public WidgetMarkup.Builder setButtons(int index, WidgetMarkup.Button.Builder builderForValue)

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

repeated .google.chat.v1.WidgetMarkup.Button buttons = 6;

Parameters
Name Description
index int
builderForValue WidgetMarkup.Button.Builder
Returns
Type Description
WidgetMarkup.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setImage(WidgetMarkup.Image value)

public WidgetMarkup.Builder setImage(WidgetMarkup.Image value)

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

Parameter
Name Description
value WidgetMarkup.Image
Returns
Type Description
WidgetMarkup.Builder

setImage(WidgetMarkup.Image.Builder builderForValue)

public WidgetMarkup.Builder setImage(WidgetMarkup.Image.Builder builderForValue)

Display an image in this widget.

.google.chat.v1.WidgetMarkup.Image image = 2;

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

setKeyValue(WidgetMarkup.KeyValue value)

public WidgetMarkup.Builder setKeyValue(WidgetMarkup.KeyValue value)

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Parameter
Name Description
value WidgetMarkup.KeyValue
Returns
Type Description
WidgetMarkup.Builder

setKeyValue(WidgetMarkup.KeyValue.Builder builderForValue)

public WidgetMarkup.Builder setKeyValue(WidgetMarkup.KeyValue.Builder builderForValue)

Display a key value item in this widget.

.google.chat.v1.WidgetMarkup.KeyValue key_value = 3;

Parameter
Name Description
builderForValue WidgetMarkup.KeyValue.Builder
Returns
Type Description
WidgetMarkup.Builder

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

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

setTextParagraph(WidgetMarkup.TextParagraph value)

public WidgetMarkup.Builder setTextParagraph(WidgetMarkup.TextParagraph value)

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Parameter
Name Description
value WidgetMarkup.TextParagraph
Returns
Type Description
WidgetMarkup.Builder

setTextParagraph(WidgetMarkup.TextParagraph.Builder builderForValue)

public WidgetMarkup.Builder setTextParagraph(WidgetMarkup.TextParagraph.Builder builderForValue)

Display a text paragraph in this widget.

.google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1;

Parameter
Name Description
builderForValue WidgetMarkup.TextParagraph.Builder
Returns
Type Description
WidgetMarkup.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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