class AsposeSlidesCloud::ShapeImageExportOptions

Provides options that control how a shape is saved in thumbnail.

Attributes

format[RW]

Gets export format.

scale_x[RW]

Get or sets scaling ratio by X axis.

scale_y[RW]

Get or sets scaling ratio by Y axis.

thumbnail_bounds[RW]

Get or sets thumbnail bounds

Public Class Methods

attribute_map() click to toggle source

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

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 41
def self.attribute_map
  {
    :'scale_x' => :'ScaleX',
    :'scale_y' => :'ScaleY',
    :'thumbnail_bounds' => :'ThumbnailBounds',
    :'format' => :'Format',
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 62
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?(:'ScaleX')
    self.scale_x = attributes[:'ScaleX']
  end

  if attributes.has_key?(:'ScaleY')
    self.scale_y = attributes[:'ScaleY']
  end

  if attributes.has_key?(:'ThumbnailBounds')
    self.thumbnail_bounds = attributes[:'ThumbnailBounds']
  end

  if attributes.has_key?(:'Format')
    self.format = attributes[:'Format']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 51
def self.swagger_types
  {
    :'scale_x' => :'Float',
    :'scale_y' => :'Float',
    :'thumbnail_bounds' => :'String',
    :'format' => :'String',
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 112
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      scale_x == o.scale_x &&
      scale_y == o.scale_y &&
      thumbnail_bounds == o.thumbnail_bounds &&
      format == o.format
end
eql?(o) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 123
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 129
def hash
  [scale_x, scale_y, thumbnail_bounds, format].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 87
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end
thumbnail_bounds=(thumbnail_bounds) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] thumbnail_bounds Object to be assigned

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 102
def thumbnail_bounds=(thumbnail_bounds)
  validator = EnumAttributeValidator.new('String', ['Slide', 'Shape', 'Appearance'])
  unless validator.valid?(thumbnail_bounds)
    fail ArgumentError, 'invalid value for "thumbnail_bounds", must be one of #{validator.allowable_values}.'
  end
  @thumbnail_bounds = thumbnail_bounds
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/aspose_slides_cloud/models/shape_image_export_options.rb, line 94
def valid?
  thumbnail_bounds_validator = EnumAttributeValidator.new('String', ['Slide', 'Shape', 'Appearance'])
  return false unless thumbnail_bounds_validator.valid?(@thumbnail_bounds)
  true
end