Class: AsposeCellsCloud::PageSetup

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose_cells_cloud/models/page_setup.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PageSetup

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 189

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?(:'BlackAndWhite')
      self.black_and_white = attributes[:'BlackAndWhite']
  end
  if attributes.has_key?(:'BottomMargin')
      self.bottom_margin = attributes[:'BottomMargin']
  end
  if attributes.has_key?(:'CenterHorizontally')
      self.center_horizontally = attributes[:'CenterHorizontally']
  end
  if attributes.has_key?(:'CenterVertically')
      self.center_vertically = attributes[:'CenterVertically']
  end
  if attributes.has_key?(:'FirstPageNumber')
      self.first_page_number = attributes[:'FirstPageNumber']
  end
  if attributes.has_key?(:'FitToPagesTall')
      self.fit_to_pages_tall = attributes[:'FitToPagesTall']
  end
  if attributes.has_key?(:'FitToPagesWide')
      self.fit_to_pages_wide = attributes[:'FitToPagesWide']
  end
  if attributes.has_key?(:'FooterMargin')
      self.footer_margin = attributes[:'FooterMargin']
  end
  if attributes.has_key?(:'HeaderMargin')
      self.header_margin = attributes[:'HeaderMargin']
  end
  if attributes.has_key?(:'IsAutoFirstPageNumber')
      self.is_auto_first_page_number = attributes[:'IsAutoFirstPageNumber']
  end
  if attributes.has_key?(:'IsHFAlignMargins')
      self.is_hf_align_margins = attributes[:'IsHFAlignMargins']
  end
  if attributes.has_key?(:'IsHFDiffFirst')
      self.is_hf_diff_first = attributes[:'IsHFDiffFirst']
  end
  if attributes.has_key?(:'IsHFDiffOddEven')
      self.is_hf_diff_odd_even = attributes[:'IsHFDiffOddEven']
  end
  if attributes.has_key?(:'IsHFScaleWithDoc')
      self.is_hf_scale_with_doc = attributes[:'IsHFScaleWithDoc']
  end
  if attributes.has_key?(:'IsPercentScale')
      self.is_percent_scale = attributes[:'IsPercentScale']
  end
  if attributes.has_key?(:'LeftMargin')
      self.left_margin = attributes[:'LeftMargin']
  end
  if attributes.has_key?(:'Order')
      self.order = attributes[:'Order']
  end
  if attributes.has_key?(:'Orientation')
      self.orientation = attributes[:'Orientation']
  end
  if attributes.has_key?(:'PaperSize')
      self.paper_size = attributes[:'PaperSize']
  end
  if attributes.has_key?(:'PrintArea')
      self.print_area = attributes[:'PrintArea']
  end
  if attributes.has_key?(:'PrintComments')
      self.print_comments = attributes[:'PrintComments']
  end
  if attributes.has_key?(:'PrintCopies')
      self.print_copies = attributes[:'PrintCopies']
  end
  if attributes.has_key?(:'PrintDraft')
      self.print_draft = attributes[:'PrintDraft']
  end
  if attributes.has_key?(:'PrintErrors')
      self.print_errors = attributes[:'PrintErrors']
  end
  if attributes.has_key?(:'PrintGridlines')
      self.print_gridlines = attributes[:'PrintGridlines']
  end
  if attributes.has_key?(:'PrintHeadings')
      self.print_headings = attributes[:'PrintHeadings']
  end
  if attributes.has_key?(:'PrintQuality')
      self.print_quality = attributes[:'PrintQuality']
  end
  if attributes.has_key?(:'PrintTitleColumns')
      self.print_title_columns = attributes[:'PrintTitleColumns']
  end
  if attributes.has_key?(:'PrintTitleRows')
      self.print_title_rows = attributes[:'PrintTitleRows']
  end
  if attributes.has_key?(:'RightMargin')
      self.right_margin = attributes[:'RightMargin']
  end
  if attributes.has_key?(:'TopMargin')
      self.top_margin = attributes[:'TopMargin']
  end
  if attributes.has_key?(:'Zoom')
      self.zoom = attributes[:'Zoom']
  end
  if attributes.has_key?(:'Header')
      self.header = attributes[:'Header']
  end
  if attributes.has_key?(:'Footer')
      self.footer = attributes[:'Footer']
  end
  if attributes.has_key?(:'link')
      self.link = attributes[:'link']
  end

