Class: AsposeDiagramCloud::ImageSaveOptions
- Inherits:
-
Object
- Object
- AsposeDiagramCloud::ImageSaveOptions
- Defined in:
- lib/AsposeDiagramCloud/models/image_save_options.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#area ⇒ Object
Returns the value of attribute area.
-
#compositing_quality ⇒ Object
Returns the value of attribute compositing_quality.
-
#default_font ⇒ Object
Returns the value of attribute default_font.
-
#export_guide_shapes ⇒ Object
Returns the value of attribute export_guide_shapes.
-
#export_hidden_page ⇒ Object
Returns the value of attribute export_hidden_page.
-
#image_brightness ⇒ Object
Returns the value of attribute image_brightness.
-
#image_color_mode ⇒ Object
Returns the value of attribute image_color_mode.
-
#image_contrast ⇒ Object
Returns the value of attribute image_contrast.
-
#interpolation_mode ⇒ Object
Returns the value of attribute interpolation_mode.
-
#is_export_comments ⇒ Object
Returns the value of attribute is_export_comments.
-
#jpeg_quality ⇒ Object
Returns the value of attribute jpeg_quality.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
-
#page_index ⇒ Object
Returns the value of attribute page_index.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#pixel_offset_mode ⇒ Object
Returns the value of attribute pixel_offset_mode.
-
#resolution ⇒ Object
Returns the value of attribute resolution.
-
#same_as_pdf_conversion_area ⇒ Object
Returns the value of attribute same_as_pdf_conversion_area.
-
#save_foreground_pages_only ⇒ Object
Returns the value of attribute save_foreground_pages_only.
-
#save_format ⇒ Object
Returns the value of attribute save_format.
-
#scale ⇒ Object
Returns the value of attribute scale.
-
#smoothing_mode ⇒ Object
Returns the value of attribute smoothing_mode.
-
#tiff_compression ⇒ Object
Returns the value of attribute tiff_compression.
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 = {}) ⇒ ImageSaveOptions
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 = {}) ⇒ ImageSaveOptions
Initializes the object
142 143 144 145 146 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 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 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 142 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?(:'SaveFormat') self.save_format = attributes[:'SaveFormat'] end if attributes.has_key?(:'DefaultFont') self.default_font = attributes[:'DefaultFont'] end if attributes.has_key?(:'Area') self.area = attributes[:'Area'] end if attributes.has_key?(:'ExportGuideShapes') self.export_guide_shapes = attributes[:'ExportGuideShapes'] end if attributes.has_key?(:'PageSize') self.page_size = attributes[:'PageSize'] end if attributes.has_key?(:'IsExportComments') self.is_export_comments = attributes[:'IsExportComments'] end if attributes.has_key?(:'ImageBrightness') self.image_brightness = attributes[:'ImageBrightness'] end if attributes.has_key?(:'ImageContrast') self.image_contrast = attributes[:'ImageContrast'] end if attributes.has_key?(:'JpegQuality') self.jpeg_quality = attributes[:'JpegQuality'] end if attributes.has_key?(:'PageCount') self.page_count = attributes[:'PageCount'] end if attributes.has_key?(:'Resolution') self.resolution = attributes[:'Resolution'] end if attributes.has_key?(:'Scale') self.scale = attributes[:'Scale'] end if attributes.has_key?(:'TiffCompression') self.tiff_compression = attributes[:'TiffCompression'] end if attributes.has_key?(:'ExportHiddenPage') self.export_hidden_page = attributes[:'ExportHiddenPage'] end if attributes.has_key?(:'ImageColorMode') self.image_color_mode = attributes[:'ImageColorMode'] end if attributes.has_key?(:'PageIndex') self.page_index = attributes[:'PageIndex'] end if attributes.has_key?(:'SaveForegroundPagesOnly') self.save_foreground_pages_only = attributes[:'SaveForegroundPagesOnly'] end if attributes.has_key?(:'SameAsPdfConversionArea') self.same_as_pdf_conversion_area = attributes[:'SameAsPdfConversionArea'] end if attributes.has_key?(:'PixelOffsetMode') self.pixel_offset_mode = attributes[:'PixelOffsetMode'] end if attributes.has_key?(:'SmoothingMode') self.smoothing_mode = attributes[:'SmoothingMode'] end if attributes.has_key?(:'CompositingQuality') self.compositing_quality = attributes[:'CompositingQuality'] end if attributes.has_key?(:'InterpolationMode') self.interpolation_mode = attributes[:'InterpolationMode'] end end |
Instance Attribute Details
#area ⇒ Object
Returns the value of attribute area.
22 23 24 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 22 def area @area end |
#compositing_quality ⇒ Object
Returns the value of attribute compositing_quality.
58 59 60 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 58 def compositing_quality @compositing_quality end |
#default_font ⇒ Object
Returns the value of attribute default_font.
20 21 22 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 20 def default_font @default_font end |
#export_guide_shapes ⇒ Object
Returns the value of attribute export_guide_shapes.
24 25 26 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 24 def export_guide_shapes @export_guide_shapes end |
#export_hidden_page ⇒ Object
Returns the value of attribute export_hidden_page.
44 45 46 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 44 def export_hidden_page @export_hidden_page end |
#image_brightness ⇒ Object
Returns the value of attribute image_brightness.
30 31 32 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 30 def image_brightness @image_brightness end |
#image_color_mode ⇒ Object
Returns the value of attribute image_color_mode.
46 47 48 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 46 def image_color_mode @image_color_mode end |
#image_contrast ⇒ Object
Returns the value of attribute image_contrast.
32 33 34 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 32 def image_contrast @image_contrast end |
#interpolation_mode ⇒ Object
Returns the value of attribute interpolation_mode.
60 61 62 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 60 def interpolation_mode @interpolation_mode end |
#is_export_comments ⇒ Object
Returns the value of attribute is_export_comments.
28 29 30 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 28 def is_export_comments @is_export_comments end |
#jpeg_quality ⇒ Object
Returns the value of attribute jpeg_quality.
34 35 36 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 34 def jpeg_quality @jpeg_quality end |
#page_count ⇒ Object
Returns the value of attribute page_count.
36 37 38 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 36 def page_count @page_count end |
#page_index ⇒ Object
Returns the value of attribute page_index.
48 49 50 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 48 def page_index @page_index end |
#page_size ⇒ Object
Returns the value of attribute page_size.
26 27 28 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 26 def page_size @page_size end |
#pixel_offset_mode ⇒ Object
Returns the value of attribute pixel_offset_mode.
54 55 56 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 54 def pixel_offset_mode @pixel_offset_mode end |
#resolution ⇒ Object
Returns the value of attribute resolution.
38 39 40 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 38 def resolution @resolution end |
#same_as_pdf_conversion_area ⇒ Object
Returns the value of attribute same_as_pdf_conversion_area.
52 53 54 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 52 def same_as_pdf_conversion_area @same_as_pdf_conversion_area end |
#save_foreground_pages_only ⇒ Object
Returns the value of attribute save_foreground_pages_only.
50 51 52 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 50 def save_foreground_pages_only @save_foreground_pages_only end |
#save_format ⇒ Object
Returns the value of attribute save_format.
18 19 20 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 18 def save_format @save_format end |
#scale ⇒ Object
Returns the value of attribute scale.
40 41 42 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 40 def scale @scale end |
#smoothing_mode ⇒ Object
Returns the value of attribute smoothing_mode.
56 57 58 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 56 def smoothing_mode @smoothing_mode end |
#tiff_compression ⇒ Object
Returns the value of attribute tiff_compression.
42 43 44 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 42 def tiff_compression @tiff_compression end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 85 def self.attribute_map { :'save_format' => :'SaveFormat', :'default_font' => :'DefaultFont', :'area' => :'Area', :'export_guide_shapes' => :'ExportGuideShapes', :'page_size' => :'PageSize', :'is_export_comments' => :'IsExportComments', :'image_brightness' => :'ImageBrightness', :'image_contrast' => :'ImageContrast', :'jpeg_quality' => :'JpegQuality', :'page_count' => :'PageCount', :'resolution' => :'Resolution', :'scale' => :'Scale', :'tiff_compression' => :'TiffCompression', :'export_hidden_page' => :'ExportHiddenPage', :'image_color_mode' => :'ImageColorMode', :'page_index' => :'PageIndex', :'save_foreground_pages_only' => :'SaveForegroundPagesOnly', :'same_as_pdf_conversion_area' => :'SameAsPdfConversionArea', :'pixel_offset_mode' => :'PixelOffsetMode', :'smoothing_mode' => :'SmoothingMode', :'compositing_quality' => :'CompositingQuality', :'interpolation_mode' => :'InterpolationMode' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 113 def self.swagger_types { :'save_format' => :'String', :'default_font' => :'String', :'area' => :'RectangleF', :'export_guide_shapes' => :'BOOLEAN', :'page_size' => :'PageSize', :'is_export_comments' => :'BOOLEAN', :'image_brightness' => :'Float', :'image_contrast' => :'Float', :'jpeg_quality' => :'Integer', :'page_count' => :'Integer', :'resolution' => :'Float', :'scale' => :'Float', :'tiff_compression' => :'String', :'export_hidden_page' => :'BOOLEAN', :'image_color_mode' => :'String', :'page_index' => :'Integer', :'save_foreground_pages_only' => :'BOOLEAN', :'same_as_pdf_conversion_area' => :'BOOLEAN', :'pixel_offset_mode' => :'String', :'smoothing_mode' => :'String', :'compositing_quality' => :'String', :'interpolation_mode' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 347 def ==(o) return true if self.equal?(o) self.class == o.class && save_format == o.save_format && default_font == o.default_font && area == o.area && export_guide_shapes == o.export_guide_shapes && page_size == o.page_size && is_export_comments == o.is_export_comments && image_brightness == o.image_brightness && image_contrast == o.image_contrast && jpeg_quality == o.jpeg_quality && page_count == o.page_count && resolution == o.resolution && scale == o.scale && tiff_compression == o.tiff_compression && export_hidden_page == o.export_hidden_page && image_color_mode == o.image_color_mode && page_index == o.page_index && save_foreground_pages_only == o.save_foreground_pages_only && same_as_pdf_conversion_area == o.same_as_pdf_conversion_area && pixel_offset_mode == o.pixel_offset_mode && smoothing_mode == o.smoothing_mode && compositing_quality == o.compositing_quality && interpolation_mode == o.interpolation_mode end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 410 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 = AsposeDiagramCloud.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
476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 476 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
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 389 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
376 377 378 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 376 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
382 383 384 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 382 def hash [save_format, default_font, area, export_guide_shapes, page_size, is_export_comments, image_brightness, image_contrast, jpeg_quality, page_count, resolution, scale, tiff_compression, export_hidden_page, image_color_mode, page_index, save_foreground_pages_only, same_as_pdf_conversion_area, pixel_offset_mode, smoothing_mode, compositing_quality, interpolation_mode].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 240 def list_invalid_properties invalid_properties = Array.new if @save_format.nil? invalid_properties.push("invalid value for 'save_format', save_format cannot be nil.") end if @area.nil? invalid_properties.push("invalid value for 'area', area cannot be nil.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
456 457 458 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 456 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
462 463 464 465 466 467 468 469 470 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 462 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
450 451 452 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 450 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/AsposeDiagramCloud/models/image_save_options.rb', line 255 def valid? return false if @save_format.nil? save_format_validator = EnumAttributeValidator.new('String', ["VDX", "VSX", "VTX", "TIFF", "PNG", "BMP", "EMF", "JPEG", "PDF", "XPS", "GIF", "HTML", "SVG", "SWF", "XAML", "VSDX", "VSTX", "VSSX", "VSDM", "VSSM", "VSTM"]) return false unless save_format_validator.valid?(@save_format) return false if @area.nil? tiff_compression_validator = EnumAttributeValidator.new('String', ["None", "Rle", "Ccitt3", "Ccitt4", "Lzw"]) return false unless tiff_compression_validator.valid?(@tiff_compression) image_color_mode_validator = EnumAttributeValidator.new('String', ["None", "Grayscale", "BlackAndWhite"]) return false unless image_color_mode_validator.valid?(@image_color_mode) pixel_offset_mode_validator = EnumAttributeValidator.new('String', ["Default", "HighSpeed", "HighQuality", "None", "Half", "Invalid"]) return false unless pixel_offset_mode_validator.valid?(@pixel_offset_mode) smoothing_mode_validator = EnumAttributeValidator.new('String', ["Default", "HighSpeed", "HighQuality", "None", "AntiAlias", "Invalid"]) return false unless smoothing_mode_validator.valid?(@smoothing_mode) compositing_quality_validator = EnumAttributeValidator.new('String', ["Default", "HighSpeed", "HighQuality", "GammaCorrected", "AssumeLinear", "Invalid"]) return false unless compositing_quality_validator.valid?(@compositing_quality) interpolation_mode_validator = EnumAttributeValidator.new('String', ["Default", "Low", "High", "Bilinear", "Bicubic", "NearestNeighbor", "HighQualityBilinear", "HighQualityBicubic", "Invalid"]) return false unless interpolation_mode_validator.valid?(@interpolation_mode) return true end |