Class: AsposeWordsCloud::PageSetup
- Inherits:
-
Object
- Object
- AsposeWordsCloud::PageSetup
- Defined in:
- lib/aspose_words_cloud/models/page_setup.rb
Overview
Represents the page setup properties of a section.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#bidi ⇒ Object
Gets or sets a value indicating whether this section contains bidirectional (complex scripts) text.
-
#border_always_in_front ⇒ Object
Gets or sets a value indicating whether the page border is positioned relative to intersecting texts and objects.
-
#border_applies_to ⇒ Object
Gets or sets the option that controls which pages the page border is printed on.
-
#border_distance_from ⇒ Object
Gets or sets the value, that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
-
#bottom_margin ⇒ Object
Gets or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
-
#different_first_page_header_footer ⇒ Object
Gets or sets a value indicating whether a different header or footer is used on the first page.
-
#first_page_tray ⇒ Object
Gets or sets the paper tray (bin) to use for the first page of a section.
-
#footer_distance ⇒ Object
Gets or sets the distance (in points) between the footer and the bottom of the page.
-
#gutter ⇒ Object
Gets or sets the amount of extra space added to the margin for document binding.
-
#header_distance ⇒ Object
Gets or sets the distance (in points) between the header and the top of the page.
-
#left_margin ⇒ Object
Gets or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
-
#line_number_count_by ⇒ Object
Gets or sets the numeric increment for line numbers.
-
#line_number_distance_from_text ⇒ Object
Gets or sets the distance between the right edge of line numbers and the left edge of the document.
-
#line_number_restart_mode ⇒ Object
Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
-
#line_starting_number ⇒ Object
Gets or sets the starting line number.
-
#link ⇒ Object
Gets or sets the link to the document.
-
#orientation ⇒ Object
Gets or sets the orientation of the page.
-
#other_pages_tray ⇒ Object
Gets or sets the paper tray (bin) to be used for all but the first page of a section.
-
#page_height ⇒ Object
Gets or sets the height of the page in points.
-
#page_number_style ⇒ Object
Gets or sets the page number format.
-
#page_starting_number ⇒ Object
Gets or sets the starting page number of the section.
-
#page_width ⇒ Object
Gets or sets the width of the page in points.
-
#paper_size ⇒ Object
Gets or sets the paper size.
-
#restart_page_numbering ⇒ Object
Gets or sets a value indicating whether page numbering restarts at the beginning of the section.
-
#right_margin ⇒ Object
Gets or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
-
#rtl_gutter ⇒ Object
Gets or sets a value indicating whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
-
#section_start ⇒ Object
Gets or sets the type of section break for the specified object.
-
#suppress_endnotes ⇒ Object
Gets or sets a value indicating whether endnotes are printed at the end of the next section that doesn’t suppress endnotes.
-
#top_margin ⇒ Object
Gets or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
-
#vertical_alignment ⇒ Object
Gets or sets the vertical alignment of text on each page in the document.or section.
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
-
#==(other) ⇒ 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?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PageSetup
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 = {}) ⇒ PageSetup
Initializes the object
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 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 220 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.key?(:'Link') self.link = attributes[:'Link'] end if attributes.key?(:'Bidi') self.bidi = attributes[:'Bidi'] end if attributes.key?(:'BorderAlwaysInFront') self.border_always_in_front = attributes[:'BorderAlwaysInFront'] end if attributes.key?(:'BorderAppliesTo') self.border_applies_to = attributes[:'BorderAppliesTo'] end if attributes.key?(:'BorderDistanceFrom') self.border_distance_from = attributes[:'BorderDistanceFrom'] end if attributes.key?(:'BottomMargin') self.bottom_margin = attributes[:'BottomMargin'] end if attributes.key?(:'DifferentFirstPageHeaderFooter') self. = attributes[:'DifferentFirstPageHeaderFooter'] end if attributes.key?(:'FirstPageTray') self.first_page_tray = attributes[:'FirstPageTray'] end if attributes.key?(:'FooterDistance') self. = attributes[:'FooterDistance'] end if attributes.key?(:'Gutter') self.gutter = attributes[:'Gutter'] end if attributes.key?(:'HeaderDistance') self.header_distance = attributes[:'HeaderDistance'] end if attributes.key?(:'LeftMargin') self.left_margin = attributes[:'LeftMargin'] end if attributes.key?(:'LineNumberCountBy') self.line_number_count_by = attributes[:'LineNumberCountBy'] end if attributes.key?(:'LineNumberDistanceFromText') self.line_number_distance_from_text = attributes[:'LineNumberDistanceFromText'] end if attributes.key?(:'LineNumberRestartMode') self.line_number_restart_mode = attributes[:'LineNumberRestartMode'] end if attributes.key?(:'LineStartingNumber') self.line_starting_number = attributes[:'LineStartingNumber'] end if attributes.key?(:'Orientation') self.orientation = attributes[:'Orientation'] end if attributes.key?(:'OtherPagesTray') self.other_pages_tray = attributes[:'OtherPagesTray'] end if attributes.key?(:'PageHeight') self.page_height = attributes[:'PageHeight'] end if attributes.key?(:'PageNumberStyle') self.page_number_style = attributes[:'PageNumberStyle'] end if attributes.key?(:'PageStartingNumber') self.page_starting_number = attributes[:'PageStartingNumber'] end if attributes.key?(:'PageWidth') self.page_width = attributes[:'PageWidth'] end if attributes.key?(:'PaperSize') self.paper_size = attributes[:'PaperSize'] end if attributes.key?(:'RestartPageNumbering') self.restart_page_numbering = attributes[:'RestartPageNumbering'] end if attributes.key?(:'RightMargin') self.right_margin = attributes[:'RightMargin'] end if attributes.key?(:'RtlGutter') self.rtl_gutter = attributes[:'RtlGutter'] end if attributes.key?(:'SectionStart') self.section_start = attributes[:'SectionStart'] end if attributes.key?(:'SuppressEndnotes') self.suppress_endnotes = attributes[:'SuppressEndnotes'] end if attributes.key?(:'TopMargin') self.top_margin = attributes[:'TopMargin'] end if attributes.key?(:'VerticalAlignment') self.vertical_alignment = attributes[:'VerticalAlignment'] end end |
Instance Attribute Details
#bidi ⇒ Object
Gets or sets a value indicating whether this section contains bidirectional (complex scripts) text.
36 37 38 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 36 def bidi @bidi end |
#border_always_in_front ⇒ Object
Gets or sets a value indicating whether the page border is positioned relative to intersecting texts and objects.
39 40 41 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 39 def border_always_in_front @border_always_in_front end |
#border_applies_to ⇒ Object
Gets or sets the option that controls which pages the page border is printed on.
42 43 44 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 42 def border_applies_to @border_applies_to end |
#border_distance_from ⇒ Object
Gets or sets the value, that indicates whether the specified page border is measured from the edge of the page or from the text it surrounds.
45 46 47 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 45 def border_distance_from @border_distance_from end |
#bottom_margin ⇒ Object
Gets or sets the distance (in points) between the bottom edge of the page and the bottom boundary of the body text.
48 49 50 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 48 def bottom_margin @bottom_margin end |
#different_first_page_header_footer ⇒ Object
Gets or sets a value indicating whether a different header or footer is used on the first page.
51 52 53 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 51 def @different_first_page_header_footer end |
#first_page_tray ⇒ Object
Gets or sets the paper tray (bin) to use for the first page of a section. The value is implementation (printer) specific.
55 56 57 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 55 def first_page_tray @first_page_tray end |
#footer_distance ⇒ Object
Gets or sets the distance (in points) between the footer and the bottom of the page.
58 59 60 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 58 def @footer_distance end |
#gutter ⇒ Object
Gets or sets the amount of extra space added to the margin for document binding.
61 62 63 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 61 def gutter @gutter end |
#header_distance ⇒ Object
Gets or sets the distance (in points) between the header and the top of the page.
64 65 66 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 64 def header_distance @header_distance end |
#left_margin ⇒ Object
Gets or sets the distance (in points) between the left edge of the page and the left boundary of the body text.
67 68 69 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 67 def left_margin @left_margin end |
#line_number_count_by ⇒ Object
Gets or sets the numeric increment for line numbers.
70 71 72 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 70 def line_number_count_by @line_number_count_by end |
#line_number_distance_from_text ⇒ Object
Gets or sets the distance between the right edge of line numbers and the left edge of the document.
73 74 75 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 73 def line_number_distance_from_text @line_number_distance_from_text end |
#line_number_restart_mode ⇒ Object
Gets or sets the way line numbering runs that is, whether it starts over at the beginning of a new page or section or runs continuously.
76 77 78 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 76 def line_number_restart_mode @line_number_restart_mode end |
#line_starting_number ⇒ Object
Gets or sets the starting line number.
79 80 81 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 79 def line_starting_number @line_starting_number end |
#link ⇒ Object
Gets or sets the link to the document.
33 34 35 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 33 def link @link end |
#orientation ⇒ Object
Gets or sets the orientation of the page.
82 83 84 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 82 def orientation @orientation end |
#other_pages_tray ⇒ Object
Gets or sets the paper tray (bin) to be used for all but the first page of a section. The value is implementation (printer) specific.
86 87 88 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 86 def other_pages_tray @other_pages_tray end |
#page_height ⇒ Object
Gets or sets the height of the page in points.
89 90 91 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 89 def page_height @page_height end |
#page_number_style ⇒ Object
Gets or sets the page number format.
92 93 94 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 92 def page_number_style @page_number_style end |
#page_starting_number ⇒ Object
Gets or sets the starting page number of the section.
95 96 97 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 95 def page_starting_number @page_starting_number end |
#page_width ⇒ Object
Gets or sets the width of the page in points.
98 99 100 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 98 def page_width @page_width end |
#paper_size ⇒ Object
Gets or sets the paper size.
101 102 103 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 101 def paper_size @paper_size end |
#restart_page_numbering ⇒ Object
Gets or sets a value indicating whether page numbering restarts at the beginning of the section.
104 105 106 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 104 def restart_page_numbering @restart_page_numbering end |
#right_margin ⇒ Object
Gets or sets the distance (in points) between the right edge of the page and the right boundary of the body text.
107 108 109 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 107 def right_margin @right_margin end |
#rtl_gutter ⇒ Object
Gets or sets a value indicating whether Microsoft Word uses gutters for the section based on a right-to-left language or a left-to-right language.
110 111 112 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 110 def rtl_gutter @rtl_gutter end |
#section_start ⇒ Object
Gets or sets the type of section break for the specified object.
113 114 115 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 113 def section_start @section_start end |
#suppress_endnotes ⇒ Object
Gets or sets a value indicating whether endnotes are printed at the end of the next section that doesn’t suppress endnotes. Suppressed endnotes are printed before the endnotes in that section.
116 117 118 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 116 def suppress_endnotes @suppress_endnotes end |
#top_margin ⇒ Object
Gets or sets the distance (in points) between the top edge of the page and the top boundary of the body text.
119 120 121 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 119 def top_margin @top_margin end |
#vertical_alignment ⇒ Object
Gets or sets the vertical alignment of text on each page in the document.or section.
122 123 124 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 122 def vertical_alignment @vertical_alignment end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 147 def self.attribute_map { :'link' => :'Link', :'bidi' => :'Bidi', :'border_always_in_front' => :'BorderAlwaysInFront', :'border_applies_to' => :'BorderAppliesTo', :'border_distance_from' => :'BorderDistanceFrom', :'bottom_margin' => :'BottomMargin', :'different_first_page_header_footer' => :'DifferentFirstPageHeaderFooter', :'first_page_tray' => :'FirstPageTray', :'footer_distance' => :'FooterDistance', :'gutter' => :'Gutter', :'header_distance' => :'HeaderDistance', :'left_margin' => :'LeftMargin', :'line_number_count_by' => :'LineNumberCountBy', :'line_number_distance_from_text' => :'LineNumberDistanceFromText', :'line_number_restart_mode' => :'LineNumberRestartMode', :'line_starting_number' => :'LineStartingNumber', :'orientation' => :'Orientation', :'other_pages_tray' => :'OtherPagesTray', :'page_height' => :'PageHeight', :'page_number_style' => :'PageNumberStyle', :'page_starting_number' => :'PageStartingNumber', :'page_width' => :'PageWidth', :'paper_size' => :'PaperSize', :'restart_page_numbering' => :'RestartPageNumbering', :'right_margin' => :'RightMargin', :'rtl_gutter' => :'RtlGutter', :'section_start' => :'SectionStart', :'suppress_endnotes' => :'SuppressEndnotes', :'top_margin' => :'TopMargin', :'vertical_alignment' => :'VerticalAlignment' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 183 def self.swagger_types { :'link' => :'WordsApiLink', :'bidi' => :'BOOLEAN', :'border_always_in_front' => :'BOOLEAN', :'border_applies_to' => :'String', :'border_distance_from' => :'String', :'bottom_margin' => :'Float', :'different_first_page_header_footer' => :'BOOLEAN', :'first_page_tray' => :'Integer', :'footer_distance' => :'Float', :'gutter' => :'Float', :'header_distance' => :'Float', :'left_margin' => :'Float', :'line_number_count_by' => :'Integer', :'line_number_distance_from_text' => :'Float', :'line_number_restart_mode' => :'String', :'line_starting_number' => :'Integer', :'orientation' => :'String', :'other_pages_tray' => :'Integer', :'page_height' => :'Float', :'page_number_style' => :'String', :'page_starting_number' => :'Integer', :'page_width' => :'Float', :'paper_size' => :'String', :'restart_page_numbering' => :'BOOLEAN', :'right_margin' => :'Float', :'rtl_gutter' => :'BOOLEAN', :'section_start' => :'String', :'suppress_endnotes' => :'BOOLEAN', :'top_margin' => :'Float', :'vertical_alignment' => :'String' } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 492 def ==(other) return true if self.equal?(other) self.class == other.class && link == other.link && bidi == other.bidi && border_always_in_front == other.border_always_in_front && border_applies_to == other.border_applies_to && border_distance_from == other.border_distance_from && bottom_margin == other.bottom_margin && == other. && first_page_tray == other.first_page_tray && == other. && gutter == other.gutter && header_distance == other.header_distance && left_margin == other.left_margin && line_number_count_by == other.line_number_count_by && line_number_distance_from_text == other.line_number_distance_from_text && line_number_restart_mode == other.line_number_restart_mode && line_starting_number == other.line_starting_number && orientation == other.orientation && other_pages_tray == other.other_pages_tray && page_height == other.page_height && page_number_style == other.page_number_style && page_starting_number == other.page_starting_number && page_width == other.page_width && paper_size == other.paper_size && restart_page_numbering == other.restart_page_numbering && right_margin == other.right_margin && rtl_gutter == other.rtl_gutter && section_start == other.section_start && suppress_endnotes == other.suppress_endnotes && top_margin == other.top_margin && vertical_alignment == other.vertical_alignment end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 564 def _deserialize(type, value) case type.to_sym when :DateTime Time.at(/\d/.match(value)[0].to_f).to_datetime when :Date Time.at(/\d/.match(value)[0].to_f).to_date 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 = AsposeWordsCloud.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
631 632 633 634 635 636 637 638 639 640 641 642 643 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 631 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
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 542 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| 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 attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
529 530 531 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 529 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
535 536 537 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 535 def hash [link, bidi, border_always_in_front, border_applies_to, border_distance_from, bottom_margin, , first_page_tray, , gutter, header_distance, left_margin, line_number_count_by, line_number_distance_from_text, line_number_restart_mode, line_starting_number, orientation, other_pages_tray, page_height, page_number_style, page_starting_number, page_width, paper_size, restart_page_numbering, right_margin, rtl_gutter, section_start, suppress_endnotes, top_margin, vertical_alignment].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
349 350 351 352 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 349 def list_invalid_properties invalid_properties = [] return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
611 612 613 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 611 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
617 618 619 620 621 622 623 624 625 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 617 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
605 606 607 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 605 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/aspose_words_cloud/models/page_setup.rb', line 356 def valid? border_applies_to_validator = EnumAttributeValidator.new('String', ["AllPages", "FirstPage", "OtherPages"]) return false unless border_applies_to_validator.valid?(@border_applies_to) border_distance_from_validator = EnumAttributeValidator.new('String', ["Text", "PageEdge"]) return false unless border_distance_from_validator.valid?(@border_distance_from) line_number_restart_mode_validator = EnumAttributeValidator.new('String', ["RestartPage", "RestartSection", "Continuous"]) return false unless line_number_restart_mode_validator.valid?(@line_number_restart_mode) orientation_validator = EnumAttributeValidator.new('String', ["Portrait", "Landscape"]) return false unless orientation_validator.valid?(@orientation) page_number_style_validator = EnumAttributeValidator.new('String', ["Arabic", "UppercaseRoman", "LowercaseRoman", "UppercaseLetter", "LowercaseLetter", "Ordinal", "Number", "OrdinalText", "Hex", "ChicagoManual", "Kanji", "KanjiDigit", "AiueoHalfWidth", "IrohaHalfWidth", "ArabicFullWidth", "ArabicHalfWidth", "KanjiTraditional", "KanjiTraditional2", "NumberInCircle", "DecimalFullWidth", "Aiueo", "Iroha", "LeadingZero", "Bullet", "Ganada", "Chosung", "GB1", "GB2", "GB3", "GB4", "Zodiac1", "Zodiac2", "Zodiac3", "TradChinNum1", "TradChinNum2", "TradChinNum3", "TradChinNum4", "SimpChinNum1", "SimpChinNum2", "SimpChinNum3", "SimpChinNum4", "HanjaRead", "HanjaReadDigit", "Hangul", "Hanja", "Hebrew1", "Arabic1", "Hebrew2", "Arabic2", "HindiLetter1", "HindiLetter2", "HindiArabic", "HindiCardinalText", "ThaiLetter", "ThaiArabic", "ThaiCardinalText", "VietCardinalText", "NumberInDash", "LowercaseRussian", "UppercaseRussian", "None", "Custom"]) return false unless page_number_style_validator.valid?(@page_number_style) paper_size_validator = EnumAttributeValidator.new('String', ["A3", "A4", "A5", "B4", "B5", "Executive", "Folio", "Ledger", "Legal", "Letter", "EnvelopeDL", "Quarto", "Statement", "Tabloid", "Paper10x14", "Paper11x17", "Custom"]) return false unless paper_size_validator.valid?(@paper_size) section_start_validator = EnumAttributeValidator.new('String', ["Continuous", "NewColumn", "NewPage", "EvenPage", "OddPage"]) return false unless section_start_validator.valid?(@section_start) vertical_alignment_validator = EnumAttributeValidator.new('String', ["Top", "Center", "Justify", "Bottom"]) return false unless vertical_alignment_validator.valid?(@vertical_alignment) return true end |