aspose_slides_cloud 23.7.0 → 23.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -9
  3. data/README.md +8 -0
  4. data/aspose_slides_cloud.gemspec +0 -1
  5. data/docker-entrypoint.sh +1 -0
  6. data/lib/aspose_slides_cloud/api/slides_api.rb +142 -9
  7. data/lib/aspose_slides_cloud/api/slides_async_api.rb +273 -0
  8. data/lib/aspose_slides_cloud/api_client.rb +2 -1
  9. data/lib/aspose_slides_cloud/models/operation.rb +209 -0
  10. data/lib/aspose_slides_cloud/type_registry.rb +1 -0
  11. data/lib/aspose_slides_cloud/version.rb +1 -1
  12. data/lib/aspose_slides_cloud.rb +2 -0
  13. data/spec/api/slides_api_spec.rb +2295 -2006
  14. data/spec/api/slides_async_api_spec.rb +554 -0
  15. data/spec/spec_utils.rb +38 -7
  16. data/spec/use_cases/abstract_class_spec.rb +1 -1
  17. data/spec/use_cases/animation_spec.rb +28 -28
  18. data/spec/use_cases/async_api_spec.rb +82 -0
  19. data/spec/use_cases/chart_spec.rb +51 -51
  20. data/spec/use_cases/comment_spec.rb +17 -17
  21. data/spec/use_cases/create_spec.rb +22 -22
  22. data/spec/use_cases/font_spec.rb +24 -24
  23. data/spec/use_cases/header_footer_spec.rb +9 -9
  24. data/spec/use_cases/hyperlink_spec.rb +10 -10
  25. data/spec/use_cases/image_spec.rb +34 -13
  26. data/spec/use_cases/layout_slide_spec.rb +41 -41
  27. data/spec/use_cases/master_slide_spec.rb +40 -40
  28. data/spec/use_cases/math_spec.rb +15 -15
  29. data/spec/use_cases/merge_spec.rb +15 -15
  30. data/spec/use_cases/notes_slide_spec.rb +39 -39
  31. data/spec/use_cases/nullable_field_spec.rb +7 -7
  32. data/spec/use_cases/paragraph_spec.rb +38 -38
  33. data/spec/use_cases/pipeline_spec.rb +1 -1
  34. data/spec/use_cases/portion_spec.rb +34 -34
  35. data/spec/use_cases/property_spec.rb +38 -38
  36. data/spec/use_cases/section_spec.rb +16 -16
  37. data/spec/use_cases/shape_format_spec.rb +12 -12
  38. data/spec/use_cases/shape_spec.rb +87 -87
  39. data/spec/use_cases/slide_spec.rb +32 -32
  40. data/spec/use_cases/split_spec.rb +12 -12
  41. data/spec/use_cases/table_spec.rb +38 -38
  42. data/spec/use_cases/text_format_spec.rb +4 -4
  43. data/spec/use_cases/text_spec.rb +28 -28
  44. data/spec/use_cases/vba_spec.rb +10 -10
  45. data/spec/use_cases/watermark_spec.rb +36 -36
  46. data/testConfig.json +2 -1
  47. data/testRules.json +8 -0
  48. metadata +8 -24
  49. data/spec/use_cases/convert_spec.rb +0 -199
