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 Classes: AITag, 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)

    Source of the tag. Possible values are ‘google-auto-tagging` and `aws-auto-taggi



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

Instance Attribute Details

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

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

Returns:



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

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

#created_atTime?

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

Returns:

  • (Time, nil)


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

optional :created_at, Time, api_name: :createdAt

#custom_coordinatesString?

An string with custom coordinates of the file.

Returns:

  • (String, nil)


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

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)


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

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)


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

optional :description, String

#file_idString?

Unique identifier of the asset.

Returns:

  • (String, nil)


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

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)


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

optional :file_path, String, api_name: :filePath

#file_typeString?

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

Returns:

  • (String, nil)


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

optional :file_type, String, api_name: :fileType

#has_alphaBoolean?

Specifies if the image has an alpha channel.

Returns:

  • (Boolean, nil)


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

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

#heightFloat?

Height of the file.

Returns:

  • (Float, nil)


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

optional :height, Float

#is_private_fileBoolean?

Specifies if the file is private or not.

Returns:

  • (Boolean, nil)


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

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

#is_publishedBoolean?

Specifies if the file is published or not.

Returns:

  • (Boolean, nil)


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

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

#mimeString?

MIME type of the file.

Returns:

  • (String, nil)


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

optional :mime, String

#nameString?

Name of the asset.

Returns:

  • (String, nil)


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

optional :name, String

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

Returns:



111
112
113
# File 'lib/imagekitio/models/file.rb', line 111

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

#sizeFloat?

Size of the file in bytes.

Returns:

  • (Float, nil)


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

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)


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

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)


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

optional :thumbnail, String

#typeSymbol, ...

Type of the asset.

Returns:



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

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)


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

optional :updated_at, Time, api_name: :updatedAt

#urlString?

URL of the file.

Returns:

  • (String, nil)


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

optional :url, String

#version_infoImagekitio::Models::File::VersionInfo?

An object with details of the file version.



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

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

#widthFloat?

Width of the file.

Returns:

  • (Float, nil)


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

optional :width, Float

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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

.variantsArray(String, Float, Boolean)

Returns:

  • (Array(String, Float, Boolean))


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