Class: Imagekitio::Models::Beta::V2::FileUploadResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/imagekitio/models/beta/v2/file_upload_response.rb

Overview

Defined Under Namespace

Classes: AITag, ExtensionStatus, SelectedFieldsSchema, VersionInfo

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(confidence: nil, name: nil, source: nil) ⇒ Object

Some parameter documentations has been truncated, see AITag for more details.

Parameters:

  • confidence (Float) (defaults to: nil)

    Confidence score of the tag.

  • name (String) (defaults to: nil)

    Name of the tag.

  • source (String) (defaults to: nil)

    Array of AITags associated with the image. If no AITags are set, it will be



# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 282

Instance Attribute Details

#ai_tagsArray<Imagekitio::Models::Beta::V2::FileUploadResponse::AITag>?

An array of tags assigned to the uploaded file by auto tagging.



13
14
15
16
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 13

optional :ai_tags,
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::Models::Beta::V2::FileUploadResponse::AITag] },
api_name: :AITags,
nil?: true

#audio_codecString?

The audio codec used in the video (only for video).

Returns:

  • (String, nil)


22
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 22

optional :audio_codec, String, api_name: :audioCodec

#bit_rateInteger?

The bit rate of the video in kbps (only for video).

Returns:

  • (Integer, nil)


28
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 28

optional :bit_rate, Integer, api_name: :bitRate

#custom_coordinatesString?

Value of custom coordinates associated with the image in the format ‘x,y,width,height`. If customCoordinates are not defined, then it is null. Send customCoordinates in responseFields in API request to get the value of this field.

Returns:

  • (String, nil)


37
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 37

optional :custom_coordinates, String, api_name: :customCoordinates, nil?: true

#custom_metadataHash{Symbol=>Object}?

A key-value data associated with the asset. Use responseField in API request to get customMetadata in the upload API response. Before setting any custom metadata on an asset, you have to create the field using custom metadata fields API. Send customMetadata in responseFields in API request to get the value of this field.

Returns:

  • (Hash{Symbol=>Object}, nil)


47
48
49
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 47

optional :custom_metadata,
Imagekitio::Internal::Type::HashOf[Imagekitio::Internal::Type::Unknown],
api_name: :customMetadata

#descriptionString?

Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.

Returns:

  • (String, nil)


56
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 56

optional :description, String

#durationInteger?

The duration of the video in seconds (only for video).

Returns:

  • (Integer, nil)


62
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 62

optional :duration, Integer

#embedded_metadataHash{Symbol=>Object}?

Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data. Send embeddedMetadata in responseFields in API request to get embeddedMetadata in the upload API response.

Returns:

  • (Hash{Symbol=>Object}, nil)


70
71
72
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 70

optional :embedded_metadata,
Imagekitio::Internal::Type::HashOf[Imagekitio::Internal::Type::Unknown],
api_name: :embeddedMetadata

#extension_statusImagekitio::Models::Beta::V2::FileUploadResponse::ExtensionStatus?

Extension names with their processing status at the time of completion of the request. It could have one of the following status values:

success: The extension has been successfully applied. failed: The extension has failed and will not be retried. pending: The extension will finish processing in some time. On completion, the final status (success / failed) will be sent to the webhookUrl provided.

If no extension was requested, then this parameter is not returned.



86
87
88
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 86

optional :extension_status,
-> { Imagekitio::Models::Beta::V2::FileUploadResponse::ExtensionStatus },
api_name: :extensionStatus

#file_idString?

Unique fileId. Store this fileld in your database, as this will be used to perform update action on this file.

Returns:

  • (String, nil)


95
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 95

optional :file_id, String, api_name: :fileId

#file_pathString?

The relative path of the file in the media library e.g. /marketing-assets/new-banner.jpg.

Returns:

  • (String, nil)


102
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 102

optional :file_path, String, api_name: :filePath

#file_typeString?

Type of the uploaded file. Possible values are image, non-image.

Returns:

  • (String, nil)


108
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 108

optional :file_type, String, api_name: :fileType

#heightFloat?

Height of the image in pixels (Only for images)

Returns:

  • (Float, nil)


114
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 114

optional :height, Float

#is_private_fileBoolean?

Is the file marked as private. It can be either true or false. Send isPrivateFile in responseFields in API request to get the value of this field.

Returns:

  • (Boolean, nil)


122
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 122

optional :is_private_file, Imagekitio::Internal::Type::Boolean, api_name: :isPrivateFile

#is_publishedBoolean?

Is the file published or in draft state. It can be either true or false. Send isPublished in responseFields in API request to get the value of this field.

Returns:

  • (Boolean, nil)


130
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 130

optional :is_published, Imagekitio::Internal::Type::Boolean, api_name: :isPublished

#metadataImagekitio::Models::Metadata?

Legacy metadata. Send metadata in responseFields in API request to get metadata in the upload API response.



137
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 137

optional :metadata, -> { Imagekitio::Metadata }

#nameString?

Name of the asset.

Returns:

  • (String, nil)


143
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 143

optional :name, String

#selected_fields_schemaHash{Symbol=>Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema}?

This field is included in the response only if the Path policy feature is available in the plan. It contains schema definitions for the custom metadata fields selected for the specified file path. Field selection can only be done when the Path policy feature is enabled.

Keys are the names of the custom metadata fields; the value object has details about the custom metadata schema.



155
156
157
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 155

optional :selected_fields_schema,
-> { Imagekitio::Internal::Type::HashOf[Imagekitio::Models::Beta::V2::FileUploadResponse::SelectedFieldsSchema] },
api_name: :selectedFieldsSchema

#sizeFloat?

Size of the image file in Bytes.

Returns:

  • (Float, nil)


163
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 163

optional :size, Float

#tagsArray<String>?

The array of tags associated with the asset. If no tags are set, it will be null. Send tags in responseFields in API request to get the value of this field.

Returns:

  • (Array<String>, nil)


171
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 171

optional :tags, Imagekitio::Internal::Type::ArrayOf[String], nil?: true

#thumbnail_urlString?

In the case of an image, a small thumbnail URL.

Returns:

  • (String, nil)


177
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 177

optional :thumbnail_url, String, api_name: :thumbnailUrl

#urlString?

A publicly accessible URL of the file.

Returns:

  • (String, nil)


183
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 183

optional :url, String

#version_infoImagekitio::Models::Beta::V2::FileUploadResponse::VersionInfo?

An object containing the file or file version’s id (versionId) and name.



189
190
191
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 189

optional :version_info,
-> { Imagekitio::Models::Beta::V2::FileUploadResponse::VersionInfo },
api_name: :versionInfo

#video_codecString?

The video codec used in the video (only for video).

Returns:

  • (String, nil)


197
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 197

optional :video_codec, String, api_name: :videoCodec

#widthFloat?

Width of the image in pixels (Only for Images)

Returns:

  • (Float, nil)


203
# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 203

optional :width, Float

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 403

.variantsArray(String, Float, Boolean)

Returns:

  • (Array(String, Float, Boolean))


# File 'lib/imagekitio/models/beta/v2/file_upload_response.rb', line 608