Class: AsposeSlidesCloud::Paragraph

Inherits:
ResourceBase show all
Defined in:
lib/aspose_slides_cloud/models/paragraph.rb

Overview

Represents paragraph resource

Instance Attribute Summary collapse

Attributes inherited from ResourceBase

#alternate_links, #self_uri

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Paragraph

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# 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

Instance Attribute Details

#alignmentObject

Text alignment.



47
48
49
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 47

def alignment
  @alignment
end

#bullet_charObject

Bullet char.



77
78
79
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 77

def bullet_char
  @bullet_char
end

#bullet_fill_formatObject

Bullet fill format.



92
93
94
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 92

def bullet_fill_format
  @bullet_fill_format
end

#bullet_heightObject

Bullet height.



80
81
82
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 80

def bullet_height
  @bullet_height
end

#bullet_typeObject

Bullet type.



83
84
85
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 83

def bullet_type
  @bullet_type
end

#default_portion_formatObject

Default portion format.



74
75
76
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 74

def default_portion_format
  @default_portion_format
end

#default_tab_sizeObject

Default tabulation size.



53
54
55
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 53

def default_tab_size
  @default_tab_size
end

#depthObject

Depth.



56
57
58
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 56

def depth
  @depth
end

#east_asian_line_breakObject

True if East Asian line break is used with the paragraph.



62
63
64
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 62

def east_asian_line_break
  @east_asian_line_break
end

#font_alignmentObject

Font alignment.



50
51
52
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 50

def font_alignment
  @font_alignment
end

#hanging_punctuationObject

True if hanging punctuation is used with the paragraph.



59
60
61
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 59

def hanging_punctuation
  @hanging_punctuation
end

#indentObject

First line indent.



44
45
46
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 44

def indent
  @indent
end

#latin_line_breakObject

True if Latin line break is used with the paragraph.



65
66
67
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 65

def latin_line_break
  @latin_line_break
end

#margin_leftObject

Left margin.



29
30
31
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 29

def margin_left
  @margin_left
end

#margin_rightObject

Right margin.



32
33
34
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 32

def margin_right
  @margin_right
end

#numbered_bullet_start_withObject

Starting number for a numbered bullet.



86
87
88
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 86

def numbered_bullet_start_with
  @numbered_bullet_start_with
end

#numbered_bullet_styleObject

Numbered bullet style.



89
90
91
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 89

def numbered_bullet_style
  @numbered_bullet_style
end

#portion_listObject

List of portion links.



71
72
73
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 71

def portion_list
  @portion_list
end

#right_to_leftObject

True if right to left direction is used with the paragraph.



68
69
70
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 68

def right_to_left
  @right_to_left
end

#space_afterObject

Right spacing.



38
39
40
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 38

def space_after
  @space_after
end

#space_beforeObject

Left spacing.



35
36
37
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 35

def space_before
  @space_before
end

#space_withinObject

Spacing between lines.



41
42
43
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 41

def space_within
  @space_within
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# 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

.swagger_typesObject

Attribute type mapping.



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# 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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
# 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

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


389
390
391
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 389

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



395
396
397
# 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

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



248
249
250
251
# File 'lib/aspose_slides_cloud/models/paragraph.rb', line 248

def list_invalid_properties
  invalid_properties = super
  invalid_properties
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# 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