Class: AsposeImagingCloud::TiffOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose-imaging-cloud/models/tiff_options.rb

Overview

Represents options for TIFF frame.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ TiffOptions

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
415
416
417
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
456
457
458
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
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 276

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?(:'IsValid')
    self.is_valid = attributes[:'IsValid']
  end

  if attributes.has_key?(:'Artist')
    self.artist = attributes[:'Artist']
  end

  if attributes.has_key?(:'ByteOrder')
    self.byte_order = attributes[:'ByteOrder']
  end

  if attributes.has_key?(:'BitsPerSample')
    if (value = attributes[:'BitsPerSample']).is_a?(Array)
      self.bits_per_sample = value
    end
  end

  if attributes.has_key?(:'Compression')
    self.compression = attributes[:'Compression']
  end

  if attributes.has_key?(:'Copyright')
    self.copyright = attributes[:'Copyright']
  end

  if attributes.has_key?(:'ColorMap')
    if (value = attributes[:'ColorMap']).is_a?(Array)
      self.color_map = value
    end
  end

  if attributes.has_key?(:'DateTime')
    self.date_time = attributes[:'DateTime']
  end

  if attributes.has_key?(:'DocumentName')
    self.document_name = attributes[:'DocumentName']
  end

  if attributes.has_key?(:'AlphaStorage')
    self.alpha_storage = attributes[:'AlphaStorage']
  end

  if attributes.has_key?(:'FillOrder')
    self.fill_order = attributes[:'FillOrder']
  end

  if attributes.has_key?(:'HalfToneHints')
    if (value = attributes[:'HalfToneHints']).is_a?(Array)
      self.half_tone_hints = value
    end
  end

  if attributes.has_key?(:'ImageDescription')
    self.image_description = attributes[:'ImageDescription']
  end

  if attributes.has_key?(:'InkNames')
    self.ink_names = attributes[:'InkNames']
  end

  if attributes.has_key?(:'ScannerManufacturer')
    self.scanner_manufacturer = attributes[:'ScannerManufacturer']
  end

  if attributes.has_key?(:'MaxSampleValue')
    if (value = attributes[:'MaxSampleValue']).is_a?(Array)
      self.max_sample_value = value
    end
  end

  if attributes.has_key?(:'MinSampleValue')
    if (value = attributes[:'MinSampleValue']).is_a?(Array)
      self.min_sample_value = value
    end
  end

  if attributes.has_key?(:'ScannerModel')
    self.scanner_model = attributes[:'ScannerModel']
  end

  if attributes.has_key?(:'PageName')
    self.page_name = attributes[:'PageName']
  end

  if attributes.has_key?(:'Orientation')
    self.orientation = attributes[:'Orientation']
  end

  if attributes.has_key?(:'PageNumber')
    if (value = attributes[:'PageNumber']).is_a?(Array)
      self.page_number = value
    end
  end

  if attributes.has_key?(:'Photometric')
    self.photometric = attributes[:'Photometric']
  end

  if attributes.has_key?(:'PlanarConfiguration')
    self.planar_configuration = attributes[:'PlanarConfiguration']
  end

  if attributes.has_key?(:'ResolutionUnit')
    self.resolution_unit = attributes[:'ResolutionUnit']
  end

  if attributes.has_key?(:'RowsPerStrip')
    self.rows_per_strip = attributes[:'RowsPerStrip']
  end

  if attributes.has_key?(:'SampleFormat')
    if (value = attributes[:'SampleFormat']).is_a?(Array)
      self.sample_format = value
    end
  end

  if attributes.has_key?(:'SamplesPerPixel')
    self.samples_per_pixel = attributes[:'SamplesPerPixel']
  end

  if attributes.has_key?(:'SmaxSampleValue')
    if (value = attributes[:'SmaxSampleValue']).is_a?(Array)
      self.smax_sample_value = value
    end
  end

  if attributes.has_key?(:'SminSampleValue')
    if (value = attributes[:'SminSampleValue']).is_a?(Array)
      self.smin_sample_value = value
    end
  end

  if attributes.has_key?(:'SoftwareType')
    self.software_type = attributes[:'SoftwareType']
  end

  if attributes.has_key?(:'StripByteCounts')
    if (value = attributes[:'StripByteCounts']).is_a?(Array)
      self.strip_byte_counts = value
    end
  end

  if attributes.has_key?(:'StripOffsets')
    if (value = attributes[:'StripOffsets']).is_a?(Array)
      self.strip_offsets = value
    end
  end

  if attributes.has_key?(:'SubFileType')
    self.sub_file_type = attributes[:'SubFileType']
  end

  if attributes.has_key?(:'TargetPrinter')
    self.target_printer = attributes[:'TargetPrinter']
  end

  if attributes.has_key?(:'Threshholding')
    self.threshholding = attributes[:'Threshholding']
  end

  if attributes.has_key?(:'TotalPages')
    self.total_pages = attributes[:'TotalPages']
  end

  if attributes.has_key?(:'Xposition')
    self.xposition = attributes[:'Xposition']
  end

  if attributes.has_key?(:'Xresolution')
    self.xresolution = attributes[:'Xresolution']
  end

  if attributes.has_key?(:'Yposition')
    self.yposition = attributes[:'Yposition']
  end

  if attributes.has_key?(:'Yresolution')
    self.yresolution = attributes[:'Yresolution']
  end

  if attributes.has_key?(:'FaxT4Options')
    self.fax_t4_options = attributes[:'FaxT4Options']
  end

  if attributes.has_key?(:'Predictor')
    self.predictor = attributes[:'Predictor']
  end

  if attributes.has_key?(:'ImageLength')
    self.image_length = attributes[:'ImageLength']
  end

  if attributes.has_key?(:'ImageWidth')
    self.image_width = attributes[:'ImageWidth']
  end

  if attributes.has_key?(:'ValidTagCount')
    self.valid_tag_count = attributes[:'ValidTagCount']
  end

  if attributes.has_key?(:'BitsPerPixel')
    self.bits_per_pixel = attributes[:'BitsPerPixel']
  end
