Class: AsposeSlidesCloud::Portion

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

Overview

Represents portion 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 = {}) ⇒ Portion

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/aspose_slides_cloud/models/portion.rb', line 197

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Text')
    self.text = attributes[:'Text']
  end

  if attributes.has_key?(:'MathParagraph')
    self.math_paragraph = attributes[:'MathParagraph']
  end

  if attributes.has_key?(:'FontBold')
    self.font_bold = attributes[:'FontBold']
  end

  if attributes.has_key?(:'FontItalic')
    self.font_italic = attributes[:'FontItalic']
  end

  if attributes.has_key?(:'FontUnderline')
    self.font_underline = attributes[:'FontUnderline']
  end

  if attributes.has_key?(:'StrikethroughType')
    self.strikethrough_type = attributes[:'StrikethroughType']
  end

  if attributes.has_key?(:'TextCapType')
    self.text_cap_type = attributes[:'TextCapType']
  end

  if attributes.has_key?(:'Escapement')
    self.escapement = attributes[:'Escapement']
  end

  if attributes.has_key?(:'Spacing')
    self.spacing = attributes[:'Spacing']
  end

  if attributes.has_key?(:'FontColor')
    self.font_color = attributes[:'FontColor']
  end

  if attributes.has_key?(:'HighlightColor')
    self.highlight_color = attributes[:'HighlightColor']
  end

  if attributes.has_key?(:'FontHeight')
    self.font_height = attributes[:'FontHeight']
  end

  if attributes.has_key?(:'NormaliseHeight')
    self.normalise_height = attributes[:'NormaliseHeight']
  end

  if attributes.has_key?(:'ProofDisabled')
    self.proof_disabled = attributes[:'ProofDisabled']
  end

  if attributes.has_key?(:'SmartTagClean')
    self.smart_tag_clean = attributes[:'SmartTagClean']
  end

  if attributes.has_key?(:'KerningMinimalSize')
    self.kerning_minimal_size = attributes[:'KerningMinimalSize']
  end

  if attributes.has_key?(:'Kumimoji')
    self.kumimoji = attributes[:'Kumimoji']
  end

  if attributes.has_key?(:'LanguageId')
    self.language_id = attributes[:'LanguageId']
  end

  if attributes.has_key?(:'AlternativeLanguageId')
    self.alternative_language_id = attributes[:'AlternativeLanguageId']
  end

  if attributes.has_key?(:'IsHardUnderlineFill')
    self.is_hard_underline_fill = attributes[:'IsHardUnderlineFill']
  end

  if attributes.has_key?(:'IsHardUnderlineLine')
    self.is_hard_underline_line = attributes[:'IsHardUnderlineLine']
  end

  if attributes.has_key?(:'FillFormat')
    self.fill_format = attributes[:'FillFormat']
  end

  if attributes.has_key?(:'EffectFormat')
    self.effect_format = attributes[:'EffectFormat']
  end

  if attributes.has_key?(:'LineFormat')
    self.line_format = attributes[:'LineFormat']
  end

  if attributes.has_key?(:'UnderlineFillFormat')
    self.underline_fill_format = attributes[:'UnderlineFillFormat']
  end

  if attributes.has_key?(:'UnderlineLineFormat')
    self.underline_line_format = attributes[:'UnderlineLineFormat']
  end

  if attributes.has_key?(:'HyperlinkClick')
    self.hyperlink_click = attributes[:'HyperlinkClick']
  end

  if attributes.has_key?(:'HyperlinkMouseOver')
    self.hyperlink_mouse_over = attributes[:'HyperlinkMouseOver']
  end

  if attributes.has_key?(:'LatinFont')
    self.latin_font = attributes[:'LatinFont']
  end

  if attributes.has_key?(:'EastAsianFont')
    self.east_asian_font = attributes[:'EastAsianFont']
  end

  if attributes.has_key?(:'ComplexScriptFont')
    self.complex_script_font = attributes[:'ComplexScriptFont']
  end
end

Instance Attribute Details

#alternative_language_idObject

Alternative proving language ID.



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

def alternative_language_id
  @alternative_language_id
end

#complex_script_fontObject

Returns or sets the complex script font info.



119
120
121
# File 'lib/aspose_slides_cloud/models/portion.rb', line 119

def complex_script_font
  @complex_script_font
end

#east_asian_fontObject

Returns or sets the East Asian font info.



116
117
118
# File 'lib/aspose_slides_cloud/models/portion.rb', line 116

def east_asian_font
  @east_asian_font
end

#effect_formatObject

Effect format.



95
96
97
# File 'lib/aspose_slides_cloud/models/portion.rb', line 95

def effect_format
  @effect_format
end

#escapementObject

Superscript or subscript of the text.



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

def escapement
  @escapement
end

#fill_formatObject

Fill format.



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

def fill_format
  @fill_format
end

#font_boldObject

True for bold font.



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

def font_bold
  @font_bold
end

#font_colorObject

Font color.



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

def font_color
  @font_color
end

#font_heightObject

Font height.



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

def font_height
  @font_height
