Class: AsposeSlidesCloud::PresentationToMerge

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/aspose_slides_cloud/models/presentation_to_merge.rb

Overview

Represents presentation to merge

Instance Attribute Summary collapse

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 = {}) ⇒ PresentationToMerge

Initializes the object

Parameters:

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

    Model attributes in the form of hash



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.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?(:'Path')
    self.path = attributes[:'Path']
  end

  if attributes.has_key?(:'Password')
    self.password = attributes[:'Password']
  end

  if attributes.has_key?(:'Slides')
    if (value = attributes[:'Slides']).is_a?(Array)
      self.slides = value
    end
  end

  if attributes.has_key?(:'Source')
    self.source = attributes[:'Source']
  end
end

Instance Attribute Details

#passwordObject

Get or sets the presentation password



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

def password
  @password
end

#pathObject

Get or sets the presentation path



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

def path
  @path
end

#slidesObject

Get or sets the indexes of slides to merge



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

def slides
  @slides
end

#sourceObject

Merge (request or storage).



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

def source
  @source
end

Class Method Details

.attribute_mapObject

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



41
42
43
44
45
46
47
48
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 41

def self.attribute_map
  {
    :'path' => :'Path',
    :'password' => :'Password',
    :'slides' => :'Slides',
    :'source' => :'Source',
  }
end

.swagger_typesObject

Attribute type mapping.



51
52
53
54
55
56
57
58
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 51

def self.swagger_types
  {
    :'path' => :'String',
    :'password' => :'String',
    :'slides' => :'Array<Integer>',
    :'source' => :'String',
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



114
115
116
117
118
119
120
121
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 114

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      path == o.path &&
      password == o.password &&
      slides == o.slides &&
      source == o.source
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


125
126
127
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 125

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



131
132
133
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 131

def hash
  [path, password, slides, source].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



89
90
91
92
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 89

def list_invalid_properties
  invalid_properties = Array.new
  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



96
97
98
99
100
# File 'lib/aspose_slides_cloud/models/presentation_to_merge.rb', line 96

def valid?
  source_validator = EnumAttributeValidator.new('String', ['Storage', 'Request', 'Url'])
  return false unless source_validator.valid?(@source)
  true
end