end

Instance Attribute Details

#alpha_storageObject

Gets or sets the alpha storage.



60
61
62
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 60

def alpha_storage
  @alpha_storage
end

#artistObject

Gets or sets the artist.



36
37
38
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 36

def artist
  @artist
end

#bits_per_pixelObject

Gets or sets the bits per pixel.



168
169
170
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 168

def bits_per_pixel
  @bits_per_pixel
end

#bits_per_sampleObject

Gets or sets the bits per sample.



42
43
44
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 42

def bits_per_sample
  @bits_per_sample
end

#byte_orderObject

Gets or sets the byte order.



39
40
41
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 39

def byte_order
  @byte_order
end

#color_mapObject

Gets or sets the color map.



51
52
53
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 51

def color_map
  @color_map
end

#compressionObject

Gets or sets the compression.



45
46
47
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 45

def compression
  @compression
end

Gets or sets the copyright info.



48
49
50
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 48

def copyright
  @copyright
end

#date_timeObject

Gets or sets the date and time.



54
55
56
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 54

def date_time
  @date_time
end

#document_nameObject

Gets or sets the document name.



57
58
59
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 57

def document_name
  @document_name
end

#fax_t4_optionsObject

Gets or sets the FaxT4 Options.



153
154
155
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 153

def fax_t4_options
  @fax_t4_options
end

#fill_orderObject

Gets or sets the fill order.



63
64
65
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 63

def fill_order
  @fill_order
end

#half_tone_hintsObject

Gets or sets the half-tone hints.



66
67
68
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 66

def half_tone_hints
  @half_tone_hints
end

#image_descriptionObject

Gets or sets the image description.



69
70
71
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 69

def image_description
  @image_description
end

#image_lengthObject

Gets or sets the image length.



159
160
161
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 159

def image_length
  @image_length
end

#image_widthObject

Gets or sets the image width.



162
163
164
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 162

def image_width
  @image_width
end

#ink_namesObject

Gets or sets the ink names.



72
73
74
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 72

def ink_names
  @ink_names
end

#is_validObject

Gets or sets a value indicating whether TIFF image has valid data.



33
34
35
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 33

def is_valid
  @is_valid
end

#max_sample_valueObject

Gets or sets the max sample value.



78
79
80
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 78

def max_sample_value
  @max_sample_value
end

#min_sample_valueObject

Gets or sets the min sample value.



81
82
83
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 81

def min_sample_value
  @min_sample_value
end

#orientationObject

Gets or sets the orientation.



90
91
92
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 90

