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

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

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



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/context_dev/models/brand_retrieve_simplified_response.rb', line 146

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



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

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

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

Resolution of the backdrop image



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

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

#urlString?

URL of the backdrop image

Parameters:

  • (String)

Returns:

  • (String, nil)


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

optional :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


167
# File 'sig/context_dev/models/brand_retrieve_simplified_response.rbs', line 167

def to_hash: -> {