class AsposeSlidesCloud::Camera
Attributes
Camera
type
XRotation
YRotation
ZRotation
Public Class Methods
Source
# 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
Attribute mapping from ruby-style variable name to JSON key.
Source
# 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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Source
# 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
Attribute type mapping.
Public Instance Methods
Source
# 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
Checks equality by comparing each attribute. @param [Object] Object to be compared
Source
# 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
Custom attribute writer method checking allowed values (enum). @param [Object] camera_type
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/camera.rb, line 143 def eql?(o) self == o end
@see the ‘==` method @param [Object] Object to be compared
Source
# 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
Calculates hash code according to all attributes. @return [Fixnum] Hash code
Source
# File lib/aspose_slides_cloud/models/camera.rb, line 105 def list_invalid_properties invalid_properties = Array.new invalid_properties end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Source
# 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
Check to see if the all the properties in the model are valid @return true if the model is valid