def orientation
  @orientation
end

#page_nameObject

Gets or sets the page name.



87
88
89
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 87

def page_name
  @page_name
end

#page_numberObject

Gets or sets the page number.



93
94
95
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 93

def page_number
  @page_number
end

#photometricObject

Gets or sets the photometric interpretation.



96
97
98
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 96

def photometric
  @photometric
end

#planar_configurationObject

Gets or sets the planar configuration.



99
100
101
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 99

def planar_configuration
  @planar_configuration
end

#predictorObject

Gets or sets the predictor (a mathematical operator that is applied to the image data before an encoding scheme is applied).



156
157
158
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 156

def predictor
  @predictor
end

#resolution_unitObject

Gets or sets the resolution unit.



102
103
104
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 102

def resolution_unit
  @resolution_unit
end

#rows_per_stripObject

Gets or sets the rows per strip.



105
106
107
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 105

def rows_per_strip
  @rows_per_strip
end

#sample_formatObject

Gets or sets the sample format.



108
109
110
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 108

def sample_format
  @sample_format
end

#samples_per_pixelObject

Gets or sets the samples per pixel.



111
112
113
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 111

def samples_per_pixel
  @samples_per_pixel
end

#scanner_manufacturerObject

Gets or sets the scanner manufacturer.



75
76
77
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 75

def scanner_manufacturer
  @scanner_manufacturer
end

#scanner_modelObject

Gets or sets the scanner model.



84
85
86
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 84

def scanner_model
  @scanner_model
end

#smax_sample_valueObject

Gets or sets the Smax sample value.



114
115
116
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 114

def smax_sample_value
  @smax_sample_value
end

#smin_sample_valueObject

Gets or sets the Smin sample value.



117
118
119
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 117

def smin_sample_value
  @smin_sample_value
end

#software_typeObject

Gets or sets the software type.



120
121
122
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 120

def software_type
  @software_type
end

#strip_byte_countsObject

Gets or sets the strip byte counts.



123
124
125
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 123

def strip_byte_counts
  @strip_byte_counts
end

#strip_offsetsObject

Gets or sets the strip offsets.



126
127
128
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 126

def strip_offsets
  @strip_offsets
end

#sub_file_typeObject

Gets or sets the subfile type.



129
130
131
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 129

def sub_file_type
  @sub_file_type
end

#target_printerObject

Gets or sets the target printer.



132
133
134
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 132

def target_printer
  @target_printer
end

#threshholdingObject

Gets or sets the threshholding.



135
136
137
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 135

def threshholding
  @threshholding
end

#total_pagesObject

Gets or sets the total pages count.



138
139
140
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 138

def total_pages
  @total_pages
end

#valid_tag_countObject

Gets or sets the valid tag count.



165
166
167
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 165

def valid_tag_count
  @valid_tag_count
end

#xpositionObject

Gets or sets the X position.



141
142
143
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 141

def xposition
  @xposition
end

#xresolutionObject

Gets or sets the X resolution.



144
145
146
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 144

def xresolution
  @xresolution
end

#ypositionObject

Gets or sets the Y position.



147
148
149
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 147

def yposition
  @yposition
end

#yresolutionObject

Gets or sets the Y resolution.



150
151
152
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 150

def yresolution
  @yresolution
end

Class Method Details

.attribute_mapObject

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



171
172
173
174
175
176
177
178
179
180
181
182
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
217
218
219
220
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 171

