Documentation
¶
Index ¶
- type BaseOverlayLayerMode
- type BaseOverlayParam
- type ExtensionAIAutoDescriptionParam
- type ExtensionAITasksParam
- type ExtensionAITasksTaskSelectMetadataParam
- type ExtensionAITasksTaskSelectMetadataVocabularyUnionParam
- type ExtensionAITasksTaskSelectTagsParam
- type ExtensionAITasksTaskUnionParam
- func (u ExtensionAITasksTaskUnionParam) GetField() *string
- func (u ExtensionAITasksTaskUnionParam) GetInstruction() *string
- func (u ExtensionAITasksTaskUnionParam) GetMaxSelections() *int64
- func (u ExtensionAITasksTaskUnionParam) GetMinSelections() *int64
- func (u ExtensionAITasksTaskUnionParam) GetOnNo() *ExtensionAITasksTaskYesNoOnNoParam
- func (u ExtensionAITasksTaskUnionParam) GetOnUnknown() *ExtensionAITasksTaskYesNoOnUnknownParam
- func (u ExtensionAITasksTaskUnionParam) GetOnYes() *ExtensionAITasksTaskYesNoOnYesParam
- func (u ExtensionAITasksTaskUnionParam) GetType() *string
- func (u ExtensionAITasksTaskUnionParam) GetVocabulary() (res extensionAITasksTaskUnionParamVocabulary)
- func (u ExtensionAITasksTaskUnionParam) MarshalJSON() ([]byte, error)
- func (u *ExtensionAITasksTaskUnionParam) UnmarshalJSON(data []byte) error
- type ExtensionAITasksTaskYesNoOnNoParam
- type ExtensionAITasksTaskYesNoOnNoSetMetadataParam
- type ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam
- type ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam
- type ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam
- type ExtensionAITasksTaskYesNoOnUnknownParam
- type ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam
- type ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam
- type ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam
- type ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam
- type ExtensionAITasksTaskYesNoOnYesParam
- type ExtensionAITasksTaskYesNoOnYesSetMetadataParam
- type ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam
- type ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam
- type ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam
- type ExtensionAITasksTaskYesNoParam
- type ExtensionAutoTaggingParam
- type ExtensionConfigAIAutoDescription
- type ExtensionConfigAIAutoDescriptionParam
- type ExtensionConfigAITasks
- type ExtensionConfigAITasksParam
- type ExtensionConfigAITasksTaskSelectMetadata
- type ExtensionConfigAITasksTaskSelectMetadataParam
- type ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion
- func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam
- type ExtensionConfigAITasksTaskSelectTags
- type ExtensionConfigAITasksTaskSelectTagsParam
- type ExtensionConfigAITasksTaskUnion
- func (u ExtensionConfigAITasksTaskUnion) AsAny() anyExtensionConfigAITasksTask
- func (u ExtensionConfigAITasksTaskUnion) AsSelectMetadata() (v ExtensionConfigAITasksTaskSelectMetadata)
- func (u ExtensionConfigAITasksTaskUnion) AsSelectTags() (v ExtensionConfigAITasksTaskSelectTags)
- func (u ExtensionConfigAITasksTaskUnion) AsYesNo() (v ExtensionConfigAITasksTaskYesNo)
- func (u ExtensionConfigAITasksTaskUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskUnionParam
- func (u ExtensionConfigAITasksTaskUnionParam) GetField() *string
- func (u ExtensionConfigAITasksTaskUnionParam) GetInstruction() *string
- func (u ExtensionConfigAITasksTaskUnionParam) GetMaxSelections() *int64
- func (u ExtensionConfigAITasksTaskUnionParam) GetMinSelections() *int64
- func (u ExtensionConfigAITasksTaskUnionParam) GetOnNo() *ExtensionConfigAITasksTaskYesNoOnNoParam
- func (u ExtensionConfigAITasksTaskUnionParam) GetOnUnknown() *ExtensionConfigAITasksTaskYesNoOnUnknownParam
- func (u ExtensionConfigAITasksTaskUnionParam) GetOnYes() *ExtensionConfigAITasksTaskYesNoOnYesParam
- func (u ExtensionConfigAITasksTaskUnionParam) GetType() *string
- func (u ExtensionConfigAITasksTaskUnionParam) GetVocabulary() (res extensionConfigAITasksTaskUnionParamVocabulary)
- func (u ExtensionConfigAITasksTaskUnionParam) MarshalJSON() ([]byte, error)
- func (u *ExtensionConfigAITasksTaskUnionParam) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskUnionVocabulary
- type ExtensionConfigAITasksTaskYesNo
- type ExtensionConfigAITasksTaskYesNoOnNo
- type ExtensionConfigAITasksTaskYesNoOnNoParam
- type ExtensionConfigAITasksTaskYesNoOnNoSetMetadata
- type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam
- type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam
- type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsMixed() (v []ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam
- type ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata
- type ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam
- type ExtensionConfigAITasksTaskYesNoOnUnknown
- type ExtensionConfigAITasksTaskYesNoOnUnknownParam
- type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata
- type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam
- type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam
- type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsMixed() (v []ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam
- type ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata
- type ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam
- type ExtensionConfigAITasksTaskYesNoOnYes
- type ExtensionConfigAITasksTaskYesNoOnYesParam
- type ExtensionConfigAITasksTaskYesNoOnYesSetMetadata
- type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam
- type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam
- type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsBool() (v bool)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsFloat() (v float64)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsMixed() (v []ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsString() (v string)
- func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) RawJSON() string
- func (r *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam
- type ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata
- type ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam
- type ExtensionConfigAITasksTaskYesNoParam
- type ExtensionConfigAutoTagging
- type ExtensionConfigAutoTaggingParam
- type ExtensionConfigRemoveBg
- type ExtensionConfigRemoveBgOptions
- type ExtensionConfigRemoveBgOptionsParam
- type ExtensionConfigRemoveBgParam
- type ExtensionConfigUnion
- func (u ExtensionConfigUnion) AsAIAutoDescription() (v ExtensionConfigAIAutoDescription)
- func (u ExtensionConfigUnion) AsAITasks() (v ExtensionConfigAITasks)
- func (u ExtensionConfigUnion) AsAutoTagging() (v ExtensionConfigAutoTagging)
- func (u ExtensionConfigUnion) AsRemoveBg() (v ExtensionConfigRemoveBg)
- func (u ExtensionConfigUnion) RawJSON() string
- func (r ExtensionConfigUnion) ToParam() ExtensionConfigUnionParam
- func (r *ExtensionConfigUnion) UnmarshalJSON(data []byte) error
- type ExtensionConfigUnionParam
- func (u ExtensionConfigUnionParam) GetMaxTags() *int64
- func (u ExtensionConfigUnionParam) GetMinConfidence() *int64
- func (u ExtensionConfigUnionParam) GetName() *string
- func (u ExtensionConfigUnionParam) GetOptions() *ExtensionConfigRemoveBgOptionsParam
- func (u ExtensionConfigUnionParam) GetTasks() []ExtensionConfigAITasksTaskUnionParam
- func (u ExtensionConfigUnionParam) MarshalJSON() ([]byte, error)
- func (u *ExtensionConfigUnionParam) UnmarshalJSON(data []byte) error
- type ExtensionRemoveBgOptionsParam
- type ExtensionRemoveBgParam
- type ExtensionSavedExtensionParam
- type ExtensionUnionParam
- func (u ExtensionUnionParam) GetID() *string
- func (u ExtensionUnionParam) GetMaxTags() *int64
- func (u ExtensionUnionParam) GetMinConfidence() *int64
- func (u ExtensionUnionParam) GetName() *string
- func (u ExtensionUnionParam) GetOptions() *ExtensionRemoveBgOptionsParam
- func (u ExtensionUnionParam) GetTasks() []ExtensionAITasksTaskUnionParam
- func (u ExtensionUnionParam) MarshalJSON() ([]byte, error)
- func (u *ExtensionUnionParam) UnmarshalJSON(data []byte) error
- type ExtensionsParam
- type GetImageAttributesOptionsParam
- type ImageOverlayParam
- type OverlayPositionAnchorPoint
- type OverlayPositionFocus
- type OverlayPositionParam
- type OverlayPositionXCenterUnionParam
- type OverlayPositionXUnionParam
- type OverlayPositionYCenterUnionParam
- type OverlayPositionYUnionParam
- type OverlayTimingDurationUnionParam
- type OverlayTimingEndUnionParam
- type OverlayTimingParam
- type OverlayTimingStartUnionParam
- type OverlayUnionParam
- func (u OverlayUnionParam) GetColor() *string
- func (u OverlayUnionParam) GetEncoding() *string
- func (u OverlayUnionParam) GetInput() *string
- func (u OverlayUnionParam) GetLayerMode() *string
- func (u OverlayUnionParam) GetPosition() *OverlayPositionParam
- func (u OverlayUnionParam) GetText() *string
- func (u OverlayUnionParam) GetTiming() *OverlayTimingParam
- func (u OverlayUnionParam) GetTransformation() (res overlayUnionParamTransformation)
- func (u OverlayUnionParam) GetType() *string
- func (u OverlayUnionParam) MarshalJSON() ([]byte, error)
- func (u *OverlayUnionParam) UnmarshalJSON(data []byte) error
- type ResponsiveImageAttributesParam
- type SavedExtension
- type SavedExtensionParam
- type SolidColorOverlayParam
- type SolidColorOverlayTransformationGradientBoolean
- type SolidColorOverlayTransformationGradientUnionParam
- type SolidColorOverlayTransformationHeightUnionParam
- type SolidColorOverlayTransformationParam
- type SolidColorOverlayTransformationRadiusUnionParam
- type SolidColorOverlayTransformationWidthUnionParam
- type SrcOptionsParam
- type StreamingResolution
- type SubtitleOverlayParam
- type SubtitleOverlayTransformationParam
- type SubtitleOverlayTransformationTypography
- type TextOverlayParam
- type TextOverlayTransformationFlip
- type TextOverlayTransformationFontSizeUnionParam
- type TextOverlayTransformationInnerAlignment
- type TextOverlayTransformationLineHeightUnionParam
- type TextOverlayTransformationPaddingUnionParam
- type TextOverlayTransformationParam
- type TextOverlayTransformationRadiusUnionParam
- type TextOverlayTransformationRotationUnionParam
- type TextOverlayTransformationWidthUnionParam
- type TransformationAIDropShadowBoolean
- type TransformationAIDropShadowUnionParam
- type TransformationAspectRatioUnionParam
- type TransformationAudioCodec
- type TransformationCrop
- type TransformationCropMode
- type TransformationDurationUnionParam
- type TransformationEndOffsetUnionParam
- type TransformationFlip
- type TransformationFormat
- type TransformationGradientBoolean
- type TransformationGradientUnionParam
- type TransformationHeightUnionParam
- type TransformationPageUnionParam
- type TransformationParam
- type TransformationPosition
- type TransformationRadiusUnionParam
- type TransformationRotationUnionParam
- type TransformationShadowBoolean
- type TransformationShadowUnionParam
- type TransformationSharpenBoolean
- type TransformationSharpenUnionParam
- type TransformationStartOffsetUnionParam
- type TransformationTrimBoolean
- type TransformationTrimUnionParam
- type TransformationUnsharpMaskBoolean
- type TransformationUnsharpMaskUnionParam
- type TransformationVideoCodec
- type TransformationWidthUnionParam
- type TransformationXCenterUnionParam
- type TransformationXUnionParam
- type TransformationYCenterUnionParam
- type TransformationYUnionParam
- type VideoOverlayParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseOverlayLayerMode ¶ added in v2.1.0
type BaseOverlayLayerMode string
Controls how the layer blends with the base image or underlying content. Maps to `lm` in the URL. By default, layers completely cover the base image beneath them. Layer modes change this behavior:
- `multiply`: Multiplies the pixel values of the layer with the base image. The result is always darker than the original images. This is ideal for applying shadows or color tints.
- `displace`: Uses the layer as a displacement map to distort pixels in the base image. The red channel controls horizontal displacement, and the green channel controls vertical displacement. Requires `x` or `y` parameter to control displacement magnitude.
- `cutout`: Acts as an inverse mask where opaque areas of the layer turn the base image transparent, while transparent areas leave the base image unchanged. This mode functions like a hole-punch, effectively cutting the shape of the layer out of the underlying image.
- `cutter`: Acts as a shape mask where only the parts of the base image that fall inside the opaque area of the layer are preserved. This mode functions like a cookie-cutter, trimming the base image to match the specific dimensions and shape of the layer. See [Layer modes](https://imagekit.io/docs/add-overlays-on-images#layer-modes).
const ( BaseOverlayLayerModeMultiply BaseOverlayLayerMode = "multiply" BaseOverlayLayerModeCutter BaseOverlayLayerMode = "cutter" BaseOverlayLayerModeCutout BaseOverlayLayerMode = "cutout" BaseOverlayLayerModeDisplace BaseOverlayLayerMode = "displace" )
type BaseOverlayParam ¶
type BaseOverlayParam struct {
// Controls how the layer blends with the base image or underlying content. Maps to
// `lm` in the URL. By default, layers completely cover the base image beneath
// them. Layer modes change this behavior:
//
// - `multiply`: Multiplies the pixel values of the layer with the base image. The
// result is always darker than the original images. This is ideal for applying
// shadows or color tints.
// - `displace`: Uses the layer as a displacement map to distort pixels in the base
// image. The red channel controls horizontal displacement, and the green channel
// controls vertical displacement. Requires `x` or `y` parameter to control
// displacement magnitude.
// - `cutout`: Acts as an inverse mask where opaque areas of the layer turn the
// base image transparent, while transparent areas leave the base image
// unchanged. This mode functions like a hole-punch, effectively cutting the
// shape of the layer out of the underlying image.
// - `cutter`: Acts as a shape mask where only the parts of the base image that
// fall inside the opaque area of the layer are preserved. This mode functions
// like a cookie-cutter, trimming the base image to match the specific dimensions
// and shape of the layer. See
// [Layer modes](https://imagekit.io/docs/add-overlays-on-images#layer-modes).
//
// Any of "multiply", "cutter", "cutout", "displace".
LayerMode BaseOverlayLayerMode `json:"layerMode,omitzero"`
// Specifies the overlay's position relative to the parent asset. See
// [Position of Layer](https://imagekit.io/docs/transformations#position-of-layer).
Position OverlayPositionParam `json:"position,omitzero"`
// Specifies timing information for the overlay (only applicable if the base asset
// is a video). See
// [Position of Layer](https://imagekit.io/docs/transformations#position-of-layer).
Timing OverlayTimingParam `json:"timing,omitzero"`
// contains filtered or unexported fields
}
func (BaseOverlayParam) MarshalJSON ¶
func (r BaseOverlayParam) MarshalJSON() (data []byte, err error)
func (*BaseOverlayParam) UnmarshalJSON ¶
func (r *BaseOverlayParam) UnmarshalJSON(data []byte) error
type ExtensionAIAutoDescriptionParam ¶
type ExtensionAIAutoDescriptionParam struct {
// Specifies the auto description extension.
Name constant.AIAutoDescription `json:"name" default:"ai-auto-description"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewExtensionAIAutoDescriptionParam.
func NewExtensionAIAutoDescriptionParam ¶
func NewExtensionAIAutoDescriptionParam() ExtensionAIAutoDescriptionParam
func (ExtensionAIAutoDescriptionParam) MarshalJSON ¶
func (r ExtensionAIAutoDescriptionParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAIAutoDescriptionParam) UnmarshalJSON ¶
func (r *ExtensionAIAutoDescriptionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksParam ¶ added in v2.1.0
type ExtensionAITasksParam struct {
// Array of task objects defining AI operations to perform on the asset.
Tasks []ExtensionAITasksTaskUnionParam `json:"tasks,omitzero" api:"required"`
// Specifies the AI tasks extension for automated image analysis using AI models.
//
// This field can be elided, and will marshal its zero value as "ai-tasks".
Name constant.AITasks `json:"name" default:"ai-tasks"`
// contains filtered or unexported fields
}
The properties Name, Tasks are required.
func (ExtensionAITasksParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskSelectMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskSelectMetadataParam struct {
// Name of the custom metadata field to set. The field must exist in your account.
Field string `json:"field" api:"required"`
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction" api:"required"`
// Maximum number of values to select from the vocabulary.
MaxSelections param.Opt[int64] `json:"max_selections,omitzero"`
// Minimum number of values to select from the vocabulary.
MinSelections param.Opt[int64] `json:"min_selections,omitzero"`
// An array of possible values matching the custom metadata field type. If not
// provided for SingleSelect or MultiSelect field types, all values from the custom
// metadata field definition will be used. When providing large vocabularies (above
// 30 items), the AI may not strictly adhere to the list.
Vocabulary []ExtensionAITasksTaskSelectMetadataVocabularyUnionParam `json:"vocabulary,omitzero"`
// Task type that analyzes the image and sets a custom metadata field value from a
// vocabulary.
//
// This field can be elided, and will marshal its zero value as "select_metadata".
Type constant.SelectMetadata `json:"type" default:"select_metadata"`
// contains filtered or unexported fields
}
The properties Field, Instruction, Type are required.
func (ExtensionAITasksTaskSelectMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskSelectMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskSelectMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskSelectMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskSelectMetadataVocabularyUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskSelectMetadataVocabularyUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskSelectMetadataVocabularyUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskSelectMetadataVocabularyUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskSelectMetadataVocabularyUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskSelectMetadataVocabularyUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskSelectTagsParam ¶ added in v2.1.0
type ExtensionAITasksTaskSelectTagsParam struct {
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction" api:"required"`
// Maximum number of tags to select from the vocabulary.
MaxSelections param.Opt[int64] `json:"max_selections,omitzero"`
// Minimum number of tags to select from the vocabulary.
MinSelections param.Opt[int64] `json:"min_selections,omitzero"`
// Array of possible tag values. The combined length of all strings must not exceed
// 500 characters, and values cannot include the `%` character. When providing
// large vocabularies (more than 30 items), the AI may not follow the list
// strictly.
Vocabulary []string `json:"vocabulary,omitzero"`
// Task type that analyzes the image and adds matching tags from a vocabulary.
//
// This field can be elided, and will marshal its zero value as "select_tags".
Type constant.SelectTags `json:"type" default:"select_tags"`
// contains filtered or unexported fields
}
The properties Instruction, Type are required.
func (ExtensionAITasksTaskSelectTagsParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskSelectTagsParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskSelectTagsParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskSelectTagsParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskUnionParam struct {
OfSelectTags *ExtensionAITasksTaskSelectTagsParam `json:",omitzero,inline"`
OfSelectMetadata *ExtensionAITasksTaskSelectMetadataParam `json:",omitzero,inline"`
OfYesNo *ExtensionAITasksTaskYesNoParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskUnionParam) GetField ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetField() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetInstruction ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetInstruction() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetMaxSelections ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetMaxSelections() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetMinSelections ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetMinSelections() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetOnNo ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetOnNo() *ExtensionAITasksTaskYesNoOnNoParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetOnUnknown ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetOnUnknown() *ExtensionAITasksTaskYesNoOnUnknownParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetOnYes ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetOnYes() *ExtensionAITasksTaskYesNoOnYesParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetType ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionAITasksTaskUnionParam) GetVocabulary ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) GetVocabulary() (res extensionAITasksTaskUnionParamVocabulary)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (ExtensionAITasksTaskUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnNoParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnNoParam struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags,omitzero"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags,omitzero"`
// Array of custom metadata field updates.
SetMetadata []ExtensionAITasksTaskYesNoOnNoSetMetadataParam `json:"set_metadata,omitzero"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam `json:"unset_metadata,omitzero"`
// contains filtered or unexported fields
}
Actions to execute if the AI answers no.
func (ExtensionAITasksTaskYesNoOnNoParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnNoParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnNoParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnNoParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnNoSetMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnNoSetMetadataParam struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Field, Value are required.
func (ExtensionAITasksTaskYesNoOnNoSetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnNoSetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnNoSetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnNoSetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfMixed []ExtensionAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskYesNoOnNoSetMetadataValueUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// contains filtered or unexported fields
}
The property Field is required.
func (ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnNoUnsetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnUnknownParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnUnknownParam struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags,omitzero"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags,omitzero"`
// Array of custom metadata field updates.
SetMetadata []ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam `json:"set_metadata,omitzero"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam `json:"unset_metadata,omitzero"`
// contains filtered or unexported fields
}
Actions to execute if the AI cannot determine the answer.
func (ExtensionAITasksTaskYesNoOnUnknownParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnUnknownParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnUnknownParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnUnknownParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Field, Value are required.
func (ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnUnknownSetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfMixed []ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// contains filtered or unexported fields
}
The property Field is required.
func (ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnUnknownUnsetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnYesParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnYesParam struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags,omitzero"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags,omitzero"`
// Array of custom metadata field updates.
SetMetadata []ExtensionAITasksTaskYesNoOnYesSetMetadataParam `json:"set_metadata,omitzero"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam `json:"unset_metadata,omitzero"`
// contains filtered or unexported fields
}
Actions to execute if the AI answers yes.
func (ExtensionAITasksTaskYesNoOnYesParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnYesParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnYesParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnYesParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnYesSetMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnYesSetMetadataParam struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Field, Value are required.
func (ExtensionAITasksTaskYesNoOnYesSetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnYesSetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnYesSetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnYesSetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfMixed []ExtensionAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionAITasksTaskYesNoOnYesSetMetadataValueUnionParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// contains filtered or unexported fields
}
The property Field is required.
func (ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoOnYesUnsetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionAITasksTaskYesNoParam ¶ added in v2.1.0
type ExtensionAITasksTaskYesNoParam struct {
// The yes/no question for the AI to answer about the image.
Instruction string `json:"instruction" api:"required"`
// Actions to execute if the AI answers no.
OnNo ExtensionAITasksTaskYesNoOnNoParam `json:"on_no,omitzero"`
// Actions to execute if the AI cannot determine the answer.
OnUnknown ExtensionAITasksTaskYesNoOnUnknownParam `json:"on_unknown,omitzero"`
// Actions to execute if the AI answers yes.
OnYes ExtensionAITasksTaskYesNoOnYesParam `json:"on_yes,omitzero"`
// Task type that asks a yes/no question and executes actions based on the answer.
//
// This field can be elided, and will marshal its zero value as "yes_no".
Type constant.YesNo `json:"type" default:"yes_no"`
// contains filtered or unexported fields
}
The properties Instruction, Type are required.
func (ExtensionAITasksTaskYesNoParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionAITasksTaskYesNoParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAITasksTaskYesNoParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionAITasksTaskYesNoParam) UnmarshalJSON(data []byte) error
type ExtensionAutoTaggingParam ¶
type ExtensionAutoTaggingParam struct {
// Maximum number of tags to attach to the asset.
MaxTags int64 `json:"maxTags" api:"required"`
// Minimum confidence level for tags to be considered valid.
MinConfidence int64 `json:"minConfidence" api:"required"`
// Specifies the auto-tagging extension used.
//
// Any of "google-auto-tagging", "aws-auto-tagging".
Name string `json:"name,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties MaxTags, MinConfidence, Name are required.
func (ExtensionAutoTaggingParam) MarshalJSON ¶
func (r ExtensionAutoTaggingParam) MarshalJSON() (data []byte, err error)
func (*ExtensionAutoTaggingParam) UnmarshalJSON ¶
func (r *ExtensionAutoTaggingParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAIAutoDescription ¶ added in v2.1.0
type ExtensionConfigAIAutoDescription struct {
// Specifies the auto description extension.
Name constant.AIAutoDescription `json:"name" default:"ai-auto-description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAIAutoDescription) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAIAutoDescription) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAIAutoDescription) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAIAutoDescription) UnmarshalJSON(data []byte) error
type ExtensionConfigAIAutoDescriptionParam ¶ added in v2.1.0
type ExtensionConfigAIAutoDescriptionParam struct {
// Specifies the auto description extension.
Name constant.AIAutoDescription `json:"name" default:"ai-auto-description"`
// contains filtered or unexported fields
}
This struct has a constant value, construct it with NewExtensionConfigAIAutoDescriptionParam.
func NewExtensionConfigAIAutoDescriptionParam ¶ added in v2.1.0
func NewExtensionConfigAIAutoDescriptionParam() ExtensionConfigAIAutoDescriptionParam
func (ExtensionConfigAIAutoDescriptionParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAIAutoDescriptionParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAIAutoDescriptionParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAIAutoDescriptionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasks ¶ added in v2.1.0
type ExtensionConfigAITasks struct {
// Specifies the AI tasks extension for automated image analysis using AI models.
Name constant.AITasks `json:"name" default:"ai-tasks"`
// Array of task objects defining AI operations to perform on the asset.
Tasks []ExtensionConfigAITasksTaskUnion `json:"tasks" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Tasks respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasks) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasks) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasks) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasks) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksParam ¶ added in v2.1.0
type ExtensionConfigAITasksParam struct {
// Array of task objects defining AI operations to perform on the asset.
Tasks []ExtensionConfigAITasksTaskUnionParam `json:"tasks,omitzero" api:"required"`
// Specifies the AI tasks extension for automated image analysis using AI models.
//
// This field can be elided, and will marshal its zero value as "ai-tasks".
Name constant.AITasks `json:"name" default:"ai-tasks"`
// contains filtered or unexported fields
}
The properties Name, Tasks are required.
func (ExtensionConfigAITasksParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskSelectMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskSelectMetadata struct {
// Name of the custom metadata field to set. The field must exist in your account.
Field string `json:"field" api:"required"`
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction" api:"required"`
// Task type that analyzes the image and sets a custom metadata field value from a
// vocabulary.
Type constant.SelectMetadata `json:"type" default:"select_metadata"`
// Maximum number of values to select from the vocabulary.
MaxSelections int64 `json:"max_selections"`
// Minimum number of values to select from the vocabulary.
MinSelections int64 `json:"min_selections"`
// An array of possible values matching the custom metadata field type. If not
// provided for SingleSelect or MultiSelect field types, all values from the custom
// metadata field definition will be used. When providing large vocabularies (above
// 30 items), the AI may not strictly adhere to the list.
Vocabulary []ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion `json:"vocabulary"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
Instruction respjson.Field
Type respjson.Field
MaxSelections respjson.Field
MinSelections respjson.Field
Vocabulary respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskSelectMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskSelectMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskSelectMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskSelectMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskSelectMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskSelectMetadataParam struct {
// Name of the custom metadata field to set. The field must exist in your account.
Field string `json:"field" api:"required"`
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction" api:"required"`
// Maximum number of values to select from the vocabulary.
MaxSelections param.Opt[int64] `json:"max_selections,omitzero"`
// Minimum number of values to select from the vocabulary.
MinSelections param.Opt[int64] `json:"min_selections,omitzero"`
// An array of possible values matching the custom metadata field type. If not
// provided for SingleSelect or MultiSelect field types, all values from the custom
// metadata field definition will be used. When providing large vocabularies (above
// 30 items), the AI may not strictly adhere to the list.
Vocabulary []ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam `json:"vocabulary,omitzero"`
// Task type that analyzes the image and sets a custom metadata field value from a
// vocabulary.
//
// This field can be elided, and will marshal its zero value as "select_metadata".
Type constant.SelectMetadata `json:"type" default:"select_metadata"`
// contains filtered or unexported fields
}
The properties Field, Instruction, Type are required.
func (ExtensionConfigAITasksTaskSelectMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskSelectMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskSelectMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskSelectMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion contains all possible properties and values from [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool]
func (ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskSelectMetadataVocabularyUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskSelectTags ¶ added in v2.1.0
type ExtensionConfigAITasksTaskSelectTags struct {
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction" api:"required"`
// Task type that analyzes the image and adds matching tags from a vocabulary.
Type constant.SelectTags `json:"type" default:"select_tags"`
// Maximum number of tags to select from the vocabulary.
MaxSelections int64 `json:"max_selections"`
// Minimum number of tags to select from the vocabulary.
MinSelections int64 `json:"min_selections"`
// Array of possible tag values. The combined length of all strings must not exceed
// 500 characters, and values cannot include the `%` character. When providing
// large vocabularies (more than 30 items), the AI may not follow the list
// strictly.
Vocabulary []string `json:"vocabulary"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Instruction respjson.Field
Type respjson.Field
MaxSelections respjson.Field
MinSelections respjson.Field
Vocabulary respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskSelectTags) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskSelectTags) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskSelectTags) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskSelectTags) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskSelectTagsParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskSelectTagsParam struct {
// The question or instruction for the AI to analyze the image.
Instruction string `json:"instruction" api:"required"`
// Maximum number of tags to select from the vocabulary.
MaxSelections param.Opt[int64] `json:"max_selections,omitzero"`
// Minimum number of tags to select from the vocabulary.
MinSelections param.Opt[int64] `json:"min_selections,omitzero"`
// Array of possible tag values. The combined length of all strings must not exceed
// 500 characters, and values cannot include the `%` character. When providing
// large vocabularies (more than 30 items), the AI may not follow the list
// strictly.
Vocabulary []string `json:"vocabulary,omitzero"`
// Task type that analyzes the image and adds matching tags from a vocabulary.
//
// This field can be elided, and will marshal its zero value as "select_tags".
Type constant.SelectTags `json:"type" default:"select_tags"`
// contains filtered or unexported fields
}
The properties Instruction, Type are required.
func (ExtensionConfigAITasksTaskSelectTagsParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskSelectTagsParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskSelectTagsParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskSelectTagsParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskUnion struct {
Instruction string `json:"instruction"`
// Any of "select_tags", "select_metadata", "yes_no".
Type string `json:"type"`
MaxSelections int64 `json:"max_selections"`
MinSelections int64 `json:"min_selections"`
// This field is a union of [[]string],
// [[]ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion]
Vocabulary ExtensionConfigAITasksTaskUnionVocabulary `json:"vocabulary"`
// This field is from variant [ExtensionConfigAITasksTaskSelectMetadata].
Field string `json:"field"`
// This field is from variant [ExtensionConfigAITasksTaskYesNo].
OnNo ExtensionConfigAITasksTaskYesNoOnNo `json:"on_no"`
// This field is from variant [ExtensionConfigAITasksTaskYesNo].
OnUnknown ExtensionConfigAITasksTaskYesNoOnUnknown `json:"on_unknown"`
// This field is from variant [ExtensionConfigAITasksTaskYesNo].
OnYes ExtensionConfigAITasksTaskYesNoOnYes `json:"on_yes"`
JSON struct {
Instruction respjson.Field
Type respjson.Field
MaxSelections respjson.Field
MinSelections respjson.Field
Vocabulary respjson.Field
Field respjson.Field
OnNo respjson.Field
OnUnknown respjson.Field
OnYes respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskUnion contains all possible properties and values from ExtensionConfigAITasksTaskSelectTags, ExtensionConfigAITasksTaskSelectMetadata, ExtensionConfigAITasksTaskYesNo.
Use the ExtensionConfigAITasksTaskUnion.AsAny method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ExtensionConfigAITasksTaskUnion) AsAny ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnion) AsAny() anyExtensionConfigAITasksTask
Use the following switch statement to find the correct variant
switch variant := ExtensionConfigAITasksTaskUnion.AsAny().(type) {
case shared.ExtensionConfigAITasksTaskSelectTags:
case shared.ExtensionConfigAITasksTaskSelectMetadata:
case shared.ExtensionConfigAITasksTaskYesNo:
default:
fmt.Errorf("no variant present")
}
func (ExtensionConfigAITasksTaskUnion) AsSelectMetadata ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnion) AsSelectMetadata() (v ExtensionConfigAITasksTaskSelectMetadata)
func (ExtensionConfigAITasksTaskUnion) AsSelectTags ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnion) AsSelectTags() (v ExtensionConfigAITasksTaskSelectTags)
func (ExtensionConfigAITasksTaskUnion) AsYesNo ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnion) AsYesNo() (v ExtensionConfigAITasksTaskYesNo)
func (ExtensionConfigAITasksTaskUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskUnionParam struct {
OfSelectTags *ExtensionConfigAITasksTaskSelectTagsParam `json:",omitzero,inline"`
OfSelectMetadata *ExtensionConfigAITasksTaskSelectMetadataParam `json:",omitzero,inline"`
OfYesNo *ExtensionConfigAITasksTaskYesNoParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskUnionParam) GetField ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetField() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetInstruction ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetInstruction() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetMaxSelections ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetMaxSelections() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetMinSelections ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetMinSelections() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetOnNo ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetOnNo() *ExtensionConfigAITasksTaskYesNoOnNoParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetOnUnknown ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetOnUnknown() *ExtensionConfigAITasksTaskYesNoOnUnknownParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetOnYes ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetOnYes() *ExtensionConfigAITasksTaskYesNoOnYesParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetType ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigAITasksTaskUnionParam) GetVocabulary ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) GetVocabulary() (res extensionConfigAITasksTaskUnionParamVocabulary)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (ExtensionConfigAITasksTaskUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskUnionVocabulary ¶ added in v2.1.0
type ExtensionConfigAITasksTaskUnionVocabulary struct {
// This field will be present if the value is a [[]string] instead of an object.
OfStringArray []string `json:",inline"`
// This field will be present if the value is a
// [[]ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion] instead of an
// object.
OfExtensionConfigAITasksTaskSelectMetadataVocabularyArray []ExtensionConfigAITasksTaskSelectMetadataVocabularyUnion `json:",inline"`
JSON struct {
OfStringArray respjson.Field
OfExtensionConfigAITasksTaskSelectMetadataVocabularyArray respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskUnionVocabulary is an implicit subunion of ExtensionConfigAITasksTaskUnion. ExtensionConfigAITasksTaskUnionVocabulary provides convenient access to the sub-properties of the union.
For type safety it is recommended to directly use a variant of the ExtensionConfigAITasksTaskUnion.
If the underlying value is not a json object, one of the following properties will be valid: OfStringArray OfExtensionConfigAITasksTaskSelectMetadataVocabularyArray]
func (*ExtensionConfigAITasksTaskUnionVocabulary) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskUnionVocabulary) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNo ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNo struct {
// The yes/no question for the AI to answer about the image.
Instruction string `json:"instruction" api:"required"`
// Task type that asks a yes/no question and executes actions based on the answer.
Type constant.YesNo `json:"type" default:"yes_no"`
// Actions to execute if the AI answers no.
OnNo ExtensionConfigAITasksTaskYesNoOnNo `json:"on_no"`
// Actions to execute if the AI cannot determine the answer.
OnUnknown ExtensionConfigAITasksTaskYesNoOnUnknown `json:"on_unknown"`
// Actions to execute if the AI answers yes.
OnYes ExtensionConfigAITasksTaskYesNoOnYes `json:"on_yes"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Instruction respjson.Field
Type respjson.Field
OnNo respjson.Field
OnUnknown respjson.Field
OnYes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNo) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNo) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNo) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNo ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNo struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags"`
// Array of custom metadata field updates.
SetMetadata []ExtensionConfigAITasksTaskYesNoOnNoSetMetadata `json:"set_metadata"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata `json:"unset_metadata"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddTags respjson.Field
RemoveTags respjson.Field
SetMetadata respjson.Field
UnsetMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Actions to execute if the AI answers no.
func (ExtensionConfigAITasksTaskYesNoOnNo) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnNo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnNo) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNo) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoParam struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags,omitzero"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags,omitzero"`
// Array of custom metadata field updates.
SetMetadata []ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam `json:"set_metadata,omitzero"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam `json:"unset_metadata,omitzero"`
// contains filtered or unexported fields
}
Actions to execute if the AI answers no.
func (ExtensionConfigAITasksTaskYesNoOnNoParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnNoParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnNoParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadata struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnNoSetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnNoSetMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoSetMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Field, Value are required.
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion contains all possible properties and values from [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool]
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a
// [[]ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion] instead of
// an object.
OfMixed []ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfMixed respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfMixed]
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfMixed []ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueMixedItemUnionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskYesNoOnNoSetMetadataValueUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// contains filtered or unexported fields
}
The property Field is required.
func (ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnNoUnsetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknown ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknown struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags"`
// Array of custom metadata field updates.
SetMetadata []ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata `json:"set_metadata"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata `json:"unset_metadata"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddTags respjson.Field
RemoveTags respjson.Field
SetMetadata respjson.Field
UnsetMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Actions to execute if the AI cannot determine the answer.
func (ExtensionConfigAITasksTaskYesNoOnUnknown) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnUnknown) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnUnknown) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknown) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownParam struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags,omitzero"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags,omitzero"`
// Array of custom metadata field updates.
SetMetadata []ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam `json:"set_metadata,omitzero"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam `json:"unset_metadata,omitzero"`
// contains filtered or unexported fields
}
Actions to execute if the AI cannot determine the answer.
func (ExtensionConfigAITasksTaskYesNoOnUnknownParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnUnknownParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnUnknownParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Field, Value are required.
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion contains all possible properties and values from [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool]
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a
// [[]ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion]
// instead of an object.
OfMixed []ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfMixed respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfMixed]
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfMixed []ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueMixedItemUnionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskYesNoOnUnknownSetMetadataValueUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// contains filtered or unexported fields
}
The property Field is required.
func (ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnUnknownUnsetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYes ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYes struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags"`
// Array of custom metadata field updates.
SetMetadata []ExtensionConfigAITasksTaskYesNoOnYesSetMetadata `json:"set_metadata"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata `json:"unset_metadata"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddTags respjson.Field
RemoveTags respjson.Field
SetMetadata respjson.Field
UnsetMetadata respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Actions to execute if the AI answers yes.
func (ExtensionConfigAITasksTaskYesNoOnYes) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnYes) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnYes) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYes) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesParam struct {
// Array of tag strings to add to the asset.
AddTags []string `json:"add_tags,omitzero"`
// Array of tag strings to remove from the asset.
RemoveTags []string `json:"remove_tags,omitzero"`
// Array of custom metadata field updates.
SetMetadata []ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam `json:"set_metadata,omitzero"`
// Array of custom metadata fields to remove.
UnsetMetadata []ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam `json:"unset_metadata,omitzero"`
// contains filtered or unexported fields
}
Actions to execute if the AI answers yes.
func (ExtensionConfigAITasksTaskYesNoOnYesParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnYesParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnYesParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadata struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnYesSetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnYesSetMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesSetMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam struct {
// Name of the custom metadata field to set.
Field string `json:"field" api:"required"`
// Value to set for the custom metadata field. The value type should match the
// custom metadata field type.
Value ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam `json:"value,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties Field, Value are required.
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion contains all possible properties and values from [string], [float64], [bool].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool]
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [float64] instead of an object.
OfFloat float64 `json:",inline"`
// This field will be present if the value is a [bool] instead of an object.
OfBool bool `json:",inline"`
// This field will be present if the value is a
// [[]ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion] instead
// of an object.
OfMixed []ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion `json:",inline"`
JSON struct {
OfString respjson.Field
OfFloat respjson.Field
OfBool respjson.Field
OfMixed respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion contains all possible properties and values from [string], [float64], [bool], [[]ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnion].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfFloat OfBool OfMixed]
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsBool ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsBool() (v bool)
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsFloat ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsFloat() (v float64)
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsString ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) AsString() (v string)
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam struct {
OfString param.Opt[string] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfBool param.Opt[bool] `json:",omitzero,inline"`
OfMixed []ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueMixedItemUnionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigAITasksTaskYesNoOnYesSetMetadataValueUnionParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadata) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam struct {
// Name of the custom metadata field to remove.
Field string `json:"field" api:"required"`
// contains filtered or unexported fields
}
The property Field is required.
func (ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoOnYesUnsetMetadataParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAITasksTaskYesNoParam ¶ added in v2.1.0
type ExtensionConfigAITasksTaskYesNoParam struct {
// The yes/no question for the AI to answer about the image.
Instruction string `json:"instruction" api:"required"`
// Actions to execute if the AI answers no.
OnNo ExtensionConfigAITasksTaskYesNoOnNoParam `json:"on_no,omitzero"`
// Actions to execute if the AI cannot determine the answer.
OnUnknown ExtensionConfigAITasksTaskYesNoOnUnknownParam `json:"on_unknown,omitzero"`
// Actions to execute if the AI answers yes.
OnYes ExtensionConfigAITasksTaskYesNoOnYesParam `json:"on_yes,omitzero"`
// Task type that asks a yes/no question and executes actions based on the answer.
//
// This field can be elided, and will marshal its zero value as "yes_no".
Type constant.YesNo `json:"type" default:"yes_no"`
// contains filtered or unexported fields
}
The properties Instruction, Type are required.
func (ExtensionConfigAITasksTaskYesNoParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAITasksTaskYesNoParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAITasksTaskYesNoParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAITasksTaskYesNoParam) UnmarshalJSON(data []byte) error
type ExtensionConfigAutoTagging ¶ added in v2.1.0
type ExtensionConfigAutoTagging struct {
// Maximum number of tags to attach to the asset.
MaxTags int64 `json:"maxTags" api:"required"`
// Minimum confidence level for tags to be considered valid.
MinConfidence int64 `json:"minConfidence" api:"required"`
// Specifies the auto-tagging extension used.
//
// Any of "google-auto-tagging", "aws-auto-tagging".
Name string `json:"name" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MaxTags respjson.Field
MinConfidence respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigAutoTagging) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigAutoTagging) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigAutoTagging) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAutoTagging) UnmarshalJSON(data []byte) error
type ExtensionConfigAutoTaggingParam ¶ added in v2.1.0
type ExtensionConfigAutoTaggingParam struct {
// Maximum number of tags to attach to the asset.
MaxTags int64 `json:"maxTags" api:"required"`
// Minimum confidence level for tags to be considered valid.
MinConfidence int64 `json:"minConfidence" api:"required"`
// Specifies the auto-tagging extension used.
//
// Any of "google-auto-tagging", "aws-auto-tagging".
Name string `json:"name,omitzero" api:"required"`
// contains filtered or unexported fields
}
The properties MaxTags, MinConfidence, Name are required.
func (ExtensionConfigAutoTaggingParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigAutoTaggingParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigAutoTaggingParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigAutoTaggingParam) UnmarshalJSON(data []byte) error
type ExtensionConfigRemoveBg ¶ added in v2.1.0
type ExtensionConfigRemoveBg struct {
// Specifies the background removal extension.
Name constant.RemoveBg `json:"name" default:"remove-bg"`
Options ExtensionConfigRemoveBgOptions `json:"options"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Options respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigRemoveBg) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigRemoveBg) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigRemoveBg) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigRemoveBg) UnmarshalJSON(data []byte) error
type ExtensionConfigRemoveBgOptions ¶ added in v2.1.0
type ExtensionConfigRemoveBgOptions struct {
// Whether to add an artificial shadow to the result. Default is false. Note:
// Adding shadows is currently only supported for car photos.
AddShadow bool `json:"add_shadow"`
// Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
// color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
// empty.
BgColor string `json:"bg_color"`
// Sets a background image from a URL. If this parameter is set, `bg_color` must be
// empty.
BgImageURL string `json:"bg_image_url"`
// Allows semi-transparent regions in the result. Default is true. Note:
// Semitransparency is currently only supported for car windows.
Semitransparency bool `json:"semitransparency"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddShadow respjson.Field
BgColor respjson.Field
BgImageURL respjson.Field
Semitransparency respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ExtensionConfigRemoveBgOptions) RawJSON ¶ added in v2.1.0
func (r ExtensionConfigRemoveBgOptions) RawJSON() string
Returns the unmodified JSON received from the API
func (*ExtensionConfigRemoveBgOptions) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigRemoveBgOptions) UnmarshalJSON(data []byte) error
type ExtensionConfigRemoveBgOptionsParam ¶ added in v2.1.0
type ExtensionConfigRemoveBgOptionsParam struct {
// Whether to add an artificial shadow to the result. Default is false. Note:
// Adding shadows is currently only supported for car photos.
AddShadow param.Opt[bool] `json:"add_shadow,omitzero"`
// Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
// color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
// empty.
BgColor param.Opt[string] `json:"bg_color,omitzero"`
// Sets a background image from a URL. If this parameter is set, `bg_color` must be
// empty.
BgImageURL param.Opt[string] `json:"bg_image_url,omitzero"`
// Allows semi-transparent regions in the result. Default is true. Note:
// Semitransparency is currently only supported for car windows.
Semitransparency param.Opt[bool] `json:"semitransparency,omitzero"`
// contains filtered or unexported fields
}
func (ExtensionConfigRemoveBgOptionsParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigRemoveBgOptionsParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigRemoveBgOptionsParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigRemoveBgOptionsParam) UnmarshalJSON(data []byte) error
type ExtensionConfigRemoveBgParam ¶ added in v2.1.0
type ExtensionConfigRemoveBgParam struct {
Options ExtensionConfigRemoveBgOptionsParam `json:"options,omitzero"`
// Specifies the background removal extension.
//
// This field can be elided, and will marshal its zero value as "remove-bg".
Name constant.RemoveBg `json:"name" default:"remove-bg"`
// contains filtered or unexported fields
}
The property Name is required.
func (ExtensionConfigRemoveBgParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionConfigRemoveBgParam) MarshalJSON() (data []byte, err error)
func (*ExtensionConfigRemoveBgParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigRemoveBgParam) UnmarshalJSON(data []byte) error
type ExtensionConfigUnion ¶ added in v2.1.0
type ExtensionConfigUnion struct {
// Any of "remove-bg", nil, "ai-auto-description", "ai-tasks".
Name string `json:"name"`
// This field is from variant [ExtensionConfigRemoveBg].
Options ExtensionConfigRemoveBgOptions `json:"options"`
// This field is from variant [ExtensionConfigAutoTagging].
MaxTags int64 `json:"maxTags"`
// This field is from variant [ExtensionConfigAutoTagging].
MinConfidence int64 `json:"minConfidence"`
// This field is from variant [ExtensionConfigAITasks].
Tasks []ExtensionConfigAITasksTaskUnion `json:"tasks"`
JSON struct {
Name respjson.Field
Options respjson.Field
MaxTags respjson.Field
MinConfidence respjson.Field
Tasks respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ExtensionConfigUnion contains all possible properties and values from ExtensionConfigRemoveBg, ExtensionConfigAutoTagging, ExtensionConfigAIAutoDescription, ExtensionConfigAITasks.
Use the [ExtensionConfigUnion.AsAny] method to switch on the variant.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (ExtensionConfigUnion) AsAIAutoDescription ¶ added in v2.1.0
func (u ExtensionConfigUnion) AsAIAutoDescription() (v ExtensionConfigAIAutoDescription)
func (ExtensionConfigUnion) AsAITasks ¶ added in v2.1.0
func (u ExtensionConfigUnion) AsAITasks() (v ExtensionConfigAITasks)
func (ExtensionConfigUnion) AsAutoTagging ¶ added in v2.1.0
func (u ExtensionConfigUnion) AsAutoTagging() (v ExtensionConfigAutoTagging)
func (ExtensionConfigUnion) AsRemoveBg ¶ added in v2.1.0
func (u ExtensionConfigUnion) AsRemoveBg() (v ExtensionConfigRemoveBg)
func (ExtensionConfigUnion) RawJSON ¶ added in v2.1.0
func (u ExtensionConfigUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (ExtensionConfigUnion) ToParam ¶ added in v2.1.0
func (r ExtensionConfigUnion) ToParam() ExtensionConfigUnionParam
ToParam converts this ExtensionConfigUnion to a ExtensionConfigUnionParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with ExtensionConfigUnionParam.Overrides()
func (*ExtensionConfigUnion) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionConfigUnion) UnmarshalJSON(data []byte) error
type ExtensionConfigUnionParam ¶ added in v2.1.0
type ExtensionConfigUnionParam struct {
OfRemoveBg *ExtensionConfigRemoveBgParam `json:",omitzero,inline"`
OfAutoTagging *ExtensionConfigAutoTaggingParam `json:",omitzero,inline"`
OfAIAutoDescription *ExtensionConfigAIAutoDescriptionParam `json:",omitzero,inline"`
OfAITasks *ExtensionConfigAITasksParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func ExtensionConfigParamOfAITasks ¶ added in v2.1.0
func ExtensionConfigParamOfAITasks(tasks []ExtensionConfigAITasksTaskUnionParam) ExtensionConfigUnionParam
func ExtensionConfigParamOfAutoTagging ¶ added in v2.1.0
func ExtensionConfigParamOfAutoTagging(maxTags int64, minConfidence int64, name string) ExtensionConfigUnionParam
func (ExtensionConfigUnionParam) GetMaxTags ¶ added in v2.1.0
func (u ExtensionConfigUnionParam) GetMaxTags() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigUnionParam) GetMinConfidence ¶ added in v2.1.0
func (u ExtensionConfigUnionParam) GetMinConfidence() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigUnionParam) GetName ¶ added in v2.1.0
func (u ExtensionConfigUnionParam) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigUnionParam) GetOptions ¶ added in v2.1.0
func (u ExtensionConfigUnionParam) GetOptions() *ExtensionConfigRemoveBgOptionsParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigUnionParam) GetTasks ¶ added in v2.1.0
func (u ExtensionConfigUnionParam) GetTasks() []ExtensionConfigAITasksTaskUnionParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionConfigUnionParam) MarshalJSON ¶ added in v2.1.0
func (u ExtensionConfigUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionConfigUnionParam) UnmarshalJSON ¶ added in v2.1.0
func (u *ExtensionConfigUnionParam) UnmarshalJSON(data []byte) error
type ExtensionRemoveBgOptionsParam ¶
type ExtensionRemoveBgOptionsParam struct {
// Whether to add an artificial shadow to the result. Default is false. Note:
// Adding shadows is currently only supported for car photos.
AddShadow param.Opt[bool] `json:"add_shadow,omitzero"`
// Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or
// color name (e.g., "green"). If this parameter is set, `bg_image_url` must be
// empty.
BgColor param.Opt[string] `json:"bg_color,omitzero"`
// Sets a background image from a URL. If this parameter is set, `bg_color` must be
// empty.
BgImageURL param.Opt[string] `json:"bg_image_url,omitzero"`
// Allows semi-transparent regions in the result. Default is true. Note:
// Semitransparency is currently only supported for car windows.
Semitransparency param.Opt[bool] `json:"semitransparency,omitzero"`
// contains filtered or unexported fields
}
func (ExtensionRemoveBgOptionsParam) MarshalJSON ¶
func (r ExtensionRemoveBgOptionsParam) MarshalJSON() (data []byte, err error)
func (*ExtensionRemoveBgOptionsParam) UnmarshalJSON ¶
func (r *ExtensionRemoveBgOptionsParam) UnmarshalJSON(data []byte) error
type ExtensionRemoveBgParam ¶
type ExtensionRemoveBgParam struct {
Options ExtensionRemoveBgOptionsParam `json:"options,omitzero"`
// Specifies the background removal extension.
//
// This field can be elided, and will marshal its zero value as "remove-bg".
Name constant.RemoveBg `json:"name" default:"remove-bg"`
// contains filtered or unexported fields
}
The property Name is required.
func (ExtensionRemoveBgParam) MarshalJSON ¶
func (r ExtensionRemoveBgParam) MarshalJSON() (data []byte, err error)
func (*ExtensionRemoveBgParam) UnmarshalJSON ¶
func (r *ExtensionRemoveBgParam) UnmarshalJSON(data []byte) error
type ExtensionSavedExtensionParam ¶ added in v2.1.0
type ExtensionSavedExtensionParam struct {
// The unique ID of the saved extension to apply.
ID string `json:"id" api:"required"`
// Indicates this is a reference to a saved extension.
//
// This field can be elided, and will marshal its zero value as "saved-extension".
Name constant.SavedExtension `json:"name" default:"saved-extension"`
// contains filtered or unexported fields
}
The properties ID, Name are required.
func (ExtensionSavedExtensionParam) MarshalJSON ¶ added in v2.1.0
func (r ExtensionSavedExtensionParam) MarshalJSON() (data []byte, err error)
func (*ExtensionSavedExtensionParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ExtensionSavedExtensionParam) UnmarshalJSON(data []byte) error
type ExtensionUnionParam ¶
type ExtensionUnionParam struct {
OfRemoveBg *ExtensionRemoveBgParam `json:",omitzero,inline"`
OfAutoTagging *ExtensionAutoTaggingParam `json:",omitzero,inline"`
OfAIAutoDescription *ExtensionAIAutoDescriptionParam `json:",omitzero,inline"`
OfAITasks *ExtensionAITasksParam `json:",omitzero,inline"`
OfSavedExtension *ExtensionSavedExtensionParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (ExtensionUnionParam) GetID ¶ added in v2.1.0
func (u ExtensionUnionParam) GetID() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionUnionParam) GetMaxTags ¶
func (u ExtensionUnionParam) GetMaxTags() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionUnionParam) GetMinConfidence ¶
func (u ExtensionUnionParam) GetMinConfidence() *int64
Returns a pointer to the underlying variant's property, if present.
func (ExtensionUnionParam) GetName ¶
func (u ExtensionUnionParam) GetName() *string
Returns a pointer to the underlying variant's property, if present.
func (ExtensionUnionParam) GetOptions ¶
func (u ExtensionUnionParam) GetOptions() *ExtensionRemoveBgOptionsParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionUnionParam) GetTasks ¶ added in v2.1.0
func (u ExtensionUnionParam) GetTasks() []ExtensionAITasksTaskUnionParam
Returns a pointer to the underlying variant's property, if present.
func (ExtensionUnionParam) MarshalJSON ¶
func (u ExtensionUnionParam) MarshalJSON() ([]byte, error)
func (*ExtensionUnionParam) UnmarshalJSON ¶
func (u *ExtensionUnionParam) UnmarshalJSON(data []byte) error
type ExtensionsParam ¶
type ExtensionsParam []ExtensionUnionParam
type GetImageAttributesOptionsParam ¶ added in v2.1.0
type GetImageAttributesOptionsParam struct {
// Custom list of **device-width breakpoints** in pixels. These define common
// screen widths for responsive image generation.
//
// Defaults to `[640, 750, 828, 1080, 1200, 1920, 2048, 3840]`. Sorted
// automatically.
DeviceBreakpoints []float64 `json:"deviceBreakpoints,omitzero"`
// Custom list of **image-specific breakpoints** in pixels. Useful for generating
// small variants (e.g., placeholders or thumbnails).
//
// Merged with `deviceBreakpoints` before calculating `srcSet`. Defaults to
// `[16, 32, 48, 64, 96, 128, 256, 384]`. Sorted automatically.
ImageBreakpoints []float64 `json:"imageBreakpoints,omitzero"`
// The value for the HTML `sizes` attribute (e.g., `"100vw"` or
// `"(min-width:768px) 50vw, 100vw"`).
//
// - If it includes one or more `vw` units, breakpoints smaller than the
// corresponding percentage of the smallest device width are excluded.
// - If it contains no `vw` units, the full breakpoint list is used.
//
// Enables a width-based strategy and generates `w` descriptors in `srcSet`.
Sizes param.Opt[string] `json:"sizes,omitzero"`
// The intended display width of the image in pixels, used **only when the `sizes`
// attribute is not provided**.
//
// Triggers a DPR-based strategy (1x and 2x variants) and generates `x` descriptors
// in `srcSet`.
//
// Ignored if `sizes` is present.
Width param.Opt[float64] `json:"width,omitzero"`
SrcOptionsParam
}
Options for generating responsive image attributes including `src`, `srcSet`, and `sizes` for HTML `<img>` elements. This schema extends `SrcOptions` to add support for responsive image generation with breakpoints.
func (GetImageAttributesOptionsParam) MarshalJSON ¶ added in v2.1.0
func (r GetImageAttributesOptionsParam) MarshalJSON() (data []byte, err error)
type ImageOverlayParam ¶
type ImageOverlayParam struct {
// Specifies the relative path to the image used as an overlay.
Input string `json:"input" api:"required"`
Type constant.Image `json:"type" default:"image"`
// The input path can be included in the layer as either `i-{input}` or
// `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
// format automatically. To always use base64 encoding (`ie-{base64}`), set this
// parameter to `base64`. To always use plain text (`i-{input}`), set it to
// `plain`.
//
// Regardless of the encoding method:
//
// - Leading and trailing slashes are removed.
// - Remaining slashes within the path are replaced with `@@` when using plain
// text.
Encoding string `json:"encoding,omitzero"`
// Array of transformations to be applied to the overlay image. Supported
// transformations depends on the base/parent asset. See overlays on
// [Images](https://imagekit.io/docs/add-overlays-on-images#list-of-supported-image-transformations-in-image-layers)
// and
// [Videos](https://imagekit.io/docs/add-overlays-on-videos#list-of-transformations-supported-on-image-overlay).
Transformation []TransformationParam `json:"transformation,omitzero"`
BaseOverlayParam
}
func (ImageOverlayParam) MarshalJSON ¶
func (r ImageOverlayParam) MarshalJSON() (data []byte, err error)
type OverlayPositionAnchorPoint ¶ added in v2.3.0
type OverlayPositionAnchorPoint string
Sets the anchor point on the base asset from which the overlay offset is calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
const ( OverlayPositionAnchorPointTop OverlayPositionAnchorPoint = "top" OverlayPositionAnchorPointLeft OverlayPositionAnchorPoint = "left" OverlayPositionAnchorPointRight OverlayPositionAnchorPoint = "right" OverlayPositionAnchorPointBottom OverlayPositionAnchorPoint = "bottom" OverlayPositionAnchorPointTopLeft OverlayPositionAnchorPoint = "top_left" OverlayPositionAnchorPointTopRight OverlayPositionAnchorPoint = "top_right" OverlayPositionAnchorPointBottomLeft OverlayPositionAnchorPoint = "bottom_left" OverlayPositionAnchorPointBottomRight OverlayPositionAnchorPoint = "bottom_right" OverlayPositionAnchorPointCenter OverlayPositionAnchorPoint = "center" )
type OverlayPositionFocus ¶
type OverlayPositionFocus string
Specifies the position of the overlay relative to the parent image or video. If one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this parameter is ignored. Maps to `lfo` in the URL.
const ( OverlayPositionFocusCenter OverlayPositionFocus = "center" OverlayPositionFocusTop OverlayPositionFocus = "top" OverlayPositionFocusLeft OverlayPositionFocus = "left" OverlayPositionFocusBottom OverlayPositionFocus = "bottom" OverlayPositionFocusRight OverlayPositionFocus = "right" OverlayPositionFocusTopLeft OverlayPositionFocus = "top_left" OverlayPositionFocusTopRight OverlayPositionFocus = "top_right" OverlayPositionFocusBottomLeft OverlayPositionFocus = "bottom_left" OverlayPositionFocusBottomRight OverlayPositionFocus = "bottom_right" )
type OverlayPositionParam ¶
type OverlayPositionParam struct {
// Sets the anchor point on the base asset from which the overlay offset is
// calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
// be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
//
// Any of "top", "left", "right", "bottom", "top_left", "top_right", "bottom_left",
// "bottom_right", "center".
AnchorPoint OverlayPositionAnchorPoint `json:"anchorPoint,omitzero"`
// Specifies the position of the overlay relative to the parent image or video. If
// one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
// parameter is ignored. Maps to `lfo` in the URL.
//
// Any of "center", "top", "left", "bottom", "right", "top_left", "top_right",
// "bottom_left", "bottom_right".
Focus OverlayPositionFocus `json:"focus,omitzero"`
// Specifies the x-coordinate of the top-left corner of the base asset where the
// overlay's top-left corner will be positioned. It also accepts arithmetic
// expressions such as `bw_mul_0.4` or `bw_sub_cw`. Maps to `lx` in the URL. Learn
// about
// [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
X OverlayPositionXUnionParam `json:"x,omitzero"`
// Specifies the x-coordinate on the base asset where the overlay's center will be
// positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
// `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
// be used with `y`. Learn about
// [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
XCenter OverlayPositionXCenterUnionParam `json:"xCenter,omitzero"`
// Specifies the y-coordinate of the top-left corner of the base asset where the
// overlay's top-left corner will be positioned. It also accepts arithmetic
// expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
// about
// [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
Y OverlayPositionYUnionParam `json:"y,omitzero"`
// Specifies the y-coordinate on the base asset where the overlay's center will be
// positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
// `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
// be used with `x`. Learn about
// [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
YCenter OverlayPositionYCenterUnionParam `json:"yCenter,omitzero"`
// contains filtered or unexported fields
}
func (OverlayPositionParam) MarshalJSON ¶
func (r OverlayPositionParam) MarshalJSON() (data []byte, err error)
func (*OverlayPositionParam) UnmarshalJSON ¶
func (r *OverlayPositionParam) UnmarshalJSON(data []byte) error
type OverlayPositionXCenterUnionParam ¶ added in v2.3.0
type OverlayPositionXCenterUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayPositionXCenterUnionParam) MarshalJSON ¶ added in v2.3.0
func (u OverlayPositionXCenterUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayPositionXCenterUnionParam) UnmarshalJSON ¶ added in v2.3.0
func (u *OverlayPositionXCenterUnionParam) UnmarshalJSON(data []byte) error
type OverlayPositionXUnionParam ¶
type OverlayPositionXUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayPositionXUnionParam) MarshalJSON ¶
func (u OverlayPositionXUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayPositionXUnionParam) UnmarshalJSON ¶
func (u *OverlayPositionXUnionParam) UnmarshalJSON(data []byte) error
type OverlayPositionYCenterUnionParam ¶ added in v2.3.0
type OverlayPositionYCenterUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayPositionYCenterUnionParam) MarshalJSON ¶ added in v2.3.0
func (u OverlayPositionYCenterUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayPositionYCenterUnionParam) UnmarshalJSON ¶ added in v2.3.0
func (u *OverlayPositionYCenterUnionParam) UnmarshalJSON(data []byte) error
type OverlayPositionYUnionParam ¶
type OverlayPositionYUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayPositionYUnionParam) MarshalJSON ¶
func (u OverlayPositionYUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayPositionYUnionParam) UnmarshalJSON ¶
func (u *OverlayPositionYUnionParam) UnmarshalJSON(data []byte) error
type OverlayTimingDurationUnionParam ¶
type OverlayTimingDurationUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayTimingDurationUnionParam) MarshalJSON ¶
func (u OverlayTimingDurationUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayTimingDurationUnionParam) UnmarshalJSON ¶
func (u *OverlayTimingDurationUnionParam) UnmarshalJSON(data []byte) error
type OverlayTimingEndUnionParam ¶
type OverlayTimingEndUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayTimingEndUnionParam) MarshalJSON ¶
func (u OverlayTimingEndUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayTimingEndUnionParam) UnmarshalJSON ¶
func (u *OverlayTimingEndUnionParam) UnmarshalJSON(data []byte) error
type OverlayTimingParam ¶
type OverlayTimingParam struct {
// Specifies the duration (in seconds) during which the overlay should appear on
// the base video. Accepts a positive number up to two decimal places (e.g., `20`
// or `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
// Applies only if the base asset is a video. Maps to `ldu` in the URL.
Duration OverlayTimingDurationUnionParam `json:"duration,omitzero"`
// Specifies the end time (in seconds) for when the overlay should disappear from
// the base video. If both end and duration are provided, duration is ignored.
// Accepts a positive number up to two decimal places (e.g., `20` or `20.50`) and
// arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`. Applies only if
// the base asset is a video. Maps to `leo` in the URL.
End OverlayTimingEndUnionParam `json:"end,omitzero"`
// Specifies the start time (in seconds) for when the overlay should appear on the
// base video. Accepts a positive number up to two decimal places (e.g., `20` or
// `20.50`) and arithmetic expressions such as `bdu_mul_0.4` or `bdu_sub_idu`.
// Applies only if the base asset is a video. Maps to `lso` in the URL.
Start OverlayTimingStartUnionParam `json:"start,omitzero"`
// contains filtered or unexported fields
}
func (OverlayTimingParam) MarshalJSON ¶
func (r OverlayTimingParam) MarshalJSON() (data []byte, err error)
func (*OverlayTimingParam) UnmarshalJSON ¶
func (r *OverlayTimingParam) UnmarshalJSON(data []byte) error
type OverlayTimingStartUnionParam ¶
type OverlayTimingStartUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OverlayTimingStartUnionParam) MarshalJSON ¶
func (u OverlayTimingStartUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayTimingStartUnionParam) UnmarshalJSON ¶
func (u *OverlayTimingStartUnionParam) UnmarshalJSON(data []byte) error
type OverlayUnionParam ¶
type OverlayUnionParam struct {
OfText *TextOverlayParam `json:",omitzero,inline"`
OfImage *ImageOverlayParam `json:",omitzero,inline"`
OfVideo *VideoOverlayParam `json:",omitzero,inline"`
OfSubtitle *SubtitleOverlayParam `json:",omitzero,inline"`
OfSolidColor *SolidColorOverlayParam `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func OverlayParamOfImage ¶
func OverlayParamOfImage(input string) OverlayUnionParam
func OverlayParamOfSolidColor ¶
func OverlayParamOfSolidColor(color string) OverlayUnionParam
func OverlayParamOfSubtitle ¶
func OverlayParamOfSubtitle(input string) OverlayUnionParam
func OverlayParamOfText ¶
func OverlayParamOfText(text string) OverlayUnionParam
func OverlayParamOfVideo ¶
func OverlayParamOfVideo(input string) OverlayUnionParam
func (OverlayUnionParam) GetColor ¶
func (u OverlayUnionParam) GetColor() *string
Returns a pointer to the underlying variant's property, if present.
func (OverlayUnionParam) GetEncoding ¶
func (u OverlayUnionParam) GetEncoding() *string
Returns a pointer to the underlying variant's property, if present.
func (OverlayUnionParam) GetInput ¶
func (u OverlayUnionParam) GetInput() *string
Returns a pointer to the underlying variant's property, if present.
func (OverlayUnionParam) GetLayerMode ¶ added in v2.1.0
func (u OverlayUnionParam) GetLayerMode() *string
Returns a pointer to the underlying variant's property, if present.
func (OverlayUnionParam) GetPosition ¶
func (u OverlayUnionParam) GetPosition() *OverlayPositionParam
Returns a pointer to the underlying variant's Position property, if present.
func (OverlayUnionParam) GetText ¶
func (u OverlayUnionParam) GetText() *string
Returns a pointer to the underlying variant's property, if present.
func (OverlayUnionParam) GetTiming ¶
func (u OverlayUnionParam) GetTiming() *OverlayTimingParam
Returns a pointer to the underlying variant's Timing property, if present.
func (OverlayUnionParam) GetTransformation ¶
func (u OverlayUnionParam) GetTransformation() (res overlayUnionParamTransformation)
Returns a subunion which exports methods to access subproperties
Or use AsAny() to get the underlying value
func (OverlayUnionParam) GetType ¶
func (u OverlayUnionParam) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (OverlayUnionParam) MarshalJSON ¶
func (u OverlayUnionParam) MarshalJSON() ([]byte, error)
func (*OverlayUnionParam) UnmarshalJSON ¶
func (u *OverlayUnionParam) UnmarshalJSON(data []byte) error
type ResponsiveImageAttributesParam ¶ added in v2.1.0
type ResponsiveImageAttributesParam struct {
// URL for the _largest_ candidate (assigned to plain `src`).
Src string `json:"src" api:"required" format:"uri"`
// `sizes` returned (or synthesised as `100vw`). The value for the HTML `sizes`
// attribute.
Sizes param.Opt[string] `json:"sizes,omitzero"`
// Candidate set with `w` or `x` descriptors. Multiple image URLs separated by
// commas, each with a descriptor.
SrcSet param.Opt[string] `json:"srcSet,omitzero"`
// Width as a number (if `width` was provided in the input options).
Width param.Opt[float64] `json:"width,omitzero"`
// contains filtered or unexported fields
}
Resulting set of attributes suitable for an HTML `<img>` element. Useful for enabling responsive image loading with `srcSet` and `sizes`.
The property Src is required.
func (ResponsiveImageAttributesParam) MarshalJSON ¶ added in v2.1.0
func (r ResponsiveImageAttributesParam) MarshalJSON() (data []byte, err error)
func (*ResponsiveImageAttributesParam) UnmarshalJSON ¶ added in v2.1.0
func (r *ResponsiveImageAttributesParam) UnmarshalJSON(data []byte) error
type SavedExtension ¶ added in v2.1.0
type SavedExtension struct {
// Unique identifier of the saved extension.
ID string `json:"id"`
// Configuration object for an extension (base extensions only, not saved extension
// references).
Config ExtensionConfigUnion `json:"config"`
// Timestamp when the saved extension was created.
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Description of the saved extension.
Description string `json:"description"`
// Name of the saved extension.
Name string `json:"name"`
// Timestamp when the saved extension was last updated.
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Config respjson.Field
CreatedAt respjson.Field
Description respjson.Field
Name respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Saved extension object containing extension configuration.
func (SavedExtension) RawJSON ¶ added in v2.1.0
func (r SavedExtension) RawJSON() string
Returns the unmodified JSON received from the API
func (SavedExtension) ToParam ¶ added in v2.1.0
func (r SavedExtension) ToParam() SavedExtensionParam
ToParam converts this SavedExtension to a SavedExtensionParam.
Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with SavedExtensionParam.Overrides()
func (*SavedExtension) UnmarshalJSON ¶ added in v2.1.0
func (r *SavedExtension) UnmarshalJSON(data []byte) error
type SavedExtensionParam ¶ added in v2.1.0
type SavedExtensionParam struct {
// Unique identifier of the saved extension.
ID param.Opt[string] `json:"id,omitzero"`
// Timestamp when the saved extension was created.
CreatedAt param.Opt[time.Time] `json:"createdAt,omitzero" format:"date-time"`
// Description of the saved extension.
Description param.Opt[string] `json:"description,omitzero"`
// Name of the saved extension.
Name param.Opt[string] `json:"name,omitzero"`
// Timestamp when the saved extension was last updated.
UpdatedAt param.Opt[time.Time] `json:"updatedAt,omitzero" format:"date-time"`
// Configuration object for an extension (base extensions only, not saved extension
// references).
Config ExtensionConfigUnionParam `json:"config,omitzero"`
// contains filtered or unexported fields
}
Saved extension object containing extension configuration.
func (SavedExtensionParam) MarshalJSON ¶ added in v2.1.0
func (r SavedExtensionParam) MarshalJSON() (data []byte, err error)
func (*SavedExtensionParam) UnmarshalJSON ¶ added in v2.1.0
func (r *SavedExtensionParam) UnmarshalJSON(data []byte) error
type SolidColorOverlayParam ¶
type SolidColorOverlayParam struct {
// Specifies the color of the block using an RGB hex code (e.g., `FF0000`), an RGBA
// code (e.g., `FFAABB50`), or a color name (e.g., `red`). If an 8-character value
// is provided, the last two characters represent the opacity level (from `00` for
// 0.00 to `99` for 0.99).
Color string `json:"color" api:"required"`
Type constant.SolidColor `json:"type" default:"solidColor"`
// Control width and height of the solid color overlay. Supported transformations
// depend on the base/parent asset. See overlays on
// [Images](https://imagekit.io/docs/add-overlays-on-images#apply-transformation-on-solid-color-overlay)
// and
// [Videos](https://imagekit.io/docs/add-overlays-on-videos#apply-transformations-on-solid-color-block-overlay).
Transformation []SolidColorOverlayTransformationParam `json:"transformation,omitzero"`
BaseOverlayParam
}
func (SolidColorOverlayParam) MarshalJSON ¶
func (r SolidColorOverlayParam) MarshalJSON() (data []byte, err error)
type SolidColorOverlayTransformationGradientBoolean ¶
type SolidColorOverlayTransformationGradientBoolean bool
const (
SolidColorOverlayTransformationGradientBooleanTrue SolidColorOverlayTransformationGradientBoolean = true
)
type SolidColorOverlayTransformationGradientUnionParam ¶
type SolidColorOverlayTransformationGradientUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfSolidColorOverlayTransformationGradientBoolean param.Opt[bool] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (SolidColorOverlayTransformationGradientUnionParam) MarshalJSON ¶
func (u SolidColorOverlayTransformationGradientUnionParam) MarshalJSON() ([]byte, error)
func (*SolidColorOverlayTransformationGradientUnionParam) UnmarshalJSON ¶
func (u *SolidColorOverlayTransformationGradientUnionParam) UnmarshalJSON(data []byte) error
type SolidColorOverlayTransformationHeightUnionParam ¶
type SolidColorOverlayTransformationHeightUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (SolidColorOverlayTransformationHeightUnionParam) MarshalJSON ¶
func (u SolidColorOverlayTransformationHeightUnionParam) MarshalJSON() ([]byte, error)
func (*SolidColorOverlayTransformationHeightUnionParam) UnmarshalJSON ¶
func (u *SolidColorOverlayTransformationHeightUnionParam) UnmarshalJSON(data []byte) error
type SolidColorOverlayTransformationParam ¶
type SolidColorOverlayTransformationParam struct {
// Specifies the transparency level of the overlaid solid color layer. Supports
// integers from `1` to `9`.
Alpha param.Opt[float64] `json:"alpha,omitzero"`
// Specifies the background color of the solid color overlay. Accepts an RGB hex
// code (e.g., `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
Background param.Opt[string] `json:"background,omitzero"`
// Creates a linear gradient with two colors. Pass `true` for a default gradient,
// or provide a string for a custom gradient. Only works if the base asset is an
// image. See
// [gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
Gradient SolidColorOverlayTransformationGradientUnionParam `json:"gradient,omitzero"`
// Controls the height of the solid color overlay. Accepts a numeric value or an
// arithmetic expression. Learn about
// [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
Height SolidColorOverlayTransformationHeightUnionParam `json:"height,omitzero"`
// Specifies the corner radius of the solid color overlay.
//
// - Single value (positive integer): Applied to all corners (e.g., `20`).
// - `max`: Creates a circular or oval shape.
// - Per-corner array: Provide four underscore-separated values representing
// top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
// `10_20_30_40`). See
// [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
Radius SolidColorOverlayTransformationRadiusUnionParam `json:"radius,omitzero"`
// Controls the width of the solid color overlay. Accepts a numeric value or an
// arithmetic expression (e.g., `bw_mul_0.2` or `bh_div_2`). Learn about
// [arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
Width SolidColorOverlayTransformationWidthUnionParam `json:"width,omitzero"`
// contains filtered or unexported fields
}
func (SolidColorOverlayTransformationParam) MarshalJSON ¶
func (r SolidColorOverlayTransformationParam) MarshalJSON() (data []byte, err error)
func (*SolidColorOverlayTransformationParam) UnmarshalJSON ¶
func (r *SolidColorOverlayTransformationParam) UnmarshalJSON(data []byte) error
type SolidColorOverlayTransformationRadiusUnionParam ¶
type SolidColorOverlayTransformationRadiusUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
// Construct this variant with constant.ValueOf[constant.Max]()
OfMax constant.Max `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (SolidColorOverlayTransformationRadiusUnionParam) MarshalJSON ¶
func (u SolidColorOverlayTransformationRadiusUnionParam) MarshalJSON() ([]byte, error)
func (*SolidColorOverlayTransformationRadiusUnionParam) UnmarshalJSON ¶
func (u *SolidColorOverlayTransformationRadiusUnionParam) UnmarshalJSON(data []byte) error
type SolidColorOverlayTransformationWidthUnionParam ¶
type SolidColorOverlayTransformationWidthUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (SolidColorOverlayTransformationWidthUnionParam) MarshalJSON ¶
func (u SolidColorOverlayTransformationWidthUnionParam) MarshalJSON() ([]byte, error)
func (*SolidColorOverlayTransformationWidthUnionParam) UnmarshalJSON ¶
func (u *SolidColorOverlayTransformationWidthUnionParam) UnmarshalJSON(data []byte) error
type SrcOptionsParam ¶
type SrcOptionsParam struct {
// Accepts a relative or absolute path of the resource. If a relative path is
// provided, it is appended to the `urlEndpoint`. If an absolute path is provided,
// `urlEndpoint` is ignored.
Src string `json:"src" api:"required"`
// Get your urlEndpoint from the
// [ImageKit dashboard](https://imagekit.io/dashboard/url-endpoints).
URLEndpoint string `json:"urlEndpoint" api:"required" format:"uri"`
// When you want the signed URL to expire, specified in seconds. If `expiresIn` is
// anything above 0, the URL will always be signed even if `signed` is set to
// false. If not specified and `signed` is `true`, the signed URL will not expire
// (valid indefinitely).
//
// Example: Setting `expiresIn: 3600` will make the URL expire 1 hour from
// generation time. After the expiry time, the signed URL will no longer be valid
// and ImageKit will return a 401 Unauthorized status code.
//
// [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
ExpiresIn param.Opt[float64] `json:"expiresIn,omitzero"`
// Whether to sign the URL or not. Set this to `true` if you want to generate a
// signed URL. If `signed` is `true` and `expiresIn` is not specified, the signed
// URL will not expire (valid indefinitely). Note: If `expiresIn` is set to any
// value above 0, the URL will always be signed regardless of this setting.
// [Learn more](https://imagekit.io/docs/media-delivery-basic-security#how-to-generate-signed-urls).
Signed param.Opt[bool] `json:"signed,omitzero"`
// These are additional query parameters that you want to add to the final URL.
// They can be any query parameters and not necessarily related to ImageKit. This
// is especially useful if you want to add a versioning parameter to your URLs.
QueryParameters map[string]string `json:"queryParameters,omitzero"`
// An array of objects specifying the transformations to be applied in the URL. If
// more than one transformation is specified, they are applied in the order they
// are specified as chained transformations. See
// [Chained transformations](https://imagekit.io/docs/transformations#chained-transformations).
Transformation []TransformationParam `json:"transformation,omitzero"`
// By default, the transformation string is added as a query parameter in the URL,
// e.g., `?tr=w-100,h-100`. If you want to add the transformation string in the
// path of the URL, set this to `path`. Learn more in the
// [Transformations guide](https://imagekit.io/docs/transformations).
//
// Any of "path", "query".
TransformationPosition TransformationPosition `json:"transformationPosition,omitzero"`
// contains filtered or unexported fields
}
Options for generating ImageKit URLs with transformations. See the [Transformations guide](https://imagekit.io/docs/transformations).
The properties Src, URLEndpoint are required.
func (SrcOptionsParam) MarshalJSON ¶
func (r SrcOptionsParam) MarshalJSON() (data []byte, err error)
func (*SrcOptionsParam) UnmarshalJSON ¶
func (r *SrcOptionsParam) UnmarshalJSON(data []byte) error
type StreamingResolution ¶
type StreamingResolution string
Available streaming resolutions for [adaptive bitrate streaming](https://imagekit.io/docs/adaptive-bitrate-streaming)
const ( StreamingResolution240 StreamingResolution = "240" StreamingResolution360 StreamingResolution = "360" StreamingResolution480 StreamingResolution = "480" StreamingResolution720 StreamingResolution = "720" StreamingResolution1080 StreamingResolution = "1080" StreamingResolution1440 StreamingResolution = "1440" StreamingResolution2160 StreamingResolution = "2160" )
type SubtitleOverlayParam ¶
type SubtitleOverlayParam struct {
// Specifies the relative path to the subtitle file used as an overlay.
Input string `json:"input" api:"required"`
Type constant.Subtitle `json:"type" default:"subtitle"`
// The input path can be included in the layer as either `i-{input}` or
// `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
// format automatically. To always use base64 encoding (`ie-{base64}`), set this
// parameter to `base64`. To always use plain text (`i-{input}`), set it to
// `plain`.
//
// Regardless of the encoding method:
//
// - Leading and trailing slashes are removed.
// - Remaining slashes within the path are replaced with `@@` when using plain
// text.
Encoding string `json:"encoding,omitzero"`
// Control styling of the subtitle. See
// [Styling subtitles](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer).
Transformation []SubtitleOverlayTransformationParam `json:"transformation,omitzero"`
BaseOverlayParam
}
func (SubtitleOverlayParam) MarshalJSON ¶
func (r SubtitleOverlayParam) MarshalJSON() (data []byte, err error)
type SubtitleOverlayTransformationParam ¶
type SubtitleOverlayTransformationParam struct {
// Specifies the subtitle background color using a standard color name, an RGB
// color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
//
// [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
Background param.Opt[string] `json:"background,omitzero"`
// Sets the font color of the subtitle text using a standard color name, an RGB
// color code (e.g., FF0000), or an RGBA color code (e.g., FFAABB50).
//
// [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
Color param.Opt[string] `json:"color,omitzero"`
// Sets the font family of subtitle text. Refer to the
// [supported fonts documented](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list)
// in the ImageKit transformations guide.
FontFamily param.Opt[string] `json:"fontFamily,omitzero"`
// Sets the font outline of the subtitle text. Requires the outline width (an
// integer) and the outline color (as an RGB color code, RGBA color code, or
// standard web color name) separated by an underscore. Example: `fol-2_blue`
// (outline width of 2px and outline color blue), `fol-2_A1CCDD` (outline width of
// 2px and outline color `#A1CCDD`) and `fol-2_A1CCDD50` (outline width of 2px and
// outline color `#A1CCDD` at 50% opacity).
//
// [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
FontOutline param.Opt[string] `json:"fontOutline,omitzero"`
// Sets the font shadow for the subtitle text. Requires the shadow color (as an RGB
// color code, RGBA color code, or standard web color name) and shadow indent (an
// integer) separated by an underscore. Example: `fsh-blue_2` (shadow color blue,
// indent of 2px), `fsh-A1CCDD_3` (shadow color `#A1CCDD`, indent of 3px),
// `fsh-A1CCDD50_3` (shadow color `#A1CCDD` at 50% opacity, indent of 3px).
//
// [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
FontShadow param.Opt[string] `json:"fontShadow,omitzero"`
// Sets the font size of subtitle text.
//
// [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
FontSize param.Opt[float64] `json:"fontSize,omitzero"`
// Sets the typography style of the subtitle text. Supports values are `b` for
// bold, `i` for italics, and `b_i` for bold with italics.
//
// [Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
//
// Any of "b", "i", "b_i".
Typography SubtitleOverlayTransformationTypography `json:"typography,omitzero"`
// contains filtered or unexported fields
}
Subtitle styling options. [Learn more](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer) from the docs.
func (SubtitleOverlayTransformationParam) MarshalJSON ¶
func (r SubtitleOverlayTransformationParam) MarshalJSON() (data []byte, err error)
func (*SubtitleOverlayTransformationParam) UnmarshalJSON ¶
func (r *SubtitleOverlayTransformationParam) UnmarshalJSON(data []byte) error
type SubtitleOverlayTransformationTypography ¶
type SubtitleOverlayTransformationTypography string
Sets the typography style of the subtitle text. Supports values are `b` for bold, `i` for italics, and `b_i` for bold with italics.
[Subtitle styling options](https://imagekit.io/docs/add-overlays-on-videos#styling-controls-for-subtitles-layer)
const ( SubtitleOverlayTransformationTypographyB SubtitleOverlayTransformationTypography = "b" SubtitleOverlayTransformationTypographyI SubtitleOverlayTransformationTypography = "i" SubtitleOverlayTransformationTypographyBI SubtitleOverlayTransformationTypography = "b_i" )
type TextOverlayParam ¶
type TextOverlayParam struct {
// Specifies the text to be displayed in the overlay. The SDK automatically handles
// special characters and encoding.
Text string `json:"text" api:"required"`
Type constant.Text `json:"type" default:"text"`
// Text can be included in the layer as either `i-{input}` (plain text) or
// `ie-{base64_encoded_input}` (base64). By default, the SDK selects the
// appropriate format based on the input text. To always use base64
// (`ie-{base64}`), set this parameter to `base64`. To always use plain text
// (`i-{input}`), set it to `plain`.
//
// Regardless of the encoding method, the input text is always percent-encoded to
// ensure it is URL-safe.
Encoding string `json:"encoding,omitzero"`
// Control styling of the text overlay. See
// [Text overlays](https://imagekit.io/docs/add-overlays-on-images#text-overlay).
Transformation []TextOverlayTransformationParam `json:"transformation,omitzero"`
BaseOverlayParam
}
func (TextOverlayParam) MarshalJSON ¶
func (r TextOverlayParam) MarshalJSON() (data []byte, err error)
type TextOverlayTransformationFlip ¶
type TextOverlayTransformationFlip string
Flip/mirror the text horizontally, vertically, or in both directions. Acceptable values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or `v_h`.
const ( TextOverlayTransformationFlipH TextOverlayTransformationFlip = "h" TextOverlayTransformationFlipV TextOverlayTransformationFlip = "v" TextOverlayTransformationFlipHV TextOverlayTransformationFlip = "h_v" TextOverlayTransformationFlipVH TextOverlayTransformationFlip = "v_h" )
type TextOverlayTransformationFontSizeUnionParam ¶
type TextOverlayTransformationFontSizeUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TextOverlayTransformationFontSizeUnionParam) MarshalJSON ¶
func (u TextOverlayTransformationFontSizeUnionParam) MarshalJSON() ([]byte, error)
func (*TextOverlayTransformationFontSizeUnionParam) UnmarshalJSON ¶
func (u *TextOverlayTransformationFontSizeUnionParam) UnmarshalJSON(data []byte) error
type TextOverlayTransformationInnerAlignment ¶
type TextOverlayTransformationInnerAlignment string
Specifies the inner alignment of the text when width is more than the text length.
const ( TextOverlayTransformationInnerAlignmentLeft TextOverlayTransformationInnerAlignment = "left" TextOverlayTransformationInnerAlignmentRight TextOverlayTransformationInnerAlignment = "right" TextOverlayTransformationInnerAlignmentCenter TextOverlayTransformationInnerAlignment = "center" )
type TextOverlayTransformationLineHeightUnionParam ¶
type TextOverlayTransformationLineHeightUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TextOverlayTransformationLineHeightUnionParam) MarshalJSON ¶
func (u TextOverlayTransformationLineHeightUnionParam) MarshalJSON() ([]byte, error)
func (*TextOverlayTransformationLineHeightUnionParam) UnmarshalJSON ¶
func (u *TextOverlayTransformationLineHeightUnionParam) UnmarshalJSON(data []byte) error
type TextOverlayTransformationPaddingUnionParam ¶
type TextOverlayTransformationPaddingUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TextOverlayTransformationPaddingUnionParam) MarshalJSON ¶
func (u TextOverlayTransformationPaddingUnionParam) MarshalJSON() ([]byte, error)
func (*TextOverlayTransformationPaddingUnionParam) UnmarshalJSON ¶
func (u *TextOverlayTransformationPaddingUnionParam) UnmarshalJSON(data []byte) error
type TextOverlayTransformationParam ¶
type TextOverlayTransformationParam struct {
// Specifies the transparency level of the text overlay. Accepts integers from `1`
// to `9`.
Alpha param.Opt[float64] `json:"alpha,omitzero"`
// Specifies the background color of the text overlay. Accepts an RGB hex code, an
// RGBA code, or a color name.
Background param.Opt[string] `json:"background,omitzero"`
// Specifies the font color of the overlaid text. Accepts an RGB hex code (e.g.,
// `FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
FontColor param.Opt[string] `json:"fontColor,omitzero"`
// Specifies the font family of the overlaid text. Choose from the supported fonts
// list or use a custom font. See
// [Supported fonts](https://imagekit.io/docs/add-overlays-on-images#supported-text-font-list)
// and
// [Custom font](https://imagekit.io/docs/add-overlays-on-images#change-font-family-in-text-overlay).
FontFamily param.Opt[string] `json:"fontFamily,omitzero"`
// Specifies the typography style of the text. Supported values:
//
// - Single styles: `b` (bold), `i` (italic), `strikethrough`.
// - Combinations: Any combination separated by underscores, e.g., `b_i`,
// `b_i_strikethrough`.
Typography param.Opt[string] `json:"typography,omitzero"`
// Flip/mirror the text horizontally, vertically, or in both directions. Acceptable
// values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
// `v_h`.
//
// Any of "h", "v", "h_v", "v_h".
Flip TextOverlayTransformationFlip `json:"flip,omitzero"`
// Specifies the font size of the overlaid text. Accepts a numeric value or an
// arithmetic expression.
FontSize TextOverlayTransformationFontSizeUnionParam `json:"fontSize,omitzero"`
// Specifies the inner alignment of the text when width is more than the text
// length.
//
// Any of "left", "right", "center".
InnerAlignment TextOverlayTransformationInnerAlignment `json:"innerAlignment,omitzero"`
// Specifies the line height for multi-line text overlays. It will come into effect
// only if the text wraps over multiple lines. Accepts either an integer value or
// an arithmetic expression.
LineHeight TextOverlayTransformationLineHeightUnionParam `json:"lineHeight,omitzero"`
// Specifies the padding around the overlaid text. Can be provided as a single
// positive integer or multiple values separated by underscores (following CSS
// shorthand order). Arithmetic expressions are also accepted.
Padding TextOverlayTransformationPaddingUnionParam `json:"padding,omitzero"`
// Specifies the corner radius:
//
// - Single value (positive integer): Applied to all corners (e.g., `20`).
// - `max`: Creates a circular or oval shape.
// - Per-corner array: Provide four underscore-separated values representing
// top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
// `10_20_30_40`). See
// [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
Radius TextOverlayTransformationRadiusUnionParam `json:"radius,omitzero"`
// Specifies the rotation angle of the text overlay. Accepts a numeric value for
// clockwise rotation or a string prefixed with "N" for counter-clockwise rotation.
Rotation TextOverlayTransformationRotationUnionParam `json:"rotation,omitzero"`
// Specifies the maximum width (in pixels) of the overlaid text. The text wraps
// automatically, and arithmetic expressions (e.g., `bw_mul_0.2` or `bh_div_2`) are
// supported. Useful when used in conjunction with the `background`. Learn about
// [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
Width TextOverlayTransformationWidthUnionParam `json:"width,omitzero"`
// contains filtered or unexported fields
}
func (TextOverlayTransformationParam) MarshalJSON ¶
func (r TextOverlayTransformationParam) MarshalJSON() (data []byte, err error)
func (*TextOverlayTransformationParam) UnmarshalJSON ¶
func (r *TextOverlayTransformationParam) UnmarshalJSON(data []byte) error
type TextOverlayTransformationRadiusUnionParam ¶
type TextOverlayTransformationRadiusUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
// Construct this variant with constant.ValueOf[constant.Max]()
OfMax constant.Max `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TextOverlayTransformationRadiusUnionParam) MarshalJSON ¶
func (u TextOverlayTransformationRadiusUnionParam) MarshalJSON() ([]byte, error)
func (*TextOverlayTransformationRadiusUnionParam) UnmarshalJSON ¶
func (u *TextOverlayTransformationRadiusUnionParam) UnmarshalJSON(data []byte) error
type TextOverlayTransformationRotationUnionParam ¶
type TextOverlayTransformationRotationUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TextOverlayTransformationRotationUnionParam) MarshalJSON ¶
func (u TextOverlayTransformationRotationUnionParam) MarshalJSON() ([]byte, error)
func (*TextOverlayTransformationRotationUnionParam) UnmarshalJSON ¶
func (u *TextOverlayTransformationRotationUnionParam) UnmarshalJSON(data []byte) error
type TextOverlayTransformationWidthUnionParam ¶
type TextOverlayTransformationWidthUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TextOverlayTransformationWidthUnionParam) MarshalJSON ¶
func (u TextOverlayTransformationWidthUnionParam) MarshalJSON() ([]byte, error)
func (*TextOverlayTransformationWidthUnionParam) UnmarshalJSON ¶
func (u *TextOverlayTransformationWidthUnionParam) UnmarshalJSON(data []byte) error
type TransformationAIDropShadowBoolean ¶
type TransformationAIDropShadowBoolean bool
const (
TransformationAIDropShadowBooleanTrue TransformationAIDropShadowBoolean = true
)
type TransformationAIDropShadowUnionParam ¶
type TransformationAIDropShadowUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfTransformationAIDropShadowBoolean param.Opt[bool] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationAIDropShadowUnionParam) MarshalJSON ¶
func (u TransformationAIDropShadowUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationAIDropShadowUnionParam) UnmarshalJSON ¶
func (u *TransformationAIDropShadowUnionParam) UnmarshalJSON(data []byte) error
type TransformationAspectRatioUnionParam ¶
type TransformationAspectRatioUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationAspectRatioUnionParam) MarshalJSON ¶
func (u TransformationAspectRatioUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationAspectRatioUnionParam) UnmarshalJSON ¶
func (u *TransformationAspectRatioUnionParam) UnmarshalJSON(data []byte) error
type TransformationAudioCodec ¶
type TransformationAudioCodec string
Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See [Audio codec](https://imagekit.io/docs/video-optimization#audio-codec---ac).
const ( TransformationAudioCodecAac TransformationAudioCodec = "aac" TransformationAudioCodecOpus TransformationAudioCodec = "opus" TransformationAudioCodecNone TransformationAudioCodec = "none" )
type TransformationCrop ¶
type TransformationCrop string
Crop modes for image resizing. See [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
const ( TransformationCropForce TransformationCrop = "force" TransformationCropAtMax TransformationCrop = "at_max" TransformationCropAtMaxEnlarge TransformationCrop = "at_max_enlarge" TransformationCropAtLeast TransformationCrop = "at_least" TransformationCropMaintainRatio TransformationCrop = "maintain_ratio" )
type TransformationCropMode ¶
type TransformationCropMode string
Additional crop modes for image resizing. See [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
const ( TransformationCropModePadResize TransformationCropMode = "pad_resize" TransformationCropModeExtract TransformationCropMode = "extract" TransformationCropModePadExtract TransformationCropMode = "pad_extract" )
type TransformationDurationUnionParam ¶
type TransformationDurationUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationDurationUnionParam) MarshalJSON ¶
func (u TransformationDurationUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationDurationUnionParam) UnmarshalJSON ¶
func (u *TransformationDurationUnionParam) UnmarshalJSON(data []byte) error
type TransformationEndOffsetUnionParam ¶
type TransformationEndOffsetUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationEndOffsetUnionParam) MarshalJSON ¶
func (u TransformationEndOffsetUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationEndOffsetUnionParam) UnmarshalJSON ¶
func (u *TransformationEndOffsetUnionParam) UnmarshalJSON(data []byte) error
type TransformationFlip ¶
type TransformationFlip string
Flips or mirrors an image either horizontally, vertically, or both. Acceptable values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or `v_h`. See [Flip](https://imagekit.io/docs/effects-and-enhancements#flip---fl).
const ( TransformationFlipH TransformationFlip = "h" TransformationFlipV TransformationFlip = "v" TransformationFlipHV TransformationFlip = "h_v" TransformationFlipVH TransformationFlip = "v_h" )
type TransformationFormat ¶
type TransformationFormat string
Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`, `mp4`, or `auto`. You can also pass `orig` for images to return the original format. ImageKit automatically delivers images and videos in the optimal format based on device support unless overridden by the dashboard settings or the format parameter. See [Image format](https://imagekit.io/docs/image-optimization#format---f) and [Video format](https://imagekit.io/docs/video-optimization#format---f).
const ( TransformationFormatAuto TransformationFormat = "auto" TransformationFormatWebp TransformationFormat = "webp" TransformationFormatJpg TransformationFormat = "jpg" TransformationFormatJpeg TransformationFormat = "jpeg" TransformationFormatPng TransformationFormat = "png" TransformationFormatGif TransformationFormat = "gif" TransformationFormatSvg TransformationFormat = "svg" TransformationFormatMP4 TransformationFormat = "mp4" TransformationFormatWebm TransformationFormat = "webm" TransformationFormatAvif TransformationFormat = "avif" TransformationFormatOrig TransformationFormat = "orig" )
type TransformationGradientBoolean ¶
type TransformationGradientBoolean bool
const (
TransformationGradientBooleanTrue TransformationGradientBoolean = true
)
type TransformationGradientUnionParam ¶
type TransformationGradientUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfTransformationGradientBoolean param.Opt[bool] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationGradientUnionParam) MarshalJSON ¶
func (u TransformationGradientUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationGradientUnionParam) UnmarshalJSON ¶
func (u *TransformationGradientUnionParam) UnmarshalJSON(data []byte) error
type TransformationHeightUnionParam ¶
type TransformationHeightUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationHeightUnionParam) MarshalJSON ¶
func (u TransformationHeightUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationHeightUnionParam) UnmarshalJSON ¶
func (u *TransformationHeightUnionParam) UnmarshalJSON(data []byte) error
type TransformationPageUnionParam ¶
type TransformationPageUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationPageUnionParam) MarshalJSON ¶
func (u TransformationPageUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationPageUnionParam) UnmarshalJSON ¶
func (u *TransformationPageUnionParam) UnmarshalJSON(data []byte) error
type TransformationParam ¶
type TransformationParam struct {
// Uses AI to change the background. Provide a text prompt or a base64-encoded
// prompt, e.g., `prompt-snow road` or `prompte-[urlencoded_base64_encoded_text]`.
// Not supported inside overlay. See
// [AI Change Background](https://imagekit.io/docs/ai-transformations#change-background-e-changebg).
AIChangeBackground param.Opt[string] `json:"aiChangeBackground,omitzero"`
// Uses AI to edit images based on a text prompt. Provide a text prompt or a
// base64-encoded prompt, e.g., `prompt-snow road` or
// `prompte-[urlencoded_base64_encoded_text]`. Not supported inside overlay.
// See [AI Edit](https://imagekit.io/docs/ai-transformations#edit-image-e-edit).
AIEdit param.Opt[string] `json:"aiEdit,omitzero"`
// Specifies the background to be used in conjunction with certain cropping
// strategies when resizing an image.
//
// - A solid color: e.g., `red`, `F3F3F3`, `AAFF0010`. See
// [Solid color background](https://imagekit.io/docs/effects-and-enhancements#solid-color-background).
// - Dominant color: `dominant` extracts the dominant color from the image. See
// [Dominant color background](https://imagekit.io/docs/effects-and-enhancements#dominant-color-background).
// - Gradient: `gradient_dominant` or `gradient_dominant_2` creates a gradient
// using the dominant colors. Optionally specify palette size (2 or 4), e.g.,
// `gradient_dominant_4`. See
// [Gradient background](https://imagekit.io/docs/effects-and-enhancements#gradient-background).
// - A blurred background: e.g., `blurred`, `blurred_25_N15`, etc. See
// [Blurred background](https://imagekit.io/docs/effects-and-enhancements#blurred-background).
// - Expand the image boundaries using generative fill: `genfill`. Not supported
// inside overlay. Optionally, control the background scene by passing a text
// prompt: `genfill[:-prompt-${text}]` or
// `genfill[:-prompte-${urlencoded_base64_encoded_text}]`. See
// [Generative fill background](https://imagekit.io/docs/ai-transformations#generative-fill-bg-genfill).
Background param.Opt[string] `json:"background,omitzero"`
// Specifies the Gaussian blur level. Accepts an integer value between 1 and 100,
// or an expression like `bl-10`. See
// [Blur](https://imagekit.io/docs/effects-and-enhancements#blur---bl).
Blur param.Opt[float64] `json:"blur,omitzero"`
// Adds a border to the output media. Accepts a string in the format
// `<border-width>_<hex-code>` (e.g., `5_FFF000` for a 5px yellow border), or an
// expression like `ih_div_20_FF00FF`. See
// [Border](https://imagekit.io/docs/effects-and-enhancements#border---b).
Border param.Opt[string] `json:"border,omitzero"`
// Indicates whether the output image should retain the original color profile. See
// [Color profile](https://imagekit.io/docs/image-optimization#color-profile---cp).
ColorProfile param.Opt[bool] `json:"colorProfile,omitzero"`
// Replaces colors in the image. Supports three formats:
//
// - `toColor` - Replace dominant color with the specified color.
// - `toColor_tolerance` - Replace dominant color with specified tolerance (0-100).
// - `toColor_tolerance_fromColor` - Replace a specific color with another within
// tolerance range. Colors can be hex codes (e.g., `FF0022`) or names (e.g.,
// `red`, `blue`). See
// [Color replacement](https://imagekit.io/docs/effects-and-enhancements#color-replace---cr).
ColorReplace param.Opt[string] `json:"colorReplace,omitzero"`
// Specifies a fallback image if the resource is not found, e.g., a URL or file
// path. See
// [Default image](https://imagekit.io/docs/image-transformation#default-image---di).
DefaultImage param.Opt[string] `json:"defaultImage,omitzero"`
// Distorts the shape of an image. Supports two modes:
//
// - Perspective distortion: `p-x1_y1_x2_y2_x3_y3_x4_y4` changes the position of
// the four corners starting clockwise from top-left.
// - Arc distortion: `a-degrees` curves the image upwards (positive values) or
// downwards (negative values). See
// [Distort effect](https://imagekit.io/docs/effects-and-enhancements#distort---e-distort).
Distort param.Opt[string] `json:"distort,omitzero"`
// Accepts values between 0.1 and 5, or `auto` for automatic device pixel ratio
// (DPR) calculation. Also accepts arithmetic expressions.
//
// - Learn about
// [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
// - See [DPR](https://imagekit.io/docs/image-resize-and-crop#dpr---dpr).
Dpr param.Opt[float64] `json:"dpr,omitzero"`
// Refines padding and cropping behavior for pad resize, maintain ratio, and
// extract crop modes. Supports manual positions and coordinate-based focus. With
// AI-based cropping, you can automatically keep key subjects in frame—such as
// faces or detected objects (e.g., `fo-face`, `fo-person`, `fo-car`)— while
// resizing.
//
// - See [Focus](https://imagekit.io/docs/image-resize-and-crop#focus---fo).
// - [Object aware cropping](https://imagekit.io/docs/image-resize-and-crop#object-aware-cropping---fo-object-name)
Focus param.Opt[string] `json:"focus,omitzero"`
// Specifies whether the output image (in JPEG or PNG) should be compressed
// losslessly. See
// [Lossless compression](https://imagekit.io/docs/image-optimization#lossless-webp-and-png---lo).
Lossless param.Opt[bool] `json:"lossless,omitzero"`
// By default, ImageKit removes all metadata during automatic image compression.
// Set this to true to preserve metadata. See
// [Image metadata](https://imagekit.io/docs/image-optimization#image-metadata---md).
Metadata param.Opt[bool] `json:"metadata,omitzero"`
// Named transformation reference. See
// [Named transformations](https://imagekit.io/docs/transformations#named-transformations).
Named param.Opt[string] `json:"named,omitzero"`
// Specifies the opacity level of the output image. See
// [Opacity](https://imagekit.io/docs/effects-and-enhancements#opacity---o).
Opacity param.Opt[float64] `json:"opacity,omitzero"`
// If set to true, serves the original file without applying any transformations.
// See
// [Deliver original file as-is](https://imagekit.io/docs/core-delivery-features#deliver-original-file-as-is---orig-true).
Original param.Opt[bool] `json:"original,omitzero"`
// Specifies whether the output JPEG image should be rendered progressively.
// Progressive loading begins with a low-quality, pixelated version of the full
// image, which gradually improves to provide a faster perceived load time. See
// [Progressive images](https://imagekit.io/docs/image-optimization#progressive-image---pr).
Progressive param.Opt[bool] `json:"progressive,omitzero"`
// Specifies the quality of the output image for lossy formats such as JPEG, WebP,
// and AVIF. A higher quality value results in a larger file size with better
// quality, while a lower value produces a smaller file size with reduced quality.
// See [Quality](https://imagekit.io/docs/image-optimization#quality---q).
Quality param.Opt[float64] `json:"quality,omitzero"`
// Pass any transformation not directly supported by the SDK. This transformation
// string is appended to the URL as provided.
Raw param.Opt[string] `json:"raw,omitzero"`
// Accepts a numeric value that determines how much to zoom in or out of the
// cropped area. It should be used in conjunction with fo-face or fo-<object_name>.
// See [Zoom](https://imagekit.io/docs/image-resize-and-crop#zoom---z).
Zoom param.Opt[float64] `json:"zoom,omitzero"`
// Adds an AI-based drop shadow around a foreground object on a transparent or
// removed background. Optionally, control the direction, elevation, and saturation
// of the light source (e.g., `az-45` to change light direction). Pass `true` for
// the default drop shadow, or provide a string for a custom drop shadow. Supported
// inside overlay. See
// [AI Drop Shadow](https://imagekit.io/docs/ai-transformations#ai-drop-shadow-e-dropshadow).
AIDropShadow TransformationAIDropShadowUnionParam `json:"aiDropShadow,omitzero"`
// Applies ImageKit's in-house background removal. Supported inside overlay. See
// [AI Background Removal](https://imagekit.io/docs/ai-transformations#imagekit-background-removal-e-bgremove).
//
// Any of true.
AIRemoveBackground bool `json:"aiRemoveBackground,omitzero"`
// Uses third-party background removal. Note: It is recommended to use
// aiRemoveBackground, ImageKit's in-house solution, which is more cost-effective.
// Supported inside overlay. See
// [External Background Removal](https://imagekit.io/docs/ai-transformations#background-removal-e-removedotbg).
//
// Any of true.
AIRemoveBackgroundExternal bool `json:"aiRemoveBackgroundExternal,omitzero"`
// Performs AI-based retouching to improve faces or product shots. Not supported
// inside overlay. See
// [AI Retouch](https://imagekit.io/docs/ai-transformations#retouch-e-retouch).
//
// Any of true.
AIRetouch bool `json:"aiRetouch,omitzero"`
// Upscales images beyond their original dimensions using AI. Not supported inside
// overlay. See
// [AI Upscale](https://imagekit.io/docs/ai-transformations#upscale-e-upscale).
//
// Any of true.
AIUpscale bool `json:"aiUpscale,omitzero"`
// Generates a variation of an image using AI. This produces a new image with
// slight variations from the original, such as changes in color, texture, and
// other visual elements, while preserving the structure and essence of the
// original image. Not supported inside overlay. See
// [AI Generate Variations](https://imagekit.io/docs/ai-transformations#generate-variations-of-an-image-e-genvar).
//
// Any of true.
AIVariation bool `json:"aiVariation,omitzero"`
// Specifies the aspect ratio for the output, e.g., "ar-4-3". Typically used with
// either width or height (but not both). For example: aspectRatio = `4:3`, `4_3`,
// or an expression like `iar_div_2`. See
// [Image resize and crop – Aspect ratio](https://imagekit.io/docs/image-resize-and-crop#aspect-ratio---ar).
AspectRatio TransformationAspectRatioUnionParam `json:"aspectRatio,omitzero"`
// Specifies the audio codec, e.g., `aac`, `opus`, or `none`. See
// [Audio codec](https://imagekit.io/docs/video-optimization#audio-codec---ac).
//
// Any of "aac", "opus", "none".
AudioCodec TransformationAudioCodec `json:"audioCodec,omitzero"`
// Automatically enhances the contrast of an image (contrast stretch). See
// [Contrast Stretch](https://imagekit.io/docs/effects-and-enhancements#contrast-stretch---e-contrast).
//
// Any of true.
ContrastStretch bool `json:"contrastStretch,omitzero"`
// Crop modes for image resizing. See
// [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
//
// Any of "force", "at_max", "at_max_enlarge", "at_least", "maintain_ratio".
Crop TransformationCrop `json:"crop,omitzero"`
// Additional crop modes for image resizing. See
// [Crop modes & focus](https://imagekit.io/docs/image-resize-and-crop#crop-crop-modes--focus).
//
// Any of "pad_resize", "extract", "pad_extract".
CropMode TransformationCropMode `json:"cropMode,omitzero"`
// Specifies the duration (in seconds) for trimming videos, e.g., `5` or `10.5`.
// Typically used with startOffset to indicate the length from the start offset.
// Arithmetic expressions are supported. See
// [Trim videos – Duration](https://imagekit.io/docs/trim-videos#duration---du).
Duration TransformationDurationUnionParam `json:"duration,omitzero"`
// Specifies the end offset (in seconds) for trimming videos, e.g., `5` or `10.5`.
// Typically used with startOffset to define a time window. Arithmetic expressions
// are supported. See
// [Trim videos – End offset](https://imagekit.io/docs/trim-videos#end-offset---eo).
EndOffset TransformationEndOffsetUnionParam `json:"endOffset,omitzero"`
// Flips or mirrors an image either horizontally, vertically, or both. Acceptable
// values: `h` (horizontal), `v` (vertical), `h_v` (horizontal and vertical), or
// `v_h`. See [Flip](https://imagekit.io/docs/effects-and-enhancements#flip---fl).
//
// Any of "h", "v", "h_v", "v_h".
Flip TransformationFlip `json:"flip,omitzero"`
// Specifies the output format for images or videos, e.g., `jpg`, `png`, `webp`,
// `mp4`, or `auto`. You can also pass `orig` for images to return the original
// format. ImageKit automatically delivers images and videos in the optimal format
// based on device support unless overridden by the dashboard settings or the
// format parameter. See
// [Image format](https://imagekit.io/docs/image-optimization#format---f) and
// [Video format](https://imagekit.io/docs/video-optimization#format---f).
//
// Any of "auto", "webp", "jpg", "jpeg", "png", "gif", "svg", "mp4", "webm",
// "avif", "orig".
Format TransformationFormat `json:"format,omitzero"`
// Creates a linear gradient with two colors. Pass `true` for a default gradient,
// or provide a string for a custom gradient. See
// [Gradient](https://imagekit.io/docs/effects-and-enhancements#gradient---e-gradient).
Gradient TransformationGradientUnionParam `json:"gradient,omitzero"`
// Enables a grayscale effect for images. See
// [Grayscale](https://imagekit.io/docs/effects-and-enhancements#grayscale---e-grayscale).
//
// Any of true.
Grayscale bool `json:"grayscale,omitzero"`
// Specifies the height of the output. If a value between 0 and 1 is provided, it
// is treated as a percentage (e.g., `0.5` represents 50% of the original height).
// You can also supply arithmetic expressions (e.g., `ih_mul_0.5`). Height
// transformation –
// [Images](https://imagekit.io/docs/image-resize-and-crop#height---h) ·
// [Videos](https://imagekit.io/docs/video-resize-and-crop#height---h)
Height TransformationHeightUnionParam `json:"height,omitzero"`
// Specifies an overlay to be applied on the parent image or video. ImageKit
// supports overlays including images, text, videos, subtitles, and solid colors.
// See
// [Overlay using layers](https://imagekit.io/docs/transformations#overlay-using-layers).
Overlay OverlayUnionParam `json:"overlay,omitzero"`
// Extracts a specific page or frame from multi-page or layered files (PDF, PSD,
// AI). For example, specify by number (e.g., `2`), a range (e.g., `3-4` for the
// 2nd and 3rd layers), or by name (e.g., `name-layer-4` for a PSD layer). See
// [Thumbnail extraction](https://imagekit.io/docs/vector-and-animated-images#get-thumbnail-from-psd-pdf-ai-eps-and-animated-files).
Page TransformationPageUnionParam `json:"page,omitzero"`
// Specifies the corner radius for rounded corners.
//
// - Single value (positive integer): Applied to all corners (e.g., `20`).
// - `max`: Creates a circular or oval shape.
// - Per-corner array: Provide four underscore-separated values representing
// top-left, top-right, bottom-right, and bottom-left corners respectively (e.g.,
// `10_20_30_40`). See
// [Radius](https://imagekit.io/docs/effects-and-enhancements#radius---r).
Radius TransformationRadiusUnionParam `json:"radius,omitzero"`
// Specifies the rotation angle in degrees. Positive values rotate the image
// clockwise; you can also use, for example, `N40` for counterclockwise rotation or
// `auto` to use the orientation specified in the image's EXIF data. For videos,
// only the following values are supported: 0, 90, 180, 270, or 360. See
// [Rotate](https://imagekit.io/docs/effects-and-enhancements#rotate---rt).
Rotation TransformationRotationUnionParam `json:"rotation,omitzero"`
// Adds a shadow beneath solid objects in an image with a transparent background.
// For AI-based drop shadows, refer to aiDropShadow. Pass `true` for a default
// shadow, or provide a string for a custom shadow. See
// [Shadow](https://imagekit.io/docs/effects-and-enhancements#shadow---e-shadow).
Shadow TransformationShadowUnionParam `json:"shadow,omitzero"`
// Sharpens the input image, highlighting edges and finer details. Pass `true` for
// default sharpening, or provide a numeric value for custom sharpening. See
// [Sharpen](https://imagekit.io/docs/effects-and-enhancements#sharpen---e-sharpen).
Sharpen TransformationSharpenUnionParam `json:"sharpen,omitzero"`
// Specifies the start offset (in seconds) for trimming videos, e.g., `5` or
// `10.5`. Arithmetic expressions are also supported. See
// [Trim videos – Start offset](https://imagekit.io/docs/trim-videos#start-offset---so).
StartOffset TransformationStartOffsetUnionParam `json:"startOffset,omitzero"`
// An array of resolutions for adaptive bitrate streaming, e.g., [`240`, `360`,
// `480`, `720`, `1080`]. See
// [Adaptive Bitrate Streaming](https://imagekit.io/docs/adaptive-bitrate-streaming).
StreamingResolutions []StreamingResolution `json:"streamingResolutions,omitzero"`
// Useful for images with a solid or nearly solid background and a central object.
// This parameter trims the background, leaving only the central object in the
// output image. See
// [Trim edges](https://imagekit.io/docs/effects-and-enhancements#trim-edges---t).
Trim TransformationTrimUnionParam `json:"trim,omitzero"`
// Applies Unsharp Masking (USM), an image sharpening technique. Pass `true` for a
// default unsharp mask, or provide a string for a custom unsharp mask. See
// [Unsharp Mask](https://imagekit.io/docs/effects-and-enhancements#unsharp-mask---e-usm).
UnsharpMask TransformationUnsharpMaskUnionParam `json:"unsharpMask,omitzero"`
// Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See
// [Video codec](https://imagekit.io/docs/video-optimization#video-codec---vc).
//
// Any of "h264", "vp9", "av1", "none".
VideoCodec TransformationVideoCodec `json:"videoCodec,omitzero"`
// Specifies the width of the output. If a value between 0 and 1 is provided, it is
// treated as a percentage (e.g., `0.4` represents 40% of the original width). You
// can also supply arithmetic expressions (e.g., `iw_div_2`). Width transformation
// – [Images](https://imagekit.io/docs/image-resize-and-crop#width---w) ·
// [Videos](https://imagekit.io/docs/video-resize-and-crop#width---w)
Width TransformationWidthUnionParam `json:"width,omitzero"`
// Focus using cropped image coordinates - X coordinate. See
// [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
X TransformationXUnionParam `json:"x,omitzero"`
// Focus using cropped image coordinates - X center coordinate. See
// [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
XCenter TransformationXCenterUnionParam `json:"xCenter,omitzero"`
// Focus using cropped image coordinates - Y coordinate. See
// [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
Y TransformationYUnionParam `json:"y,omitzero"`
// Focus using cropped image coordinates - Y center coordinate. See
// [Focus using cropped coordinates](https://imagekit.io/docs/image-resize-and-crop#example---focus-using-cropped-image-coordinates).
YCenter TransformationYCenterUnionParam `json:"yCenter,omitzero"`
// contains filtered or unexported fields
}
The SDK provides easy-to-use names for transformations. These names are converted to the corresponding transformation string before being added to the URL. SDKs are updated regularly to support new transformations. If you want to use a transformation that is not supported by the SDK, You can use the `raw` parameter to pass the transformation string directly. See the [Transformations documentation](https://imagekit.io/docs/transformations).
func (TransformationParam) MarshalJSON ¶
func (r TransformationParam) MarshalJSON() (data []byte, err error)
func (*TransformationParam) UnmarshalJSON ¶
func (r *TransformationParam) UnmarshalJSON(data []byte) error
type TransformationPosition ¶
type TransformationPosition string
By default, the transformation string is added as a query parameter in the URL, e.g., `?tr=w-100,h-100`. If you want to add the transformation string in the path of the URL, set this to `path`. Learn more in the [Transformations guide](https://imagekit.io/docs/transformations).
const ( TransformationPositionPath TransformationPosition = "path" TransformationPositionQuery TransformationPosition = "query" )
type TransformationRadiusUnionParam ¶
type TransformationRadiusUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
// Construct this variant with constant.ValueOf[constant.Max]()
OfMax constant.Max `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationRadiusUnionParam) MarshalJSON ¶
func (u TransformationRadiusUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationRadiusUnionParam) UnmarshalJSON ¶
func (u *TransformationRadiusUnionParam) UnmarshalJSON(data []byte) error
type TransformationRotationUnionParam ¶
type TransformationRotationUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationRotationUnionParam) MarshalJSON ¶
func (u TransformationRotationUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationRotationUnionParam) UnmarshalJSON ¶
func (u *TransformationRotationUnionParam) UnmarshalJSON(data []byte) error
type TransformationShadowBoolean ¶
type TransformationShadowBoolean bool
const (
TransformationShadowBooleanTrue TransformationShadowBoolean = true
)
type TransformationShadowUnionParam ¶
type TransformationShadowUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfTransformationShadowBoolean param.Opt[bool] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationShadowUnionParam) MarshalJSON ¶
func (u TransformationShadowUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationShadowUnionParam) UnmarshalJSON ¶
func (u *TransformationShadowUnionParam) UnmarshalJSON(data []byte) error
type TransformationSharpenBoolean ¶
type TransformationSharpenBoolean bool
const (
TransformationSharpenBooleanTrue TransformationSharpenBoolean = true
)
type TransformationSharpenUnionParam ¶
type TransformationSharpenUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfTransformationSharpenBoolean param.Opt[bool] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationSharpenUnionParam) MarshalJSON ¶
func (u TransformationSharpenUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationSharpenUnionParam) UnmarshalJSON ¶
func (u *TransformationSharpenUnionParam) UnmarshalJSON(data []byte) error
type TransformationStartOffsetUnionParam ¶
type TransformationStartOffsetUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationStartOffsetUnionParam) MarshalJSON ¶
func (u TransformationStartOffsetUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationStartOffsetUnionParam) UnmarshalJSON ¶
func (u *TransformationStartOffsetUnionParam) UnmarshalJSON(data []byte) error
type TransformationTrimBoolean ¶
type TransformationTrimBoolean bool
const (
TransformationTrimBooleanTrue TransformationTrimBoolean = true
)
type TransformationTrimUnionParam ¶
type TransformationTrimUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfTransformationTrimBoolean param.Opt[bool] `json:",omitzero,inline"`
OfFloat param.Opt[float64] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationTrimUnionParam) MarshalJSON ¶
func (u TransformationTrimUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationTrimUnionParam) UnmarshalJSON ¶
func (u *TransformationTrimUnionParam) UnmarshalJSON(data []byte) error
type TransformationUnsharpMaskBoolean ¶
type TransformationUnsharpMaskBoolean bool
const (
TransformationUnsharpMaskBooleanTrue TransformationUnsharpMaskBoolean = true
)
type TransformationUnsharpMaskUnionParam ¶
type TransformationUnsharpMaskUnionParam struct {
// Construct this variant with constant.ValueOf[bool]()
OfTransformationUnsharpMaskBoolean param.Opt[bool] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationUnsharpMaskUnionParam) MarshalJSON ¶
func (u TransformationUnsharpMaskUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationUnsharpMaskUnionParam) UnmarshalJSON ¶
func (u *TransformationUnsharpMaskUnionParam) UnmarshalJSON(data []byte) error
type TransformationVideoCodec ¶
type TransformationVideoCodec string
Specifies the video codec, e.g., `h264`, `vp9`, `av1`, or `none`. See [Video codec](https://imagekit.io/docs/video-optimization#video-codec---vc).
const ( TransformationVideoCodecH264 TransformationVideoCodec = "h264" TransformationVideoCodecVp9 TransformationVideoCodec = "vp9" TransformationVideoCodecAv1 TransformationVideoCodec = "av1" TransformationVideoCodecNone TransformationVideoCodec = "none" )
type TransformationWidthUnionParam ¶
type TransformationWidthUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationWidthUnionParam) MarshalJSON ¶
func (u TransformationWidthUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationWidthUnionParam) UnmarshalJSON ¶
func (u *TransformationWidthUnionParam) UnmarshalJSON(data []byte) error
type TransformationXCenterUnionParam ¶
type TransformationXCenterUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationXCenterUnionParam) MarshalJSON ¶
func (u TransformationXCenterUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationXCenterUnionParam) UnmarshalJSON ¶
func (u *TransformationXCenterUnionParam) UnmarshalJSON(data []byte) error
type TransformationXUnionParam ¶
type TransformationXUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationXUnionParam) MarshalJSON ¶
func (u TransformationXUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationXUnionParam) UnmarshalJSON ¶
func (u *TransformationXUnionParam) UnmarshalJSON(data []byte) error
type TransformationYCenterUnionParam ¶
type TransformationYCenterUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationYCenterUnionParam) MarshalJSON ¶
func (u TransformationYCenterUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationYCenterUnionParam) UnmarshalJSON ¶
func (u *TransformationYCenterUnionParam) UnmarshalJSON(data []byte) error
type TransformationYUnionParam ¶
type TransformationYUnionParam struct {
OfFloat param.Opt[float64] `json:",omitzero,inline"`
OfString param.Opt[string] `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (TransformationYUnionParam) MarshalJSON ¶
func (u TransformationYUnionParam) MarshalJSON() ([]byte, error)
func (*TransformationYUnionParam) UnmarshalJSON ¶
func (u *TransformationYUnionParam) UnmarshalJSON(data []byte) error
type VideoOverlayParam ¶
type VideoOverlayParam struct {
// Specifies the relative path to the video used as an overlay.
Input string `json:"input" api:"required"`
Type constant.Video `json:"type" default:"video"`
// The input path can be included in the layer as either `i-{input}` or
// `ie-{base64_encoded_input}`. By default, the SDK determines the appropriate
// format automatically. To always use base64 encoding (`ie-{base64}`), set this
// parameter to `base64`. To always use plain text (`i-{input}`), set it to
// `plain`.
//
// Regardless of the encoding method:
//
// - Leading and trailing slashes are removed.
// - Remaining slashes within the path are replaced with `@@` when using plain
// text.
Encoding string `json:"encoding,omitzero"`
// Array of transformation to be applied to the overlay video. Except
// `streamingResolutions`, all other video transformations are supported. See
// [Video transformations](https://imagekit.io/docs/video-transformation).
Transformation []TransformationParam `json:"transformation,omitzero"`
BaseOverlayParam
}
func (VideoOverlayParam) MarshalJSON ¶
func (r VideoOverlayParam) MarshalJSON() (data []byte, err error)