cloudsmith-api 2.0.12 → 2.0.13

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 (134) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +14 -5
  4. data/build.json +1 -1
  5. data/docs/AlpinePackageUpload.md +7 -0
  6. data/docs/CargoPackageUpload.md +7 -0
  7. data/docs/CocoapodsPackageUpload.md +7 -0
  8. data/docs/ComposerPackageUpload.md +7 -0
  9. data/docs/ConanPackageUpload.md +7 -0
  10. data/docs/CondaPackageUpload.md +7 -0
  11. data/docs/CranPackageUpload.md +7 -0
  12. data/docs/DartPackageUpload.md +7 -0
  13. data/docs/DebPackageUpload.md +7 -0
  14. data/docs/DockerPackageUpload.md +7 -0
  15. data/docs/GoPackageUpload.md +7 -0
  16. data/docs/HelmPackageUpload.md +7 -0
  17. data/docs/HexPackageUpload.md +7 -0
  18. data/docs/LuarocksPackageUpload.md +7 -0
  19. data/docs/MavenPackageUpload.md +7 -0
  20. data/docs/NpmPackageUpload.md +7 -0
  21. data/docs/NugetPackageUpload.md +7 -0
  22. data/docs/OrganizationMembership.md +1 -1
  23. data/docs/OrgsApi.md +358 -0
  24. data/docs/P2PackageUpload.md +7 -0
  25. data/docs/Package.md +7 -0
  26. data/docs/PackageCopy.md +7 -0
  27. data/docs/PackageMove.md +7 -0
  28. data/docs/PackageQuarantine.md +7 -0
  29. data/docs/PackageResync.md +7 -0
  30. data/docs/PackageStatus.md +7 -0
  31. data/docs/PackageTag.md +7 -0
  32. data/docs/PackagesApi.md +4 -4
  33. data/docs/ProviderSettings.md +14 -0
  34. data/docs/ProviderSettingsRequest.md +12 -0
  35. data/docs/ProviderSettingsRequestPatch.md +12 -0
  36. data/docs/PythonPackageUpload.md +7 -0
  37. data/docs/RawPackageUpload.md +7 -0
  38. data/docs/RpmPackageUpload.md +7 -0
  39. data/docs/RubyPackageUpload.md +7 -0
  40. data/docs/StatusBasic.md +1 -1
  41. data/docs/SwiftPackageUpload.md +7 -0
  42. data/docs/TerraformPackageUpload.md +7 -0
  43. data/docs/VagrantPackageUpload.md +7 -0
  44. data/lib/cloudsmith-api/api/orgs_api.rb +358 -0
  45. data/lib/cloudsmith-api/api/packages_api.rb +4 -4
  46. data/lib/cloudsmith-api/models/alpine_package_upload.rb +64 -1
  47. data/lib/cloudsmith-api/models/cargo_package_upload.rb +64 -1
  48. data/lib/cloudsmith-api/models/cocoapods_package_upload.rb +64 -1
  49. data/lib/cloudsmith-api/models/composer_package_upload.rb +64 -1
  50. data/lib/cloudsmith-api/models/conan_package_upload.rb +64 -1
  51. data/lib/cloudsmith-api/models/conda_package_upload.rb +64 -1
  52. data/lib/cloudsmith-api/models/cran_package_upload.rb +64 -1
  53. data/lib/cloudsmith-api/models/dart_package_upload.rb +64 -1
  54. data/lib/cloudsmith-api/models/deb_package_upload.rb +64 -1
  55. data/lib/cloudsmith-api/models/docker_package_upload.rb +64 -1
  56. data/lib/cloudsmith-api/models/go_package_upload.rb +64 -1
  57. data/lib/cloudsmith-api/models/helm_package_upload.rb +64 -1
  58. data/lib/cloudsmith-api/models/hex_package_upload.rb +64 -1
  59. data/lib/cloudsmith-api/models/luarocks_package_upload.rb +64 -1
  60. data/lib/cloudsmith-api/models/maven_package_upload.rb +64 -1
  61. data/lib/cloudsmith-api/models/npm_package_upload.rb +64 -1
  62. data/lib/cloudsmith-api/models/nuget_package_upload.rb +64 -1
  63. data/lib/cloudsmith-api/models/organization_membership.rb +1 -1
  64. data/lib/cloudsmith-api/models/p2_package_upload.rb +64 -1
  65. data/lib/cloudsmith-api/models/package.rb +64 -1
  66. data/lib/cloudsmith-api/models/package_copy.rb +64 -1
  67. data/lib/cloudsmith-api/models/package_move.rb +64 -1
  68. data/lib/cloudsmith-api/models/package_quarantine.rb +64 -1
  69. data/lib/cloudsmith-api/models/package_resync.rb +64 -1
  70. data/lib/cloudsmith-api/models/package_status.rb +64 -1
  71. data/lib/cloudsmith-api/models/package_tag.rb +64 -1
  72. data/lib/cloudsmith-api/models/provider_settings.rb +272 -0
  73. data/lib/cloudsmith-api/models/provider_settings_request.rb +252 -0
  74. data/lib/cloudsmith-api/models/provider_settings_request_patch.rb +227 -0
  75. data/lib/cloudsmith-api/models/python_package_upload.rb +64 -1
  76. data/lib/cloudsmith-api/models/raw_package_upload.rb +64 -1
  77. data/lib/cloudsmith-api/models/rpm_package_upload.rb +64 -1
  78. data/lib/cloudsmith-api/models/ruby_package_upload.rb +64 -1
  79. data/lib/cloudsmith-api/models/status_basic.rb +1 -1
  80. data/lib/cloudsmith-api/models/swift_package_upload.rb +64 -1
  81. data/lib/cloudsmith-api/models/terraform_package_upload.rb +64 -1
  82. data/lib/cloudsmith-api/models/vagrant_package_upload.rb +64 -1
  83. data/lib/cloudsmith-api/version.rb +1 -1
  84. data/lib/cloudsmith-api.rb +3 -0
  85. data/spec/api/orgs_api_spec.rb +81 -0
  86. data/spec/api/packages_api_spec.rb +2 -2
  87. data/spec/models/alpine_package_upload_spec.rb +42 -0
  88. data/spec/models/cargo_package_upload_spec.rb +42 -0
  89. data/spec/models/cocoapods_package_upload_spec.rb +42 -0
  90. data/spec/models/composer_package_upload_spec.rb +42 -0
  91. data/spec/models/conan_package_upload_spec.rb +42 -0
  92. data/spec/models/conda_package_upload_spec.rb +42 -0
  93. data/spec/models/cran_package_upload_spec.rb +42 -0
  94. data/spec/models/dart_package_upload_spec.rb +42 -0
  95. data/spec/models/deb_package_upload_spec.rb +42 -0
  96. data/spec/models/docker_package_upload_spec.rb +42 -0
  97. data/spec/models/go_package_upload_spec.rb +42 -0
  98. data/spec/models/helm_package_upload_spec.rb +42 -0
  99. data/spec/models/hex_package_upload_spec.rb +42 -0
  100. data/spec/models/luarocks_package_upload_spec.rb +42 -0
  101. data/spec/models/maven_package_upload_spec.rb +42 -0
  102. data/spec/models/npm_package_upload_spec.rb +42 -0
  103. data/spec/models/nuget_package_upload_spec.rb +42 -0
  104. data/spec/models/p2_package_upload_spec.rb +42 -0
  105. data/spec/models/package_copy_spec.rb +42 -0
  106. data/spec/models/package_move_spec.rb +42 -0
  107. data/spec/models/package_quarantine_spec.rb +42 -0
  108. data/spec/models/package_resync_spec.rb +42 -0
  109. data/spec/models/package_spec.rb +42 -0
  110. data/spec/models/package_status_spec.rb +42 -0
  111. data/spec/models/package_tag_spec.rb +42 -0
  112. data/spec/models/provider_settings_request_patch_spec.rb +65 -0
  113. data/spec/models/provider_settings_request_spec.rb +65 -0
  114. data/spec/models/provider_settings_spec.rb +77 -0
  115. data/spec/models/python_package_upload_spec.rb +42 -0
  116. data/spec/models/raw_package_upload_spec.rb +42 -0
  117. data/spec/models/rpm_package_upload_spec.rb +42 -0
  118. data/spec/models/ruby_package_upload_spec.rb +42 -0
  119. data/spec/models/swift_package_upload_spec.rb +42 -0
  120. data/spec/models/terraform_package_upload_spec.rb +42 -0
  121. data/spec/models/vagrant_package_upload_spec.rb +42 -0
  122. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.21/gem_make.out +1 -1
  123. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-3.1.7/gem_make.out +2 -2
  124. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-3.1.7/mkmf.log +5 -5
  125. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.16.3/gem_make.out +2 -2
  126. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.16.3/mkmf.log +1 -1
  127. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.2/gem_make.out +1 -1
  128. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.2/mkmf.log +1 -1
  129. data/vendor/bundle/ruby/2.6.0/gems/bigdecimal-3.1.7/ext/bigdecimal/Makefile +2 -2
  130. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.16.3/ext/ffi_c/Makefile +2 -2
  131. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.2/ext/json/Makefile +2 -2
  132. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.2/ext/json/ext/generator/Makefile +2 -2
  133. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.2/ext/json/ext/parser/Makefile +2 -2
  134. metadata +15 -3
