class AsposeSlidesCloud::Paragraph
Represents paragraph resource
Attributes
Text alignment.
Bullet char.
Bullet fill format.
Bullet height.
Bullet type.
Default portion format.
Default tabulation size.
Depth.
True if East Asian line break is used with the paragraph.
Font alignment.
True if hanging punctuation is used with the paragraph.
First line indent.
True if Latin line break is used with the paragraph.
Left margin.
Right margin.
Starting number for a numbered bullet.
Numbered bullet style.
List of portion links.
True if right to left direction is used with the paragraph.
Right spacing.
Left spacing.
Spacing between lines.
Public Class Methods
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 95 def self.attribute_map super.merge({ :'margin_left' => :'MarginLeft', :'margin_right' => :'MarginRight', :'space_before' => :'SpaceBefore', :'space_after' => :'SpaceAfter', :'space_within' => :'SpaceWithin', :'indent' => :'Indent', :'alignment' => :'Alignment', :'font_alignment' => :'FontAlignment', :'default_tab_size' => :'DefaultTabSize', :'depth' => :'Depth', :'hanging_punctuation' => :'HangingPunctuation', :'east_asian_line_break' => :'EastAsianLineBreak', :'latin_line_break' => :'LatinLineBreak', :'right_to_left' => :'RightToLeft', :'portion_list' => :'PortionList', :'default_portion_format' => :'DefaultPortionFormat', :'bullet_char' => :'BulletChar', :'bullet_height' => :'BulletHeight', :'bullet_type' => :'BulletType', :'numbered_bullet_start_with' => :'NumberedBulletStartWith', :'numbered_bullet_style' => :'NumberedBulletStyle', :'bullet_fill_format' => :'BulletFillFormat', }) end
Attribute mapping from ruby-style variable name to JSON key.
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 152 def initialize(attributes = {}) super if attributes.has_key?(:'MarginLeft') self.margin_left = attributes[:'MarginLeft'] end if attributes.has_key?(:'MarginRight') self.margin_right = attributes[:'MarginRight'] end if attributes.has_key?(:'SpaceBefore') self.space_before = attributes[:'SpaceBefore'] end if attributes.has_key?(:'SpaceAfter') self.space_after = attributes[:'SpaceAfter'] end if attributes.has_key?(:'SpaceWithin') self.space_within = attributes[:'SpaceWithin'] end if attributes.has_key?(:'Indent') self.indent = attributes[:'Indent'] end if attributes.has_key?(:'Alignment') self.alignment = attributes[:'Alignment'] end if attributes.has_key?(:'FontAlignment') self.font_alignment = attributes[:'FontAlignment'] end if attributes.has_key?(:'DefaultTabSize') self.default_tab_size = attributes[:'DefaultTabSize'] end if attributes.has_key?(:'Depth') self.depth = attributes[:'Depth'] end if attributes.has_key?(:'HangingPunctuation') self.hanging_punctuation = attributes[:'HangingPunctuation'] end if attributes.has_key?(:'EastAsianLineBreak') self.east_asian_line_break = attributes[:'EastAsianLineBreak'] end if attributes.has_key?(:'LatinLineBreak') self.latin_line_break = attributes[:'LatinLineBreak'] end if attributes.has_key?(:'RightToLeft') self.right_to_left = attributes[:'RightToLeft'] end if attributes.has_key?(:'PortionList') if (value = attributes[:'PortionList']).is_a?(Array) self.portion_list = value end end if attributes.has_key?(:'DefaultPortionFormat') self.default_portion_format = attributes[:'DefaultPortionFormat'] end if attributes.has_key?(:'BulletChar') self.bullet_char = attributes[:'BulletChar'] end if attributes.has_key?(:'BulletHeight') self.bullet_height = attributes[:'BulletHeight'] end if attributes.has_key?(:'BulletType') self.bullet_type = attributes[:'BulletType'] end if attributes.has_key?(:'NumberedBulletStartWith') self.numbered_bullet_start_with = attributes[:'NumberedBulletStartWith'] end if attributes.has_key?(:'NumberedBulletStyle') self.numbered_bullet_style = attributes[:'NumberedBulletStyle'] end if attributes.has_key?(:'BulletFillFormat') self.bullet_fill_format = attributes[:'BulletFillFormat'] end end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 123 def self.swagger_types super.merge({ :'margin_left' => :'Float', :'margin_right' => :'Float', :'space_before' => :'Float', :'space_after' => :'Float', :'space_within' => :'Float', :'indent' => :'Float', :'alignment' => :'String', :'font_alignment' => :'String', :'default_tab_size' => :'Float', :'depth' => :'Integer', :'hanging_punctuation' => :'String', :'east_asian_line_break' => :'String', :'latin_line_break' => :'String', :'right_to_left' => :'String', :'portion_list' => :'Array<Portion>', :'default_portion_format' => :'PortionFormat', :'bullet_char' => :'String', :'bullet_height' => :'Float', :'bullet_type' => :'String', :'numbered_bullet_start_with' => :'Integer', :'numbered_bullet_style' => :'String', :'bullet_fill_format' => :'FillFormat', }) end
Attribute type mapping.
Public Instance Methods
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 358 def ==(o) return true if self.equal?(o) self.class == o.class && self_uri == o.self_uri && alternate_links == o.alternate_links && margin_left == o.margin_left && margin_right == o.margin_right && space_before == o.space_before && space_after == o.space_after && space_within == o.space_within && indent == o.indent && alignment == o.alignment && font_alignment == o.font_alignment && default_tab_size == o.default_tab_size && depth == o.depth && hanging_punctuation == o.hanging_punctuation && east_asian_line_break == o.east_asian_line_break && latin_line_break == o.latin_line_break && right_to_left == o.right_to_left && portion_list == o.portion_list && default_portion_format == o.default_portion_format && bullet_char == o.bullet_char && bullet_height == o.bullet_height && bullet_type == o.bullet_type && numbered_bullet_start_with == o.numbered_bullet_start_with && numbered_bullet_style == o.numbered_bullet_style && bullet_fill_format == o.bullet_fill_format end
Checks equality by comparing each attribute. @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 278 def alignment=(alignment) validator = EnumAttributeValidator.new('String', ['Left', 'Center', 'Right', 'Justify', 'JustifyLow', 'Distributed', 'NotDefined']) unless validator.valid?(alignment) fail ArgumentError, 'invalid value for "alignment", must be one of #{validator.allowable_values}.' end @alignment = alignment end
Custom attribute writer method checking allowed values (enum). @param [Object] alignment Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 338 def bullet_type=(bullet_type) validator = EnumAttributeValidator.new('String', ['None', 'Symbol', 'Numbered', 'Picture', 'NotDefined']) unless validator.valid?(bullet_type) fail ArgumentError, 'invalid value for "bullet_type", must be one of #{validator.allowable_values}.' end @bullet_type = bullet_type end
Custom attribute writer method checking allowed values (enum). @param [Object] bullet_type
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 308 def east_asian_line_break=(east_asian_line_break) validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) unless validator.valid?(east_asian_line_break) fail ArgumentError, 'invalid value for "east_asian_line_break", must be one of #{validator.allowable_values}.' end @east_asian_line_break = east_asian_line_break end
Custom attribute writer method checking allowed values (enum). @param [Object] east_asian_line_break
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 389 def eql?(o) self == o end
@see the ‘==` method @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 288 def font_alignment=(font_alignment) validator = EnumAttributeValidator.new('String', ['Automatic', 'Top', 'Center', 'Bottom', 'Baseline', 'Default']) unless validator.valid?(font_alignment) fail ArgumentError, 'invalid value for "font_alignment", must be one of #{validator.allowable_values}.' end @font_alignment = font_alignment end
Custom attribute writer method checking allowed values (enum). @param [Object] font_alignment
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 298 def hanging_punctuation=(hanging_punctuation) validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) unless validator.valid?(hanging_punctuation) fail ArgumentError, 'invalid value for "hanging_punctuation", must be one of #{validator.allowable_values}.' end @hanging_punctuation = hanging_punctuation end
Custom attribute writer method checking allowed values (enum). @param [Object] hanging_punctuation
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 395 def hash [self_uri, alternate_links, margin_left, margin_right, space_before, space_after, space_within, indent, alignment, font_alignment, default_tab_size, depth, hanging_punctuation, east_asian_line_break, latin_line_break, right_to_left, portion_list, default_portion_format, bullet_char, bullet_height, bullet_type, numbered_bullet_start_with, numbered_bullet_style, bullet_fill_format].hash end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 318 def latin_line_break=(latin_line_break) validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) unless validator.valid?(latin_line_break) fail ArgumentError, 'invalid value for "latin_line_break", must be one of #{validator.allowable_values}.' end @latin_line_break = latin_line_break end
Custom attribute writer method checking allowed values (enum). @param [Object] latin_line_break
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 248 def list_invalid_properties invalid_properties = super 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/paragraph.rb, line 348 def numbered_bullet_style=(numbered_bullet_style) validator = EnumAttributeValidator.new('String', ['BulletAlphaLCPeriod', 'BulletAlphaUCPeriod', 'BulletArabicParenRight', 'BulletArabicPeriod', 'BulletRomanLCParenBoth', 'BulletRomanLCParenRight', 'BulletRomanLCPeriod', 'BulletRomanUCPeriod', 'BulletAlphaLCParenBoth', 'BulletAlphaLCParenRight', 'BulletAlphaUCParenBoth', 'BulletAlphaUCParenRight', 'BulletArabicParenBoth', 'BulletArabicPlain', 'BulletRomanUCParenBoth', 'BulletRomanUCParenRight', 'BulletSimpChinPlain', 'BulletSimpChinPeriod', 'BulletCircleNumDBPlain', 'BulletCircleNumWDWhitePlain', 'BulletCircleNumWDBlackPlain', 'BulletTradChinPlain', 'BulletTradChinPeriod', 'BulletArabicAlphaDash', 'BulletArabicAbjadDash', 'BulletHebrewAlphaDash', 'BulletKanjiKoreanPlain', 'BulletKanjiKoreanPeriod', 'BulletArabicDBPlain', 'BulletArabicDBPeriod', 'BulletThaiAlphaPeriod', 'BulletThaiAlphaParenRight', 'BulletThaiAlphaParenBoth', 'BulletThaiNumPeriod', 'BulletThaiNumParenRight', 'BulletThaiNumParenBoth', 'BulletHindiAlphaPeriod', 'BulletHindiNumPeriod', 'BulletKanjiSimpChinDBPeriod', 'BulletHindiNumParenRight', 'BulletHindiAlpha1Period', 'NotDefined']) unless validator.valid?(numbered_bullet_style) fail ArgumentError, 'invalid value for "numbered_bullet_style", must be one of #{validator.allowable_values}.' end @numbered_bullet_style = numbered_bullet_style end
Custom attribute writer method checking allowed values (enum). @param [Object] numbered_bullet_style
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 328 def right_to_left=(right_to_left) validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) unless validator.valid?(right_to_left) fail ArgumentError, 'invalid value for "right_to_left", must be one of #{validator.allowable_values}.' end @right_to_left = right_to_left end
Custom attribute writer method checking allowed values (enum). @param [Object] right_to_left
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/paragraph.rb, line 255 def valid? return false if !super alignment_validator = EnumAttributeValidator.new('String', ['Left', 'Center', 'Right', 'Justify', 'JustifyLow', 'Distributed', 'NotDefined']) return false unless alignment_validator.valid?(@alignment) font_alignment_validator = EnumAttributeValidator.new('String', ['Automatic', 'Top', 'Center', 'Bottom', 'Baseline', 'Default']) return false unless font_alignment_validator.valid?(@font_alignment) hanging_punctuation_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) return false unless hanging_punctuation_validator.valid?(@hanging_punctuation) east_asian_line_break_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) return false unless east_asian_line_break_validator.valid?(@east_asian_line_break) latin_line_break_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) return false unless latin_line_break_validator.valid?(@latin_line_break) right_to_left_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined']) return false unless right_to_left_validator.valid?(@right_to_left) bullet_type_validator = EnumAttributeValidator.new('String', ['None', 'Symbol', 'Numbered', 'Picture', 'NotDefined']) return false unless bullet_type_validator.valid?(@bullet_type) numbered_bullet_style_validator = EnumAttributeValidator.new('String', ['BulletAlphaLCPeriod', 'BulletAlphaUCPeriod', 'BulletArabicParenRight', 'BulletArabicPeriod', 'BulletRomanLCParenBoth', 'BulletRomanLCParenRight', 'BulletRomanLCPeriod', 'BulletRomanUCPeriod', 'BulletAlphaLCParenBoth', 'BulletAlphaLCParenRight', 'BulletAlphaUCParenBoth', 'BulletAlphaUCParenRight', 'BulletArabicParenBoth', 'BulletArabicPlain', 'BulletRomanUCParenBoth', 'BulletRomanUCParenRight', 'BulletSimpChinPlain', 'BulletSimpChinPeriod', 'BulletCircleNumDBPlain', 'BulletCircleNumWDWhitePlain', 'BulletCircleNumWDBlackPlain', 'BulletTradChinPlain', 'BulletTradChinPeriod', 'BulletArabicAlphaDash', 'BulletArabicAbjadDash', 'BulletHebrewAlphaDash', 'BulletKanjiKoreanPlain', 'BulletKanjiKoreanPeriod', 'BulletArabicDBPlain', 'BulletArabicDBPeriod', 'BulletThaiAlphaPeriod', 'BulletThaiAlphaParenRight', 'BulletThaiAlphaParenBoth', 'BulletThaiNumPeriod', 'BulletThaiNumParenRight', 'BulletThaiNumParenBoth', 'BulletHindiAlphaPeriod', 'BulletHindiNumPeriod', 'BulletKanjiSimpChinDBPeriod', 'BulletHindiNumParenRight', 'BulletHindiAlpha1Period', 'NotDefined']) return false unless numbered_bullet_style_validator.valid?(@numbered_bullet_style) true end
Check to see if the all the properties in the model are valid @return true if the model is valid