cloudsmith-api 2.0.23 → 2.0.24

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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +17 -4
  4. data/build.json +1 -1
  5. data/docs/FormatSupport.md +1 -0
  6. data/docs/GenericPackageUpload.md +90 -0
  7. data/docs/GenericPackageUploadRequest.md +13 -0
  8. data/docs/GenericUpstream.md +33 -0
  9. data/docs/GenericUpstreamRequest.md +21 -0
  10. data/docs/GenericUpstreamRequestPatch.md +21 -0
  11. data/docs/MavenUpstream.md +1 -0
  12. data/docs/MavenUpstreamRequest.md +1 -0
  13. data/docs/MavenUpstreamRequestPatch.md +1 -0
  14. data/docs/OrganizationTeam.md +1 -1
  15. data/docs/OrganizationTeamRequest.md +1 -1
  16. data/docs/OrganizationTeamRequestPatch.md +1 -1
  17. data/docs/Package.md +1 -0
  18. data/docs/PackageCopy.md +1 -0
  19. data/docs/PackageCopyRequest.md +1 -1
  20. data/docs/PackageMove.md +1 -0
  21. data/docs/PackageMoveRequest.md +1 -1
  22. data/docs/PackageQuarantine.md +1 -0
  23. data/docs/PackageResync.md +1 -0
  24. data/docs/PackageTag.md +1 -0
  25. data/docs/PackagesApi.md +131 -0
  26. data/docs/ReposApi.md +401 -0
  27. data/lib/cloudsmith-api/api/packages_api.rb +123 -0
  28. data/lib/cloudsmith-api/api/repos_api.rb +395 -0
  29. data/lib/cloudsmith-api/models/format_support.rb +16 -1
  30. data/lib/cloudsmith-api/models/generic_package_upload.rb +992 -0
  31. data/lib/cloudsmith-api/models/generic_package_upload_request.rb +245 -0
  32. data/lib/cloudsmith-api/models/generic_upstream.rb +503 -0
  33. data/lib/cloudsmith-api/models/generic_upstream_request.rb +375 -0
  34. data/lib/cloudsmith-api/models/generic_upstream_request_patch.rb +365 -0
  35. data/lib/cloudsmith-api/models/maven_upstream.rb +25 -1
  36. data/lib/cloudsmith-api/models/maven_upstream_request.rb +25 -1
  37. data/lib/cloudsmith-api/models/maven_upstream_request_patch.rb +25 -1
  38. data/lib/cloudsmith-api/models/organization_team.rb +1 -0
  39. data/lib/cloudsmith-api/models/organization_team_request.rb +1 -0
  40. data/lib/cloudsmith-api/models/organization_team_request_patch.rb +1 -0
  41. data/lib/cloudsmith-api/models/package.rb +11 -1
  42. data/lib/cloudsmith-api/models/package_copy.rb +11 -1
  43. data/lib/cloudsmith-api/models/package_copy_request.rb +1 -0
  44. data/lib/cloudsmith-api/models/package_move.rb +11 -1
  45. data/lib/cloudsmith-api/models/package_move_request.rb +1 -0
  46. data/lib/cloudsmith-api/models/package_quarantine.rb +11 -1
  47. data/lib/cloudsmith-api/models/package_resync.rb +11 -1
  48. data/lib/cloudsmith-api/models/package_tag.rb +11 -1
  49. data/lib/cloudsmith-api/version.rb +1 -1
  50. data/lib/cloudsmith-api.rb +5 -0
  51. data/spec/api/packages_api_spec.rb +28 -0
  52. data/spec/api/repos_api_spec.rb +87 -0
  53. data/spec/models/format_support_spec.rb +6 -0
  54. data/spec/models/generic_package_upload_request_spec.rb +71 -0
  55. data/spec/models/generic_package_upload_spec.rb +537 -0
  56. data/spec/models/generic_upstream_request_patch_spec.rb +127 -0
  57. data/spec/models/generic_upstream_request_spec.rb +127 -0
  58. data/spec/models/generic_upstream_spec.rb +203 -0
  59. data/spec/models/maven_upstream_request_patch_spec.rb +10 -0
  60. data/spec/models/maven_upstream_request_spec.rb +10 -0
  61. data/spec/models/maven_upstream_spec.rb +10 -0
  62. data/spec/models/package_copy_spec.rb +6 -0
  63. data/spec/models/package_move_spec.rb +6 -0
  64. data/spec/models/package_quarantine_spec.rb +6 -0
  65. data/spec/models/package_resync_spec.rb +6 -0
  66. data/spec/models/package_spec.rb +6 -0
  67. data/spec/models/package_tag_spec.rb +6 -0
  68. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.3.1/gem_make.out +1 -1
  69. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-4.0.1/gem_make.out +2 -2
  70. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-4.0.1/mkmf.log +4 -4
  71. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.17.3/gem_make.out +2 -2
  72. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.17.3/mkmf.log +1 -1
  73. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.6/gem_make.out +2 -2
  74. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.6/mkmf.log +1 -1
  75. data/vendor/bundle/ruby/2.6.0/gems/bigdecimal-4.0.1/ext/bigdecimal/Makefile +2 -2
  76. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.17.3/ext/ffi_c/Makefile +2 -2
  77. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.6/ext/json/ext/generator/Makefile +2 -2
  78. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.6/ext/json/ext/parser/Makefile +2 -2
  79. metadata +25 -5