@@ -0,0 +1,252 @@
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.26
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudsmithApi
16
+ class ProviderSettingsRequest
17
+ # The set of claims that any received tokens from the provider must contain to authenticate as the configured service account.
18
+ attr_accessor :claims
19
+
20
+ # Whether the provider settings should be used for incoming OIDC requests.
21
+ attr_accessor :enabled
22
+
23
+ # The name of the provider settings are being configured for
24
+ attr_accessor :name
25
+
26
+ # The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/
27
+ attr_accessor :provider_url
28
+
29
+ # The service accounts associated with these provider settings
30
+ attr_accessor :service_accounts
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'claims' => :'claims',
36
+ :'enabled' => :'enabled',
37
+ :'name' => :'name',
38
+ :'provider_url' => :'provider_url',
39
+ :'service_accounts' => :'service_accounts'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'claims' => :'Object',
47
+ :'enabled' => :'BOOLEAN',
48
+ :'name' => :'String',
49
+ :'provider_url' => :'String',
50
+ :'service_accounts' => :'Array<String>'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'claims')
63
+ self.claims = attributes[:'claims']
64
+ end
65
+
66
+ if attributes.has_key?(:'enabled')
67
+ self.enabled = attributes[:'enabled']
68
+ end
69
+
70
+ if attributes.has_key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+
74
+ if attributes.has_key?(:'provider_url')
75
+ self.provider_url = attributes[:'provider_url']
76
+ end
77
+
78
+ if attributes.has_key?(:'service_accounts')
79
+ if (value = attributes[:'service_accounts']).is_a?(Array)
80
+ self.service_accounts = value
81
+ end
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ if @claims.nil?
90
+ invalid_properties.push('invalid value for "claims", claims cannot be nil.')
91
+ end
92
+
93
+ if @enabled.nil?
94
+ invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
95
+ end
96
+
97
+ if @name.nil?
98
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
99
+ end
100
+
101
+ if @provider_url.nil?
102
+ invalid_properties.push('invalid value for "provider_url", provider_url cannot be nil.')
103
+ end
104
+
105
+ if @service_accounts.nil?
106
+ invalid_properties.push('invalid value for "service_accounts", service_accounts cannot be nil.')
107
+ end
108
+
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ return false if @claims.nil?
116
+ return false if @enabled.nil?
117
+ return false if @name.nil?
118
+ return false if @provider_url.nil?
119
+ return false if @service_accounts.nil?
120
+ true
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ claims == o.claims &&
129
+ enabled == o.enabled &&
130
+ name == o.name &&
131
+ provider_url == o.provider_url &&
132
+ service_accounts == o.service_accounts
133
+ end
134
+
135
+ # @see the `==` method
136
+ # @param [Object] Object to be compared
137
+ def eql?(o)
138
+ self == o
139
+ end
140
+
141
+ # Calculates hash code according to all attributes.
142
+ # @return [Fixnum] Hash code
143
+ def hash
144
+ [claims, enabled, name, provider_url, service_accounts].hash
145
+ end
146
+
147
+ # Builds the object from hash
148
+ # @param [Hash] attributes Model attributes in the form of hash
149
+ # @return [Object] Returns the model itself
150
+ def build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ self.class.swagger_types.each_pair do |key, type|
153
+ if type =~ /\AArray<(.*)>/i
154
+ # check to ensure the input is an array given that the attribute
155
+ # is documented as an array but the input is not
156
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
157
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
158
+ end
159
+ elsif !attributes[self.class.attribute_map[key]].nil?
160
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
161
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
162
+ end
163
+
164
+ self
165
+ end
166
+
167
+ # Deserializes the data based on type
168
+ # @param string type Data type
169
+ # @param string value Value to be deserialized
170
+ # @return [Object] Deserialized data
171
+ def _deserialize(type, value)
172
+ case type.to_sym
173
+ when :DateTime
174
+ DateTime.parse(value)
175
+ when :Date
176
+ Date.parse(value)
177
+ when :String
178
+ value.to_s
179
+ when :Integer
180
+ value.to_i
181
+ when :Float
182
+ value.to_f
183
+ when :BOOLEAN
184
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
185
+ true
186
+ else
187
+ false
188
+ end
189
+ when :Object
190
+ # generic object (usually a Hash), return directly
191
+ value
192
+ when /\AArray<(?<inner_type>.+)>\z/
193
+ inner_type = Regexp.last_match[:inner_type]
194
+ value.map { |v| _deserialize(inner_type, v) }
195
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
196
+ k_type = Regexp.last_match[:k_type]
197
+ v_type = Regexp.last_match[:v_type]
198
+ {}.tap do |hash|
199
+ value.each do |k, v|
200
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
201
+ end
202
+ end
203
+ else # model
204
+ temp_model = CloudsmithApi.const_get(type).new
205
+ temp_model.build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ next if value.nil?
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ # Outputs non-array value in the form of hash
234
+ # For object, use to_hash. Otherwise, just return the value
235
+ # @param [Object] value Any valid value
236
+ # @return [Hash] Returns the value in the form of hash
237
+ def _to_hash(value)
238
+ if value.is_a?(Array)
239
+ value.compact.map { |v| _to_hash(v) }
240
+ elsif value.is_a?(Hash)
241
+ {}.tap do |hash|
242
+ value.each { |k, v| hash[k] = _to_hash(v) }
243
+ end
244
+ elsif value.respond_to? :to_hash
245
+ value.to_hash
246
+ else
247
+ value
248
+ end
249
+ end
250
+
251
+ end
252
+ end
@@ -0,0 +1,227 @@
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.26
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudsmithApi
16
+ class ProviderSettingsRequestPatch
17
+ # The set of claims that any received tokens from the provider must contain to authenticate as the configured service account.
18
+ attr_accessor :claims
19
+
20
+ # Whether the provider settings should be used for incoming OIDC requests.
21
+ attr_accessor :enabled
22
+
23
+ # The name of the provider settings are being configured for
24
+ attr_accessor :name
25
+
26
+ # The URL from the provider that serves as the base for the OpenID configuration. For example, if the OpenID configuration is available at https://token.actions.githubusercontent.com/.well-known/openid-configuration, the provider URL would be https://token.actions.githubusercontent.com/
27
+ attr_accessor :provider_url
28
+
29
+ # The service accounts associated with these provider settings
30
+ attr_accessor :service_accounts
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'claims' => :'claims',
36
+ :'enabled' => :'enabled',
37
+ :'name' => :'name',
38
+ :'provider_url' => :'provider_url',
39
+ :'service_accounts' => :'service_accounts'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'claims' => :'Object',
47
+ :'enabled' => :'BOOLEAN',
48
+ :'name' => :'String',
49
+ :'provider_url' => :'String',
50
+ :'service_accounts' => :'Array<String>'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'claims')
63
+ self.claims = attributes[:'claims']
64
+ end
65
+
66
+ if attributes.has_key?(:'enabled')
67
+ self.enabled = attributes[:'enabled']
68
+ end
69
+
70
+ if attributes.has_key?(:'name')
71
+ self.name = attributes[:'name']
72
+ end
73
+
74
+ if attributes.has_key?(:'provider_url')
75
+ self.provider_url = attributes[:'provider_url']
76
+ end
77
+
78
+ if attributes.has_key?(:'service_accounts')
79
+ if (value = attributes[:'service_accounts']).is_a?(Array)
80
+ self.service_accounts = value
81
+ end
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ claims == o.claims &&
104
+ enabled == o.enabled &&
105
+ name == o.name &&
106
+ provider_url == o.provider_url &&
107
+ service_accounts == o.service_accounts
108
+ end
109
+
110
+ # @see the `==` method
111
+ # @param [Object] Object to be compared
112
+ def eql?(o)
113
+ self == o
114
+ end
115
+
116
+ # Calculates hash code according to all attributes.
117
+ # @return [Fixnum] Hash code
118
+ def hash
119
+ [claims, enabled, name, provider_url, service_accounts].hash
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.swagger_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :DateTime
149
+ DateTime.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :BOOLEAN
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ temp_model = CloudsmithApi.const_get(type).new
180
+ temp_model.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ next if value.nil?
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+ end
@@ -58,10 +58,24 @@ class PythonPackageUpload
58
58
 