end

Instance Attribute Details

#black_and_whiteObject

Returns the value of attribute black_and_white.



35
36
37
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 35

def black_and_white
  @black_and_white
end

#bottom_marginObject

Returns the value of attribute bottom_margin.



37
38
39
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 37

def bottom_margin
  @bottom_margin
end

#center_horizontallyObject

Returns the value of attribute center_horizontally.



39
40
41
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 39

def center_horizontally
  @center_horizontally
end

#center_verticallyObject

Returns the value of attribute center_vertically.



41
42
43
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 41

def center_vertically
  @center_vertically
end

#first_page_numberObject

Returns the value of attribute first_page_number.



43
44
45
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 43

def first_page_number
  @first_page_number
end

#fit_to_pages_tallObject

Returns the value of attribute fit_to_pages_tall.



45
46
47
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 45

def fit_to_pages_tall
  @fit_to_pages_tall
end

#fit_to_pages_wideObject

Returns the value of attribute fit_to_pages_wide.



47
48
49
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 47

def fit_to_pages_wide
  @fit_to_pages_wide
end

Returns the value of attribute footer.



101
102
103
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 101

def footer
  @footer
end

Returns the value of attribute footer_margin.



49
50
51
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 49

def footer_margin
  @footer_margin
end

#headerObject

Returns the value of attribute header.



99
100
101
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 99

def header
  @header
end

#header_marginObject

Returns the value of attribute header_margin.



51
52
53
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 51

def header_margin
  @header_margin
end

#is_auto_first_page_numberObject

Returns the value of attribute is_auto_first_page_number.



53
54
55
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 53

def is_auto_first_page_number
  @is_auto_first_page_number
end

#is_hf_align_marginsObject

Returns the value of attribute is_hf_align_margins.



55
56
57
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 55

def is_hf_align_margins
  @is_hf_align_margins
end

#is_hf_diff_firstObject

Returns the value of attribute is_hf_diff_first.



57
58
59
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 57

def is_hf_diff_first
  @is_hf_diff_first
end

#is_hf_diff_odd_evenObject

Returns the value of attribute is_hf_diff_odd_even.



59
60
61
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 59

def is_hf_diff_odd_even
  @is_hf_diff_odd_even
end

#is_hf_scale_with_docObject

Returns the value of attribute is_hf_scale_with_doc.



61
62
63
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 61

def is_hf_scale_with_doc
  @is_hf_scale_with_doc
end

#is_percent_scaleObject

Returns the value of attribute is_percent_scale.



63
64
65
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 63

def is_percent_scale
  @is_percent_scale
end

#left_marginObject

Returns the value of attribute left_margin.



65
66
67
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 65

def left_margin
  @left_margin
end

Returns the value of attribute link.



103
104
105
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 103

def link
  @link
end

#orderObject

Returns the value of attribute order.



67
68
69
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 67

def order
  @order
end

#orientationObject

Returns the value of attribute orientation.



69
70
71
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 69

def orientation
  @orientation
end

#paper_sizeObject

Returns the value of attribute paper_size.



71
72
73
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 71

def paper_size
  @paper_size
end

Returns the value of attribute print_area.



73
74
75
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 73

def print_area
  @print_area
end

Returns the value of attribute print_comments.



75
76
77
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 75

def print_comments
  @print_comments
end

Returns the value of attribute print_copies.



77
78
79
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 77

def print_copies
  @print_copies
end

Returns the value of attribute print_draft.



79
80
81
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 79

def print_draft
  @print_draft
end

Returns the value of attribute print_errors.



81
82
83
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 81

def print_errors
  @print_errors
end

Returns the value of attribute print_gridlines.



83
84
85
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 83

def print_gridlines
  @print_gridlines
end

Returns the value of attribute print_headings.



85
86
87
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 85

def print_headings
  @print_headings
end

Returns the value of attribute print_quality.



87
88
89
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 87

def print_quality
  @print_quality
end

Returns the value of attribute print_title_columns.



89
90
91
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 89

def print_title_columns
  @print_title_columns
end

Returns the value of attribute print_title_rows.



91
92
93
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 91

def print_title_rows
  @print_title_rows
end

#right_marginObject

Returns the value of attribute right_margin.