@@ -0,0 +1,245 @@
1
+ =begin
2
+ #Cloudsmith API (v1)
3
+
4
+ #The API to the Cloudsmith Service
5
+
6
+ OpenAPI spec version: v1
7
+ Contact: support@cloudsmith.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.50
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudsmithApi
16
+ class GenericPackageUploadRequest
17
+ # The full filepath of the package including filename.
18
+ attr_accessor :filepath
19
+
20
+ # The name of this package.
21
+ attr_accessor :name
22
+
23
+ # The primary file for the package.
24
+ attr_accessor :package_file
25
+
26
+ # If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
27
+ attr_accessor :republish
28
+
29
+ # A comma-separated values list of tags to add to the package.
30
+ attr_accessor :tags
31
+
32
+ # The raw version for this package.
33
+ attr_accessor :version
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'filepath' => :'filepath',
39
+ :'name' => :'name',
40
+ :'package_file' => :'package_file',
41
+ :'republish' => :'republish',
42
+ :'tags' => :'tags',
43
+ :'version' => :'version'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'filepath' => :'String',
51
+ :'name' => :'String',
52
+ :'package_file' => :'String',
53
+ :'republish' => :'BOOLEAN',
54
+ :'tags' => :'String',
55
+ :'version' => :'String'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ return unless attributes.is_a?(Hash)
63
+
64
+ # convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
66
+
67
+ if attributes.has_key?(:'filepath')
68
+ self.filepath = attributes[:'filepath']
69
+ end
70
+
71
+ if attributes.has_key?(:'name')
72
+ self.name = attributes[:'name']
73
+ end
74
+
75
+ if attributes.has_key?(:'package_file')
76
+ self.package_file = attributes[:'package_file']
77
+ end
78
+
79
+ if attributes.has_key?(:'republish')
80
+ self.republish = attributes[:'republish']
81
+ end
82
+
83
+ if attributes.has_key?(:'tags')
84
+ self.tags = attributes[:'tags']
85
+ end
86
+
87
+ if attributes.has_key?(:'version')
88
+ self.version = attributes[:'version']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ if @filepath.nil?
97
+ invalid_properties.push('invalid value for "filepath", filepath cannot be nil.')
98
+ end
99
+
100
+ if @package_file.nil?
101
+ invalid_properties.push('invalid value for "package_file", package_file cannot be nil.')
102
+ end
103
+
104
+ invalid_properties
105
+ end
106
+
107
+ # Check to see if the all the properties in the model are valid
108
+ # @return true if the model is valid
109
+ def valid?
110
+ return false if @filepath.nil?
111
+ return false if @package_file.nil?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ filepath == o.filepath &&
121
+ name == o.name &&
122
+ package_file == o.package_file &&
123
+ republish == o.republish &&
124
+ tags == o.tags &&
125
+ version == o.version
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [filepath, name, package_file, republish, tags, version].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = CloudsmithApi.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+ end