Class: Imagekitio::Models::FileUploadResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/imagekitio/models/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/file_upload_response.rb', line 278

Instance Attribute Details

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

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



11
12
13
14
# File 'lib/imagekitio/models/file_upload_response.rb', line 11

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

#audio_codecString?

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

Returns:

  • (String, nil)


20
# File 'lib/imagekitio/models/file_upload_response.rb', line 20

optional :audio_codec, String, api_name: :audioCodec

#bit_rateInteger?

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

Returns:

  • (Integer, nil)


26
# File 'lib/imagekitio/models/file_upload_response.rb', line 26

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)


35
# File 'lib/imagekitio/models/file_upload_response.rb', line 35

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)


45
46
47
# File 'lib/imagekitio/models/file_upload_response.rb', line 45

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)


54
# File 'lib/imagekitio/models/file_upload_response.rb', line 54

optional :description, String

#durationInteger?

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

Returns:

  • (Integer, nil)


60
# File 'lib/imagekitio/models/file_upload_response.rb', line 60

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)


68
69
70
# File 'lib/imagekitio/models/file_upload_response.rb', line 68

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

#extension_statusImagekitio::Models::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.



84
85
86
# File 'lib/imagekitio/models/file_upload_response.rb', line 84

optional :extension_status,
-> { Imagekitio::Models::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)


93
# File 'lib/imagekitio/models/file_upload_response.rb', line 93

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)


100
# File 'lib/imagekitio/models/file_upload_response.rb', line 100

optional :file_path, String, api_name: :filePath

#file_typeString?

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

Returns:

  • (String, nil)


106
# File 'lib/imagekitio/models/file_upload_response.rb', line 106

optional :file_type, String, api_name: :fileType

#heightFloat?

Height of the image in pixels (Only for images)

Returns:

  • (Float, nil)


112
# File 'lib/imagekitio/models/file_upload_response.rb', line 112

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)


120
# File 'lib/imagekitio/models/file_upload_response.rb', line 120

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)


128
# File 'lib/imagekitio/models/file_upload_response.rb', line 128

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.



135
# File 'lib/imagekitio/models/file_upload_response.rb', line 135

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

#nameString?

Name of the asset.

Returns:

  • (String, nil)


141
# File 'lib/imagekitio/models/file_upload_response.rb', line 141

optional :name, String

#selected_fields_schemaHash{Symbol=>Imagekitio::Models::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.



153
154
155
# File 'lib/imagekitio/models/file_upload_response.rb', line 153

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

#sizeFloat?

Size of the image file in Bytes.

Returns:

  • (Float, nil)


161
# File 'lib/imagekitio/models/file_upload_response.rb', line 161

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)


169
# File 'lib/imagekitio/models/file_upload_response.rb', line 169

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

#thumbnail_urlString?

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

Returns:

  • (String, nil)


175
# File 'lib/imagekitio/models/file_upload_response.rb', line 175

optional :thumbnail_url, String, api_name: :thumbnailUrl

#urlString?

A publicly accessible URL of the file.

Returns:

  • (String, nil)


181
# File 'lib/imagekitio/models/file_upload_response.rb', line 181

optional :url, String

#version_infoImagekitio::Models::FileUploadResponse::VersionInfo?

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



187
# File 'lib/imagekitio/models/file_upload_response.rb', line 187

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

#video_codecString?

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

Returns:

  • (String, nil)


193
# File 'lib/imagekitio/models/file_upload_response.rb', line 193

optional :video_codec, String, api_name: :videoCodec

#widthFloat?

Width of the image in pixels (Only for Images)

Returns:

  • (Float, nil)


199
# File 'lib/imagekitio/models/file_upload_response.rb', line 199

optional :width, Float

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/imagekitio/models/file_upload_response.rb', line 379

.variantsArray(String, Float, Boolean)

Returns:

  • (Array(String, Float, Boolean))


# File 'lib/imagekitio/models/file_upload_response.rb', line 583