Class: AsposeSlidesCloud::SlideProperties

Inherits:
ResourceBase show all
Defined in:
lib/aspose_slides_cloud/models/slide_properties.rb

Overview

Slide properties.

Instance Attribute Summary collapse

Attributes inherited from ResourceBase

#alternate_links, #self_uri

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ SlideProperties

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 72

def initialize(attributes = {})
  super

  if attributes.has_key?(:'FirstSlideNumber')
    self.first_slide_number = attributes[:'FirstSlideNumber']
  end

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

  if attributes.has_key?(:'ScaleType')
    self.scale_type = attributes[:'ScaleType']
  end

  if attributes.has_key?(:'SizeType')
    self.size_type = attributes[:'SizeType']
  end

  if attributes.has_key?(:'Width')
    self.width = attributes[:'Width']
  end

  if attributes.has_key?(:'Height')
    self.height = attributes[:'Height']
  end
end

Instance Attribute Details

#first_slide_numberObject

First slide number.



29
30
31
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 29

def first_slide_number
  @first_slide_number
end

#heightObject

Height.



44
45
46
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 44

def height
  @height
end

#orientationObject

Slide orientation.



32
33
34
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 32

def orientation
  @orientation
end

#scale_typeObject

Scale type.



35
36
37
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 35

def scale_type
  @scale_type
end

#size_typeObject

Size type.



38
39
40
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 38

def size_type
  @size_type
end

#widthObject

Width.



41
42
43
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 41

def width
  @width
end

Class Method Details

.attribute_mapObject

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



47
48
49
50
51
52
53
54
55
56
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 47

def self.attribute_map
  super.merge({
    :'first_slide_number' => :'FirstSlideNumber',
    :'orientation' => :'Orientation',
    :'scale_type' => :'ScaleType',
    :'size_type' => :'SizeType',
    :'width' => :'Width',
    :'height' => :'Height',
  })
end

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 59

def self.swagger_types
  super.merge({
    :'first_slide_number' => :'Integer',
    :'orientation' => :'String',
    :'scale_type' => :'String',
    :'size_type' => :'String',
    :'width' => :'Integer',
    :'height' => :'Integer',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



152
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 152

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      self_uri == o.self_uri &&
      alternate_links == o.alternate_links &&
      first_slide_number == o.first_slide_number &&
      orientation == o.orientation &&
      scale_type == o.scale_type &&
      size_type == o.size_type &&
      width == o.width &&
      height == o.height
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


167
168
169
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 167

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



173
174
175
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 173

def hash
  [self_uri, alternate_links, first_slide_number, orientation, scale_type, size_type, width, height].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



102
103
104
105
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 102

def list_invalid_properties
  invalid_properties = super
  invalid_properties
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



109
110
111
112
113
114
115
116
117
118
# File 'lib/aspose_slides_cloud/models/slide_properties.rb', line 109

def valid?
  return false if !super
  orientation_validator = EnumAttributeValidator.new('String', ['Landscape', 'Portrait'])
  return false unless orientation_validator.valid?(@orientation)
  scale_type_validator = EnumAttributeValidator.new('String', ['DoNotScale', 'EnsureFit', 'Maximize'])
  return false unless scale_type_validator.valid?(@scale_type)
  size_type_validator = EnumAttributeValidator.new('String', ['OnScreen', 'LetterPaper', 'A4Paper', 'Slide35mm', 'Overhead', 'Banner', 'Custom', 'Ledger', 'A3Paper', 'B4IsoPaper', 'B5IsoPaper', 'B4JisPaper', 'B5JisPaper', 'HagakiCard', 'OnScreen16x9', 'OnScreen16x10', 'Widescreen'])
  return false unless size_type_validator.valid?(@size_type)
  true
end