Class: AILabTools::Generated::Params::PortraitAIEyeshadowTryOnParams

Inherits:
Params
  • Object
show all
Defined in:
lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image:, eyeshadow_style: nil, image_template: nil, aspect_ratio: nil) ⇒ PortraitAIEyeshadowTryOnParams

Returns a new instance of PortraitAIEyeshadowTryOnParams.

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 8

def initialize(image:, eyeshadow_style: nil, image_template: nil, aspect_ratio: nil)
  @image = image
  @eyeshadow_style = eyeshadow_style
  @image_template = image_template
  @aspect_ratio = aspect_ratio
  raise ArgumentError, "At least one of eyeshadow_style, image_template is required" if @eyeshadow_style.nil? && @image_template.nil?
end

Instance Attribute Details

#aspect_ratioObject (readonly)

Returns the value of attribute aspect_ratio.



7
8
9
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 7

def aspect_ratio
  @aspect_ratio
end

#eyeshadow_styleObject (readonly)

Returns the value of attribute eyeshadow_style.



7
8
9
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 7

def eyeshadow_style
  @eyeshadow_style
end

#imageObject (readonly)

Returns the value of attribute image.



7
8
9
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 7

def image
  @image
end

#image_templateObject (readonly)

Returns the value of attribute image_template.



7
8
9
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 7

def image_template
  @image_template
end

Instance Method Details

#body_fieldsObject



20
21
22
23
24
25
26
27
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 20

def body_fields
  compact_hash({
    "image" => @image,
    "eyeshadow_style" => @eyeshadow_style,
    "image_template" => @image_template,
    "aspect_ratio" => @aspect_ratio,
  })
end

#query_fieldsObject



16
17
18
# File 'lib/ailabtools/generated/params/portrait_ai_eyeshadow_try_on_params.rb', line 16

def query_fields
  {}
end