59
59
  attr_accessor :indexed
60
60
 
61
+ attr_accessor :is_cancellable
62
+
63
+ attr_accessor :is_copyable
64
+
65
+ attr_accessor :is_deleteable
66
+
61
67
  attr_accessor :is_downloadable
62
68
 
69
+ attr_accessor :is_moveable
70
+
71
+ attr_accessor :is_quarantinable
72
+
63
73
  attr_accessor :is_quarantined
64
74
 
75
+ attr_accessor :is_resyncable
76
+
77
+ attr_accessor :is_security_scannable
78
+
65
79
  attr_accessor :is_sync_awaiting
66
80
 
67
81
  attr_accessor :is_sync_completed
@@ -218,8 +232,15 @@ class PythonPackageUpload
218
232
  :'format_url' => :'format_url',
219
233
  :'identifier_perm' => :'identifier_perm',
220
234
  :'indexed' => :'indexed',
235
+ :'is_cancellable' => :'is_cancellable',
236
+ :'is_copyable' => :'is_copyable',
237
+ :'is_deleteable' => :'is_deleteable',
221
238
  :'is_downloadable' => :'is_downloadable',
239
+ :'is_moveable' => :'is_moveable',
240
+ :'is_quarantinable' => :'is_quarantinable',
222
241
  :'is_quarantined' => :'is_quarantined',
