cloudsmith-api 1.61.3 → 1.120.3
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +51 -30
- data/build.json +1 -1
- data/docs/AuditLogApi.md +137 -0
- data/docs/FilesApi.md +13 -6
- data/docs/NamespaceAuditLog.md +23 -0
- data/docs/OrganizationGroupSync.md +12 -0
- data/docs/OrganizationInvite.md +16 -0
- data/docs/OrganizationTeam.md +12 -0
- data/docs/OrgsApi.md +713 -0
- data/docs/OrgsInvitesCreate.md +12 -0
- data/docs/OrgsInvitesExtend.md +11 -0
- data/docs/OrgsSamlgroupsyncCreate.md +12 -0
- data/docs/OrgsTeamsCreate.md +11 -0
- data/docs/OrgsTeamsPartialUpdate.md +11 -0
- data/docs/ReposApi.md +586 -0
- data/docs/ReposCreate.md +29 -1
- data/docs/ReposGpgCreate.md +9 -0
- data/docs/ReposPartialUpdate.md +28 -0
- data/docs/ReposRsaCreate.md +9 -0
- data/docs/Repository.md +28 -0
- data/docs/RepositoryAuditLog.md +20 -0
- data/docs/RepositoryCreate.md +29 -1
- data/docs/RepositoryGpgKey.md +14 -0
- data/docs/RepositoryPrivilegeList.md +8 -0
- data/docs/RepositoryRsaKey.md +13 -0
- data/lib/cloudsmith-api/api/audit_log_api.rb +147 -0
- data/lib/cloudsmith-api/api/files_api.rb +17 -7
- data/lib/cloudsmith-api/api/orgs_api.rb +671 -0
- data/lib/cloudsmith-api/api/repos_api.rb +566 -0
- data/lib/cloudsmith-api/models/alpine_package_upload.rb +34 -0
- data/lib/cloudsmith-api/models/conan_package_upload.rb +34 -0
- data/lib/cloudsmith-api/models/entitlements_create.rb +46 -0
- data/lib/cloudsmith-api/models/entitlements_partial_update.rb +46 -0
- data/lib/cloudsmith-api/models/entitlements_refresh.rb +46 -0
- data/lib/cloudsmith-api/models/files_abort.rb +34 -0
- data/lib/cloudsmith-api/models/files_complete.rb +34 -0
- data/lib/cloudsmith-api/models/files_create.rb +34 -0
- data/lib/cloudsmith-api/models/files_validate.rb +34 -0
- data/lib/cloudsmith-api/models/maven_package_upload.rb +34 -0
- data/lib/cloudsmith-api/models/namespace_audit_log.rb +395 -0
- data/lib/cloudsmith-api/models/organization_group_sync.rb +240 -0
- data/lib/cloudsmith-api/models/organization_invite.rb +299 -0
- data/lib/cloudsmith-api/models/organization_membership.rb +46 -0
- data/lib/cloudsmith-api/models/organization_team.rb +264 -0
- data/lib/cloudsmith-api/models/orgs_invites_create.rb +259 -0
- data/lib/cloudsmith-api/models/orgs_invites_extend.rb +249 -0
- data/lib/cloudsmith-api/models/orgs_samlgroupsync_create.rb +245 -0
- data/lib/cloudsmith-api/models/orgs_teams_create.rb +254 -0
- data/lib/cloudsmith-api/models/orgs_teams_partial_update.rb +249 -0
- data/lib/cloudsmith-api/models/package.rb +34 -0
- data/lib/cloudsmith-api/models/package_copy.rb +34 -0
- data/lib/cloudsmith-api/models/package_move.rb +34 -0
- data/lib/cloudsmith-api/models/packages_tag.rb +34 -0
- data/lib/cloudsmith-api/models/raw_package_upload.rb +34 -0
- data/lib/cloudsmith-api/models/repos_create.rb +403 -5
- data/lib/cloudsmith-api/models/repos_gpg_create.rb +200 -0
- data/lib/cloudsmith-api/models/repos_partial_update.rb +414 -4
- data/lib/cloudsmith-api/models/repos_rsa_create.rb +200 -0
- data/lib/cloudsmith-api/models/repository.rb +414 -4
- data/lib/cloudsmith-api/models/repository_audit_log.rb +355 -0
- data/lib/cloudsmith-api/models/repository_create.rb +403 -5
- data/lib/cloudsmith-api/models/repository_gpg_key.rb +250 -0
- data/lib/cloudsmith-api/models/repository_privilege_list.rb +185 -0
- data/lib/cloudsmith-api/models/repository_rsa_key.rb +235 -0
- data/lib/cloudsmith-api/models/repository_token.rb +46 -0
- data/lib/cloudsmith-api/models/repository_token_refresh.rb +46 -0
- data/lib/cloudsmith-api/models/vagrant_package_upload.rb +34 -0
- data/lib/cloudsmith-api/models/vulnerability_scan_results.rb +34 -0
- data/lib/cloudsmith-api/models/vulnerability_scan_results_list.rb +34 -0
- data/lib/cloudsmith-api/version.rb +1 -1
- data/lib/cloudsmith-api.rb +16 -0
- data/spec/api/audit_log_api_spec.rb +66 -0
- data/spec/api/files_api_spec.rb +4 -2
- data/spec/api/orgs_api_spec.rb +161 -0
- data/spec/api/repos_api_spec.rb +132 -0
- data/spec/models/alpine_package_upload_spec.rb +4 -0
- data/spec/models/conan_package_upload_spec.rb +4 -0
- data/spec/models/entitlements_create_spec.rb +8 -0
- data/spec/models/entitlements_partial_update_spec.rb +8 -0
- data/spec/models/entitlements_refresh_spec.rb +8 -0
- data/spec/models/files_abort_spec.rb +4 -0
- data/spec/models/files_complete_spec.rb +4 -0
- data/spec/models/files_create_spec.rb +4 -0
- data/spec/models/files_validate_spec.rb +4 -0
- data/spec/models/maven_package_upload_spec.rb +4 -0
- data/spec/models/namespace_audit_log_spec.rb +131 -0
- data/spec/models/organization_group_sync_spec.rb +65 -0
- data/spec/models/organization_invite_spec.rb +93 -0
- data/spec/models/organization_membership_spec.rb +8 -0
- data/spec/models/organization_team_spec.rb +69 -0
- data/spec/models/orgs_invites_create_spec.rb +69 -0
- data/spec/models/orgs_invites_extend_spec.rb +63 -0
- data/spec/models/orgs_samlgroupsync_create_spec.rb +65 -0
- data/spec/models/orgs_teams_create_spec.rb +63 -0
- data/spec/models/orgs_teams_partial_update_spec.rb +63 -0
- data/spec/models/package_copy_spec.rb +4 -0
- data/spec/models/package_move_spec.rb +4 -0
- data/spec/models/package_spec.rb +4 -0
- data/spec/models/packages_tag_spec.rb +4 -0
- data/spec/models/raw_package_upload_spec.rb +4 -0
- data/spec/models/repos_create_spec.rb +200 -0
- data/spec/models/repos_gpg_create_spec.rb +47 -0
- data/spec/models/repos_partial_update_spec.rb +204 -0
- data/spec/models/repos_rsa_create_spec.rb +47 -0
- data/spec/models/repository_audit_log_spec.rb +113 -0
- data/spec/models/repository_create_spec.rb +200 -0
- data/spec/models/repository_gpg_key_spec.rb +77 -0
- data/spec/models/repository_privilege_list_spec.rb +41 -0
- data/spec/models/repository_rsa_key_spec.rb +71 -0
- data/spec/models/repository_spec.rb +204 -0
- data/spec/models/repository_token_refresh_spec.rb +8 -0
- data/spec/models/repository_token_spec.rb +8 -0
- data/spec/models/vagrant_package_upload_spec.rb +4 -0
- data/spec/models/vulnerability_scan_results_list_spec.rb +4 -0
- data/spec/models/vulnerability_scan_results_spec.rb +4 -0
- data/vendor/bundle/ruby/2.6.0/bin/htmldiff +3 -3
- data/vendor/bundle/ruby/2.6.0/bin/ldiff +3 -3
- data/vendor/bundle/ruby/2.6.0/bin/multigem +3 -3
- data/vendor/bundle/ruby/2.6.0/bin/multiruby +3 -3
- data/vendor/bundle/ruby/2.6.0/bin/rake +2 -0
- data/vendor/bundle/ruby/2.6.0/bin/rspec +2 -0
- data/vendor/bundle/ruby/2.6.0/bin/unit_diff +3 -3
- data/vendor/bundle/ruby/2.6.0/bin/zentest +3 -3
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.19/gem_make.out +4 -4
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/ffi_c.so +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/gem_make.out +5 -5
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/mkmf.log +9 -9
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/gem_make.out +4 -4
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/mkmf.log +7 -7
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/AbstractMemory.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ArrayType.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Buffer.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Call.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ClosurePool.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/DynamicLibrary.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Function.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/FunctionInfo.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/LastError.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/LongDouble.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/MappedType.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/MemoryPointer.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/MethodHandle.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Platform.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Pointer.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Struct.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/StructByValue.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/StructLayout.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Thread.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Type.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Types.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Variadic.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ffi.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ffi_c.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/lib/ffi_c.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/Makefile +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator/Makefile +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator/generator.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/parser/Makefile +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/parser/parser.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/parser/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/specifications/ZenTest-4.12.1.gemspec +6 -9
- data/vendor/bundle/ruby/2.6.0/specifications/addressable-2.8.0.gemspec +6 -9
- data/vendor/bundle/ruby/2.6.0/specifications/autotest-4.4.6.gemspec +8 -13
- data/vendor/bundle/ruby/2.6.0/specifications/autotest-fsevent-0.2.19.gemspec +8 -13
- data/vendor/bundle/ruby/2.6.0/specifications/autotest-growl-0.2.16.gemspec +7 -11
- data/vendor/bundle/ruby/2.6.0/specifications/autotest-rails-pure-4.1.2.gemspec +2 -2
- data/vendor/bundle/ruby/2.6.0/specifications/crack-0.4.5.gemspec +5 -7
- data/vendor/bundle/ruby/2.6.0/specifications/diff-lcs-1.5.0.gemspec +12 -21
- data/vendor/bundle/ruby/2.6.0/specifications/ethon-0.15.0.gemspec +5 -7
- data/vendor/bundle/ruby/2.6.0/specifications/ffi-1.15.5.gemspec +8 -13
- data/vendor/bundle/ruby/2.6.0/specifications/hashdiff-1.0.1.gemspec +9 -15
- data/vendor/bundle/ruby/2.6.0/specifications/json-2.6.2.gemspec +0 -0
- data/vendor/bundle/ruby/2.6.0/specifications/public_suffix-4.0.7.gemspec +2 -2
- data/vendor/bundle/ruby/2.6.0/specifications/rake-12.3.3.gemspec +9 -15
- data/vendor/bundle/ruby/2.6.0/specifications/rexml-3.2.5.gemspec +7 -11
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-3.11.0.gemspec +7 -11
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-core-3.11.0.gemspec +13 -23
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-expectations-3.11.0.gemspec +10 -17
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-mocks-3.11.1.gemspec +10 -17
- data/vendor/bundle/ruby/2.6.0/specifications/rspec-support-3.11.0.gemspec +6 -9
- data/vendor/bundle/ruby/2.6.0/specifications/sys-uname-1.2.2.gemspec +7 -11
- data/vendor/bundle/ruby/2.6.0/specifications/typhoeus-1.4.0.gemspec +5 -7
- data/vendor/bundle/ruby/2.6.0/specifications/vcr-3.0.3.gemspec +26 -49
- data/vendor/bundle/ruby/2.6.0/specifications/webmock-1.24.6.gemspec +19 -35
- metadata +85 -21
@@ -59,6 +59,28 @@ module CloudsmithApi
|
|
59
59
|
# None
|
60
60
|
attr_accessor :token
|
61
61
|
|
62
|
+
class EnumAttributeValidator
|
63
|
+
attr_reader :datatype
|
64
|
+
attr_reader :allowable_values
|
65
|
+
|
66
|
+
def initialize(datatype, allowable_values)
|
67
|
+
@allowable_values = allowable_values.map do |value|
|
68
|
+
case datatype.to_s
|
69
|
+
when /Integer/i
|
70
|
+
value.to_i
|
71
|
+
when /Float/i
|
72
|
+
value.to_f
|
73
|
+
else
|
74
|
+
value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def valid?(value)
|
80
|
+
!value || allowable_values.include?(value)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
62
84
|
# Attribute mapping from ruby-style variable name to JSON key.
|
63
85
|
def self.attribute_map
|
64
86
|
{
|
@@ -184,10 +206,34 @@ module CloudsmithApi
|
|
184
206
|
# Check to see if the all the properties in the model are valid
|
185
207
|
# @return true if the model is valid
|
186
208
|
def valid?
|
209
|
+
limit_bandwidth_unit_validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
|
210
|
+
return false unless limit_bandwidth_unit_validator.valid?(@limit_bandwidth_unit)
|
187
211
|
return false if @name.nil?
|
212
|
+
scheduled_reset_period_validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
|
213
|
+
return false unless scheduled_reset_period_validator.valid?(@scheduled_reset_period)
|
188
214
|
true
|
189
215
|
end
|
190
216
|
|
217
|
+
# Custom attribute writer method checking allowed values (enum).
|
218
|
+
# @param [Object] limit_bandwidth_unit Object to be assigned
|
219
|
+
def limit_bandwidth_unit=(limit_bandwidth_unit)
|
220
|
+
validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
|
221
|
+
unless validator.valid?(limit_bandwidth_unit)
|
222
|
+
fail ArgumentError, 'invalid value for "limit_bandwidth_unit", must be one of #{validator.allowable_values}.'
|
223
|
+
end
|
224
|
+
@limit_bandwidth_unit = limit_bandwidth_unit
|
225
|
+
end
|
226
|
+
|
227
|
+
# Custom attribute writer method checking allowed values (enum).
|
228
|
+
# @param [Object] scheduled_reset_period Object to be assigned
|
229
|
+
def scheduled_reset_period=(scheduled_reset_period)
|
230
|
+
validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
|
231
|
+
unless validator.valid?(scheduled_reset_period)
|
232
|
+
fail ArgumentError, 'invalid value for "scheduled_reset_period", must be one of #{validator.allowable_values}.'
|
233
|
+
end
|
234
|
+
@scheduled_reset_period = scheduled_reset_period
|
235
|
+
end
|
236
|
+
|
191
237
|
# Checks equality by comparing each attribute.
|
192
238
|
# @param [Object] Object to be compared
|
193
239
|
def ==(o)
|
@@ -59,6 +59,28 @@ module CloudsmithApi
|
|
59
59
|
# None
|
60
60
|
attr_accessor :token
|
61
61
|
|
62
|
+
class EnumAttributeValidator
|
63
|
+
attr_reader :datatype
|
64
|
+
attr_reader :allowable_values
|
65
|
+
|
66
|
+
def initialize(datatype, allowable_values)
|
67
|
+
@allowable_values = allowable_values.map do |value|
|
68
|
+
case datatype.to_s
|
69
|
+
when /Integer/i
|
70
|
+
value.to_i
|
71
|
+
when /Float/i
|
72
|
+
value.to_f
|
73
|
+
else
|
74
|
+
value
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def valid?(value)
|
80
|
+
!value || allowable_values.include?(value)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
62
84
|
# Attribute mapping from ruby-style variable name to JSON key.
|
63
85
|
def self.attribute_map
|
64
86
|
{
|
@@ -180,9 +202,33 @@ module CloudsmithApi
|
|
180
202
|
# Check to see if the all the properties in the model are valid
|
181
203
|
# @return true if the model is valid
|
182
204
|
def valid?
|
205
|
+
limit_bandwidth_unit_validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
|
206
|
+
return false unless limit_bandwidth_unit_validator.valid?(@limit_bandwidth_unit)
|
207
|
+
scheduled_reset_period_validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
|
208
|
+
return false unless scheduled_reset_period_validator.valid?(@scheduled_reset_period)
|
183
209
|
true
|
184
210
|
end
|
185
211
|
|
212
|
+
# Custom attribute writer method checking allowed values (enum).
|
213
|
+
# @param [Object] limit_bandwidth_unit Object to be assigned
|
214
|
+
def limit_bandwidth_unit=(limit_bandwidth_unit)
|
215
|
+
validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
|
216
|
+
unless validator.valid?(limit_bandwidth_unit)
|
217
|
+
fail ArgumentError, 'invalid value for "limit_bandwidth_unit", must be one of #{validator.allowable_values}.'
|
218
|
+
end
|
219
|
+
@limit_bandwidth_unit = limit_bandwidth_unit
|
220
|
+
end
|
221
|
+
|
222
|
+
# Custom attribute writer method checking allowed values (enum).
|
223
|
+
# @param [Object] scheduled_reset_period Object to be assigned
|
224
|
+
def scheduled_reset_period=(scheduled_reset_period)
|
225
|
+
validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
|
226
|
+
unless validator.valid?(scheduled_reset_period)
|
227
|
+
fail ArgumentError, 'invalid value for "scheduled_reset_period", must be one of #{validator.allowable_values}.'
|
228
|
+
end
|
229
|
+
@scheduled_reset_period = scheduled_reset_period
|
230
|
+
end
|
231
|
+
|
186
232
|
# Checks equality by comparing each attribute.
|
187
233
|
# @param [Object] Object to be compared
|
188
234
|
def ==(o)
|
@@ -56,6 +56,28 @@ module CloudsmithApi
|
|
56
56
|
# None
|
57
57
|
attr_accessor :token
|
58
58
|
|
59
|
+
class EnumAttributeValidator
|
60
|
+
attr_reader :datatype
|
61
|
+
attr_reader :allowable_values
|
62
|
+
|
63
|
+
def initialize(datatype, allowable_values)
|
64
|
+
@allowable_values = allowable_values.map do |value|
|
65
|
+
case datatype.to_s
|
66
|
+
when /Integer/i
|
67
|
+
value.to_i
|
68
|
+
when /Float/i
|
69
|
+
value.to_f
|
70
|
+
else
|
71
|
+
value
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def valid?(value)
|
77
|
+
!value || allowable_values.include?(value)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
59
81
|
# Attribute mapping from ruby-style variable name to JSON key.
|
60
82
|
def self.attribute_map
|
61
83
|
{
|
@@ -171,9 +193,33 @@ module CloudsmithApi
|
|
171
193
|
# Check to see if the all the properties in the model are valid
|
172
194
|
# @return true if the model is valid
|
173
195
|
def valid?
|
196
|
+
limit_bandwidth_unit_validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
|
197
|
+
return false unless limit_bandwidth_unit_validator.valid?(@limit_bandwidth_unit)
|
198
|
+
scheduled_reset_period_validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
|
199
|
+
return false unless scheduled_reset_period_validator.valid?(@scheduled_reset_period)
|
174
200
|
true
|
175
201
|
end
|
176
202
|
|
203
|
+
# Custom attribute writer method checking allowed values (enum).
|
204
|
+
# @param [Object] limit_bandwidth_unit Object to be assigned
|
205
|
+
def limit_bandwidth_unit=(limit_bandwidth_unit)
|
206
|
+
validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
|
207
|
+
unless validator.valid?(limit_bandwidth_unit)
|
208
|
+
fail ArgumentError, 'invalid value for "limit_bandwidth_unit", must be one of #{validator.allowable_values}.'
|
209
|
+
end
|
210
|
+
@limit_bandwidth_unit = limit_bandwidth_unit
|
211
|
+
end
|
212
|
+
|
213
|
+
# Custom attribute writer method checking allowed values (enum).
|
214
|
+
# @param [Object] scheduled_reset_period Object to be assigned
|
215
|
+
def scheduled_reset_period=(scheduled_reset_period)
|
216
|
+
validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
|
217
|
+
unless validator.valid?(scheduled_reset_period)
|
218
|
+
fail ArgumentError, 'invalid value for "scheduled_reset_period", must be one of #{validator.allowable_values}.'
|
219
|
+
end
|
220
|
+
@scheduled_reset_period = scheduled_reset_period
|
221
|
+
end
|
222
|
+
|
177
223
|
# Checks equality by comparing each attribute.
|
178
224
|
# @param [Object] Object to be compared
|
179
225
|
def ==(o)
|
@@ -26,6 +26,28 @@ module CloudsmithApi
|
|
26
26
|
# SHA256 checksum for a PUT-based package file upload.
|
27
27
|
attr_accessor :sha256_checksum
|
28
28
|
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
29
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
52
|
def self.attribute_map
|
31
53
|
{
|
@@ -86,9 +108,21 @@ module CloudsmithApi
|
|
86
108
|
# @return true if the model is valid
|
87
109
|
def valid?
|
88
110
|
return false if @filename.nil?
|
111
|
+
method_validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
112
|
+
return false unless method_validator.valid?(@method)
|
89
113
|
true
|
90
114
|
end
|
91
115
|
|
116
|
+
# Custom attribute writer method checking allowed values (enum).
|
117
|
+
# @param [Object] method Object to be assigned
|
118
|
+
def method=(method)
|
119
|
+
validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
120
|
+
unless validator.valid?(method)
|
121
|
+
fail ArgumentError, 'invalid value for "method", must be one of #{validator.allowable_values}.'
|
122
|
+
end
|
123
|
+
@method = method
|
124
|
+
end
|
125
|
+
|
92
126
|
# Checks equality by comparing each attribute.
|
93
127
|
# @param [Object] Object to be compared
|
94
128
|
def ==(o)
|
@@ -26,6 +26,28 @@ module CloudsmithApi
|
|
26
26
|
# SHA256 checksum for a PUT-based package file upload.
|
27
27
|
attr_accessor :sha256_checksum
|
28
28
|
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
29
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
52
|
def self.attribute_map
|
31
53
|
{
|
@@ -86,9 +108,21 @@ module CloudsmithApi
|
|
86
108
|
# @return true if the model is valid
|
87
109
|
def valid?
|
88
110
|
return false if @filename.nil?
|
111
|
+
method_validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
112
|
+
return false unless method_validator.valid?(@method)
|
89
113
|
true
|
90
114
|
end
|
91
115
|
|
116
|
+
# Custom attribute writer method checking allowed values (enum).
|
117
|
+
# @param [Object] method Object to be assigned
|
118
|
+
def method=(method)
|
119
|
+
validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
120
|
+
unless validator.valid?(method)
|
121
|
+
fail ArgumentError, 'invalid value for "method", must be one of #{validator.allowable_values}.'
|
122
|
+
end
|
123
|
+
@method = method
|
124
|
+
end
|
125
|
+
|
92
126
|
# Checks equality by comparing each attribute.
|
93
127
|
# @param [Object] Object to be compared
|
94
128
|
def ==(o)
|
@@ -26,6 +26,28 @@ module CloudsmithApi
|
|
26
26
|
# SHA256 checksum for a PUT-based package file upload.
|
27
27
|
attr_accessor :sha256_checksum
|
28
28
|
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
29
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
52
|
def self.attribute_map
|
31
53
|
{
|
@@ -86,9 +108,21 @@ module CloudsmithApi
|
|
86
108
|
# @return true if the model is valid
|
87
109
|
def valid?
|
88
110
|
return false if @filename.nil?
|
111
|
+
method_validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
112
|
+
return false unless method_validator.valid?(@method)
|
89
113
|
true
|
90
114
|
end
|
91
115
|
|
116
|
+
# Custom attribute writer method checking allowed values (enum).
|
117
|
+
# @param [Object] method Object to be assigned
|
118
|
+
def method=(method)
|
119
|
+
validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
120
|
+
unless validator.valid?(method)
|
121
|
+
fail ArgumentError, 'invalid value for "method", must be one of #{validator.allowable_values}.'
|
122
|
+
end
|
123
|
+
@method = method
|
124
|
+
end
|
125
|
+
|
92
126
|
# Checks equality by comparing each attribute.
|
93
127
|
# @param [Object] Object to be compared
|
94
128
|
def ==(o)
|
@@ -26,6 +26,28 @@ module CloudsmithApi
|
|
26
26
|
# SHA256 checksum for a PUT-based package file upload.
|
27
27
|
attr_accessor :sha256_checksum
|
28
28
|
|
29
|
+
class EnumAttributeValidator
|
30
|
+
attr_reader :datatype
|
31
|
+
attr_reader :allowable_values
|
32
|
+
|
33
|
+
def initialize(datatype, allowable_values)
|
34
|
+
@allowable_values = allowable_values.map do |value|
|
35
|
+
case datatype.to_s
|
36
|
+
when /Integer/i
|
37
|
+
value.to_i
|
38
|
+
when /Float/i
|
39
|
+
value.to_f
|
40
|
+
else
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def valid?(value)
|
47
|
+
!value || allowable_values.include?(value)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
29
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
52
|
def self.attribute_map
|
31
53
|
{
|
@@ -86,9 +108,21 @@ module CloudsmithApi
|
|
86
108
|
# @return true if the model is valid
|
87
109
|
def valid?
|
88
110
|
return false if @filename.nil?
|
111
|
+
method_validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
112
|
+
return false unless method_validator.valid?(@method)
|
89
113
|
true
|
90
114
|
end
|
91
115
|
|
116
|
+
# Custom attribute writer method checking allowed values (enum).
|
117
|
+
# @param [Object] method Object to be assigned
|
118
|
+
def method=(method)
|
119
|
+
validator = EnumAttributeValidator.new('String', ['put_parts', 'put', 'post', 'presigned', 'unsigned_put'])
|
120
|
+
unless validator.valid?(method)
|
121
|
+
fail ArgumentError, 'invalid value for "method", must be one of #{validator.allowable_values}.'
|
122
|
+
end
|
123
|
+
@method = method
|
124
|
+
end
|
125
|
+
|
92
126
|
# Checks equality by comparing each attribute.
|
93
127
|
# @param [Object] Object to be compared
|
94
128
|
def ==(o)
|
@@ -221,6 +221,28 @@ module CloudsmithApi
|
|
221
221
|
#
|
222
222
|
attr_accessor :vulnerability_scan_results_url
|
223
223
|
|
224
|
+
class EnumAttributeValidator
|
225
|
+
attr_reader :datatype
|
226
|
+
attr_reader :allowable_values
|
227
|
+
|
228
|
+
def initialize(datatype, allowable_values)
|
229
|
+
@allowable_values = allowable_values.map do |value|
|
230
|
+
case datatype.to_s
|
231
|
+
when /Integer/i
|
232
|
+
value.to_i
|
233
|
+
when /Float/i
|
234
|
+
value.to_f
|
235
|
+
else
|
236
|
+
value
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
def valid?(value)
|
242
|
+
!value || allowable_values.include?(value)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
224
246
|
# Attribute mapping from ruby-style variable name to JSON key.
|
225
247
|
def self.attribute_map
|
226
248
|
{
|
@@ -670,9 +692,21 @@ module CloudsmithApi
|
|
670
692
|
# Check to see if the all the properties in the model are valid
|
671
693
|
# @return true if the model is valid
|
672
694
|
def valid?
|
695
|
+
security_scan_status_validator = EnumAttributeValidator.new('String', ['Awaiting Security Scan', 'Security Scanning in Progress', 'Scan Detected Vulnerabilities', 'Scan Detected No Vulnerabilities', 'Security Scanning Disabled', 'Security Scanning Failed', 'Security Scanning Skipped', 'Security Scanning Not Supported'])
|
696
|
+
return false unless security_scan_status_validator.valid?(@security_scan_status)
|
673
697
|
true
|
674
698
|
end
|
675
699
|
|
700
|
+
# Custom attribute writer method checking allowed values (enum).
|
701
|
+
# @param [Object] security_scan_status Object to be assigned
|
702
|
+
def security_scan_status=(security_scan_status)
|
703
|
+
validator = EnumAttributeValidator.new('String', ['Awaiting Security Scan', 'Security Scanning in Progress', 'Scan Detected Vulnerabilities', 'Scan Detected No Vulnerabilities', 'Security Scanning Disabled', 'Security Scanning Failed', 'Security Scanning Skipped', 'Security Scanning Not Supported'])
|
704
|
+
unless validator.valid?(security_scan_status)
|
705
|
+
fail ArgumentError, 'invalid value for "security_scan_status", must be one of #{validator.allowable_values}.'
|
706
|
+
end
|
707
|
+
@security_scan_status = security_scan_status
|
708
|
+
end
|
709
|
+
|
676
710
|
# Checks equality by comparing each attribute.
|
677
711
|
# @param [Object] Object to be compared
|
678
712
|
def ==(o)
|