allq_rest 1.5.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -97
  3. data/lib/allq_rest/client.rb +168 -0
  4. data/lib/allq_rest/configuration.rb +7 -192
  5. data/lib/allq_rest/errors.rb +17 -0
  6. data/lib/allq_rest/job.rb +10 -0
  7. data/lib/allq_rest/version.rb +2 -14
  8. data/lib/allq_rest.rb +21 -46
  9. data/swagger.yaml +706 -0
  10. metadata +32 -116
  11. data/Gemfile +0 -7
  12. data/Gemfile.lock +0 -42
  13. data/Rakefile +0 -8
  14. data/allq_rest-1.2.92.gem +0 -0
  15. data/allq_rest-1.2.93.gem +0 -0
  16. data/allq_rest-1.3.0.gem +0 -0
  17. data/allq_rest-1.4.0.gem +0 -0
  18. data/allq_rest-1.5.0.gem +0 -0
  19. data/allq_rest-1.5.1.gem +0 -0
  20. data/allq_rest.gemspec +0 -28
  21. data/deploy.sh +0 -4
  22. data/docs/ActionsApi.md +0 -544
  23. data/docs/AdminApi.md +0 -98
  24. data/docs/BasicPayload.md +0 -11
  25. data/docs/BasicResponse.md +0 -8
  26. data/docs/JobRef.md +0 -8
  27. data/docs/JobResponse.md +0 -12
  28. data/docs/NewJob.md +0 -13
  29. data/docs/NewParentJob.md +0 -16
  30. data/docs/StatsInfo.md +0 -9
  31. data/docs/StatsResults.md +0 -10
  32. data/docs/StatsTube.md +0 -14
  33. data/docs/Throttle.md +0 -9
  34. data/docs/TubeRef.md +0 -8
  35. data/git_push.sh +0 -55
  36. data/lib/.DS_Store +0 -0
  37. data/lib/allq_rest/.DS_Store +0 -0
  38. data/lib/allq_rest/api/actions_api.rb +0 -763
  39. data/lib/allq_rest/api/admin_api.rb +0 -181
  40. data/lib/allq_rest/api_client.rb +0 -395
  41. data/lib/allq_rest/api_error.rb +0 -38
  42. data/lib/allq_rest/models/basic_payload.rb +0 -218
  43. data/lib/allq_rest/models/basic_response.rb +0 -188
  44. data/lib/allq_rest/models/job_ref.rb +0 -190
  45. data/lib/allq_rest/models/job_response.rb +0 -260
  46. data/lib/allq_rest/models/multiple_job_response.rb +0 -187
  47. data/lib/allq_rest/models/new_job.rb +0 -281
  48. data/lib/allq_rest/models/new_parent_job.rb +0 -312
  49. data/lib/allq_rest/models/stats_info.rb +0 -204
  50. data/lib/allq_rest/models/stats_results.rb +0 -254
  51. data/lib/allq_rest/models/stats_tube.rb +0 -306
  52. data/lib/allq_rest/models/throttle.rb +0 -209
  53. data/lib/allq_rest/models/tube_ref.rb +0 -190
  54. data/spec/.DS_Store +0 -0
  55. data/spec/api/actions_api_spec.rb +0 -600
  56. data/spec/api/admin_api_spec.rb +0 -58
  57. data/spec/api_client_spec.rb +0 -226
  58. data/spec/configuration_spec.rb +0 -42
  59. data/spec/models/basic_payload_spec.rb +0 -60
  60. data/spec/models/basic_response_spec.rb +0 -42
  61. data/spec/models/job_ref_spec.rb +0 -42
  62. data/spec/models/job_response_spec.rb +0 -66
  63. data/spec/models/new_job_spec.rb +0 -72
  64. data/spec/models/new_parent_job_spec.rb +0 -90
  65. data/spec/models/stats_info_spec.rb +0 -48
  66. data/spec/models/stats_results_spec.rb +0 -54
  67. data/spec/models/stats_tube_spec.rb +0 -78
  68. data/spec/models/throttle_spec.rb +0 -48
  69. data/spec/models/tube_ref_spec.rb +0 -42
  70. data/spec/spec_helper.rb +0 -113
@@ -1,260 +0,0 @@
1
- =begin
2
- #AllQ
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.0
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.27
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module Allq
16
- # Basic Job Instance
17
- class JobResponse
18
- # Job id
19
- attr_accessor :id
20
-
21
- # Body
22
- attr_accessor :body
23
-
24
- # Tube name
25
- attr_accessor :tube
26
-
27
- # Expired count
28
- attr_accessor :expireds
29
-
30
- # Release count
31
- attr_accessor :releases
32
-
33
- # Special
34
- attr_accessor :special
35
-
36
- # Attribute mapping from ruby-style variable name to JSON key.
37
- def self.attribute_map
38
- {
39
- :'id' => :'id',
40
- :'body' => :'body',
41
- :'tube' => :'tube',
42
- :'expireds' => :'expireds',
43
- :'releases' => :'releases',
44
- :'special' => :'special'
45
- }
46
- end
47
-
48
- # Attribute type mapping.
49
- def self.swagger_types
50
- {
51
- :'id' => :'String',
52
- :'body' => :'String',
53
- :'tube' => :'String',
54
- :'expireds' => :'Integer',
55
- :'releases' => :'Integer',
56
- :'special' => :'String'
57
- }
58
- end
59
-
60
- # Initializes the object
61
- # @param [Hash] attributes Model attributes in the form of hash
62
- def initialize(attributes = {})
63
- return unless attributes.is_a?(Hash)
64
-
65
- # convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
67
-
68
- if attributes.has_key?(:'id')
69
- self.id = attributes[:'id']
70
- end
71
-
72
- if attributes.has_key?(:'body')
73
- self.body = attributes[:'body']
74
- end
75
-
76
- if attributes.has_key?(:'tube')
77
- self.tube = attributes[:'tube']
78
- end
79
-
80
- if attributes.has_key?(:'expireds')
81
- self.expireds = attributes[:'expireds']
82
- else
83
- self.expireds = 0
84
- end
85
-
86
- if attributes.has_key?(:'releases')
87
- self.releases = attributes[:'releases']
88
- else
89
- self.releases = 0
90
- end
91
-
92
- if attributes.has_key?(:'special')
93
- self.special = attributes[:'special']
94
- end
95
- end
96
-
97
- # Show invalid properties with the reasons. Usually used together with valid?
98
- # @return Array for valid properties with the reasons
99
- def list_invalid_properties
100
- invalid_properties = Array.new
101
- if @body.nil?
102
- invalid_properties.push('invalid value for "body", body cannot be nil.')
103
- end
104
-
105
- if @tube.nil?
106
- invalid_properties.push('invalid value for "tube", tube cannot be nil.')
107
- end
108
-
109
- if @expireds.nil?
110
- invalid_properties.push('invalid value for "expireds", expireds cannot be nil.')
111
- end
112
-
113
- if @releases.nil?
114
- invalid_properties.push('invalid value for "releases", releases cannot be nil.')
115
- end
116
-
117
- invalid_properties
118
- end
119
-
120
- # Check to see if the all the properties in the model are valid
121
- # @return true if the model is valid
122
- def valid?
123
- return false if @body.nil?
124
- return false if @tube.nil?
125
- return false if @expireds.nil?
126
- return false if @releases.nil?
127
- true
128
- end
129
-
130
- # Checks equality by comparing each attribute.
131
- # @param [Object] Object to be compared
132
- def ==(o)
133
- return true if self.equal?(o)
134
- self.class == o.class &&
135
- id == o.id &&
136
- body == o.body &&
137
- tube == o.tube &&
138
- expireds == o.expireds &&
139
- releases == o.releases &&
140
- special == o.special
141
- end
142
-
143
- # @see the `==` method
144
- # @param [Object] Object to be compared
145
- def eql?(o)
146
- self == o
147
- end
148
-
149
- # Calculates hash code according to all attributes.
150
- # @return [Fixnum] Hash code
151
- def hash
152
- [id, body, tube, expireds, releases, special].hash
153
- end
154
-
155
- # Builds the object from hash
156
- # @param [Hash] attributes Model attributes in the form of hash
157
- # @return [Object] Returns the model itself
158
- def build_from_hash(attributes)
159
- return nil unless attributes.is_a?(Hash)
160
- self.class.swagger_types.each_pair do |key, type|
161
- if type =~ /\AArray<(.*)>/i
162
- # check to ensure the input is an array given that the attribute
163
- # is documented as an array but the input is not
164
- if attributes[self.class.attribute_map[key]].is_a?(Array)
165
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
166
- end
167
- elsif !attributes[self.class.attribute_map[key]].nil?
168
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
- end # or else data not found in attributes(hash), not an issue as the data can be optional
170
- end
171
-
172
- self
173
- end
174
-
175
- # Deserializes the data based on type
176
- # @param string type Data type
177
- # @param string value Value to be deserialized
178
- # @return [Object] Deserialized data
179
- def _deserialize(type, value)
180
- case type.to_sym
181
- when :DateTime
182
- DateTime.parse(value)
183
- when :Date
184
- Date.parse(value)
185
- when :String
186
- value.to_s
187
- when :Integer
188
- value.to_i
189
- when :Float
190
- value.to_f
191
- when :BOOLEAN
192
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
- true
194
- else
195
- false
196
- end
197
- when :Object
198
- # generic object (usually a Hash), return directly
199
- value
200
- when /\AArray<(?<inner_type>.+)>\z/
201
- inner_type = Regexp.last_match[:inner_type]
202
- value.map { |v| _deserialize(inner_type, v) }
203
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
- k_type = Regexp.last_match[:k_type]
205
- v_type = Regexp.last_match[:v_type]
206
- {}.tap do |hash|
207
- value.each do |k, v|
208
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
- end
210
- end
211
- else # model
212
- temp_model = Allq.const_get(type).new
213
- temp_model.build_from_hash(value)
214
- end
215
- end
216
-
217
- # Returns the string representation of the object
218
- # @return [String] String presentation of the object
219
- def to_s
220
- to_hash.to_s
221
- end
222
-
223
- # to_body is an alias to to_hash (backward compatibility)
224
- # @return [Hash] Returns the object in the form of hash
225
- def to_body
226
- to_hash
227
- end
228
-
229
- # Returns the object in the form of hash
230
- # @return [Hash] Returns the object in the form of hash
231
- def to_hash
232
- hash = {}
233
- self.class.attribute_map.each_pair do |attr, param|
234
- value = self.send(attr)
235
- next if value.nil?
236
- hash[param] = _to_hash(value)
237
- end
238
- hash
239
- end
240
-
241
- # Outputs non-array value in the form of hash
242
- # For object, use to_hash. Otherwise, just return the value
243
- # @param [Object] value Any valid value
244
- # @return [Hash] Returns the value in the form of hash
245
- def _to_hash(value)
246
- if value.is_a?(Array)
247
- value.compact.map { |v| _to_hash(v) }
248
- elsif value.is_a?(Hash)
249
- {}.tap do |hash|
250
- value.each { |k, v| hash[k] = _to_hash(v) }
251
- end
252
- elsif value.respond_to? :to_hash
253
- value.to_hash
254
- else
255
- value
256
- end
257
- end
258
-
259
- end
260
- end
@@ -1,187 +0,0 @@
1
- =begin
2
- #AllQ
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: 1.0
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.2
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module Allq
16
- # Multi-Job Instance
17
- class MultipleJobResponse
18
- # Array of jobs
19
- attr_accessor :jobs
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'jobs' => :'jobs'
25
- }
26
- end
27
-
28
- # Attribute type mapping.
29
- def self.swagger_types
30
- {
31
- :'jobs' => :'Array<JobResponse>'
32
- }
33
- end
34
-
35
- # Initializes the object
36
- # @param [Hash] attributes Model attributes in the form of hash
37
- def initialize(attributes = {})
38
- return unless attributes.is_a?(Hash)
39
-
40
- # convert string to symbol for hash key
41
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
42
-
43
- if attributes.has_key?(:'jobs')
44
- if (value = attributes[:'jobs']).is_a?(Array)
45
- self.jobs = value
46
- end
47
- end
48
- end
49
-
50
- # Show invalid properties with the reasons. Usually used together with valid?
51
- # @return Array for valid properties with the reasons
52
- def list_invalid_properties
53
- invalid_properties = Array.new
54
- invalid_properties
55
- end
56
-
57
- # Check to see if the all the properties in the model are valid
58
- # @return true if the model is valid
59
- def valid?
60
- true
61
- end
62
-
63
- # Checks equality by comparing each attribute.
64
- # @param [Object] Object to be compared
65
- def ==(o)
66
- return true if self.equal?(o)
67
- self.class == o.class &&
68
- jobs == o.jobs
69
- end
70
-
71
- # @see the `==` method
72
- # @param [Object] Object to be compared
73
- def eql?(o)
74
- self == o
75
- end
76
-
77
- # Calculates hash code according to all attributes.
78
- # @return [Fixnum] Hash code
79
- def hash
80
- [jobs].hash
81
- end
82
-
83
- # Builds the object from hash
84
- # @param [Hash] attributes Model attributes in the form of hash
85
- # @return [Object] Returns the model itself
86
- def build_from_hash(attributes)
87
- return nil unless attributes.is_a?(Hash)
88
- self.class.swagger_types.each_pair do |key, type|
89
- if type =~ /\AArray<(.*)>/i
90
- # check to ensure the input is an array given that the the attribute
91
- # is documented as an array but the input is not
92
- if attributes[self.class.attribute_map[key]].is_a?(Array)
93
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
94
- end
95
- elsif !attributes[self.class.attribute_map[key]].nil?
96
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
97
- end # or else data not found in attributes(hash), not an issue as the data can be optional
98
- end
99
-
100
- self
101
- end
102
-
103
- # Deserializes the data based on type
104
- # @param string type Data type
105
- # @param string value Value to be deserialized
106
- # @return [Object] Deserialized data
107
- def _deserialize(type, value)
108
- case type.to_sym
109
- when :DateTime
110
- DateTime.parse(value)
111
- when :Date
112
- Date.parse(value)
113
- when :String
114
- value.to_s
115
- when :Integer
116
- value.to_i
117
- when :Float
118
- value.to_f
119
- when :BOOLEAN
120
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
121
- true
122
- else
123
- false
124
- end
125
- when :Object
126
- # generic object (usually a Hash), return directly
127
- value
128
- when /\AArray<(?<inner_type>.+)>\z/
129
- inner_type = Regexp.last_match[:inner_type]
130
- value.map { |v| _deserialize(inner_type, v) }
131
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
132
- k_type = Regexp.last_match[:k_type]
133
- v_type = Regexp.last_match[:v_type]
134
- {}.tap do |hash|
135
- value.each do |k, v|
136
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
137
- end
138
- end
139
- else # model
140
- temp_model = Allq.const_get(type).new
141
- temp_model.build_from_hash(value)
142
- end
143
- end
144
-
145
- # Returns the string representation of the object
146
- # @return [String] String presentation of the object
147
- def to_s
148
- to_hash.to_s
149
- end
150
-
151
- # to_body is an alias to to_hash (backward compatibility)
152
- # @return [Hash] Returns the object in the form of hash
153
- def to_body
154
- to_hash
155
- end
156
-
157
- # Returns the object in the form of hash
158
- # @return [Hash] Returns the object in the form of hash
159
- def to_hash
160
- hash = {}
161
- self.class.attribute_map.each_pair do |attr, param|
162
- value = self.send(attr)
163
- next if value.nil?
164
- hash[param] = _to_hash(value)
165
- end
166
- hash
167
- end
168
-
169
- # Outputs non-array value in the form of hash
170
- # For object, use to_hash. Otherwise, just return the value
171
- # @param [Object] value Any valid value
172
- # @return [Hash] Returns the value in the form of hash
173
- def _to_hash(value)
174
- if value.is_a?(Array)
175
- value.compact.map { |v| _to_hash(v) }
176
- elsif value.is_a?(Hash)
177
- {}.tap do |hash|
178
- value.each { |k, v| hash[k] = _to_hash(v) }
179
- end
180
- elsif value.respond_to? :to_hash
181
- value.to_hash
182
- else
183
- value
184
- end
185
- end
186
- end
187
- end