end

#font_italicObject

True for italic font.



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

def font_italic
  @font_italic
end

#font_underlineObject

Text underline type.



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

def font_underline
  @font_underline
end

#highlight_colorObject

Highlight color.



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

def highlight_color
  @highlight_color
end

Hyperlink defined for mouse click.



107
108
109
# File 'lib/aspose_slides_cloud/models/portion.rb', line 107

def hyperlink_click
  @hyperlink_click
end

Hyperlink defined for mouse over.



110
111
112
# File 'lib/aspose_slides_cloud/models/portion.rb', line 110

def hyperlink_mouse_over
  @hyperlink_mouse_over
end

#is_hard_underline_fillObject

True if underline style has own FillFormat properties.



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

def is_hard_underline_fill
  @is_hard_underline_fill
end

#is_hard_underline_lineObject

True if underline style has own LineFormat properties.



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

def is_hard_underline_line
  @is_hard_underline_line
end

#kerning_minimal_sizeObject

Minimal font size for kerning.



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

def kerning_minimal_size
  @kerning_minimal_size
end

#kumimojiObject

True if numbers should ignore East-Asian specific vertical text layout.



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

def kumimoji
  @kumimoji
end

#language_idObject

Proving language ID.



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

def language_id
  @language_id
end

#latin_fontObject

Returns or sets the Latin font info.



113
114
115
# File 'lib/aspose_slides_cloud/models/portion.rb', line 113

def latin_font
  @latin_font
end

#line_formatObject

Line format.



98
99
100
# File 'lib/aspose_slides_cloud/models/portion.rb', line 98

def line_format
  @line_format
end

#math_paragraphObject

Math paragraph.



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

def math_paragraph
  @math_paragraph
end

#normalise_heightObject

True to normalize the text.



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

def normalise_height
  @normalise_height
end

#proof_disabledObject

True if the text proof should be disabled.



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

def proof_disabled
  @proof_disabled
end

#smart_tag_cleanObject

True if smart tag should be cleaned.



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

def smart_tag_clean
  @smart_tag_clean
end

#spacingObject

Intercharacter spacing increment.



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

def spacing
  @spacing
end

#strikethrough_typeObject

Text strikethrough type.



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

def strikethrough_type
  @strikethrough_type
end

#textObject

Text.



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

def text
  @text
end

#text_cap_typeObject

Text capitalization type.



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

def text_cap_type
  @text_cap_type
end

#underline_fill_formatObject

Underline fill format.



101
102
103
# File 'lib/aspose_slides_cloud/models/portion.rb', line 101

def underline_fill_format
  @underline_fill_format
end

#underline_line_formatObject

Underline line format.



104
105
106
# File 'lib/aspose_slides_cloud/models/portion.rb', line 104

def underline_line_format
  @underline_line_format
end

Class Method Details

.attribute_mapObject

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



122
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
149
150
151
152
153
154
155
156
# File 'lib/aspose_slides_cloud/models/portion.rb', line 122

def self.attribute_map
  super.merge({
    :'text' => :'Text',
    :'math_paragraph' => :'MathParagraph',
    :'font_bold' => :'FontBold',
    :'font_italic' => :'FontItalic',
    :'font_underline' => :'FontUnderline',
    :'strikethrough_type' => :'StrikethroughType',
    :'text_cap_type' => :'TextCapType',
    :'escapement' => :'Escapement',
    :'spacing' => :'Spacing',
    :'font_color' => :'FontColor',
    :'highlight_color' => :'HighlightColor',
    :'font_height' => :'FontHeight',
    :'normalise_height' => :'NormaliseHeight',
    :'proof_disabled' => :'ProofDisabled',
    :'smart_tag_clean' => :'SmartTagClean',
    :'kerning_minimal_size' => :'KerningMinimalSize',
    :'kumimoji' => :'Kumimoji',
    :'language_id' => :'LanguageId',
    :'alternative_language_id' => :'AlternativeLanguageId',
    :'is_hard_underline_fill' => :'IsHardUnderlineFill',
    :'is_hard_underline_line' => :'IsHardUnderlineLine',
    :'fill_format' => :'FillFormat',
    :'effect_format' => :'EffectFormat',
    :'line_format' => :'LineFormat',
    :'underline_fill_format' => :'UnderlineFillFormat',
    :'underline_line_format' => :'UnderlineLineFormat',
    :'hyperlink_click' => :'HyperlinkClick',
    :'hyperlink_mouse_over' => :'HyperlinkMouseOver',
    :'latin_font' => :'LatinFont',
    :'east_asian_font' => :'EastAsianFont',
    :'complex_script_font' => :'ComplexScriptFont',
  })
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/aspose_slides_cloud/models/portion.rb', line 159

