Class: AsposeSlidesCloud::Portion
- Inherits:
-
ResourceBase
- Object
- ResourceBase
- AsposeSlidesCloud::Portion
- Defined in:
- lib/aspose_slides_cloud/models/portion.rb
Overview
Represents portion resource
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#alternative_language_id ⇒ Object
Alternative proving language ID.
-
#effect_format ⇒ Object
Effect format.
-
#escapement ⇒ Object
Superscript or subscript of the text.
-
#fill_format ⇒ Object
Fill format.
-
#font_bold ⇒ Object
True for bold font.
-
#font_color ⇒ Object
Font color.
-
#font_height ⇒ Object
Font height.
-
#font_italic ⇒ Object
True for italic font.
-
#font_underline ⇒ Object
Text underline type.
-
#highlight_color ⇒ Object
Highlight color.
-
#is_hard_underline_fill ⇒ Object
True if underline style has own FillFormat properties.
-
#is_hard_underline_line ⇒ Object
True if underline style has own LineFormat properties.
-
#kerning_minimal_size ⇒ Object
Minimal font size for kerning.
-
#kumimoji ⇒ Object
True if numbers should ignore East-Asian specific vertical text layout.
-
#language_id ⇒ Object
Proving language ID.
-
#line_format ⇒ Object
Line format.
-
#normalise_height ⇒ Object
True to normalize the text.
-
#proof_disabled ⇒ Object
True if the text proof should be disabled.
-
#smart_tag_clean ⇒ Object
True if smart tag should be cleaned.
-
#spacing ⇒ Object
Intercharacter spacing increment.
-
#strikethrough_type ⇒ Object
Text strikethrough type.
-
#text ⇒ Object
Text.
-
#text_cap_type ⇒ Object
Text capitalization type.
-
#underline_fill_format ⇒ Object
Underline fill format.
-
#underline_line_format ⇒ Object
Underline line format.
Attributes inherited from ResourceBase
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Portion
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Portion
Initializes the object
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 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 189 def initialize(attributes = {}) super if attributes.has_key?(:'Text') self.text = attributes[:'Text'] 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 end |
Instance Attribute Details
#alternative_language_id ⇒ Object
Alternative proving language ID.
80 81 82 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 80 def alternative_language_id @alternative_language_id end |
#effect_format ⇒ Object
Effect format.
92 93 94 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 92 def effect_format @effect_format end |
#escapement ⇒ Object
Superscript or subscript of the text.
47 48 49 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 47 def escapement @escapement end |
#fill_format ⇒ Object
Fill format.
89 90 91 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 89 def fill_format @fill_format end |
#font_bold ⇒ Object
True for bold font.
32 33 34 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 32 def font_bold @font_bold end |
#font_color ⇒ Object
Font color.
53 54 55 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 53 def font_color @font_color end |
#font_height ⇒ Object
Font height.
59 60 61 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 59 def font_height @font_height end |
#font_italic ⇒ Object
True for italic font.
35 36 37 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 35 def font_italic @font_italic end |
#font_underline ⇒ Object
Text underline type.
38 39 40 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 38 def font_underline @font_underline end |
#highlight_color ⇒ Object
Highlight color.
56 57 58 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 56 def highlight_color @highlight_color end |
#is_hard_underline_fill ⇒ Object
True if underline style has own FillFormat properties.
83 84 85 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 83 def is_hard_underline_fill @is_hard_underline_fill end |
#is_hard_underline_line ⇒ Object
True if underline style has own LineFormat properties.
86 87 88 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 86 def is_hard_underline_line @is_hard_underline_line end |
#kerning_minimal_size ⇒ Object
Minimal font size for kerning.
71 72 73 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 71 def kerning_minimal_size @kerning_minimal_size end |
#kumimoji ⇒ Object
True if numbers should ignore East-Asian specific vertical text layout.
74 75 76 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 74 def kumimoji @kumimoji end |
#language_id ⇒ Object
Proving language ID.
77 78 79 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 77 def language_id @language_id end |
#line_format ⇒ Object
Line format.
95 96 97 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 95 def line_format @line_format end |
#normalise_height ⇒ Object
True to normalize the text.
62 63 64 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 62 def normalise_height @normalise_height end |
#proof_disabled ⇒ Object
True if the text proof should be disabled.
65 66 67 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 65 def proof_disabled @proof_disabled end |
#smart_tag_clean ⇒ Object
True if smart tag should be cleaned.
68 69 70 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 68 def smart_tag_clean @smart_tag_clean end |
#spacing ⇒ Object
Intercharacter spacing increment.
50 51 52 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 50 def spacing @spacing end |
#strikethrough_type ⇒ Object
Text strikethrough type.
41 42 43 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 41 def strikethrough_type @strikethrough_type end |
#text ⇒ Object
Text.
29 30 31 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 29 def text @text end |
#text_cap_type ⇒ Object
Text capitalization type.
44 45 46 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 44 def text_cap_type @text_cap_type end |
#underline_fill_format ⇒ Object
Underline fill format.
98 99 100 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 98 def underline_fill_format @underline_fill_format end |
#underline_line_format ⇒ Object
Underline line format.
101 102 103 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 101 def underline_line_format @underline_line_format end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 126 def self.attribute_map super.merge({ :'text' => :'Text', :'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', }) end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 157 def self.swagger_types super.merge({ :'text' => :'String', :'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', }) end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 429 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 && 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 end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 509 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = AsposeSlidesCloud.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
575 576 577 578 579 580 581 582 583 584 585 586 587 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 575 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 476 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| mapKey = self.class.attribute_map[key] if !mapKey.nil? val = attributes[mapKey] if val.nil? mapKeyString = mapKey.to_s mapKeyString[0] = mapKeyString[0].downcase mapKey = mapKeyString.to_sym val = attributes[mapKey] end if !val.nil? if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if val.is_a?(Array) self.send("#{key}=", val.map { |v| _deserialize($1, v) }) end else self.send("#{key}=", _deserialize(type, val)) end end end end self end |
#eql?(o) ⇒ Boolean
463 464 465 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 463 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
469 470 471 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 469 def hash [self_uri, alternate_links, text, 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].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
295 296 297 298 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 295 def list_invalid_properties invalid_properties = super invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
555 556 557 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 555 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
561 562 563 564 565 566 567 568 569 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 561 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
549 550 551 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 549 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/aspose_slides_cloud/models/portion.rb', line 302 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 |