class AsposeSlidesCloud::PresetShadowEffect
Represents preset shadow effect
Attributes
direction
distance
preset
shadow color
Public Class Methods
Source
# 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
Attribute mapping from ruby-style variable name to JSON key.
Source
# 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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Source
# 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
Attribute type mapping.
Public Instance Methods
Source
# 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
Checks equality by comparing each attribute. @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/preset_shadow_effect.rb, line 138 def eql?(o) self == o end
@see the ‘==` method @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/preset_shadow_effect.rb, line 144 def hash [direction, distance, preset, shadow_color].hash end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
Source
# 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
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/preset_shadow_effect.rb, line 117 def preset=(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']) unless validator.valid?(preset) fail ArgumentError, 'invalid value for "preset", must be one of #{validator.allowable_values}.' end @preset = preset end
Custom attribute writer method checking allowed values (enum). @param [Object] preset Object to be assigned
Source
# 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
Check to see if the all the properties in the model are valid @return true if the model is valid