Class: AsposeSlidesCloud::PortionFormat

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

Overview

Represents portion format.

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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?(:'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.



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

def alternative_language_id
  @alternative_language_id
end

#complex_script_fontObject

Returns or sets the complex script font info.



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

def complex_script_font
  @complex_script_font
end

#east_asian_fontObject

Returns or sets the East Asian font info.



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

def east_asian_font
  @east_asian_font
end

#effect_formatObject

Effect format.



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

def effect_format
  @effect_format
end

#escapementObject

Superscript or subscript of the text.



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

def escapement
  @escapement
end

#fill_formatObject

Fill format.



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

def fill_format
  @fill_format
end

#font_boldObject

True for bold font.



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

def font_bold
  @font_bold
end

#font_colorObject

Font color.



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

def font_color
  @font_color
end

#font_heightObject

Font height.



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

def font_height
  @font_height
end

#font_italicObject

True for italic font.



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

def font_italic
  @font_italic
end

#font_underlineObject

Text underline type.



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

def font_underline
  @font_underline
end

#highlight_colorObject

Highlight color.



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

def highlight_color
  @highlight_color
end

Hyperlink defined for mouse click.



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

def hyperlink_click
  @hyperlink_click
end

Hyperlink defined for mouse over.



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

def hyperlink_mouse_over
  @hyperlink_mouse_over
end

#is_hard_underline_fillObject

True if underline style has own FillFormat properties.



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

def is_hard_underline_fill
  @is_hard_underline_fill
end

#is_hard_underline_lineObject

True if underline style has own LineFormat properties.



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

def is_hard_underline_line
  @is_hard_underline_line
end

#kerning_minimal_sizeObject

Minimal font size for kerning.



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

def kerning_minimal_size
  @kerning_minimal_size
end

#kumimojiObject

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



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

def kumimoji
  @kumimoji
end

#language_idObject

Proving language ID.



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

def language_id
  @language_id
end

#latin_fontObject

Returns or sets the Latin font info.



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

def latin_font
  @latin_font
end

#line_formatObject

Line format.



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

def line_format
  @line_format
end

#normalise_heightObject

True to normalize the text.



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

def normalise_height
  @normalise_height
end

#proof_disabledObject

True if the text proof should be disabled.



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

def proof_disabled
  @proof_disabled
end

#smart_tag_cleanObject

True if smart tag should be cleaned.



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

def smart_tag_clean
  @smart_tag_clean
end

#spacingObject

Intercharacter spacing increment.



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

def spacing
  @spacing
end

#strikethrough_typeObject

Text strikethrough type.



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

def strikethrough_type
  @strikethrough_type
end

#text_cap_typeObject

Text capitalization type.



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

def text_cap_type
  @text_cap_type
end

#underline_fill_formatObject

Underline fill format.



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

def underline_fill_format
  @underline_fill_format
end

#underline_line_formatObject

Underline line format.



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

def underline_line_format
  @underline_line_format
end

Class Method Details

.attribute_mapObject

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



116
117
118
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
144
145
146
147
148
# File 'lib/aspose_slides_cloud/models/portion_format.rb', line 116

def self.attribute_map
  {
    :'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.



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

def self.swagger_types
  {
    :'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



445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/aspose_slides_cloud/models/portion_format.rb', line 445

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      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


481
482
483
# File 'lib/aspose_slides_cloud/models/portion_format.rb', line 481

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



487
488
489
# File 'lib/aspose_slides_cloud/models/portion_format.rb', line 487

def hash
  [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



312
313
314
315
# File 'lib/aspose_slides_cloud/models/portion_format.rb', line 312

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



319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/aspose_slides_cloud/models/portion_format.rb', line 319

def valid?
  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