Class: ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/brand_retrieve_simplified_response.rb

Defined Under Namespace

Classes: Color, Resolution

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(hex: nil, name: nil) ⇒ Object

Parameters:

  • hex (String) (defaults to: nil)

    Color in hexadecimal format

  • name (String) (defaults to: nil)

    Name of the color



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/context_dev/models/brand_retrieve_simplified_response.rb', line 80

class Backdrop < ContextDev::Internal::Type::BaseModel
  # @!attribute colors
  #   Array of colors in the backdrop image
  #
  #   @return [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>, nil]
  optional :colors,
           -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color] }

  # @!attribute resolution
  #   Resolution of the backdrop image
  #
  #   @return [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution, nil]
  optional :resolution,
           -> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution }

  # @!attribute url
  #   URL of the backdrop image
  #
  #   @return [String, nil]
  optional :url, String

  # @!method initialize(colors: nil, resolution: nil, url: nil)
  #   @param colors [Array<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>] Array of colors in the backdrop image
  #
  #   @param resolution [ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution] Resolution of the backdrop image
  #
  #   @param url [String] URL of the backdrop image

  class Color < ContextDev::Internal::Type::BaseModel
    # @!attribute hex
    #   Color in hexadecimal format
    #
    #   @return [String, nil]
    optional :hex, String

    # @!attribute name
    #   Name of the color
    #
    #   @return [String, nil]
    optional :name, String

    # @!method initialize(hex: nil, name: nil)
    #   @param hex [String] Color in hexadecimal format
    #
    #   @param name [String] Name of the color
  end

  # @see ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop#resolution
  class Resolution < ContextDev::Internal::Type::BaseModel
    # @!attribute aspect_ratio
    #   Aspect ratio of the image (width/height)
    #
    #   @return [Float, nil]
    optional :aspect_ratio, Float

    # @!attribute height
    #   Height of the image in pixels
    #
    #   @return [Integer, nil]
    optional :height, Integer

    # @!attribute width
    #   Width of the image in pixels
    #
    #   @return [Integer, nil]
    optional :width, Integer

    # @!method initialize(aspect_ratio: nil, height: nil, width: nil)
    #   Resolution of the backdrop image
    #
    #   @param aspect_ratio [Float] Aspect ratio of the image (width/height)
    #
    #   @param height [Integer] Height of the image in pixels
    #
    #   @param width [Integer] Width of the image in pixels
  end
end

Instance Attribute Details

#colorsArray<ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color>?

Array of colors in the backdrop image



85
86
# File 'lib/context_dev/models/brand_retrieve_simplified_response.rb', line 85

optional :colors,
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Color] }

#resolutionContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution?

Resolution of the backdrop image



92
93
# File 'lib/context_dev/models/brand_retrieve_simplified_response.rb', line 92

optional :resolution,
-> { ContextDev::Models::BrandRetrieveSimplifiedResponse::Brand::Backdrop::Resolution }

#urlString?

URL of the backdrop image

Returns:

  • (String, nil)


99
# File 'lib/context_dev/models/brand_retrieve_simplified_response.rb', line 99

optional :url, String