class AsposeSlidesCloud::LightRig

Light rig

Attributes

direction[RW]

Light direction

light_type[RW]

Light type

x_rotation[RW]

XRotation

y_rotation[RW]

YRotation

z_rotation[RW]

ZRotation

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/aspose_slides_cloud/models/light_rig.rb, line 44
def self.attribute_map
  {
    :'direction' => :'Direction',
    :'light_type' => :'LightType',
    :'x_rotation' => :'XRotation',
    :'y_rotation' => :'YRotation',
    :'z_rotation' => :'ZRotation',
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/aspose_slides_cloud/models/light_rig.rb, line 67
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'Direction')
    self.direction = attributes[:'Direction']
  end

  if attributes.has_key?(:'LightType')
    self.light_type = attributes[:'LightType']
  end

  if attributes.has_key?(:'XRotation')
    self.x_rotation = attributes[:'XRotation']
  end

  if attributes.has_key?(:'YRotation')
    self.y_rotation = attributes[:'YRotation']
  end

  if attributes.has_key?(:'ZRotation')
    self.z_rotation = attributes[:'ZRotation']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/aspose_slides_cloud/models/light_rig.rb, line 55
def self.swagger_types
  {
    :'direction' => :'String',
    :'light_type' => :'String',
    :'x_rotation' => :'Float',
    :'y_rotation' => :'Float',
    :'z_rotation' => :'Float',
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/light_rig.rb, line 133
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      direction == o.direction &&
      light_type == o.light_type &&
      x_rotation == o.x_rotation &&
      y_rotation == o.y_rotation &&
      z_rotation == o.z_rotation
end
direction=(direction) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] direction Object to be assigned

# File lib/aspose_slides_cloud/models/light_rig.rb, line 113
def direction=(direction)
  validator = EnumAttributeValidator.new('String', ['TopLeft', 'Top', 'TopRight', 'Right', 'BottomRight', 'Bottom', 'BottomLeft', 'Left', 'NotDefined'])
  unless validator.valid?(direction)
    fail ArgumentError, 'invalid value for "direction", must be one of #{validator.allowable_values}.'
  end
  @direction = direction
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/light_rig.rb, line 145
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/aspose_slides_cloud/models/light_rig.rb, line 151
def hash
  [direction, light_type, x_rotation, y_rotation, z_rotation].hash
end
light_type=(light_type) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] light_type Object to be assigned

# File lib/aspose_slides_cloud/models/light_rig.rb, line 123
def light_type=(light_type)
  validator = EnumAttributeValidator.new('String', ['Balanced', 'BrightRoom', 'Chilly', 'Contrasting', 'Flat', 'Flood', 'Freezing', 'Glow', 'Harsh', 'LegacyFlat1', 'LegacyFlat2', 'LegacyFlat3', 'LegacyFlat4', 'LegacyHarsh1', 'LegacyHarsh2', 'LegacyHarsh3', 'LegacyHarsh4', 'LegacyNormal1', 'LegacyNormal2', 'LegacyNormal3', 'LegacyNormal4', 'Morning', 'Soft', 'Sunrise', 'Sunset', 'ThreePt', 'TwoPt', 'NotDefined'])
  unless validator.valid?(light_type)
    fail ArgumentError, 'invalid value for "light_type", must be one of #{validator.allowable_values}.'
  end
  @light_type = light_type
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/aspose_slides_cloud/models/light_rig.rb, line 96
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/aspose_slides_cloud/models/light_rig.rb, line 103
def valid?
  direction_validator = EnumAttributeValidator.new('String', ['TopLeft', 'Top', 'TopRight', 'Right', 'BottomRight', 'Bottom', 'BottomLeft', 'Left', 'NotDefined'])
  return false unless direction_validator.valid?(@direction)
  light_type_validator = EnumAttributeValidator.new('String', ['Balanced', 'BrightRoom', 'Chilly', 'Contrasting', 'Flat', 'Flood', 'Freezing', 'Glow', 'Harsh', 'LegacyFlat1', 'LegacyFlat2', 'LegacyFlat3', 'LegacyFlat4', 'LegacyHarsh1', 'LegacyHarsh2', 'LegacyHarsh3', 'LegacyHarsh4', 'LegacyNormal1', 'LegacyNormal2', 'LegacyNormal3', 'LegacyNormal4', 'Morning', 'Soft', 'Sunrise', 'Sunset', 'ThreePt', 'TwoPt', 'NotDefined'])
  return false unless light_type_validator.valid?(@light_type)
  true
end