93
94
95
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 93

def right_margin
  @right_margin
end

#top_marginObject

Returns the value of attribute top_margin.



95
96
97
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 95

def top_margin
  @top_margin
end

#zoomObject

Returns the value of attribute zoom.



97
98
99
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 97

def zoom
  @zoom
end

Class Method Details

.attribute_mapObject

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



106
107
108
109
110
111
112
113
114
115
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
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 106

def self.attribute_map
  {
    :'black_and_white' => :'BlackAndWhite',
    :'bottom_margin' => :'BottomMargin',
    :'center_horizontally' => :'CenterHorizontally',
    :'center_vertically' => :'CenterVertically',
    :'first_page_number' => :'FirstPageNumber',
    :'fit_to_pages_tall' => :'FitToPagesTall',
    :'fit_to_pages_wide' => :'FitToPagesWide',
    :'footer_margin' => :'FooterMargin',
    :'header_margin' => :'HeaderMargin',
    :'is_auto_first_page_number' => :'IsAutoFirstPageNumber',
    :'is_hf_align_margins' => :'IsHFAlignMargins',
    :'is_hf_diff_first' => :'IsHFDiffFirst',
    :'is_hf_diff_odd_even' => :'IsHFDiffOddEven',
    :'is_hf_scale_with_doc' => :'IsHFScaleWithDoc',
    :'is_percent_scale' => :'IsPercentScale',
    :'left_margin' => :'LeftMargin',
    :'order' => :'Order',
    :'orientation' => :'Orientation',
    :'paper_size' => :'PaperSize',
    :'print_area' => :'PrintArea',
    :'print_comments' => :'PrintComments',
    :'print_copies' => :'PrintCopies',
    :'print_draft' => :'PrintDraft',
    :'print_errors' => :'PrintErrors',
    :'print_gridlines' => :'PrintGridlines',
    :'print_headings' => :'PrintHeadings',
    :'print_quality' => :'PrintQuality',
    :'print_title_columns' => :'PrintTitleColumns',
    :'print_title_rows' => :'PrintTitleRows',
    :'right_margin' => :'RightMargin',
    :'top_margin' => :'TopMargin',
    :'zoom' => :'Zoom',
    :'header' => :'Header',
    :'footer' => :'Footer',
    :'link' => :'link'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 147

def self.swagger_types
  {
    :'black_and_white' => :'BOOLEAN',
    :'bottom_margin' => :'Float',
    :'center_horizontally' => :'BOOLEAN',
    :'center_vertically' => :'BOOLEAN',
    :'first_page_number' => :'Integer',
    :'fit_to_pages_tall' => :'Integer',
    :'fit_to_pages_wide' => :'Integer',
    :'footer_margin' => :'Float',
    :'header_margin' => :'Float',
    :'is_auto_first_page_number' => :'BOOLEAN',
    :'is_hf_align_margins' => :'BOOLEAN',
    :'is_hf_diff_first' => :'BOOLEAN',
    :'is_hf_diff_odd_even' => :'BOOLEAN',
    :'is_hf_scale_with_doc' => :'BOOLEAN',
    :'is_percent_scale' => :'BOOLEAN',
    :'left_margin' => :'Float',
    :'order' => :'String',
    :'orientation' => :'String',
    :'paper_size' => :'String',
    :'print_area' => :'String',
    :'print_comments' => :'String',
    :'print_copies' => :'Integer',
    :'print_draft' => :'BOOLEAN',
    :'print_errors' => :'String',
    :'print_gridlines' => :'BOOLEAN',
    :'print_headings' => :'BOOLEAN',
    :'print_quality' => :'Integer',
    :'print_title_columns' => :'String',
    :'print_title_rows' => :'String',
    :'right_margin' => :'Float',
    :'top_margin' => :'Float',
    :'zoom' => :'Integer',
    :'header' => :'Array<PageSection>',
    :'footer' => :'Array<PageSection>',
    :'link' => :'Link'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



459
460
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
498
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 459

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      black_and_white == o.black_and_white &&
      bottom_margin == o.bottom_margin &&
      center_horizontally == o.center_horizontally &&
      center_vertically == o.center_vertically &&
      first_page_number == o.first_page_number &&
      fit_to_pages_tall == o.fit_to_pages_tall &&
      fit_to_pages_wide == o.fit_to_pages_wide &&
      footer_margin == o.footer_margin &&
      header_margin == o.header_margin &&
      is_auto_first_page_number == o.is_auto_first_page_number &&
      is_hf_align_margins == o.is_hf_align_margins &&
      is_hf_diff_first == o.is_hf_diff_first &&
      is_hf_diff_odd_even == o.is_hf_diff_odd_even &&
      is_hf_scale_with_doc == o.is_hf_scale_with_doc &&
      is_percent_scale == o.is_percent_scale &&
      left_margin == o.left_margin &&
      order == o.order &&
      orientation == o.orientation &&
      paper_size == o.paper_size &&
      print_area == o.print_area &&
      print_comments == o.print_comments &&
      print_copies == o.print_copies &&
      print_draft == o.print_draft &&
      print_errors == o.print_errors &&
      print_gridlines == o.print_gridlines &&
      print_headings == o.print_headings &&
      print_quality == o.print_quality &&
      print_title_columns == o.print_title_columns &&
      print_title_rows == o.print_title_rows &&
      right_margin == o.right_margin &&
      top_margin == o.top_margin &&
      zoom == o.zoom &&
      header == o.header &&
      footer == o.footer &&
      link == o.link 
      std_dev == o.std_dev
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 536

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 = AsposeCellsCloud.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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



602
603
604
605
606
607
608
609
610
611
612
613
614
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 602

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 515

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?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


502
503
504
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 502

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



508
509
510
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 508

def hash
  [ black_and_white , bottom_margin , center_horizontally , center_vertically , first_page_number , fit_to_pages_tall , fit_to_pages_wide , footer_margin , header_margin , is_auto_first_page_number , is_hf_align_margins , is_hf_diff_first , is_hf_diff_odd_even , is_hf_scale_with_doc , is_percent_scale , left_margin , order , orientation , paper_size , print_area , print_comments , print_copies , print_draft , print_errors , print_gridlines , print_headings , print_quality , print_title_columns , print_title_rows , right_margin , top_margin , zoom , header , footer , link ].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properies with the reasons



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
346
347
348
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
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 305

def list_invalid_properties
  invalid_properties = Array.new
  if @black_and_white.nil?
      invalid_properties.push("invalid value for 'black_and_white', black_and_white cannot be nil.")
  end
  if @bottom_margin.nil?
      invalid_properties.push("invalid value for 'bottom_margin', bottom_margin cannot be nil.")
  end
  if @center_horizontally.nil?
      invalid_properties.push("invalid value for 'center_horizontally', center_horizontally cannot be nil.")
  end
  if @center_vertically.nil?
      invalid_properties.push("invalid value for 'center_vertically', center_vertically cannot be nil.")
  end
  if @first_page_number.nil?
      invalid_properties.push("invalid value for 'first_page_number', first_page_number cannot be nil.")
  end
  if @fit_to_pages_tall.nil?
      invalid_properties.push("invalid value for 'fit_to_pages_tall', fit_to_pages_tall cannot be nil.")
  end
  if @fit_to_pages_wide.nil?
      invalid_properties.push("invalid value for 'fit_to_pages_wide', fit_to_pages_wide cannot be nil.")
  end
  if @footer_margin.nil?
      invalid_properties.push("invalid value for 'footer_margin', footer_margin cannot be nil.")
  end
  if @header_margin.nil?
      invalid_properties.push("invalid value for 'header_margin', header_margin cannot be nil.")
  end
  if @is_auto_first_page_number.nil?
      invalid_properties.push("invalid value for 'is_auto_first_page_number', is_auto_first_page_number cannot be nil.")
  end
  if @is_hf_align_margins.nil?
      invalid_properties.push("invalid value for 'is_hf_align_margins', is_hf_align_margins cannot be nil.")
  end
  if @is_hf_diff_first.nil?
      invalid_properties.push("invalid value for 'is_hf_diff_first', is_hf_diff_first cannot be nil.")
  end
  if @is_hf_diff_odd_even.nil?
      invalid_properties.push("invalid value for 'is_hf_diff_odd_even', is_hf_diff_odd_even cannot be nil.")
  end
  if @is_hf_scale_with_doc.nil?
      invalid_properties.push("invalid value for 'is_hf_scale_with_doc', is_hf_scale_with_doc cannot be nil.")
  end
  if @is_percent_scale.nil?
      invalid_properties.push("invalid value for 'is_percent_scale', is_percent_scale cannot be nil.")
  end
  if @left_margin.nil?
      invalid_properties.push("invalid value for 'left_margin', left_margin cannot be nil.")
  end
  if @order.nil?
      invalid_properties.push("invalid value for 'order', order cannot be nil.")
  end
  if @orientation.nil?
      invalid_properties.push("invalid value for 'orientation', orientation cannot be nil.")
  end
  if @paper_size.nil?
      invalid_properties.push("invalid value for 'paper_size', paper_size cannot be nil.")
  end
  if @print_area.nil?
      invalid_properties.push("invalid value for 'print_area', print_area cannot be nil.")
  end
  if @print_comments.nil?
      invalid_properties.push("invalid value for 'print_comments', print_comments cannot be nil.")
  end
  if @print_copies.nil?
      invalid_properties.push("invalid value for 'print_copies', print_copies cannot be nil.")
  end
  if @print_draft.nil?
      invalid_properties.push("invalid value for 'print_draft', print_draft cannot be nil.")
  end
  if @print_errors.nil?
      invalid_properties.push("invalid value for 'print_errors', print_errors cannot be nil.")
  end
  if @print_gridlines.nil?
      invalid_properties.push("invalid value for 'print_gridlines', print_gridlines cannot be nil.")
  end
  if @print_headings.nil?
      invalid_properties.push("invalid value for 'print_headings', print_headings cannot be nil.")
  end
  if @print_quality.nil?
      invalid_properties.push("invalid value for 'print_quality', print_quality cannot be nil.")
  end
  if @print_title_columns.nil?
      invalid_properties.push("invalid value for 'print_title_columns', print_title_columns cannot be nil.")
  end
  if @print_title_rows.nil?
      invalid_properties.push("invalid value for 'print_title_rows', print_title_rows cannot be nil.")
  end
  if @right_margin.nil?
      invalid_properties.push("invalid value for 'right_margin', right_margin cannot be nil.")
  end
  if @top_margin.nil?
      invalid_properties.push("invalid value for 'top_margin', top_margin cannot be nil.")
  end
  if @zoom.nil?
      invalid_properties.push("invalid value for 'zoom', zoom cannot be nil.")
  end
  if @header.nil?
      invalid_properties.push("invalid value for 'header', header cannot be nil.")
  end
  if @footer.nil?
      invalid_properties.push("invalid value for 'footer', footer cannot be nil.")
  end
  if @link.nil?
      invalid_properties.push("invalid value for 'link', link cannot be nil.")
  end

  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



582
583
584
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 582

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



588
589
590
591
592
593
594
595
596
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 588

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



576
577
578
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 576

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



418
419
420
421
422
423
424
425
426
427
428
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
# File 'lib/aspose_cells_cloud/models/page_setup.rb', line 418

def valid?
  return false if @black_and_white.nil?
  return false if @bottom_margin.nil?
  return false if @center_horizontally.nil?
  return false if @center_vertically.nil?
  return false if @first_page_number.nil?
  return false if @fit_to_pages_tall.nil?
  return false if @fit_to_pages_wide.nil?
  return false if @footer_margin.nil?
  return false if @header_margin.nil?
  return false if @is_auto_first_page_number.nil?
  return false if @is_hf_align_margins.nil?
  return false if @is_hf_diff_first.nil?
  return false if @is_hf_diff_odd_even.nil?
  return false if @is_hf_scale_with_doc.nil?
  return false if @is_percent_scale.nil?
  return false if @left_margin.nil?
  return false if @order.nil?
  return false if @orientation.nil?
  return false if @paper_size.nil?
  return false if @print_area.nil?
  return false if @print_comments.nil?
  return false if @print_copies.nil?
  return false if @print_draft.nil?
  return false if @print_errors.nil?
  return false if @print_gridlines.nil?
  return false if @print_headings.nil?
  return false if @print_quality.nil?
  return false if @print_title_columns.nil?
  return false if @print_title_rows.nil?
  return false if @right_margin.nil?
  return false if @top_margin.nil?
  return false if @zoom.nil?
  return false if @header.nil?
  return false if @footer.nil?
  return false if @link.nil?
  return true
end