Class: AsposeSlidesCloud::PresetShadowEffect
- Inherits:
-
BaseObject
- Object
- BaseObject
- AsposeSlidesCloud::PresetShadowEffect
- Defined in:
- lib/aspose_slides_cloud/models/preset_shadow_effect.rb
Overview
Represents preset shadow effect
Instance Attribute Summary collapse
-
#direction ⇒ Object
direction.
-
#distance ⇒ Object
distance.
-
#preset ⇒ Object
preset.
-
#shadow_color ⇒ Object
shadow color.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PresetShadowEffect
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ PresetShadowEffect
Initializes the object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 62 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?(:'Distance') self.distance = attributes[:'Distance'] end if attributes.has_key?(:'Preset') self.preset = attributes[:'Preset'] end if attributes.has_key?(:'ShadowColor') self.shadow_color = attributes[:'ShadowColor'] end end |
Instance Attribute Details
#direction ⇒ Object
direction
29 30 31 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 29 def direction @direction end |
#distance ⇒ Object
distance
32 33 34 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 32 def distance @distance end |
#preset ⇒ Object
preset
35 36 37 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 35 def preset @preset end |
#shadow_color ⇒ Object
shadow color
38 39 40 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 38 def shadow_color @shadow_color end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 41 def self.attribute_map { :'direction' => :'Direction', :'distance' => :'Distance', :'preset' => :'Preset', :'shadow_color' => :'ShadowColor', } end |
.swagger_types ⇒ Object
Attribute type mapping.
51 52 53 54 55 56 57 58 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 51 def self.swagger_types { :'direction' => :'Float', :'distance' => :'Float', :'preset' => :'String', :'shadow_color' => :'String', } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
127 128 129 130 131 132 133 134 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 127 def ==(o) return true if self.equal?(o) self.class == o.class && direction == o.direction && distance == o.distance && preset == o.preset && shadow_color == o.shadow_color end |
#eql?(o) ⇒ Boolean
138 139 140 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 138 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
144 145 146 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 144 def hash [direction, distance, preset, shadow_color].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 87 def list_invalid_properties invalid_properties = Array.new if @direction.nil? invalid_properties.push('invalid value for "direction", direction cannot be nil.') end if @distance.nil? invalid_properties.push('invalid value for "distance", distance cannot be nil.') end if @preset.nil? invalid_properties.push('invalid value for "preset", preset cannot be nil.') end invalid_properties end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
106 107 108 109 110 111 112 113 |
# File 'lib/aspose_slides_cloud/models/preset_shadow_effect.rb', line 106 def valid? return false if @direction.nil? return false if @distance.nil? return false if @preset.nil? preset_validator = EnumAttributeValidator.new('String', ['TopLeftDropShadow', 'TopLeftLargeDropShadow', 'BackLeftLongPerspectiveShadow', 'BackRightLongPerspectiveShadow', 'TopLeftDoubleDropShadow', 'BottomRightSmallDropShadow', 'FrontLeftLongPerspectiveShadow', 'FrontRightLongPerspectiveShadow', 'OuterBoxShadow3D', 'InnerBoxShadow3D', 'BackCenterPerspectiveShadow', 'TopRightDropShadow', 'FrontBottomShadow', 'BackLeftPerspectiveShadow', 'BackRightPerspectiveShadow', 'BottomLeftDropShadow', 'BottomRightDropShadow', 'FrontLeftPerspectiveShadow', 'FrontRightPerspectiveShadow', 'TopLeftSmallDropShadow']) return false unless preset_validator.valid?(@preset) true end |