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.
-
#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
81 82 83 84 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 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 81 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?(:'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.
41 42 43 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 41 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 |
#error ⇒ Object
Returns the value of attribute error.
45 46 47 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 45 def error @error end |
#failed ⇒ Object
Returns the value of attribute failed.
39 40 41 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 39 def failed @failed end |
#finished ⇒ Object
Returns the value of attribute finished.
43 44 45 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 43 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.
37 38 39 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 37 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.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 48 def self.attribute_map { :'id' => :'Id', :'method' => :'Method', :'status' => :'Status', :'progress' => :'Progress', :'created' => :'Created', :'started' => :'Started', :'failed' => :'Failed', :'canceled' => :'Canceled', :'finished' => :'Finished', :'error' => :'Error', } end |
.swagger_types ⇒ Object
Attribute type mapping.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 64 def self.swagger_types { :'id' => :'String', :'method' => :'String', :'status' => :'String', :'progress' => :'OperationProgress', :'created' => :'DateTime', :'started' => :'DateTime', :'failed' => :'DateTime', :'canceled' => :'DateTime', :'finished' => :'DateTime', :'error' => :'OperationError', } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 182 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 && started == o.started && failed == o.failed && canceled == o.canceled && finished == o.finished && error == o.error end |
#eql?(o) ⇒ Boolean
199 200 201 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 199 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
205 206 207 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 205 def hash [id, method, status, progress, created, started, failed, canceled, finished, error].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 130 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
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/aspose_slides_cloud/models/operation.rb', line 149 def valid? return false if @id.nil? return false if @method.nil? method_validator = EnumAttributeValidator.new('String', ['Convert', 'DownloadPresentation', 'ConvertAndSave', 'SavePresentation', 'Merge', 'MergeAndSave', 'Split', 'UploadAndSplit']) 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 |