class AsposeSlidesCloud::ExportOptions
Represents export options for whole presentation.
Attributes
Default regular font for rendering the presentation.
Gets of sets list of font fallback rules.
Gets of sets list of font substitution rules.
Default regular font for rendering the presentation.
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/aspose_slides_cloud/models/export_options.rb, line 43 def self.attribute_map { :'default_regular_font' => :'DefaultRegularFont', :'gradient_style' => :'GradientStyle', :'font_fallback_rules' => :'FontFallbackRules', :'font_subst_rules' => :'FontSubstRules', :'format' => :'Format', } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/aspose_slides_cloud/models/export_options.rb, line 66 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?(:'DefaultRegularFont') self.default_regular_font = attributes[:'DefaultRegularFont'] end if attributes.has_key?(:'GradientStyle') self.gradient_style = attributes[:'GradientStyle'] end if attributes.has_key?(:'FontFallbackRules') if (value = attributes[:'FontFallbackRules']).is_a?(Array) self.font_fallback_rules = value end end if attributes.has_key?(:'FontSubstRules') if (value = attributes[:'FontSubstRules']).is_a?(Array) self.font_subst_rules = value end end if attributes.has_key?(:'Format') self.format = attributes[:'Format'] end end
Attribute type mapping.
# File lib/aspose_slides_cloud/models/export_options.rb, line 54 def self.swagger_types { :'default_regular_font' => :'String', :'gradient_style' => :'String', :'font_fallback_rules' => :'Array<FontFallbackRule>', :'font_subst_rules' => :'Array<FontSubstRule>', :'format' => :'String', } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/aspose_slides_cloud/models/export_options.rb, line 124 def ==(o) return true if self.equal?(o) self.class == o.class && default_regular_font == o.default_regular_font && gradient_style == o.gradient_style && font_fallback_rules == o.font_fallback_rules && font_subst_rules == o.font_subst_rules && format == o.format end
@see the ‘==` method @param [Object] Object to be compared
# File lib/aspose_slides_cloud/models/export_options.rb, line 136 def eql?(o) self == o end
Custom attribute writer method checking allowed values (enum). @param [Object] gradient_style
Object to be assigned
# File lib/aspose_slides_cloud/models/export_options.rb, line 114 def gradient_style=(gradient_style) validator = EnumAttributeValidator.new('String', ['Default', 'PowerPointUI']) unless validator.valid?(gradient_style) fail ArgumentError, 'invalid value for "gradient_style", must be one of #{validator.allowable_values}.' end @gradient_style = gradient_style end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/aspose_slides_cloud/models/export_options.rb, line 142 def hash [default_regular_font, gradient_style, font_fallback_rules, font_subst_rules, format].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/aspose_slides_cloud/models/export_options.rb, line 99 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/aspose_slides_cloud/models/export_options.rb, line 106 def valid? gradient_style_validator = EnumAttributeValidator.new('String', ['Default', 'PowerPointUI']) return false unless gradient_style_validator.valid?(@gradient_style) true end