Class: Imagekitio::Models::Metadata

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

Defined Under Namespace

Classes: Exif

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(audio_codec: nil, bit_rate: nil, density: nil, duration: nil, exif: nil, format_: nil, has_color_profile: nil, has_transparency: nil, height: nil, p_hash: nil, quality: nil, size: nil, video_codec: nil, width: nil) ⇒ Object

JSON object containing metadata.

Parameters:

  • audio_codec (String) (defaults to: nil)

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

  • bit_rate (Integer) (defaults to: nil)

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

  • density (Integer) (defaults to: nil)

    The density of the image in DPI.

  • duration (Integer) (defaults to: nil)

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

  • exif (Imagekitio::Models::Metadata::Exif) (defaults to: nil)
  • format_ (String) (defaults to: nil)

    The format of the file (e.g., ‘jpg’, ‘mp4’).

  • has_color_profile (Boolean) (defaults to: nil)

    Indicates if the image has a color profile.

  • has_transparency (Boolean) (defaults to: nil)

    Indicates if the image contains transparent areas.

  • height (Integer) (defaults to: nil)

    The height of the image or video in pixels.

  • p_hash (String) (defaults to: nil)

    Perceptual hash of the image.

  • quality (Integer) (defaults to: nil)

    The quality indicator of the image.

  • size (Integer) (defaults to: nil)

    The file size in bytes.

  • video_codec (String) (defaults to: nil)

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

  • width (Integer) (defaults to: nil)

    The width of the image or video in pixels.



# File 'lib/imagekitio/models/metadata.rb', line 89

Instance Attribute Details

#audio_codecString?

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

Returns:

  • (String, nil)


10
# File 'lib/imagekitio/models/metadata.rb', line 10

optional :audio_codec, String, api_name: :audioCodec

#bit_rateInteger?

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

Returns:

  • (Integer, nil)


16
# File 'lib/imagekitio/models/metadata.rb', line 16

optional :bit_rate, Integer, api_name: :bitRate

#densityInteger?

The density of the image in DPI.

Returns:

  • (Integer, nil)


22
# File 'lib/imagekitio/models/metadata.rb', line 22

optional :density, Integer

#durationInteger?

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

Returns:

  • (Integer, nil)


28
# File 'lib/imagekitio/models/metadata.rb', line 28

optional :duration, Integer

#exifImagekitio::Models::Metadata::Exif?



33
# File 'lib/imagekitio/models/metadata.rb', line 33

optional :exif, -> { Imagekitio::Metadata::Exif }

#format_String?

The format of the file (e.g., ‘jpg’, ‘mp4’).

Returns:

  • (String, nil)


39
# File 'lib/imagekitio/models/metadata.rb', line 39

optional :format_, String, api_name: :format

#has_color_profileBoolean?

Indicates if the image has a color profile.

Returns:

  • (Boolean, nil)


45
# File 'lib/imagekitio/models/metadata.rb', line 45

optional :has_color_profile, Imagekitio::Internal::Type::Boolean, api_name: :hasColorProfile

#has_transparencyBoolean?

Indicates if the image contains transparent areas.

Returns:

  • (Boolean, nil)


51
# File 'lib/imagekitio/models/metadata.rb', line 51

optional :has_transparency, Imagekitio::Internal::Type::Boolean, api_name: :hasTransparency

#heightInteger?

The height of the image or video in pixels.

Returns:

  • (Integer, nil)


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

optional :height, Integer

#p_hashString?

Perceptual hash of the image.

Returns:

  • (String, nil)


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

optional :p_hash, String, api_name: :pHash

#qualityInteger?

The quality indicator of the image.

Returns:

  • (Integer, nil)


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

optional :quality, Integer

#sizeInteger?

The file size in bytes.

Returns:

  • (Integer, nil)


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

optional :size, Integer

#video_codecString?

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

Returns:

  • (String, nil)


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

optional :video_codec, String, api_name: :videoCodec

#widthInteger?

The width of the image or video in pixels.

Returns:

  • (Integer, nil)


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

optional :width, Integer