242
+ :'is_resyncable' => :'is_resyncable',
243
+ :'is_security_scannable' => :'is_security_scannable',
223
244
  :'is_sync_awaiting' => :'is_sync_awaiting',
224
245
  :'is_sync_completed' => :'is_sync_completed',
225
246
  :'is_sync_failed' => :'is_sync_failed',
@@ -292,8 +313,15 @@ class PythonPackageUpload
292
313
  :'format_url' => :'String',
293
314
  :'identifier_perm' => :'String',
294
315
  :'indexed' => :'BOOLEAN',
316
+ :'is_cancellable' => :'BOOLEAN',
317
+ :'is_copyable' => :'BOOLEAN',
318
+ :'is_deleteable' => :'BOOLEAN',
295
319
  :'is_downloadable' => :'BOOLEAN',
320
+ :'is_moveable' => :'BOOLEAN',
321
+ :'is_quarantinable' => :'BOOLEAN',
296
322
  :'is_quarantined' => :'BOOLEAN',
323
+ :'is_resyncable' => :'BOOLEAN',
324
+ :'is_security_scannable' => :'BOOLEAN',
297
325
  :'is_sync_awaiting' => :'BOOLEAN',
298
326
  :'is_sync_completed' => :'BOOLEAN',
299
327
  :'is_sync_failed' => :'BOOLEAN',
