class AsposeSlidesCloud::PatternFill
Represents Pattern Fill
Attributes
Gets or sets the back color of the pattern fill.
Gets or sets the fore color of the pattern fill.
Gets or sets the style of pattern fill.
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
AsposeSlidesCloud::FillFormat::attribute_map
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 38 def self.attribute_map super.merge({ :'back_color' => :'BackColor', :'fore_color' => :'ForeColor', :'style' => :'Style', }) end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
AsposeSlidesCloud::FillFormat::new
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 57 def initialize(attributes = {}) super if attributes.has_key?(:'BackColor') self.back_color = attributes[:'BackColor'] end if attributes.has_key?(:'ForeColor') self.fore_color = attributes[:'ForeColor'] end if attributes.has_key?(:'Style') self.style = attributes[:'Style'] end self.type = 'Pattern' end
Attribute type mapping.
AsposeSlidesCloud::FillFormat::swagger_types
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 47 def self.swagger_types super.merge({ :'back_color' => :'String', :'fore_color' => :'String', :'style' => :'String', }) end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 107 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && back_color == o.back_color && fore_color == o.fore_color && style == o.style end
@see the ‘==` method @param [Object] Object to be compared
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 118 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 124 def hash [type, back_color, fore_color, style].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
AsposeSlidesCloud::FillFormat#list_invalid_properties
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 76 def list_invalid_properties invalid_properties = super if @style.nil? invalid_properties.push('invalid value for "style", style cannot be nil.') end invalid_properties end
Custom attribute writer method checking allowed values (enum). @param [Object] style Object to be assigned
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 97 def style=(style) validator = EnumAttributeValidator.new('String', ['Unknown', 'Percent05', 'Percent10', 'Percent20', 'Percent25', 'Percent30', 'Percent40', 'Percent50', 'Percent60', 'Percent70', 'Percent75', 'Percent80', 'Percent90', 'DarkHorizontal', 'DarkVertical', 'DarkDownwardDiagonal', 'DarkUpwardDiagonal', 'SmallCheckerBoard', 'Trellis', 'LightHorizontal', 'LightVertical', 'LightDownwardDiagonal', 'LightUpwardDiagonal', 'SmallGrid', 'DottedDiamond', 'WideDownwardDiagonal', 'WideUpwardDiagonal', 'DashedUpwardDiagonal', 'DashedDownwardDiagonal', 'NarrowVertical', 'NarrowHorizontal', 'DashedVertical', 'DashedHorizontal', 'LargeConfetti', 'LargeGrid', 'HorizontalBrick', 'LargeCheckerBoard', 'SmallConfetti', 'Zigzag', 'SolidDiamond', 'DiagonalBrick', 'OutlinedDiamond', 'Plaid', 'Sphere', 'Weave', 'DottedGrid', 'Divot', 'Shingle', 'Wave', 'Horizontal', 'Vertical', 'Cross', 'DownwardDiagonal', 'UpwardDiagonal', 'DiagonalCross', 'NotDefined']) unless validator.valid?(style) fail ArgumentError, 'invalid value for "style", must be one of #{validator.allowable_values}.' end @style = style end
Check to see if the all the properties in the model are valid @return true if the model is valid
AsposeSlidesCloud::FillFormat#valid?
# File lib/aspose_slides_cloud/models/pattern_fill.rb, line 87 def valid? return false if !super return false if @style.nil? style_validator = EnumAttributeValidator.new('String', ['Unknown', 'Percent05', 'Percent10', 'Percent20', 'Percent25', 'Percent30', 'Percent40', 'Percent50', 'Percent60', 'Percent70', 'Percent75', 'Percent80', 'Percent90', 'DarkHorizontal', 'DarkVertical', 'DarkDownwardDiagonal', 'DarkUpwardDiagonal', 'SmallCheckerBoard', 'Trellis', 'LightHorizontal', 'LightVertical', 'LightDownwardDiagonal', 'LightUpwardDiagonal', 'SmallGrid', 'DottedDiamond', 'WideDownwardDiagonal', 'WideUpwardDiagonal', 'DashedUpwardDiagonal', 'DashedDownwardDiagonal', 'NarrowVertical', 'NarrowHorizontal', 'DashedVertical', 'DashedHorizontal', 'LargeConfetti', 'LargeGrid', 'HorizontalBrick', 'LargeCheckerBoard', 'SmallConfetti', 'Zigzag', 'SolidDiamond', 'DiagonalBrick', 'OutlinedDiamond', 'Plaid', 'Sphere', 'Weave', 'DottedGrid', 'Divot', 'Shingle', 'Wave', 'Horizontal', 'Vertical', 'Cross', 'DownwardDiagonal', 'UpwardDiagonal', 'DiagonalCross', 'NotDefined']) return false unless style_validator.valid?(@style) true end