class AsposeSlidesCloud::LightRig
Light rig
Attributes
Light direction
Light type
XRotation
YRotation
ZRotation
Public Class Methods
Source
# 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
Attribute mapping from ruby-style variable name to JSON key.
Source
# 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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Source
# 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
Attribute type mapping.
Public Instance Methods
Source
# 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
Checks equality by comparing each attribute. @param [Object] Object to be compared
Source
# 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
Custom attribute writer method checking allowed values (enum). @param [Object] direction Object to be assigned
Source
# File lib/aspose_slides_cloud/models/light_rig.rb, line 145 def eql?(o) self == o end
@see the ‘==` method @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/light_rig.rb, line 151 def hash [direction, light_type, x_rotation, y_rotation, z_rotation].hash end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
Source
# 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
Custom attribute writer method checking allowed values (enum). @param [Object] light_type
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/light_rig.rb, line 96 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Source
# 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
Check to see if the all the properties in the model are valid @return true if the model is valid