class AsposeSlidesCloud::Placeholder

Represents placeholder

Attributes

index[RW]

Index.

orientation[RW]

Orientation.

shape[RW]

Shape link.

size[RW]

Size.

type[RW]

Placeholder type.

Public Class Methods

attribute_map() click to toggle source

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

Calls superclass method
# File lib/aspose_slides_cloud/models/placeholder.rb, line 44
def self.attribute_map
  super.merge({
    :'index' => :'Index',
    :'orientation' => :'Orientation',
    :'size' => :'Size',
    :'type' => :'Type',
    :'shape' => :'Shape',
  })
end
new(attributes = {}) click to toggle source

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

Calls superclass method
# File lib/aspose_slides_cloud/models/placeholder.rb, line 67
def initialize(attributes = {})
  super

  if attributes.has_key?(:'Index')
    self.index = attributes[:'Index']
  end

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

  if attributes.has_key?(:'Size')
    self.size = attributes[:'Size']
  end

  if attributes.has_key?(:'Type')
    self.type = attributes[:'Type']
  end

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

Attribute type mapping.

Calls superclass method
# File lib/aspose_slides_cloud/models/placeholder.rb, line 55
def self.swagger_types
  super.merge({
    :'index' => :'Integer',
    :'orientation' => :'String',
    :'size' => :'String',
    :'type' => :'String',
    :'shape' => :'ResourceUri',
  })
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/placeholder.rb, line 163
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      index == o.index &&
      orientation == o.orientation &&
      size == o.size &&
      type == o.type &&
      shape == o.shape
end
eql?(o) click to toggle source

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

# File lib/aspose_slides_cloud/models/placeholder.rb, line 177
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/placeholder.rb, line 183
def hash
  [self_uri, alternate_links, index, orientation, size, type, shape].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

Calls superclass method
# File lib/aspose_slides_cloud/models/placeholder.rb, line 93
def list_invalid_properties
  invalid_properties = super
  if @index.nil?
    invalid_properties.push('invalid value for "index", index cannot be nil.')
  end

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

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

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

  invalid_properties
end
orientation=(orientation) click to toggle source

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

# File lib/aspose_slides_cloud/models/placeholder.rb, line 133
def orientation=(orientation)
  validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical'])
  unless validator.valid?(orientation)
    fail ArgumentError, 'invalid value for "orientation", must be one of #{validator.allowable_values}.'
  end
  @orientation = orientation
end
size=(size) click to toggle source

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

# File lib/aspose_slides_cloud/models/placeholder.rb, line 143
def size=(size)
  validator = EnumAttributeValidator.new('String', ['Full', 'Half', 'Quarter'])
  unless validator.valid?(size)
    fail ArgumentError, 'invalid value for "size", must be one of #{validator.allowable_values}.'
  end
  @size = size
end
type=(type) click to toggle source

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

# File lib/aspose_slides_cloud/models/placeholder.rb, line 153
def type=(type)
  validator = EnumAttributeValidator.new('String', ['Title', 'Body', 'CenteredTitle', 'Subtitle', 'DateAndTime', 'SlideNumber', 'Footer', 'Header', 'Object', 'Chart', 'Table', 'ClipArt', 'Diagram', 'Media', 'SlideImage', 'Picture'])
  unless validator.valid?(type)
    fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
  end
  @type = type
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

Calls superclass method
# File lib/aspose_slides_cloud/models/placeholder.rb, line 116
def valid?
  return false if !super
  return false if @index.nil?
  return false if @orientation.nil?
  orientation_validator = EnumAttributeValidator.new('String', ['Horizontal', 'Vertical'])
  return false unless orientation_validator.valid?(@orientation)
  return false if @size.nil?
  size_validator = EnumAttributeValidator.new('String', ['Full', 'Half', 'Quarter'])
  return false unless size_validator.valid?(@size)
  return false if @type.nil?
  type_validator = EnumAttributeValidator.new('String', ['Title', 'Body', 'CenteredTitle', 'Subtitle', 'DateAndTime', 'SlideNumber', 'Footer', 'Header', 'Object', 'Chart', 'Table', 'ClipArt', 'Diagram', 'Media', 'SlideImage', 'Picture'])
  return false unless type_validator.valid?(@type)
  true
end