@@ -435,14 +463,42 @@ class PythonPackageUpload
435
463
  self.indexed = attributes[:'indexed']
436
464
  end
437
465
 
466
+ if attributes.has_key?(:'is_cancellable')
467
+ self.is_cancellable = attributes[:'is_cancellable']
468
+ end
469
+
470
+ if attributes.has_key?(:'is_copyable')
471
+ self.is_copyable = attributes[:'is_copyable']
472
+ end
473
+
474
+ if attributes.has_key?(:'is_deleteable')
475
+ self.is_deleteable = attributes[:'is_deleteable']
476
+ end
477
+
438
478
  if attributes.has_key?(:'is_downloadable')
439
479
  self.is_downloadable = attributes[:'is_downloadable']
440
480
  end
441
481
 
482
+ if attributes.has_key?(:'is_moveable')
483
+ self.is_moveable = attributes[:'is_moveable']
484
+ end
485
+
486
+ if attributes.has_key?(:'is_quarantinable')
487
+ self.is_quarantinable = attributes[:'is_quarantinable']
488
+ end
489
+
442
490
  if attributes.has_key?(:'is_quarantined')
443
491
  self.is_quarantined = attributes[:'is_quarantined']
444
492
  end
445
493
 
494
+ if attributes.has_key?(:'is_resyncable')
495
+ self.is_resyncable = attributes[:'is_resyncable']
496
+ end
497
+
498
+ if attributes.has_key?(:'is_security_scannable')
499
+ self.is_security_scannable = attributes[:'is_security_scannable']
500
+ end
501
+
446
502
  if attributes.has_key?(:'is_sync_awaiting')
447
503
  self.is_sync_awaiting = attributes[:'is_sync_awaiting']
448
504
  end
@@ -680,8 +736,15 @@ class PythonPackageUpload
680
736
  format_url == o.format_url &&
681
737
  identifier_perm == o.identifier_perm &&
682
738
  indexed == o.indexed &&
739
+ is_cancellable == o.is_cancellable &&
740
+ is_copyable == o.is_copyable &&
741
+ is_deleteable == o.is_deleteable &&
683
742
  is_downloadable == o.is_downloadable &&
743
+ is_moveable == o.is_moveable &&
744
+ is_quarantinable == o.is_quarantinable &&
684
745
  is_quarantined == o.is_quarantined &&
746
+ is_resyncable == o.is_resyncable &&
747
+ is_security_scannable == o.is_security_scannable &&
685
748
  is_sync_awaiting == o.is_sync_awaiting &&
686
749
  is_sync_completed == o.is_sync_completed &&
687
750
  is_sync_failed == o.is_sync_failed &&
@@ -739,7 +802,7 @@ class PythonPackageUpload
739
802
  # Calculates hash code according to all attributes.
740
803
  # @return [Fixnum] Hash code
741
804
  def hash
742
- [architectures, cdn_url, checksum_md5, checksum_sha1, checksum_sha256, checksum_sha512, dependencies_checksum_md5, dependencies_url, description, distro, distro_version, downloads, epoch, extension, filename, files, format, format_url, identifier_perm, indexed, is_downloadable, is_quarantined, is_sync_awaiting, is_sync_completed, is_sync_failed, is_sync_in_flight, is_sync_in_progress, license, name, namespace, namespace_url, num_files, origin_repository, origin_repository_url, package_type, release, repository, repository_url, security_scan_completed_at, security_scan_started_at, security_scan_status, security_scan_status_updated_at, self_html_url, self_url, signature_url, size, slug, slug_perm, stage, stage_str, stage_updated_at, status, status_reason, status_str, status_updated_at, status_url, subtype, summary, sync_finished_at, sync_progress, tags_immutable, type_display, uploaded_at, uploader, uploader_url, version, version_orig, vulnerability_scan_results_url].hash
805
+ [architectures, cdn_url, checksum_md5, checksum_sha1, checksum_sha256, checksum_sha512, dependencies_checksum_md5, dependencies_url, description, distro, distro_version, downloads, epoch, extension, filename, files, format, format_url, identifier_perm, indexed, is_cancellable, is_copyable, is_deleteable, is_downloadable, is_moveable, is_quarantinable, is_quarantined, is_resyncable, is_security_scannable, is_sync_awaiting, is_sync_completed, is_sync_failed, is_sync_in_flight, is_sync_in_progress, license, name, namespace, namespace_url, num_files, origin_repository, origin_repository_url, package_type, release, repository, repository_url, security_scan_completed_at, security_scan_started_at, security_scan_status, security_scan_status_updated_at, self_html_url, self_url, signature_url, size, slug, slug_perm, stage, stage_str, stage_updated_at, status, status_reason, status_str, status_updated_at, status_url, subtype, summary, sync_finished_at, sync_progress, tags_immutable, type_display, uploaded_at, uploader, uploader_url, version, version_orig, vulnerability_scan_results_url].hash
743
806
  end
744
807
 
745
808
  # Builds the object from hash