Class: AsposeHtml::OperationResult

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/aspose_html_cloud/models/operation_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

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

Constructor Details

#initialize(attributes = {}) ⇒ OperationResult

Initializes the object

Parameters:

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

    Model attributes in the form of hash



71
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
99
100
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 71

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?(:'code')
    self.code = attributes[:'code']
  end

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

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

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

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

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

Instance Attribute Details

#codeObject

Returns the value of attribute code.



33
34
35
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 33

def code
  @code
end

#descriptionObject

Returns the value of attribute description.



39
40
41
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 39

def description
  @description
end

#fileObject

Returns the value of attribute file.



43
44
45
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 43

def file
  @file
end

#idObject

Returns the value of attribute id.



35
36
37
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 35

def id
  @id
end

Returns the value of attribute links.



41
42
43
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 41

def links
  @links
end

#statusObject

Returns the value of attribute status.



37
38
39
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 37

def status
  @status
end

Class Method Details

.attribute_mapObject

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



46
47
48
49
50
51
52
53
54
55
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 46

def self.attribute_map
  {
    :'code' => :'code',
    :'id' => :'id',
    :'status' => :'status',
    :'description' => :'description',
    :'links' => :'links',
    :'file' => :'file'
  }
end

.model_typesObject

Attribute type mapping.



58
59
60
61
62
63
64
65
66
67
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 58

def self.model_types
  {
    :'code' => :'Integer',
    :'id' => :'String',
    :'status' => :'String',
    :'description' => :'String',
    :'links' => :'Object',
    :'file' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



122
123
124
125
126
127
128
129
130
131
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 122

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      code == o.code &&
      id == o.id &&
      status == o.status &&
      description == o.description &&
      links == o.links &&
      file == o.file
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



135
136
137
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 135

def hash
  [code, id, status, description, links, file].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



104
105
106
107
108
109
110
111
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 104

def list_invalid_properties
  invalid_properties = Array.new
  if @code.nil?
    invalid_properties.push('invalid value for "code", code cannot be nil.')
  end

  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



115
116
117
118
# File 'lib/aspose_html_cloud/models/operation_result.rb', line 115

def valid?
  return false if @code.nil?
  true
end