Class: AsposeSlidesCloud::Operation
- Inherits:
-
BaseObject
- Object
- BaseObject
- AsposeSlidesCloud::Operation
- Defined in:
- lib/aspose_slides_cloud/models/operation.rb
Instance Attribute Summary collapse
-
#canceled ⇒ Object
Returns the value of attribute canceled.
-
#created ⇒ Object
Returns the value of attribute created.
-
#enqueued ⇒ Object
Returns the value of attribute enqueued.
-
#error ⇒ Object
Returns the value of attribute error.
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#finished ⇒ Object
Returns the value of attribute finished.
-
#id ⇒ Object
Returns the value of attribute id.
-
#method ⇒ Object
Returns the value of attribute method.
-
#progress ⇒ Object
Returns the value of attribute progress.
-
#started ⇒ Object
Returns the value of attribute started.
-
#status ⇒ Object
Returns the value of attribute status.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Operation
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Operation
Initializes the object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 85 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?(:'Id') self.id = attributes[:'Id'] end if attributes.has_key?(:'Method') self.method = attributes[:'Method'] end if attributes.has_key?(:'Status') self.status = attributes[:'Status'] end if attributes.has_key?(:'Progress') self.progress = attributes[:'Progress'] end if attributes.has_key?(:'Created') self.created = attributes[:'Created'] end if attributes.has_key?(:'Enqueued') self.enqueued = attributes[:'Enqueued'] end if attributes.has_key?(:'Started') self.started = attributes[:'Started'] end if attributes.has_key?(:'Failed') self.failed = attributes[:'Failed'] end if attributes.has_key?(:'Canceled') self.canceled = attributes[:'Canceled'] end if attributes.has_key?(:'Finished') self.finished = attributes[:'Finished'] end if attributes.has_key?(:'Error') self.error = attributes[:'Error'] end end |
Instance Attribute Details
#canceled ⇒ Object
Returns the value of attribute canceled.
43 44 45 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 43 def canceled @canceled end |
#created ⇒ Object
Returns the value of attribute created.
35 36 37 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 35 def created @created end |
#enqueued ⇒ Object
Returns the value of attribute enqueued.
37 38 39 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 37 def enqueued @enqueued end |
#error ⇒ Object
Returns the value of attribute error.
47 48 49 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 47 def error @error end |
#failed ⇒ Object
Returns the value of attribute failed.
41 42 43 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 41 def failed @failed end |
#finished ⇒ Object
Returns the value of attribute finished.
45 46 47 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 45 def finished @finished end |
#id ⇒ Object
Returns the value of attribute id.
27 28 29 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 27 def id @id end |
#method ⇒ Object
Returns the value of attribute method.
29 30 31 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 29 def method @method end |
#progress ⇒ Object
Returns the value of attribute progress.
33 34 35 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 33 def progress @progress end |
#started ⇒ Object
Returns the value of attribute started.
39 40 41 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 39 def started @started end |
#status ⇒ Object
Returns the value of attribute status.
31 32 33 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 31 def status @status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 50 def self.attribute_map { :'id' => :'Id', :'method' => :'Method', :'status' => :'Status', :'progress' => :'Progress', :'created' => :'Created', :'enqueued' => :'Enqueued', :'started' => :'Started', :'failed' => :'Failed', :'canceled' => :'Canceled', :'finished' => :'Finished', :'error' => :'Error', } end |
.swagger_types ⇒ Object
Attribute type mapping.
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 67 def self.swagger_types { :'id' => :'String', :'method' => :'String', :'status' => :'String', :'progress' => :'OperationProgress', :'created' => :'DateTime', :'enqueued' => :'DateTime', :'started' => :'DateTime', :'failed' => :'DateTime', :'canceled' => :'DateTime', :'finished' => :'DateTime', :'error' => :'String', } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 190 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && method == o.method && status == o.status && progress == o.progress && created == o.created && enqueued == o.enqueued && started == o.started && failed == o.failed && canceled == o.canceled && finished == o.finished && error == o.error end |
#eql?(o) ⇒ Boolean
208 209 210 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 208 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
214 215 216 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 214 def hash [id, method, status, progress, created, enqueued, started, failed, canceled, finished, error].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 138 def list_invalid_properties invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @method.nil? invalid_properties.push('invalid value for "method", method cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
157 158 159 160 161 162 163 164 165 166 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 157 def valid? return false if @id.nil? return false if @method.nil? method_validator = EnumAttributeValidator.new('String', ['Convert', 'DownloadPresentation', 'ConvertAndSave', 'SavePresentation', 'Merge', 'MergeAndSave']) return false unless method_validator.valid?(@method) return false if @status.nil? status_validator = EnumAttributeValidator.new('String', ['Created', 'Enqueued', 'Started', 'Failed', 'Canceled', 'Finished']) return false unless status_validator.valid?(@status) true end |