def self.swagger_types
  super.merge({
    :'text' => :'String',
    :'math_paragraph' => :'MathParagraph',
    :'font_bold' => :'String',
    :'font_italic' => :'String',
    :'font_underline' => :'String',
    :'strikethrough_type' => :'String',
    :'text_cap_type' => :'String',
    :'escapement' => :'Float',
    :'spacing' => :'Float',
    :'font_color' => :'String',
    :'highlight_color' => :'String',
    :'font_height' => :'Float',
    :'normalise_height' => :'String',
    :'proof_disabled' => :'String',
    :'smart_tag_clean' => :'BOOLEAN',
    :'kerning_minimal_size' => :'Float',
    :'kumimoji' => :'String',
    :'language_id' => :'String',
    :'alternative_language_id' => :'String',
    :'is_hard_underline_fill' => :'String',
    :'is_hard_underline_line' => :'String',
    :'fill_format' => :'FillFormat',
    :'effect_format' => :'EffectFormat',
    :'line_format' => :'LineFormat',
    :'underline_fill_format' => :'FillFormat',
    :'underline_line_format' => :'LineFormat',
    :'hyperlink_click' => :'Hyperlink',
    :'hyperlink_mouse_over' => :'Hyperlink',
    :'latin_font' => :'String',
    :'east_asian_font' => :'String',
    :'complex_script_font' => :'String',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/aspose_slides_cloud/models/portion.rb', line 461

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      text == o.text &&
      math_paragraph == o.math_paragraph &&
      font_bold == o.font_bold &&
      font_italic == o.font_italic &&
      font_underline == o.font_underline &&
      strikethrough_type == o.strikethrough_type &&
      text_cap_type == o.text_cap_type &&
      escapement == o.escapement &&
      spacing == o.spacing &&
      font_color == o.font_color &&
      highlight_color == o.highlight_color &&
      font_height == o.font_height &&
      normalise_height == o.normalise_height &&
      proof_disabled == o.proof_disabled &&
      smart_tag_clean == o.smart_tag_clean &&
      kerning_minimal_size == o.kerning_minimal_size &&
      kumimoji == o.kumimoji &&
      language_id == o.language_id &&
      alternative_language_id == o.alternative_language_id &&
      is_hard_underline_fill == o.is_hard_underline_fill &&
      is_hard_underline_line == o.is_hard_underline_line &&
      fill_format == o.fill_format &&
      effect_format == o.effect_format &&
      line_format == o.line_format &&
      underline_fill_format == o.underline_fill_format &&
      underline_line_format == o.underline_line_format &&
      hyperlink_click == o.hyperlink_click &&
      hyperlink_mouse_over == o.hyperlink_mouse_over &&
      latin_font == o.latin_font &&
      east_asian_font == o.east_asian_font &&
      complex_script_font == o.complex_script_font
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


501
502
503
# File 'lib/aspose_slides_cloud/models/portion.rb', line 501

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



507
508
509
# File 'lib/aspose_slides_cloud/models/portion.rb', line 507

def hash
  [self_uri, alternate_links, text, math_paragraph, font_bold, font_italic, font_underline, strikethrough_type, text_cap_type, escapement, spacing, font_color, highlight_color, font_height, normalise_height, proof_disabled, smart_tag_clean, kerning_minimal_size, kumimoji, language_id, alternative_language_id, is_hard_underline_fill, is_hard_underline_line, fill_format, effect_format, line_format, underline_fill_format, underline_line_format, hyperlink_click, hyperlink_mouse_over, latin_font, east_asian_font, complex_script_font].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



327
328
329
330
# File 'lib/aspose_slides_cloud/models/portion.rb', line 327

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



334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/aspose_slides_cloud/models/portion.rb', line 334

def valid?
  return false if !super
  font_bold_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless font_bold_validator.valid?(@font_bold)
  font_italic_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless font_italic_validator.valid?(@font_italic)
  font_underline_validator = EnumAttributeValidator.new('String', ['None', 'Words', 'Single', 'Double', 'Heavy', 'Dotted', 'HeavyDotted', 'Dashed', 'HeavyDashed', 'LongDashed', 'HeavyLongDashed', 'DotDash', 'HeavyDotDash', 'DotDotDash', 'HeavyDotDotDash', 'Wavy', 'HeavyWavy', 'DoubleWavy', 'NotDefined'])
  return false unless font_underline_validator.valid?(@font_underline)
  strikethrough_type_validator = EnumAttributeValidator.new('String', ['None', 'Single', 'Double', 'NotDefined'])
  return false unless strikethrough_type_validator.valid?(@strikethrough_type)
  text_cap_type_validator = EnumAttributeValidator.new('String', ['None', 'Small', 'All', 'NotDefined'])
  return false unless text_cap_type_validator.valid?(@text_cap_type)
  normalise_height_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless normalise_height_validator.valid?(@normalise_height)
  proof_disabled_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless proof_disabled_validator.valid?(@proof_disabled)
  kumimoji_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless kumimoji_validator.valid?(@kumimoji)
  is_hard_underline_fill_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless is_hard_underline_fill_validator.valid?(@is_hard_underline_fill)
  is_hard_underline_line_validator = EnumAttributeValidator.new('String', ['False', 'True', 'NotDefined'])
  return false unless is_hard_underline_line_validator.valid?(@is_hard_underline_line)
  true
end