Class: Imagekitio::Models::File

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/imagekitio/models/file.rb

Overview

Direct Known Subclasses

FileUpdateResponse

Defined Under Namespace

Modules: Type

Instance Attribute 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(ai_tags: nil, audio_codec: nil, bit_rate: nil, created_at: nil, custom_coordinates: nil, custom_metadata: nil, description: nil, duration: nil, embedded_metadata: nil, file_id: nil, file_path: nil, file_type: nil, has_alpha: nil, height: nil, is_private_file: nil, is_published: nil, mime: nil, name: nil, selected_fields_schema: nil, size: nil, tags: nil, thumbnail: nil, type: nil, updated_at: nil, url: nil, version_info: nil, video_codec: nil, width: nil) ⇒ Object

Some parameter documentations has been truncated, see Imagekitio::Models::File for more details.

Object containing details of a file or file version.

Parameters:

  • ai_tags (Array<Imagekitio::Models::AITag>, nil) (defaults to: nil)

    Array of AI-generated tags associated with the image. If no AITags are set, it w

  • audio_codec (String) (defaults to: nil)

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

  • bit_rate (Integer) (defaults to: nil)

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

  • created_at (Time) (defaults to: nil)

    Date and time when the file was uploaded. The date and time is in ISO8601 format

  • custom_coordinates (String, nil) (defaults to: nil)

    An string with custom coordinates of the file.

  • custom_metadata (Hash{Symbol=>Object}) (defaults to: nil)

    An object with custom metadata for the file.

  • description (String) (defaults to: nil)

    Optional text to describe the contents of the file. Can be set by the user or th

  • duration (Integer) (defaults to: nil)

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

  • embedded_metadata (Hash{Symbol=>Object}) (defaults to: nil)

    Consolidated embedded metadata associated with the file. It includes exif, iptc,

  • file_id (String) (defaults to: nil)

    Unique identifier of the asset.

  • file_path (String) (defaults to: nil)

    Path of the file. This is the path you would use in the URL to access the file.

  • file_type (String) (defaults to: nil)

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

  • has_alpha (Boolean) (defaults to: nil)

    Specifies if the image has an alpha channel.

  • height (Float) (defaults to: nil)

    Height of the file.

  • is_private_file (Boolean) (defaults to: nil)

    Specifies if the file is private or not.

  • is_published (Boolean) (defaults to: nil)

    Specifies if the file is published or not.

  • mime (String) (defaults to: nil)

    MIME type of the file.

  • name (String) (defaults to: nil)

    Name of the asset.

  • selected_fields_schema (Hash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}) (defaults to: nil)

    This field is included in the response only if the Path policy feature is availa

  • size (Float) (defaults to: nil)

    Size of the file in bytes.

  • tags (Array<String>, nil) (defaults to: nil)

    An array of tags assigned to the file. Tags are used to search files in the medi

  • thumbnail (String) (defaults to: nil)

    URL of the thumbnail image. This URL is used to access the thumbnail image of th

  • type (Symbol, Imagekitio::Models::File::Type) (defaults to: nil)

    Type of the asset.

  • updated_at (Time) (defaults to: nil)

    Date and time when the file was last updated. The date and time is in ISO8601 fo

  • url (String) (defaults to: nil)

    URL of the file.

  • version_info (Imagekitio::Models::VersionInfo) (defaults to: nil)

    An object with details of the file version.

  • video_codec (String) (defaults to: nil)

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

  • width (Float) (defaults to: nil)

    Width of the file.



# File 'lib/imagekitio/models/file.rb', line 200

Instance Attribute Details

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

Array of AI-generated tags associated with the image. If no AITags are set, it will be null.

Returns:



12
13
14
15
# File 'lib/imagekitio/models/file.rb', line 12

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

#audio_codecString?

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

Returns:

  • (String, nil)


21
# File 'lib/imagekitio/models/file.rb', line 21

optional :audio_codec, String, api_name: :audioCodec

#bit_rateInteger?

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

Returns:

  • (Integer, nil)


27
# File 'lib/imagekitio/models/file.rb', line 27

optional :bit_rate, Integer, api_name: :bitRate

#created_atTime?

Date and time when the file was uploaded. The date and time is in ISO8601 format.

Returns:

  • (Time, nil)


34
# File 'lib/imagekitio/models/file.rb', line 34

optional :created_at, Time, api_name: :createdAt

#custom_coordinatesString?

