public final class ImageCropStyle extends GeneratedMessageV3 implements ImageCropStyleOrBuilder
Represents the crop style applied to an image.
Google Workspace Add-ons and Chat apps:
For example, here's how to apply a 16:9 aspect ratio:
<code><code>
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
</code></code>
Protobuf type google.apps.card.v1.ImageCropStyle
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > ImageCropStyleImplements
ImageCropStyleOrBuilderStatic Fields
ASPECT_RATIO_FIELD_NUMBER
public static final int ASPECT_RATIO_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TYPE_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static ImageCropStyle getDefaultInstance()
Returns | |
---|---|
Type | Description |
ImageCropStyle |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static ImageCropStyle.Builder newBuilder()
Returns | |
---|---|
Type | Description |
ImageCropStyle.Builder |
newBuilder(ImageCropStyle prototype)
public static ImageCropStyle.Builder newBuilder(ImageCropStyle prototype)
Parameter | |
---|---|
Name | Description |
prototype | ImageCropStyle |
Returns | |
---|---|
Type | Description |
ImageCropStyle.Builder |
parseDelimitedFrom(InputStream input)
public static ImageCropStyle parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static ImageCropStyle parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data | byte[] |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static ImageCropStyle parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data | ByteString |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static ImageCropStyle parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input | CodedInputStream |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static ImageCropStyle parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static ImageCropStyle parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data | ByteBuffer |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static ImageCropStyle parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageCropStyle |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<ImageCropStyle> parser()
Returns | |
---|---|
Type | Description |
Parser<ImageCropStyle> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj | Object |
Returns | |
---|---|
Type | Description |
boolean |
getAspectRatio()
public double getAspectRatio()
The aspect ratio to use if the crop type is RECTANGLE_CUSTOM
.
For example, here's how to apply a 16:9 aspect ratio:
<code><code>
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
</code></code>
double aspect_ratio = 2;
Returns | |
---|---|
Type | Description |
double | The aspectRatio. |
getDefaultInstanceForType()
public ImageCropStyle getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
ImageCropStyle |
getParserForType()
public Parser<ImageCropStyle> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<ImageCropStyle> |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getType()
public ImageCropStyle.ImageCropType getType()
The crop type.
.google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
Returns | |
---|---|
Type | Description |
ImageCropStyle.ImageCropType | The type. |
getTypeValue()
public int getTypeValue()
The crop type.
.google.apps.card.v1.ImageCropStyle.ImageCropType type = 1;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for type. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public ImageCropStyle.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
ImageCropStyle.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected ImageCropStyle.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent | BuilderParent |
Returns | |
---|---|
Type | Description |
ImageCropStyle.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused | UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public ImageCropStyle.Builder toBuilder()
Returns | |
---|---|
Type | Description |
ImageCropStyle.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output | CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |