Class: AsposeSlidesCloud::LightRig

Inherits:
BaseObject show all
Defined in:
lib/aspose_slides_cloud/models/light_rig.rb

Overview

Light rig

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ LightRig

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# 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

Instance Attribute Details

#directionObject

Light direction



29
30
31
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 29

def direction
  @direction
end

#light_typeObject

Light type



32
33
34
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 32

def light_type
  @light_type
end

#x_rotationObject

XRotation



35
36
37
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 35

def x_rotation
  @x_rotation
end

#y_rotationObject

YRotation



38
39
40
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 38

def y_rotation
  @y_rotation
end

#z_rotationObject

ZRotation



41
42
43
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 41

def z_rotation
  @z_rotation
end

Class Method Details

.attribute_mapObject

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



44
45
46
47
48
49
50
51
52
# 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

.swagger_typesObject

Attribute type mapping.



55
56
57
58
59
60
61
62
63
# 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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



133
134
135
136
137
138
139
140
141
# 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

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


145
146
147
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 145

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



151
152
153
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 151

def hash
  [direction, light_type, x_rotation, y_rotation, z_rotation].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



96
97
98
99
# File 'lib/aspose_slides_cloud/models/light_rig.rb', line 96

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



103
104
105
106
107
108
109
# 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