An string with custom coordinates of the file.

Returns:

  • (String, nil)


40
# File 'lib/imagekitio/models/file.rb', line 40

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

#custom_metadataHash{Symbol=>Object}?

An object with custom metadata for the file.

Returns:

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


46
47
48
# File 'lib/imagekitio/models/file.rb', line 46

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)


55
# File 'lib/imagekitio/models/file.rb', line 55

optional :description, String

#durationInteger?

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

Returns:

  • (Integer, nil)


61
# File 'lib/imagekitio/models/file.rb', line 61

optional :duration, Integer

#embedded_metadataHash{Symbol=>Object}?

Consolidated embedded metadata associated with the file. It includes exif, iptc, and xmp data.

Returns:

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


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

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

#file_idString?

Unique identifier of the asset.

Returns:

  • (String, nil)


76
# File 'lib/imagekitio/models/file.rb', line 76

optional :file_id, String, api_name: :fileId

#file_pathString?

Path of the file. This is the path you would use in the URL to access the file. For example, if the file is at the root of the media library, the path will be ‘/file.jpg`. If the file is inside a folder named `images`, the path will be `/images/file.jpg`.

Returns:

  • (String, nil)


85
# File 'lib/imagekitio/models/file.rb', line 85

optional :file_path, String, api_name: :filePath

#file_typeString?

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

Returns:

  • (String, nil)


91
# File 'lib/imagekitio/models/file.rb', line 91

optional :file_type, String, api_name: :fileType

#has_alphaBoolean?

Specifies if the image has an alpha channel.

Returns:

  • (Boolean, nil)


97
# File 'lib/imagekitio/models/file.rb', line 97

optional :has_alpha, Imagekitio::Internal::Type::Boolean, api_name: :hasAlpha

#heightFloat?

Height of the file.

Returns:

  • (Float, nil)


103
# File 'lib/imagekitio/models/file.rb', line 103

optional :height, Float

#is_private_fileBoolean?

Specifies if the file is private or not.

Returns:

  • (Boolean, nil)


109
# File 'lib/imagekitio/models/file.rb', line 109

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

#is_publishedBoolean?

Specifies if the file is published or not.

Returns:

  • (Boolean, nil)


115
# File 'lib/imagekitio/models/file.rb', line 115

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

#mimeString?

MIME type of the file.

Returns:

  • (String, nil)


121
# File 'lib/imagekitio/models/file.rb', line 121

optional :mime, String

#nameString?

Name of the asset.

Returns:

  • (String, nil)


127
# File 'lib/imagekitio/models/file.rb', line 127

optional :name, String

#selected_fields_schemaHash{Symbol=>Imagekitio::Models::SelectedFieldsSchemaItem}?

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.

Returns:



139
140
141
# File 'lib/imagekitio/models/file.rb', line 139

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

#sizeFloat?

Size of the file in bytes.

Returns:

  • (Float, nil)


147
# File 'lib/imagekitio/models/file.rb', line 147

optional :size, Float

#tagsArray<String>?

An array of tags assigned to the file. Tags are used to search files in the media library.

Returns:

  • (Array<String>, nil)


154
# File 'lib/imagekitio/models/file.rb', line 154

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

#thumbnailString?

URL of the thumbnail image. This URL is used to access the thumbnail image of the file in the media library.

Returns:

  • (String, nil)


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

optional :thumbnail, String

#typeSymbol, ...

Type of the asset.

Returns:



167
# File 'lib/imagekitio/models/file.rb', line 167

optional :type, enum: -> { Imagekitio::File::Type }

#updated_atTime?

Date and time when the file was last updated. The date and time is in ISO8601 format.

Returns:

  • (Time, nil)


174
# File 'lib/imagekitio/models/file.rb', line 174

optional :updated_at, Time, api_name: :updatedAt

#urlString?

URL of the file.

Returns:

  • (String, nil)


180
# File 'lib/imagekitio/models/file.rb', line 180

optional :url, String

#version_infoImagekitio::Models::VersionInfo?

An object with details of the file version.



186
# File 'lib/imagekitio/models/file.rb', line 186

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

#video_codecString?

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

Returns:

  • (String, nil)


192
# File 'lib/imagekitio/models/file.rb', line 192

optional :video_codec, String, api_name: :videoCodec

#widthFloat?

Width of the file.

Returns:

  • (Float, nil)


198
# File 'lib/imagekitio/models/file.rb', line 198

optional :width, Float