def self.attribute_map
  {
    :'is_valid' => :'IsValid',
    :'artist' => :'Artist',
    :'byte_order' => :'ByteOrder',
    :'bits_per_sample' => :'BitsPerSample',
    :'compression' => :'Compression',
    :'copyright' => :'Copyright',
    :'color_map' => :'ColorMap',
    :'date_time' => :'DateTime',
    :'document_name' => :'DocumentName',
    :'alpha_storage' => :'AlphaStorage',
    :'fill_order' => :'FillOrder',
    :'half_tone_hints' => :'HalfToneHints',
    :'image_description' => :'ImageDescription',
    :'ink_names' => :'InkNames',
    :'scanner_manufacturer' => :'ScannerManufacturer',
    :'max_sample_value' => :'MaxSampleValue',
    :'min_sample_value' => :'MinSampleValue',
    :'scanner_model' => :'ScannerModel',
    :'page_name' => :'PageName',
    :'orientation' => :'Orientation',
    :'page_number' => :'PageNumber',
    :'photometric' => :'Photometric',
    :'planar_configuration' => :'PlanarConfiguration',
    :'resolution_unit' => :'ResolutionUnit',
    :'rows_per_strip' => :'RowsPerStrip',
    :'sample_format' => :'SampleFormat',
    :'samples_per_pixel' => :'SamplesPerPixel',
    :'smax_sample_value' => :'SmaxSampleValue',
    :'smin_sample_value' => :'SminSampleValue',
    :'software_type' => :'SoftwareType',
    :'strip_byte_counts' => :'StripByteCounts',
    :'strip_offsets' => :'StripOffsets',
    :'sub_file_type' => :'SubFileType',
    :'target_printer' => :'TargetPrinter',
    :'threshholding' => :'Threshholding',
    :'total_pages' => :'TotalPages',
    :'xposition' => :'Xposition',
    :'xresolution' => :'Xresolution',
    :'yposition' => :'Yposition',
    :'yresolution' => :'Yresolution',
    :'fax_t4_options' => :'FaxT4Options',
    :'predictor' => :'Predictor',
    :'image_length' => :'ImageLength',
    :'image_width' => :'ImageWidth',
    :'valid_tag_count' => :'ValidTagCount',
    :'bits_per_pixel' => :'BitsPerPixel'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 223

def self.swagger_types
  {
    :'is_valid' => :'BOOLEAN',
    :'artist' => :'String',
    :'byte_order' => :'String',
    :'bits_per_sample' => :'Array<Integer>',
    :'compression' => :'String',
    :'copyright' => :'String',
    :'color_map' => :'Array<Integer>',
    :'date_time' => :'String',
    :'document_name' => :'String',
    :'alpha_storage' => :'String',
    :'fill_order' => :'String',
    :'half_tone_hints' => :'Array<Integer>',
    :'image_description' => :'String',
    :'ink_names' => :'String',
    :'scanner_manufacturer' => :'String',
    :'max_sample_value' => :'Array<Integer>',
    :'min_sample_value' => :'Array<Integer>',
    :'scanner_model' => :'String',
    :'page_name' => :'String',
    :'orientation' => :'String',
    :'page_number' => :'Array<Integer>',
    :'photometric' => :'String',
    :'planar_configuration' => :'String',
    :'resolution_unit' => :'String',
    :'rows_per_strip' => :'Integer',
    :'sample_format' => :'Array<String>',
    :'samples_per_pixel' => :'Integer',
    :'smax_sample_value' => :'Array<Integer>',
    :'smin_sample_value' => :'Array<Integer>',
    :'software_type' => :'String',
    :'strip_byte_counts' => :'Array<Integer>',
    :'strip_offsets' => :'Array<Integer>',
    :'sub_file_type' => :'String',
    :'target_printer' => :'String',
    :'threshholding' => :'String',
    :'total_pages' => :'Integer',
    :'xposition' => :'Float',
    :'xresolution' => :'Float',
    :'yposition' => :'Float',
    :'yresolution' => :'Float',
    :'fax_t4_options' => :'String',
    :'predictor' => :'String',
    :'image_length' => :'Integer',
    :'image_width' => :'Integer',
    :'valid_tag_count' => :'Integer',
    :'bits_per_pixel' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
602
603
604
605
606
607
608
609
610
611
612
613
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 564

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      is_valid == o.is_valid &&
      artist == o.artist &&
      byte_order == o.byte_order &&
      bits_per_sample == o.bits_per_sample &&
      compression == o.compression &&
      copyright == o.copyright &&
      color_map == o.color_map &&
      date_time == o.date_time &&
      document_name == o.document_name &&
      alpha_storage == o.alpha_storage &&
      fill_order == o.fill_order &&
      half_tone_hints == o.half_tone_hints &&
      image_description == o.image_description &&
      ink_names == o.ink_names &&
      scanner_manufacturer == o.scanner_manufacturer &&
      max_sample_value == o.max_sample_value &&
      min_sample_value == o.min_sample_value &&
      scanner_model == o.scanner_model &&
      page_name == o.page_name &&
      orientation == o.orientation &&
      page_number == o.page_number &&
      photometric == o.photometric &&
      planar_configuration == o.planar_configuration &&
      resolution_unit == o.resolution_unit &&
      rows_per_strip == o.rows_per_strip &&
      sample_format == o.sample_format &&
      samples_per_pixel == o.samples_per_pixel &&
      smax_sample_value == o.smax_sample_value &&
      smin_sample_value == o.smin_sample_value &&
      software_type == o.software_type &&
      strip_byte_counts == o.strip_byte_counts &&
      strip_offsets == o.strip_offsets &&
      sub_file_type == o.sub_file_type &&
      target_printer == o.target_printer &&
      threshholding == o.threshholding &&
      total_pages == o.total_pages &&
      xposition == o.xposition &&
      xresolution == o.xresolution &&
      yposition == o.yposition &&
      yresolution == o.yresolution &&
      fax_t4_options == o.fax_t4_options &&
      predictor == o.predictor &&
      image_length == o.image_length &&
      image_width == o.image_width &&
      valid_tag_count == o.valid_tag_count &&
      bits_per_pixel == o.bits_per_pixel
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



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 653

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



719
720
721
722
723
724
725
726
727
728
729
730
731
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 719

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



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 630

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    attribute_key = self.class.attribute_map[key]
    attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
    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[attribute_key].is_a?(Array)
        self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[attribute_key].nil?
      self.send("#{key}=", _deserialize(type, attributes[attribute_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


617
618
619
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 617

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



623
624
625
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 623

def hash
  [is_valid, artist, byte_order, bits_per_sample, compression, copyright, color_map, date_time, document_name, alpha_storage, fill_order, half_tone_hints, image_description, ink_names, scanner_manufacturer, max_sample_value, min_sample_value, scanner_model, page_name, orientation, page_number, photometric, planar_configuration, resolution_unit, rows_per_strip, sample_format, samples_per_pixel, smax_sample_value, smin_sample_value, software_type, strip_byte_counts, strip_offsets, sub_file_type, target_printer, threshholding, total_pages, xposition, xresolution, yposition, yresolution, fax_t4_options, predictor, image_length, image_width, valid_tag_count, bits_per_pixel].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



491
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
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 491

def list_invalid_properties
  invalid_properties = Array.new
  if @is_valid.nil?
    invalid_properties.push('invalid value for "is_valid", is_valid cannot be nil.')
  end

  if @rows_per_strip.nil?
    invalid_properties.push('invalid value for "rows_per_strip", rows_per_strip cannot be nil.')
  end

  if @samples_per_pixel.nil?
    invalid_properties.push('invalid value for "samples_per_pixel", samples_per_pixel cannot be nil.')
  end

  if @total_pages.nil?
    invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
  end

  if @xposition.nil?
    invalid_properties.push('invalid value for "xposition", xposition cannot be nil.')
  end

  if @xresolution.nil?
    invalid_properties.push('invalid value for "xresolution", xresolution cannot be nil.')
  end

  if @yposition.nil?
    invalid_properties.push('invalid value for "yposition", yposition cannot be nil.')
  end

  if @yresolution.nil?
    invalid_properties.push('invalid value for "yresolution", yresolution cannot be nil.')
  end

  if @image_length.nil?
    invalid_properties.push('invalid value for "image_length", image_length cannot be nil.')
  end

  if @image_width.nil?
    invalid_properties.push('invalid value for "image_width", image_width cannot be nil.')
  end

  if @valid_tag_count.nil?
    invalid_properties.push('invalid value for "valid_tag_count", valid_tag_count cannot be nil.')
  end

  if @bits_per_pixel.nil?
    invalid_properties.push('invalid value for "bits_per_pixel", bits_per_pixel cannot be nil.')
  end

  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



699
700
701
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 699

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



705
706
707
708
709
710
711
712
713
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 705

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



693
694
695
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 693

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



546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/aspose-imaging-cloud/models/tiff_options.rb', line 546

def valid?
  return false if @is_valid.nil?
  return false if @rows_per_strip.nil?
  return false if @samples_per_pixel.nil?
  return false if @total_pages.nil?
  return false if @xposition.nil?
  return false if @xresolution.nil?
  return false if @yposition.nil?
  return false if @yresolution.nil?
  return false if @image_length.nil?
  return false if @image_width.nil?
  return false if @valid_tag_count.nil?
  return false if @bits_per_pixel.nil?
  true
end