Class: AsposeSlidesCloud::ParagraphFormat

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/aspose_slides_cloud/models/paragraph_format.rb

Overview

Paragraph formatting properties.

Instance Attribute Summary collapse

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 = {}) ⇒ ParagraphFormat

Initializes the object

Parameters:

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

    Model attributes in the form of hash



147
148
149
150
151
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
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 147

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?(:'Depth')
    self.depth = attributes[:'Depth']
  end

  if attributes.has_key?(:'Alignment')
    self.alignment = attributes[:'Alignment']
  end

  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?(:'FontAlignment')
    self.font_alignment = attributes[:'FontAlignment']
  end

  if attributes.has_key?(:'Indent')
    self.indent = attributes[:'Indent']
  end

  if attributes.has_key?(:'RightToLeft')
    self.right_to_left = attributes[:'RightToLeft']
  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?(:'HangingPunctuation')
    self.hanging_punctuation = attributes[:'HangingPunctuation']
  end

  if attributes.has_key?(:'DefaultTabSize')
    self.default_tab_size = attributes[:'DefaultTabSize']
  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.



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

def alignment
  @alignment
end

#bullet_charObject

Bullet char.



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

def bullet_char
  @bullet_char
end

#bullet_fill_formatObject

Bullet fill format.



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

def bullet_fill_format
  @bullet_fill_format
end

#bullet_heightObject

Bullet height.



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

def bullet_height
  @bullet_height
end

#bullet_typeObject

Bullet type.



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

def bullet_type
  @bullet_type
end

#default_portion_formatObject

Default portion format.



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

def default_portion_format
  @default_portion_format
end

#default_tab_sizeObject

Returns or sets default tabulation size with no inheritance.



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

def default_tab_size
  @default_tab_size
end

#depthObject

Depth.



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

def depth
  @depth
end

#east_asian_line_breakObject

Determines whether the East Asian line break is used in a paragraph. No inheritance applied.



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

def east_asian_line_break
  @east_asian_line_break
end

#font_alignmentObject

Font alignment.



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

def font_alignment
  @font_alignment
end

#hanging_punctuationObject

Determines whether the hanging punctuation is used in a paragraph. No inheritance applied.



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

def hanging_punctuation
  @hanging_punctuation
end

#indentObject

First line indent.



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

def indent
  @indent
end

#latin_line_breakObject

Determines whether the Latin line break is used in a paragraph. No inheritance applied.



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

def latin_line_break
  @latin_line_break
end

#margin_leftObject

Left margin.



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

def margin_left
  @margin_left
end

#margin_rightObject

Right margin.



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

def margin_right
  @margin_right
end

#numbered_bullet_start_withObject

Starting number for a numbered bullet.



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

def numbered_bullet_start_with
  @numbered_bullet_start_with
end

#numbered_bullet_styleObject

Numbered bullet style.



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

def numbered_bullet_style
  @numbered_bullet_style
end

#right_to_leftObject

Determines whether the Right to Left writing is used in a paragraph. No inheritance applied.



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

def right_to_left
  @right_to_left
end

#space_afterObject

Right spacing.



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

def space_after
  @space_after
end

#space_beforeObject

Left spacing.



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

def space_before
  @space_before
end

#space_withinObject

Spacing between lines.



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

def space_within
  @space_within
end

Class Method Details

.attribute_mapObject

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



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 92

def self.attribute_map
  {
    :'depth' => :'Depth',
    :'alignment' => :'Alignment',
    :'margin_left' => :'MarginLeft',
    :'margin_right' => :'MarginRight',
    :'space_before' => :'SpaceBefore',
    :'space_after' => :'SpaceAfter',
    :'space_within' => :'SpaceWithin',
    :'font_alignment' => :'FontAlignment',
    :'indent' => :'Indent',
    :'right_to_left' => :'RightToLeft',
    :'east_asian_line_break' => :'EastAsianLineBreak',
    :'latin_line_break' => :'LatinLineBreak',
    :'hanging_punctuation' => :'HangingPunctuation',
    :'default_tab_size' => :'DefaultTabSize',
    :'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.



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 119

def self.swagger_types
  {
    :'depth' => :'Integer',
    :'alignment' => :'String',
    :'margin_left' => :'Float',
    :'margin_right' => :'Float',
    :'space_before' => :'Float',
    :'space_after' => :'Float',
    :'space_within' => :'Float',
    :'font_alignment' => :'String',
    :'indent' => :'Float',
    :'right_to_left' => :'String',
    :'east_asian_line_break' => :'String',
    :'latin_line_break' => :'String',
    :'hanging_punctuation' => :'String',
    :'default_tab_size' => :'Float',
    :'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



349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 349

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      depth == o.depth &&
      alignment == o.alignment &&
      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 &&
      font_alignment == o.font_alignment &&
      indent == o.indent &&
      right_to_left == o.right_to_left &&
      east_asian_line_break == o.east_asian_line_break &&
      latin_line_break == o.latin_line_break &&
      hanging_punctuation == o.hanging_punctuation &&
      default_tab_size == o.default_tab_size &&
      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


377
378
379
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 377

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



383
384
385
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 383

def hash
  [depth, alignment, margin_left, margin_right, space_before, space_after, space_within, font_alignment, indent, right_to_left, east_asian_line_break, latin_line_break, hanging_punctuation, default_tab_size, 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



240
241
242
243
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 240

def list_invalid_properties
  invalid_properties = Array.new
  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



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/aspose_slides_cloud/models/paragraph_format.rb', line 247

def valid?
  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)
  right_to_left_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless right_to_left_validator.valid?(@right_to_left)
  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)
  hanging_punctuation_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless hanging_punctuation_validator.valid?(@hanging_punctuation)
  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