@@ -0,0 +1,209 @@
1
+ =begin
2
+ Copyright (c) 2019 Aspose Pty Ltd
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
21
+ =end
22
+
23
+ require 'date'
24
+
25
+ module AsposeSlidesCloud
26
+ class Operation < BaseObject
27
+ attr_accessor :id
28
+
29
+ attr_accessor :method
30
+
31
+ attr_accessor :status
32
+
33
+ attr_accessor :created
34
+
35
+ attr_accessor :enqueued
36
+
37
+ attr_accessor :started
38
+
39
+ attr_accessor :failed
40
+
41
+ attr_accessor :canceled
42
+
43
+ attr_accessor :finished
44
+
45
+ attr_accessor :error
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'id' => :'Id',
51
+ :'method' => :'Method',
52
+ :'status' => :'Status',
53
+ :'created' => :'Created',
54
+ :'enqueued' => :'Enqueued',
55
+ :'started' => :'Started',
56
+ :'failed' => :'Failed',
57
+ :'canceled' => :'Canceled',
58
+ :'finished' => :'Finished',
59
+ :'error' => :'Error',
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.swagger_types
65
+ {
66
+ :'id' => :'String',
67
+ :'method' => :'String',
68
+ :'status' => :'String',
69
+ :'created' => :'DateTime',
70
+ :'enqueued' => :'DateTime',
71
+ :'started' => :'DateTime',
72
+ :'failed' => :'DateTime',
73
+ :'canceled' => :'DateTime',
74
+ :'finished' => :'DateTime',
75
+ :'error' => :'String',
76
+ }
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ return unless attributes.is_a?(Hash)
83
+
84
+ # convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
86
+
87
+ if attributes.has_key?(:'Id')
88
+ self.id = attributes[:'Id']
89
+ end
90
+
91
+ if attributes.has_key?(:'Method')
92
+ self.method = attributes[:'Method']
93
+ end
94
+
95
+ if attributes.has_key?(:'Status')
96
+ self.status = attributes[:'Status']
97
+ end
98
+
99
+ if attributes.has_key?(:'Created')
100
+ self.created = attributes[:'Created']
101
+ end
102
+
103
+ if attributes.has_key?(:'Enqueued')
104
+ self.enqueued = attributes[:'Enqueued']
105
+ end
106
+
107
+ if attributes.has_key?(:'Started')
108
+ self.started = attributes[:'Started']
109
+ end
110
+
111
+ if attributes.has_key?(:'Failed')
112
+ self.failed = attributes[:'Failed']
113
+ end
114
+
115
+ if attributes.has_key?(:'Canceled')
116
+ self.canceled = attributes[:'Canceled']
117
+ end
118
+
119
+ if attributes.has_key?(:'Finished')
120
+ self.finished = attributes[:'Finished']
121
+ end
122
+
123
+ if attributes.has_key?(:'Error')
124
+ self.error = attributes[:'Error']
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ invalid_properties = Array.new
132
+ if @id.nil?
133
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
134
+ end
135
+
136
+ if @method.nil?
137
+ invalid_properties.push('invalid value for "method", method cannot be nil.')
138
+ end
139
+
140
+ if @status.nil?
141
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
142
+ end
143
+
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ return false if @id.nil?
151
+ return false if @method.nil?
152
+ method_validator = EnumAttributeValidator.new('String', ['Convert', 'DownloadPresentation'])
153
+ return false unless method_validator.valid?(@method)
154
+ return false if @status.nil?
155
+ status_validator = EnumAttributeValidator.new('String', ['Created', 'Enqueued', 'Started', 'Failed', 'Canceled', 'Finished'])
156
+ return false unless status_validator.valid?(@status)
157
+ true
158
+ end
159
+
160
+ # Custom attribute writer method checking allowed values (enum).
161
+ # @param [Object] method Object to be assigned
162
+ def method=(method)
163
+ validator = EnumAttributeValidator.new('String', ['Convert', 'DownloadPresentation'])
164
+ unless validator.valid?(method)
165
+ fail ArgumentError, 'invalid value for "method", must be one of #{validator.allowable_values}.'
166
+ end
167
+ @method = method
168
+ end
169
+
170
+ # Custom attribute writer method checking allowed values (enum).
171
+ # @param [Object] status Object to be assigned
172
+ def status=(status)
173
+ validator = EnumAttributeValidator.new('String', ['Created', 'Enqueued', 'Started', 'Failed', 'Canceled', 'Finished'])
174
+ unless validator.valid?(status)
175
+ fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
176
+ end
177
+ @status = status
178
+ end
179
+
180
+ # Checks equality by comparing each attribute.
181
+ # @param [Object] Object to be compared
182
+ def ==(o)
183
+ return true if self.equal?(o)
184
+ self.class == o.class &&
185
+ id == o.id &&
186
+ method == o.method &&
187
+ status == o.status &&
188
+ created == o.created &&
189
+ enqueued == o.enqueued &&
190
+ started == o.started &&
191
+ failed == o.failed &&
192
+ canceled == o.canceled &&
193
+ finished == o.finished &&
194
+ error == o.error
195
+ end
196
+
197
+ # @see the `==` method
198
+ # @param [Object] Object to be compared
199
+ def eql?(o)
200
+ self == o
201
+ end
202
+
203
+ # Calculates hash code according to all attributes.
204
+ # @return [Fixnum] Hash code
205
+ def hash
206
+ [id, method, status, created, enqueued, started, failed, canceled, finished, error].hash
207
+ end
208
+ end
209
+ end
@@ -372,6 +372,7 @@ module AsposeSlidesCloud
372
372
  :'OleObjectFrame' => { :'Type' => 'OleObjectFrame', },
373
373
  :'OneValueChartDataPoint' => { :'Type' => 'OneValue', },
374
374
  :'OneValueSeries' => { :'DataPointType' => 'OneValue', },
375
+ :'Operation' => { },
375
376
  :'OrderedMergeRequest' => { },
376
377
  :'OuterShadowEffect' => { },
377
378
  :'OutputFile' => { },
@@ -21,5 +21,5 @@ SOFTWARE.
21
21
  =end
22
22
 
23
23
  module AsposeSlidesCloud
24
- VERSION = '23.7.0'
24
+ VERSION = '23.10.0'
25
25
  end
@@ -171,6 +171,7 @@ require 'aspose_slides_cloud/models/object_exist'
171
171
  require 'aspose_slides_cloud/models/ole_object_frame'
172
172
  require 'aspose_slides_cloud/models/one_value_chart_data_point'
173
173
  require 'aspose_slides_cloud/models/one_value_series'
174
+ require 'aspose_slides_cloud/models/operation'
174
175
  require 'aspose_slides_cloud/models/ordered_merge_request'
175
176
  require 'aspose_slides_cloud/models/outer_shadow_effect'
176
177
  require 'aspose_slides_cloud/models/output_file'
@@ -280,6 +281,7 @@ require 'aspose_slides_cloud/models/zoom_frame'
280
281
 
281
282
  # APIs
282
283
  require 'aspose_slides_cloud/api/slides_api'
284
+ require 'aspose_slides_cloud/api/slides_async_api'
283
285
 
284
286
  module AsposeSlidesCloud
285
287
  class << self