class AsposeSlidesCloud::Camera

Camera

Attributes

camera_type[RW]

Camera type

field_of_view_angle[RW]

Camera FOV

x_rotation[RW]

XRotation

y_rotation[RW]

YRotation

z_rotation[RW]

ZRotation

zoom[RW]

Camera zoom

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/camera.rb, line 47
def self.attribute_map
  {
    :'camera_type' => :'CameraType',
    :'field_of_view_angle' => :'FieldOfViewAngle',
    :'zoom' => :'Zoom',
    :'x_rotation' => :'XRotation',
    :'y_rotation' => :'YRotation',
    :'z_rotation' => :'ZRotation',
  }
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/camera.rb, line 72
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?(:'CameraType')
    self.camera_type = attributes[:'CameraType']
  end

  if attributes.has_key?(:'FieldOfViewAngle')
    self.field_of_view_angle = attributes[:'FieldOfViewAngle']
  end

  if attributes.has_key?(:'Zoom')
    self.zoom = attributes[:'Zoom']
  end

  if attributes.has_key?(:'XRotation')
    self.x_rotation = attributes[:'XRotation']
  end

  if attributes.has_key?(:'YRotation')
    self.y_rotation = attributes[:'YRotation']
  end

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

Attribute type mapping.

# File lib/aspose_slides_cloud/models/camera.rb, line 59
def self.swagger_types
  {
    :'camera_type' => :'String',
    :'field_of_view_angle' => :'Float',
    :'zoom' => :'Float',
    :'x_rotation' => :'Float',
    :'y_rotation' => :'Float',
    :'z_rotation' => :'Float',
  }
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/camera.rb, line 130
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      camera_type == o.camera_type &&
      field_of_view_angle == o.field_of_view_angle &&
      zoom == o.zoom &&
      x_rotation == o.x_rotation &&
      y_rotation == o.y_rotation &&
      z_rotation == o.z_rotation
end
camera_type=(camera_type) click to toggle source

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

# File lib/aspose_slides_cloud/models/camera.rb, line 120
def camera_type=(camera_type)
  validator = EnumAttributeValidator.new('String', ['IsometricBottomDown', 'IsometricBottomUp', 'IsometricLeftDown', 'IsometricLeftUp', 'IsometricOffAxis1Left', 'IsometricOffAxis1Right', 'IsometricOffAxis1Top', 'IsometricOffAxis2Left', 'IsometricOffAxis2Right', 'IsometricOffAxis2Top', 'IsometricOffAxis3Bottom', 'IsometricOffAxis3Left', 'IsometricOffAxis3Right', 'IsometricOffAxis4Bottom', 'IsometricOffAxis4Left', 'IsometricOffAxis4Right', 'IsometricRightDown', 'IsometricRightUp', 'IsometricTopDown', 'IsometricTopUp', 'LegacyObliqueBottom', 'LegacyObliqueBottomLeft', 'LegacyObliqueBottomRight', 'LegacyObliqueFront', 'LegacyObliqueLeft', 'LegacyObliqueRight', 'LegacyObliqueTop', 'LegacyObliqueTopLeft', 'LegacyObliqueTopRight', 'LegacyPerspectiveBottom', 'LegacyPerspectiveBottomLeft', 'LegacyPerspectiveBottomRight', 'LegacyPerspectiveFront', 'LegacyPerspectiveLeft', 'LegacyPerspectiveRight', 'LegacyPerspectiveTop', 'LegacyPerspectiveTopLeft', 'LegacyPerspectiveTopRight', 'ObliqueBottom', 'ObliqueBottomLeft', 'ObliqueBottomRight', 'ObliqueLeft', 'ObliqueRight', 'ObliqueTop', 'ObliqueTopLeft', 'ObliqueTopRight', 'OrthographicFront', 'PerspectiveAbove', 'PerspectiveAboveLeftFacing', 'PerspectiveAboveRightFacing', 'PerspectiveBelow', 'PerspectiveContrastingLeftFacing', 'PerspectiveContrastingRightFacing', 'PerspectiveFront', 'PerspectiveHeroicExtremeLeftFacing', 'PerspectiveHeroicExtremeRightFacing', 'PerspectiveHeroicLeftFacing', 'PerspectiveHeroicRightFacing', 'PerspectiveLeft', 'PerspectiveRelaxed', 'PerspectiveRelaxedModerately', 'PerspectiveRight', 'NotDefined'])
  unless validator.valid?(camera_type)
    fail ArgumentError, 'invalid value for "camera_type", must be one of #{validator.allowable_values}.'
  end
  @camera_type = camera_type
end
eql?(o) click to toggle source

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

# File lib/aspose_slides_cloud/models/camera.rb, line 143
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/camera.rb, line 149
def hash
  [camera_type, field_of_view_angle, zoom, x_rotation, y_rotation, z_rotation].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/camera.rb, line 105
def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
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/camera.rb, line 112
def valid?
  camera_type_validator = EnumAttributeValidator.new('String', ['IsometricBottomDown', 'IsometricBottomUp', 'IsometricLeftDown', 'IsometricLeftUp', 'IsometricOffAxis1Left', 'IsometricOffAxis1Right', 'IsometricOffAxis1Top', 'IsometricOffAxis2Left', 'IsometricOffAxis2Right', 'IsometricOffAxis2Top', 'IsometricOffAxis3Bottom', 'IsometricOffAxis3Left', 'IsometricOffAxis3Right', 'IsometricOffAxis4Bottom', 'IsometricOffAxis4Left', 'IsometricOffAxis4Right', 'IsometricRightDown', 'IsometricRightUp', 'IsometricTopDown', 'IsometricTopUp', 'LegacyObliqueBottom', 'LegacyObliqueBottomLeft', 'LegacyObliqueBottomRight', 'LegacyObliqueFront', 'LegacyObliqueLeft', 'LegacyObliqueRight', 'LegacyObliqueTop', 'LegacyObliqueTopLeft', 'LegacyObliqueTopRight', 'LegacyPerspectiveBottom', 'LegacyPerspectiveBottomLeft', 'LegacyPerspectiveBottomRight', 'LegacyPerspectiveFront', 'LegacyPerspectiveLeft', 'LegacyPerspectiveRight', 'LegacyPerspectiveTop', 'LegacyPerspectiveTopLeft', 'LegacyPerspectiveTopRight', 'ObliqueBottom', 'ObliqueBottomLeft', 'ObliqueBottomRight', 'ObliqueLeft', 'ObliqueRight', 'ObliqueTop', 'ObliqueTopLeft', 'ObliqueTopRight', 'OrthographicFront', 'PerspectiveAbove', 'PerspectiveAboveLeftFacing', 'PerspectiveAboveRightFacing', 'PerspectiveBelow', 'PerspectiveContrastingLeftFacing', 'PerspectiveContrastingRightFacing', 'PerspectiveFront', 'PerspectiveHeroicExtremeLeftFacing', 'PerspectiveHeroicExtremeRightFacing', 'PerspectiveHeroicLeftFacing', 'PerspectiveHeroicRightFacing', 'PerspectiveLeft', 'PerspectiveRelaxed', 'PerspectiveRelaxedModerately', 'PerspectiveRight', 'NotDefined'])
  return false unless camera_type_validator.valid?(@camera_type)
  true
end