Class ImageComponent (2.38.0)

public final class ImageComponent extends GeneratedMessageV3 implements ImageComponentOrBuilder

Represents an image.

Google Workspace Add-ons and Chat apps:

Protobuf type google.apps.card.v1.ImageComponent

Static Fields

ALT_TEXT_FIELD_NUMBER

public static final int ALT_TEXT_FIELD_NUMBER
Field Value
Type Description
int

BORDER_STYLE_FIELD_NUMBER

public static final int BORDER_STYLE_FIELD_NUMBER
Field Value
Type Description
int

CROP_STYLE_FIELD_NUMBER

public static final int CROP_STYLE_FIELD_NUMBER
Field Value
Type Description
int

IMAGE_URI_FIELD_NUMBER

public static final int IMAGE_URI_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ImageComponent getDefaultInstance()
Returns
Type Description
ImageComponent

getDescriptor()

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

newBuilder()

public static ImageComponent.Builder newBuilder()
Returns
Type Description
ImageComponent.Builder

newBuilder(ImageComponent prototype)

public static ImageComponent.Builder newBuilder(ImageComponent prototype)
Parameter
Name Description
prototype ImageComponent
Returns
Type Description
ImageComponent.Builder

parseDelimitedFrom(InputStream input)

public static ImageComponent parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ImageComponent
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImageComponent
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ImageComponent parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ImageComponent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImageComponent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ImageComponent parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ImageComponent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImageComponent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ImageComponent parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ImageComponent
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImageComponent
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ImageComponent parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ImageComponent
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImageComponent
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ImageComponent parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ImageComponent
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ImageComponent
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ImageComponent> parser()
Returns
Type Description
Parser<ImageComponent>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAltText()

public String getAltText()

The accessibility label for the image.

string alt_text = 2;

Returns
Type Description
String

The altText.

getAltTextBytes()

public ByteString getAltTextBytes()

The accessibility label for the image.

string alt_text = 2;

Returns
Type Description
ByteString

The bytes for altText.

getBorderStyle()

public BorderStyle getBorderStyle()

The border style to apply to the image.

.google.apps.card.v1.BorderStyle border_style = 4;

Returns
Type Description
BorderStyle

The borderStyle.

getBorderStyleOrBuilder()

public BorderStyleOrBuilder getBorderStyleOrBuilder()

The border style to apply to the image.

.google.apps.card.v1.BorderStyle border_style = 4;

Returns
Type Description
BorderStyleOrBuilder

getCropStyle()

public ImageCropStyle getCropStyle()

The crop style to apply to the image.

.google.apps.card.v1.ImageCropStyle crop_style = 3;

Returns
Type Description
ImageCropStyle

The cropStyle.

getCropStyleOrBuilder()

public ImageCropStyleOrBuilder getCropStyleOrBuilder()

The crop style to apply to the image.

.google.apps.card.v1.ImageCropStyle crop_style = 3;

Returns
Type Description
ImageCropStyleOrBuilder

getDefaultInstanceForType()

public ImageComponent getDefaultInstanceForType()
Returns
Type Description
ImageComponent

getImageUri()

public String getImageUri()

The image URL.

string image_uri = 1;

Returns
Type Description
String

The imageUri.

getImageUriBytes()

public ByteString getImageUriBytes()

The image URL.

string image_uri = 1;

Returns
Type Description
ByteString

The bytes for imageUri.

getParserForType()

public Parser<ImageComponent> getParserForType()
Returns
Type Description
Parser<ImageComponent>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasBorderStyle()

public boolean hasBorderStyle()

The border style to apply to the image.

.google.apps.card.v1.BorderStyle border_style = 4;

Returns
Type Description
boolean

Whether the borderStyle field is set.

hasCropStyle()

public boolean hasCropStyle()

The crop style to apply to the image.

.google.apps.card.v1.ImageCropStyle crop_style = 3;

Returns
Type Description
boolean

Whether the cropStyle field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ImageComponent.Builder newBuilderForType()
Returns
Type Description
ImageComponent.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ImageComponent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ImageComponent.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ImageComponent.Builder toBuilder()
Returns
Type Description
ImageComponent.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException