crx_packmgr_api_client 0.1.0 → 1.0.0

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -16
  3. data/crx_packmgr_api_client-0.2.0.gem +0 -0
  4. data/crx_packmgr_api_client.gemspec +9 -4
  5. data/docs/DefaultApi.md +457 -7
  6. data/docs/{PackageFilter.md → Filter.md} +2 -2
  7. data/docs/FilterRule.md +9 -0
  8. data/docs/Group.md +11 -0
  9. data/docs/{InlineResponse200.md → GroupList.md} +2 -2
  10. data/docs/InitData.md +13 -0
  11. data/docs/InstallStatus.md +8 -0
  12. data/docs/InstallStatusStatus.md +9 -0
  13. data/docs/Package.md +1 -1
  14. data/docs/PackageList.md +1 -0
  15. data/docs/ServiceResponse.md +12 -0
  16. data/docs/ServiceResponseRequest.md +8 -0
  17. data/docs/ServiceResponseRequestParam.md +9 -0
  18. data/docs/ServiceResponseResponse.md +9 -0
  19. data/docs/UpdateStatus.md +10 -0
  20. data/git_push.sh +1 -1
  21. data/lib/crx_packmgr_api_client.rb +13 -2
  22. data/lib/crx_packmgr_api_client/api/default_api.rb +491 -8
  23. data/lib/crx_packmgr_api_client/api_client.rb +1 -1
  24. data/lib/crx_packmgr_api_client/api_error.rb +1 -1
  25. data/lib/crx_packmgr_api_client/configuration.rb +1 -1
  26. data/lib/crx_packmgr_api_client/models/{package_filter.rb → filter.rb} +3 -3
  27. data/lib/crx_packmgr_api_client/models/filter_rule.rb +241 -0
  28. data/lib/crx_packmgr_api_client/models/group.rb +226 -0
  29. data/lib/crx_packmgr_api_client/models/{inline_response_200.rb → group_list.rb} +10 -10
  30. data/lib/crx_packmgr_api_client/models/init_data.rb +246 -0
  31. data/lib/crx_packmgr_api_client/models/install_status.rb +199 -0
  32. data/lib/crx_packmgr_api_client/models/install_status_status.rb +208 -0
  33. data/lib/crx_packmgr_api_client/models/package.rb +2 -2
  34. data/lib/crx_packmgr_api_client/models/package_list.rb +14 -5
  35. data/lib/crx_packmgr_api_client/models/service_response.rb +235 -0
  36. data/lib/crx_packmgr_api_client/models/service_response_request.rb +201 -0
  37. data/lib/crx_packmgr_api_client/models/service_response_request_param.rb +208 -0
  38. data/lib/crx_packmgr_api_client/models/service_response_response.rb +208 -0
  39. data/lib/crx_packmgr_api_client/models/update_status.rb +217 -0
  40. data/lib/crx_packmgr_api_client/version.rb +2 -2
  41. data/spec/acceptance/default_api_spec.rb +150 -0
  42. data/spec/api/default_api_spec.rb +2 -14
  43. data/spec/api/download_api_spec.rb +95 -0
  44. data/spec/api/groups_api_spec.rb +193 -0
  45. data/spec/api/init_api_spec.rb +104 -0
  46. data/spec/api/installstatus_api_spec.rb +91 -0
  47. data/spec/api/list_api_spec.rb +130 -0
  48. data/spec/api/screenshot_api_spec.rb +93 -0
  49. data/spec/api/service_api_spec.rb +374 -0
  50. data/spec/api/thumbnail_api_spec.rb +93 -0
  51. data/spec/api_client_spec.rb +1 -1
  52. data/spec/configuration_spec.rb +1 -1
  53. data/spec/files/list.json +533 -0
  54. data/spec/files/service_response.txt +11 -0
  55. data/spec/files/service_response1.txt +12 -0
  56. data/spec/files/test-1.0.0.zip +0 -0
  57. data/spec/files/thumbnail.png +0 -0
  58. data/spec/models/filter_rule_spec.rb +63 -0
  59. data/spec/models/{package_filter_spec.rb → filter_spec.rb} +7 -7
  60. data/spec/models/{inline_response_200_spec.rb → group_list_spec.rb} +8 -8
  61. data/spec/models/group_spec.rb +71 -0
  62. data/spec/models/init_data_spec.rb +83 -0
  63. data/spec/models/install_status_spec.rb +53 -0
  64. data/spec/models/install_status_status_spec.rb +59 -0
  65. data/spec/models/package_list_spec.rb +1 -1
  66. data/spec/models/package_spec.rb +1 -1
  67. data/spec/models/service_response_request_param_spec.rb +59 -0
  68. data/spec/models/service_response_request_spec.rb +53 -0
  69. data/spec/models/service_response_response_spec.rb +59 -0
  70. data/spec/models/service_response_spec.rb +77 -0
  71. data/spec/models/update_status_spec.rb +65 -0
  72. data/spec/spec_helper.rb +10 -1
  73. data/spec/spec_helper_acceptance.rb +19 -0
  74. metadata +130 -17
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #CRX Package Manager API
3
+
4
+ #API for interacting with the CRX Package Manager in AEM.
5
+
6
+ OpenAPI spec version: 6.2.0
7
+ Contact: bryan.stopp@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module CrxPackageManager
27
+
28
+ class InstallStatusStatus
29
+ attr_accessor :finished
30
+
31
+ attr_accessor :item_count
32
+
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'finished' => :'finished',
38
+ :'item_count' => :'itemCount'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.swagger_types
44
+ {
45
+ :'finished' => :'BOOLEAN',
46
+ :'item_count' => :'Integer'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
+
58
+ if attributes.has_key?(:'finished')
59
+ self.finished = attributes[:'finished']
60
+ end
61
+
62
+ if attributes.has_key?(:'itemCount')
63
+ self.item_count = attributes[:'itemCount']
64
+ end
65
+
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properies with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ return invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ return true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ finished == o.finished &&
87
+ item_count == o.item_count
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Fixnum] Hash code
98
+ def hash
99
+ [finished, item_count].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.swagger_types.each_pair do |key, type|
108
+ if type =~ /^Array<(.*)>/i
109
+ # check to ensure the input is an array given that the the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
117
+ end
118
+
119
+ self
120
+ end
121
+
122
+ # Deserializes the data based on type
123
+ # @param string type Data type
124
+ # @param string value Value to be deserialized
125
+ # @return [Object] Deserialized data
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :BOOLEAN
139
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ temp_model = CrxPackageManager.const_get(type).new
160
+ temp_model.build_from_hash(value)
161
+ end
162
+ end
163
+
164
+ # Returns the string representation of the object
165
+ # @return [String] String presentation of the object
166
+ def to_s
167
+ to_hash.to_s
168
+ end
169
+
170
+ # to_body is an alias to to_hash (backward compatibility)
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_body
173
+ to_hash
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ next if value.nil?
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Outputs non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ # @param [Object] value Any valid value
191
+ # @return [Hash] Returns the value in the form of hash
192
+ def _to_hash(value)
193
+ if value.is_a?(Array)
194
+ value.compact.map{ |v| _to_hash(v) }
195
+ elsif value.is_a?(Hash)
196
+ {}.tap do |hash|
197
+ value.each { |k, v| hash[k] = _to_hash(v) }
198
+ end
199
+ elsif value.respond_to? :to_hash
200
+ value.to_hash
201
+ else
202
+ value
203
+ end
204
+ end
205
+
206
+ end
207
+
208
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #API for interacting with the CRX Package Manager in AEM.
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 6.2.0
7
7
  Contact: bryan.stopp@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -166,7 +166,7 @@ module CrxPackageManager
166
166
  :'ac_handling' => :'String',
167
167
  :'dependencies' => :'Array<String>',
168
168
  :'resolved' => :'BOOLEAN',
169
- :'filter' => :'Array<PackageFilter>',
169
+ :'filter' => :'Array<Filter>',
170
170
  :'screenshots' => :'Array<String>'
171
171
  }
172
172
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #API for interacting with the CRX Package Manager in AEM.
5
5
 
6
- OpenAPI spec version: 1.0.0
6
+ OpenAPI spec version: 6.2.0
7
7
  Contact: bryan.stopp@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -28,18 +28,22 @@ module CrxPackageManager
28
28
  class PackageList
29
29
  attr_accessor :results
30
30
 
31
+ attr_accessor :total
32
+
31
33
 
32
34
  # Attribute mapping from ruby-style variable name to JSON key.
33
35
  def self.attribute_map
34
36
  {
35
- :'results' => :'results'
37
+ :'results' => :'results',
38
+ :'total' => :'total'
36
39
  }
37
40
  end
38
41
 
39
42
  # Attribute type mapping.
40
43
  def self.swagger_types
41
44
  {
42
- :'results' => :'Array<Package>'
45
+ :'results' => :'Array<Package>',
46
+ :'total' => :'Integer'
43
47
  }
44
48
  end
45
49
 
@@ -57,6 +61,10 @@ module CrxPackageManager
57
61
  end
