Class ImageComponent (2.37.1)

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

BORDER_STYLE_FIELD_NUMBER

public static final int BORDER_STYLE_FIELD_NUMBER
Field Value
TypeDescription
int

CROP_STYLE_FIELD_NUMBER

public static final int CROP_STYLE_FIELD_NUMBER
Field Value
TypeDescription
int

IMAGE_URI_FIELD_NUMBER

public static final int IMAGE_URI_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ImageComponent getDefaultInstance()
Returns
TypeDescription
ImageComponent

getDescriptor()

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

newBuilder()

public static ImageComponent.Builder newBuilder()
Returns
TypeDescription
ImageComponent.Builder

newBuilder(ImageComponent prototype)

public static ImageComponent.Builder newBuilder(ImageComponent prototype)
Parameter
NameDescription
prototypeImageComponent
Returns
TypeDescription
ImageComponent.Builder

parseDelimitedFrom(InputStream input)

public static ImageComponent parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ImageComponent parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ImageComponent parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ImageComponent parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ImageComponent parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ImageComponent parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ImageComponent parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageComponent
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ImageComponent> parser()
Returns
TypeDescription
Parser<ImageComponent>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAltText()

public String getAltText()

The accessibility label for the image.

string alt_text = 2;

Returns
TypeDescription
String

The altText.

getAltTextBytes()

public ByteString getAltTextBytes()

The accessibility label for the image.

string alt_text = 2;

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

The borderStyle.

getBorderStyleOrBuilder()

public BorderStyleOrBuilder getBorderStyleOrBuilder()

The border style to apply to the image.

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

Returns
TypeDescription
BorderStyleOrBuilder

getCropStyle()

public ImageCropStyle getCropStyle()

The crop style to apply to the image.

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

Returns
TypeDescription
ImageCropStyle

The cropStyle.

getCropStyleOrBuilder()

public ImageCropStyleOrBuilder getCropStyleOrBuilder()

The crop style to apply to the image.

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

Returns
TypeDescription
ImageCropStyleOrBuilder

getDefaultInstanceForType()

public ImageComponent getDefaultInstanceForType()
Returns
TypeDescription
ImageComponent

getImageUri()

public String getImageUri()

The image URL.

string image_uri = 1;

Returns
TypeDescription
String

The imageUri.

getImageUriBytes()

public ByteString getImageUriBytes()

The image URL.

string image_uri = 1;

Returns
TypeDescription
ByteString

The bytes for imageUri.

getParserForType()

public Parser<ImageComponent> getParserForType()
Returns
TypeDescription
Parser<ImageComponent>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasBorderStyle()

public boolean hasBorderStyle()

The border style to apply to the image.

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

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

Whether the cropStyle field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ImageComponent.Builder newBuilderForType()
Returns
TypeDescription
ImageComponent.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ImageComponent.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ImageComponent.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ImageComponent.Builder toBuilder()
Returns
TypeDescription
ImageComponent.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException