Class ImageConfig.Builder (1.43.0)

public static final class ImageConfig.Builder extends GeneratedMessage.Builder<ImageConfig.Builder> implements ImageConfigOrBuilder

Config for image generation features.

Protobuf type google.cloud.vertexai.v1.ImageConfig

Static Methods

getDescriptor()

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

Methods

build()

public ImageConfig build()
Returns
Type Description
ImageConfig

buildPartial()

public ImageConfig buildPartial()
Returns
Type Description
ImageConfig

clear()

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

clearAspectRatio()

public ImageConfig.Builder clearAspectRatio()

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:

"1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9:16", "16:9" "21:9"

optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ImageConfig.Builder

This builder for chaining.

getAspectRatio()

public String getAspectRatio()

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:

"1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9:16", "16:9" "21:9"

optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The aspectRatio.

getAspectRatioBytes()

public ByteString getAspectRatioBytes()

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:

"1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9:16", "16:9" "21:9"

optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for aspectRatio.

getDefaultInstanceForType()

public ImageConfig getDefaultInstanceForType()
Returns
Type Description
ImageConfig

getDescriptorForType()

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

hasAspectRatio()

public boolean hasAspectRatio()

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:

"1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9:16", "16:9" "21:9"

optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the aspectRatio field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ImageConfig other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setAspectRatio(String value)

public ImageConfig.Builder setAspectRatio(String value)

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:

"1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9:16", "16:9" "21:9"

optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The aspectRatio to set.

Returns
Type Description
ImageConfig.Builder

This builder for chaining.

setAspectRatioBytes(ByteString value)

public ImageConfig.Builder setAspectRatioBytes(ByteString value)

Optional. The desired aspect ratio for the generated images. The following aspect ratios are supported:

"1:1" "2:3", "3:2" "3:4", "4:3" "4:5", "5:4" "9:16", "16:9" "21:9"

optional string aspect_ratio = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for aspectRatio to set.

Returns
Type Description
ImageConfig.Builder

This builder for chaining.