58
62
  end
59
63
 
64
+ if attributes.has_key?(:'total')
65
+ self.total = attributes[:'total']
66
+ end
67
+
60
68
  end
61
69
 
62
70
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -77,7 +85,8 @@ module CrxPackageManager
77
85
  def ==(o)
78
86
  return true if self.equal?(o)
79
87
  self.class == o.class &&
80
- results == o.results
88
+ results == o.results &&
89
+ total == o.total
81
90
  end
82
91
 
83
92
  # @see the `==` method
@@ -89,7 +98,7 @@ module CrxPackageManager
89
98
  # Calculates hash code according to all attributes.
90
99
  # @return [Fixnum] Hash code
91
100
  def hash
92
- [results].hash
101
+ [results, total].hash
93
102
  end
94
103
 
95
104
  # Builds the object from hash
@@ -0,0 +1,235 @@
1
+ =begin
2
+ #CRX Package Manager API
3
+
4
+ #API for interacting with the CRX Package Manager in AEM.
5
+
6
+ OpenAPI spec version: 6.2.0
7
+ Contact: bryan.stopp@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module CrxPackageManager
27
+
28
+ class ServiceResponse
29
+ attr_accessor :version
30
+
31
+ attr_accessor :user
32
+
33
+ attr_accessor :workspace
34
+
35
+ attr_accessor :request
36
+
37
+ attr_accessor :response
38
+
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'version' => :'version',
44
+ :'user' => :'user',
45
+ :'workspace' => :'workspace',
46
+ :'request' => :'request',
47
+ :'response' => :'response'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.swagger_types
53
+ {
54
+ :'version' => :'String',
55
+ :'user' => :'String',
56
+ :'workspace' => :'String',
57
+ :'request' => :'ServiceResponseRequest',
58
+ :'response' => :'ServiceResponseResponse'
59
+ }
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ return unless attributes.is_a?(Hash)
66
+
67
+ # convert string to symbol for hash key
68
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
69
+
70
+ if attributes.has_key?(:'version')
71
+ self.version = attributes[:'version']
72
+ end
73
+
74
+ if attributes.has_key?(:'user')
75
+ self.user = attributes[:'user']
76
+ end
77
+
78
+ if attributes.has_key?(:'workspace')
79
+ self.workspace = attributes[:'workspace']
80
+ end
81
+
82
+ if attributes.has_key?(:'request')
83
+ self.request = attributes[:'request']
84
+ end
85
+
86
+ if attributes.has_key?(:'response')
87
+ self.response = attributes[:'response']
88
+ end
89
+
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properies with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ return invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ return true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ version == o.version &&
111
+ user == o.user &&
112
+ workspace == o.workspace &&
113
+ request == o.request &&
114
+ response == o.response
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Fixnum] Hash code
125
+ def hash
126
+ [version, user, workspace, request, response].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ self.class.swagger_types.each_pair do |key, type|
135
+ if type =~ /^Array<(.*)>/i
136
+ # check to ensure the input is an array given that the the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ DateTime.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :BOOLEAN
166
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ temp_model = CrxPackageManager.const_get(type).new
187
+ temp_model.build_from_hash(value)
188
+ end
189
+ end
190
+
191
+ # Returns the string representation of the object
192
+ # @return [String] String presentation of the object
193
+ def to_s
194
+ to_hash.to_s
195
+ end
196
+
197
+ # to_body is an alias to to_hash (backward compatibility)
198
+ # @return [Hash] Returns the object in the form of hash
199
+ def to_body
200
+ to_hash
201
+ end
202
+
203
+ # Returns the object in the form of hash
204
+ # @return [Hash] Returns the object in the form of hash
205
+ def to_hash
206
+ hash = {}
207
+ self.class.attribute_map.each_pair do |attr, param|
208
+ value = self.send(attr)
209
+ next if value.nil?
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ # Outputs non-array value in the form of hash
216
+ # For object, use to_hash. Otherwise, just return the value
217
+ # @param [Object] value Any valid value
218
+ # @return [Hash] Returns the value in the form of hash
219
+ def _to_hash(value)
220
+ if value.is_a?(Array)
221
+ value.compact.map{ |v| _to_hash(v) }
222
+ elsif value.is_a?(Hash)
223
+ {}.tap do |hash|
224
+ value.each { |k, v| hash[k] = _to_hash(v) }
225
+ end
226
+ elsif value.respond_to? :to_hash
227
+ value.to_hash
228
+ else
229
+ value
230
+ end
231
+ end
232
+
233
+ end
234
+
235
+ end