cloudsmith-api 1.61.3 → 1.120.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +51 -30
  4. data/build.json +1 -1
  5. data/docs/AuditLogApi.md +137 -0
  6. data/docs/FilesApi.md +13 -6
  7. data/docs/NamespaceAuditLog.md +23 -0
  8. data/docs/OrganizationGroupSync.md +12 -0
  9. data/docs/OrganizationInvite.md +16 -0
  10. data/docs/OrganizationTeam.md +12 -0
  11. data/docs/OrgsApi.md +713 -0
  12. data/docs/OrgsInvitesCreate.md +12 -0
  13. data/docs/OrgsInvitesExtend.md +11 -0
  14. data/docs/OrgsSamlgroupsyncCreate.md +12 -0
  15. data/docs/OrgsTeamsCreate.md +11 -0
  16. data/docs/OrgsTeamsPartialUpdate.md +11 -0
  17. data/docs/ReposApi.md +586 -0
  18. data/docs/ReposCreate.md +29 -1
  19. data/docs/ReposGpgCreate.md +9 -0
  20. data/docs/ReposPartialUpdate.md +28 -0
  21. data/docs/ReposRsaCreate.md +9 -0
  22. data/docs/Repository.md +28 -0
  23. data/docs/RepositoryAuditLog.md +20 -0
  24. data/docs/RepositoryCreate.md +29 -1
  25. data/docs/RepositoryGpgKey.md +14 -0
  26. data/docs/RepositoryPrivilegeList.md +8 -0
  27. data/docs/RepositoryRsaKey.md +13 -0
  28. data/lib/cloudsmith-api/api/audit_log_api.rb +147 -0
  29. data/lib/cloudsmith-api/api/files_api.rb +17 -7
  30. data/lib/cloudsmith-api/api/orgs_api.rb +671 -0
  31. data/lib/cloudsmith-api/api/repos_api.rb +566 -0
  32. data/lib/cloudsmith-api/models/alpine_package_upload.rb +34 -0
  33. data/lib/cloudsmith-api/models/conan_package_upload.rb +34 -0
  34. data/lib/cloudsmith-api/models/entitlements_create.rb +46 -0
  35. data/lib/cloudsmith-api/models/entitlements_partial_update.rb +46 -0
  36. data/lib/cloudsmith-api/models/entitlements_refresh.rb +46 -0
  37. data/lib/cloudsmith-api/models/files_abort.rb +34 -0
  38. data/lib/cloudsmith-api/models/files_complete.rb +34 -0
  39. data/lib/cloudsmith-api/models/files_create.rb +34 -0
  40. data/lib/cloudsmith-api/models/files_validate.rb +34 -0
  41. data/lib/cloudsmith-api/models/maven_package_upload.rb +34 -0
  42. data/lib/cloudsmith-api/models/namespace_audit_log.rb +395 -0
  43. data/lib/cloudsmith-api/models/organization_group_sync.rb +240 -0
  44. data/lib/cloudsmith-api/models/organization_invite.rb +299 -0
  45. data/lib/cloudsmith-api/models/organization_membership.rb +46 -0
  46. data/lib/cloudsmith-api/models/organization_team.rb +264 -0
  47. data/lib/cloudsmith-api/models/orgs_invites_create.rb +259 -0
  48. data/lib/cloudsmith-api/models/orgs_invites_extend.rb +249 -0
  49. data/lib/cloudsmith-api/models/orgs_samlgroupsync_create.rb +245 -0
  50. data/lib/cloudsmith-api/models/orgs_teams_create.rb +254 -0
  51. data/lib/cloudsmith-api/models/orgs_teams_partial_update.rb +249 -0
  52. data/lib/cloudsmith-api/models/package.rb +34 -0
  53. data/lib/cloudsmith-api/models/package_copy.rb +34 -0
  54. data/lib/cloudsmith-api/models/package_move.rb +34 -0
  55. data/lib/cloudsmith-api/models/packages_tag.rb +34 -0
  56. data/lib/cloudsmith-api/models/raw_package_upload.rb +34 -0
  57. data/lib/cloudsmith-api/models/repos_create.rb +403 -5
  58. data/lib/cloudsmith-api/models/repos_gpg_create.rb +200 -0
  59. data/lib/cloudsmith-api/models/repos_partial_update.rb +414 -4
  60. data/lib/cloudsmith-api/models/repos_rsa_create.rb +200 -0
  61. data/lib/cloudsmith-api/models/repository.rb +414 -4
  62. data/lib/cloudsmith-api/models/repository_audit_log.rb +355 -0
  63. data/lib/cloudsmith-api/models/repository_create.rb +403 -5
  64. data/lib/cloudsmith-api/models/repository_gpg_key.rb +250 -0
  65. data/lib/cloudsmith-api/models/repository_privilege_list.rb +185 -0
  66. data/lib/cloudsmith-api/models/repository_rsa_key.rb +235 -0
  67. data/lib/cloudsmith-api/models/repository_token.rb +46 -0
  68. data/lib/cloudsmith-api/models/repository_token_refresh.rb +46 -0
  69. data/lib/cloudsmith-api/models/vagrant_package_upload.rb +34 -0
  70. data/lib/cloudsmith-api/models/vulnerability_scan_results.rb +34 -0
  71. data/lib/cloudsmith-api/models/vulnerability_scan_results_list.rb +34 -0
  72. data/lib/cloudsmith-api/version.rb +1 -1
  73. data/lib/cloudsmith-api.rb +16 -0
  74. data/spec/api/audit_log_api_spec.rb +66 -0
  75. data/spec/api/files_api_spec.rb +4 -2
  76. data/spec/api/orgs_api_spec.rb +161 -0
  77. data/spec/api/repos_api_spec.rb +132 -0
  78. data/spec/models/alpine_package_upload_spec.rb +4 -0
  79. data/spec/models/conan_package_upload_spec.rb +4 -0
  80. data/spec/models/entitlements_create_spec.rb +8 -0
  81. data/spec/models/entitlements_partial_update_spec.rb +8 -0
  82. data/spec/models/entitlements_refresh_spec.rb +8 -0
  83. data/spec/models/files_abort_spec.rb +4 -0
  84. data/spec/models/files_complete_spec.rb +4 -0
  85. data/spec/models/files_create_spec.rb +4 -0
  86. data/spec/models/files_validate_spec.rb +4 -0
  87. data/spec/models/maven_package_upload_spec.rb +4 -0
  88. data/spec/models/namespace_audit_log_spec.rb +131 -0
  89. data/spec/models/organization_group_sync_spec.rb +65 -0
  90. data/spec/models/organization_invite_spec.rb +93 -0
  91. data/spec/models/organization_membership_spec.rb +8 -0
  92. data/spec/models/organization_team_spec.rb +69 -0
  93. data/spec/models/orgs_invites_create_spec.rb +69 -0
  94. data/spec/models/orgs_invites_extend_spec.rb +63 -0
  95. data/spec/models/orgs_samlgroupsync_create_spec.rb +65 -0
  96. data/spec/models/orgs_teams_create_spec.rb +63 -0
  97. data/spec/models/orgs_teams_partial_update_spec.rb +63 -0
  98. data/spec/models/package_copy_spec.rb +4 -0
  99. data/spec/models/package_move_spec.rb +4 -0
  100. data/spec/models/package_spec.rb +4 -0
  101. data/spec/models/packages_tag_spec.rb +4 -0
  102. data/spec/models/raw_package_upload_spec.rb +4 -0
  103. data/spec/models/repos_create_spec.rb +200 -0
  104. data/spec/models/repos_gpg_create_spec.rb +47 -0
  105. data/spec/models/repos_partial_update_spec.rb +204 -0
  106. data/spec/models/repos_rsa_create_spec.rb +47 -0
  107. data/spec/models/repository_audit_log_spec.rb +113 -0
  108. data/spec/models/repository_create_spec.rb +200 -0
  109. data/spec/models/repository_gpg_key_spec.rb +77 -0
  110. data/spec/models/repository_privilege_list_spec.rb +41 -0
  111. data/spec/models/repository_rsa_key_spec.rb +71 -0
  112. data/spec/models/repository_spec.rb +204 -0
  113. data/spec/models/repository_token_refresh_spec.rb +8 -0
  114. data/spec/models/repository_token_spec.rb +8 -0
  115. data/spec/models/vagrant_package_upload_spec.rb +4 -0
  116. data/spec/models/vulnerability_scan_results_list_spec.rb +4 -0
  117. data/spec/models/vulnerability_scan_results_spec.rb +4 -0
  118. data/vendor/bundle/ruby/2.6.0/bin/htmldiff +3 -3
  119. data/vendor/bundle/ruby/2.6.0/bin/ldiff +3 -3
  120. data/vendor/bundle/ruby/2.6.0/bin/multigem +3 -3
  121. data/vendor/bundle/ruby/2.6.0/bin/multiruby +3 -3
  122. data/vendor/bundle/ruby/2.6.0/bin/rake +2 -0
  123. data/vendor/bundle/ruby/2.6.0/bin/rspec +2 -0
  124. data/vendor/bundle/ruby/2.6.0/bin/unit_diff +3 -3
  125. data/vendor/bundle/ruby/2.6.0/bin/zentest +3 -3
  126. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.19/gem_make.out +4 -4
  127. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/ffi_c.so +0 -0
  128. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/gem_make.out +5 -5
  129. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.15.5/mkmf.log +9 -9
  130. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/gem_make.out +4 -4
  131. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/json/ext/generator.so +0 -0
  132. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/json/ext/parser.so +0 -0
  133. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.6.2/mkmf.log +7 -7
  134. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/AbstractMemory.o +0 -0
  135. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ArrayType.o +0 -0
  136. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Buffer.o +0 -0
  137. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Call.o +0 -0
  138. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ClosurePool.o +0 -0
  139. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/DynamicLibrary.o +0 -0
  140. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Function.o +0 -0
  141. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/FunctionInfo.o +0 -0
  142. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/LastError.o +0 -0
  143. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/LongDouble.o +0 -0
  144. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +3 -3
  145. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/MappedType.o +0 -0
  146. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/MemoryPointer.o +0 -0
  147. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/MethodHandle.o +0 -0
  148. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Platform.o +0 -0
  149. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Pointer.o +0 -0
  150. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Struct.o +0 -0
  151. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/StructByValue.o +0 -0
  152. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/StructLayout.o +0 -0
  153. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Thread.o +0 -0
  154. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Type.o +0 -0
  155. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Types.o +0 -0
  156. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/Variadic.o +0 -0
  157. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ffi.o +0 -0
  158. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/ext/ffi_c/ffi_c.so +0 -0
  159. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.15.5/lib/ffi_c.so +0 -0
  160. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/Makefile +3 -3
  161. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator/Makefile +3 -3
  162. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator/generator.o +0 -0
  163. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/generator/generator.so +0 -0
  164. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/parser/Makefile +3 -3
  165. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/parser/parser.o +0 -0
  166. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/ext/json/ext/parser/parser.so +0 -0
  167. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/lib/json/ext/generator.so +0 -0
  168. data/vendor/bundle/ruby/2.6.0/gems/json-2.6.2/lib/json/ext/parser.so +0 -0
  169. data/vendor/bundle/ruby/2.6.0/specifications/ZenTest-4.12.1.gemspec +6 -9
  170. data/vendor/bundle/ruby/2.6.0/specifications/addressable-2.8.0.gemspec +6 -9
  171. data/vendor/bundle/ruby/2.6.0/specifications/autotest-4.4.6.gemspec +8 -13
  172. data/vendor/bundle/ruby/2.6.0/specifications/autotest-fsevent-0.2.19.gemspec +8 -13
  173. data/vendor/bundle/ruby/2.6.0/specifications/autotest-growl-0.2.16.gemspec +7 -11
  174. data/vendor/bundle/ruby/2.6.0/specifications/autotest-rails-pure-4.1.2.gemspec +2 -2
  175. data/vendor/bundle/ruby/2.6.0/specifications/crack-0.4.5.gemspec +5 -7
  176. data/vendor/bundle/ruby/2.6.0/specifications/diff-lcs-1.5.0.gemspec +12 -21
  177. data/vendor/bundle/ruby/2.6.0/specifications/ethon-0.15.0.gemspec +5 -7
  178. data/vendor/bundle/ruby/2.6.0/specifications/ffi-1.15.5.gemspec +8 -13
  179. data/vendor/bundle/ruby/2.6.0/specifications/hashdiff-1.0.1.gemspec +9 -15
  180. data/vendor/bundle/ruby/2.6.0/specifications/json-2.6.2.gemspec +0 -0
  181. data/vendor/bundle/ruby/2.6.0/specifications/public_suffix-4.0.7.gemspec +2 -2
  182. data/vendor/bundle/ruby/2.6.0/specifications/rake-12.3.3.gemspec +9 -15
  183. data/vendor/bundle/ruby/2.6.0/specifications/rexml-3.2.5.gemspec +7 -11
  184. data/vendor/bundle/ruby/2.6.0/specifications/rspec-3.11.0.gemspec +7 -11
  185. data/vendor/bundle/ruby/2.6.0/specifications/rspec-core-3.11.0.gemspec +13 -23
  186. data/vendor/bundle/ruby/2.6.0/specifications/rspec-expectations-3.11.0.gemspec +10 -17
  187. data/vendor/bundle/ruby/2.6.0/specifications/rspec-mocks-3.11.1.gemspec +10 -17
  188. data/vendor/bundle/ruby/2.6.0/specifications/rspec-support-3.11.0.gemspec +6 -9
  189. data/vendor/bundle/ruby/2.6.0/specifications/sys-uname-1.2.2.gemspec +7 -11
  190. data/vendor/bundle/ruby/2.6.0/specifications/typhoeus-1.4.0.gemspec +5 -7
  191. data/vendor/bundle/ruby/2.6.0/specifications/vcr-3.0.3.gemspec +26 -49
  192. data/vendor/bundle/ruby/2.6.0/specifications/webmock-1.24.6.gemspec +19 -35
  193. metadata +85 -21
@@ -131,6 +131,28 @@ module CloudsmithApi
131
131
  #
132
132
  attr_accessor :user_url
133
133
 
134
+ class EnumAttributeValidator
135
+ attr_reader :datatype
136
+ attr_reader :allowable_values
137
+
138
+ def initialize(datatype, allowable_values)
139
+ @allowable_values = allowable_values.map do |value|
140
+ case datatype.to_s
141
+ when /Integer/i
142
+ value.to_i
143
+ when /Float/i
144
+ value.to_f
145
+ else
146
+ value
147
+ end
148
+ end
149
+ end
150
+
151
+ def valid?(value)
152
+ !value || allowable_values.include?(value)
153
+ end
154
+ end
155
+
134
156
  # Attribute mapping from ruby-style variable name to JSON key.
135
157
  def self.attribute_map
136
158
  {
@@ -400,10 +422,34 @@ module CloudsmithApi
400
422
  # Check to see if the all the properties in the model are valid
401
423
  # @return true if the model is valid
402
424
  def valid?
425
+ limit_bandwidth_unit_validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
426
+ return false unless limit_bandwidth_unit_validator.valid?(@limit_bandwidth_unit)
403
427
  return false if @name.nil?
428
+ scheduled_reset_period_validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
429
+ return false unless scheduled_reset_period_validator.valid?(@scheduled_reset_period)
404
430
  true
405
431
  end
406
432
 
433
+ # Custom attribute writer method checking allowed values (enum).
434
+ # @param [Object] limit_bandwidth_unit Object to be assigned
435
+ def limit_bandwidth_unit=(limit_bandwidth_unit)
436
+ validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
437
+ unless validator.valid?(limit_bandwidth_unit)
438
+ fail ArgumentError, 'invalid value for "limit_bandwidth_unit", must be one of #{validator.allowable_values}.'
439
+ end
440
+ @limit_bandwidth_unit = limit_bandwidth_unit
441
+ end
442
+
443
+ # Custom attribute writer method checking allowed values (enum).
444
+ # @param [Object] scheduled_reset_period Object to be assigned
445
+ def scheduled_reset_period=(scheduled_reset_period)
446
+ validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
447
+ unless validator.valid?(scheduled_reset_period)
448
+ fail ArgumentError, 'invalid value for "scheduled_reset_period", must be one of #{validator.allowable_values}.'
449
+ end
450
+ @scheduled_reset_period = scheduled_reset_period
451
+ end
452
+
407
453
  # Checks equality by comparing each attribute.
408
454
  # @param [Object] Object to be compared
409
455
  def ==(o)
@@ -131,6 +131,28 @@ module CloudsmithApi
131
131
  #
132
132
  attr_accessor :user_url
133
133
 
134
+ class EnumAttributeValidator
135
+ attr_reader :datatype
136
+ attr_reader :allowable_values
137
+
138
+ def initialize(datatype, allowable_values)
139
+ @allowable_values = allowable_values.map do |value|
140
+ case datatype.to_s
141
+ when /Integer/i
142
+ value.to_i
143
+ when /Float/i
144
+ value.to_f
145
+ else
146
+ value
147
+ end
148
+ end
149
+ end
150
+
151
+ def valid?(value)
152
+ !value || allowable_values.include?(value)
153
+ end
154
+ end
155
+
134
156
  # Attribute mapping from ruby-style variable name to JSON key.
135
157
  def self.attribute_map
136
158
  {
@@ -396,9 +418,33 @@ module CloudsmithApi
396
418
  # Check to see if the all the properties in the model are valid
397
419
  # @return true if the model is valid
398
420
  def valid?
421
+ limit_bandwidth_unit_validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
422
+ return false unless limit_bandwidth_unit_validator.valid?(@limit_bandwidth_unit)
423
+ scheduled_reset_period_validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
424
+ return false unless scheduled_reset_period_validator.valid?(@scheduled_reset_period)
399
425
  true
400
426
  end
401
427
 
428
+ # Custom attribute writer method checking allowed values (enum).
429
+ # @param [Object] limit_bandwidth_unit Object to be assigned
430
+ def limit_bandwidth_unit=(limit_bandwidth_unit)
431
+ validator = EnumAttributeValidator.new('String', ['Byte', 'Kilobyte', 'Megabyte', 'Gigabyte', 'Terabyte', 'Petabyte', 'Exabyte', 'Zettabyte', 'Yottabyte'])
432
+ unless validator.valid?(limit_bandwidth_unit)
433
+ fail ArgumentError, 'invalid value for "limit_bandwidth_unit", must be one of #{validator.allowable_values}.'
434
+ end
435
+ @limit_bandwidth_unit = limit_bandwidth_unit
436
+ end
437
+
438
+ # Custom attribute writer method checking allowed values (enum).
439
+ # @param [Object] scheduled_reset_period Object to be assigned
440
+ def scheduled_reset_period=(scheduled_reset_period)
441
+ validator = EnumAttributeValidator.new('String', ['Never Reset', 'Daily', 'Weekly', 'Fortnightly', 'Monthly', 'Bi-Monthly', 'Quarterly', 'Every 6 months', 'Annual'])
442
+ unless validator.valid?(scheduled_reset_period)
443
+ fail ArgumentError, 'invalid value for "scheduled_reset_period", must be one of #{validator.allowable_values}.'
444
+ end
445
+ @scheduled_reset_period = scheduled_reset_period
446
+ end
447
+
402
448
  # Checks equality by comparing each attribute.
403
449
  # @param [Object] Object to be compared
404
450
  def ==(o)
@@ -215,6 +215,28 @@ module CloudsmithApi
215
215
  #
216
216
  attr_accessor :vulnerability_scan_results_url
217
217
 
218
+ class EnumAttributeValidator
219
+ attr_reader :datatype
220
+ attr_reader :allowable_values
221
+
222
+ def initialize(datatype, allowable_values)
223
+ @allowable_values = allowable_values.map do |value|
224
+ case datatype.to_s
225
+ when /Integer/i
226
+ value.to_i
227
+ when /Float/i
228
+ value.to_f
229
+ else
230
+ value
231
+ end
232
+ end
233
+ end
234
+
235
+ def valid?(value)
236
+ !value || allowable_values.include?(value)
237
+ end
238
+ end
239
+
218
240
  # Attribute mapping from ruby-style variable name to JSON key.
219
241
  def self.attribute_map
220
242
  {
@@ -666,10 +688,22 @@ module CloudsmithApi
666
688
  def valid?
667
689
  return false if @name.nil?
668
690
  return false if @provider.nil?
691
+ 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'])
692
+ return false unless security_scan_status_validator.valid?(@security_scan_status)
669
693
  return false if @version.nil?
670
694
  true
671
695
  end
672
696
 
697
+ # Custom attribute writer method checking allowed values (enum).
698
+ # @param [Object] security_scan_status Object to be assigned
699
+ def security_scan_status=(security_scan_status)
700
+ 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'])
701
+ unless validator.valid?(security_scan_status)
702
+ fail ArgumentError, 'invalid value for "security_scan_status", must be one of #{validator.allowable_values}.'
703
+ end
704
+ @security_scan_status = security_scan_status
705
+ end
706
+
673
707
  # Checks equality by comparing each attribute.
674
708
  # @param [Object] Object to be compared
675
709
  def ==(o)
@@ -38,6 +38,28 @@ module CloudsmithApi
38
38
  #
39
39
  attr_accessor :scan_id
40
40
 
41
+ class EnumAttributeValidator
42
+ attr_reader :datatype
43
+ attr_reader :allowable_values
44
+
45
+ def initialize(datatype, allowable_values)
46
+ @allowable_values = allowable_values.map do |value|
47
+ case datatype.to_s
48
+ when /Integer/i
49
+ value.to_i
50
+ when /Float/i
51
+ value.to_f
52
+ else
53
+ value
54
+ end
55
+ end
56
+ end
57
+
58
+ def valid?(value)
59
+ !value || allowable_values.include?(value)
60
+ end
61
+ end
62
+
41
63
  # Attribute mapping from ruby-style variable name to JSON key.
42
64
  def self.attribute_map
43
65
  {
@@ -134,12 +156,24 @@ module CloudsmithApi
134
156
  # @return true if the model is valid
135
157
  def valid?
136
158
  return false if @identifier.nil?
159
+ max_severity_validator = EnumAttributeValidator.new('String', ['Unknown', 'Low', 'Medium', 'High', 'Critical'])
160
+ return false unless max_severity_validator.valid?(@max_severity)
137
161
  return false if @package.nil?
138
162
  return false if @scan.nil?
139
163
  return false if @scan_id.nil?
140
164
  true
141
165
  end
142
166
 
167
+ # Custom attribute writer method checking allowed values (enum).
168
+ # @param [Object] max_severity Object to be assigned
169
+ def max_severity=(max_severity)
170
+ validator = EnumAttributeValidator.new('String', ['Unknown', 'Low', 'Medium', 'High', 'Critical'])
171
+ unless validator.valid?(max_severity)
172
+ fail ArgumentError, 'invalid value for "max_severity", must be one of #{validator.allowable_values}.'
173
+ end
174
+ @max_severity = max_severity
175
+ end
176
+
143
177
  # Checks equality by comparing each attribute.
144
178
  # @param [Object] Object to be compared
145
179
  def ==(o)
@@ -35,6 +35,28 @@ module CloudsmithApi
35
35
  #
36
36
  attr_accessor :scan_id
37
37
 
38
+ class EnumAttributeValidator
39
+ attr_reader :datatype
40
+ attr_reader :allowable_values
41
+
42
+ def initialize(datatype, allowable_values)
43
+ @allowable_values = allowable_values.map do |value|
44
+ case datatype.to_s
45
+ when /Integer/i
46
+ value.to_i
47
+ when /Float/i
48
+ value.to_f
49
+ else
50
+ value
51
+ end
52
+ end
53
+ end
54
+
55
+ def valid?(value)
56
+ !value || allowable_values.include?(value)
57
+ end
58
+ end
59
+
38
60
  # Attribute mapping from ruby-style variable name to JSON key.
39
61
  def self.attribute_map
40
62
  {
@@ -121,11 +143,23 @@ module CloudsmithApi
121
143
  # @return true if the model is valid
122
144
  def valid?
123
145
  return false if @identifier.nil?
146
+ max_severity_validator = EnumAttributeValidator.new('String', ['Unknown', 'Low', 'Medium', 'High', 'Critical'])
147
+ return false unless max_severity_validator.valid?(@max_severity)
124
148
  return false if @package.nil?
125
149
  return false if @scan_id.nil?
126
150
  true
127
151
  end
128
152
 
153
+ # Custom attribute writer method checking allowed values (enum).
154
+ # @param [Object] max_severity Object to be assigned
155
+ def max_severity=(max_severity)
156
+ validator = EnumAttributeValidator.new('String', ['Unknown', 'Low', 'Medium', 'High', 'Critical'])
157
+ unless validator.valid?(max_severity)
158
+ fail ArgumentError, 'invalid value for "max_severity", must be one of #{validator.allowable_values}.'
159
+ end
160
+ @max_severity = max_severity
161
+ end
162
+
129
163
  # Checks equality by comparing each attribute.
130
164
  # @param [Object] Object to be compared
131
165
  def ==(o)
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.26
11
11
  =end
12
12
 
13
13
  module CloudsmithApi
14
- VERSION = '1.61.3'
14
+ VERSION = '1.120.3'
15
15
  end
@@ -34,8 +34,17 @@ require 'cloudsmith-api/models/format'
34
34
  require 'cloudsmith-api/models/formats_distributions'
35
35
  require 'cloudsmith-api/models/maven_package_upload'
36
36
  require 'cloudsmith-api/models/namespace'
37
+ require 'cloudsmith-api/models/namespace_audit_log'
37
38
  require 'cloudsmith-api/models/organization'
39
+ require 'cloudsmith-api/models/organization_group_sync'
40
+ require 'cloudsmith-api/models/organization_invite'
38
41
  require 'cloudsmith-api/models/organization_membership'
42
+ require 'cloudsmith-api/models/organization_team'
43
+ require 'cloudsmith-api/models/orgs_invites_create'
44
+ require 'cloudsmith-api/models/orgs_invites_extend'
45
+ require 'cloudsmith-api/models/orgs_samlgroupsync_create'
46
+ require 'cloudsmith-api/models/orgs_teams_create'
47
+ require 'cloudsmith-api/models/orgs_teams_partial_update'
39
48
  require 'cloudsmith-api/models/package'
40
49
  require 'cloudsmith-api/models/package_copy'
41
50
  require 'cloudsmith-api/models/package_dependencies'
@@ -102,10 +111,16 @@ require 'cloudsmith-api/models/quota_history'
102
111
  require 'cloudsmith-api/models/quota_history_history'
103
112
  require 'cloudsmith-api/models/raw_package_upload'
104
113
  require 'cloudsmith-api/models/repos_create'
114
+ require 'cloudsmith-api/models/repos_gpg_create'
105
115
  require 'cloudsmith-api/models/repos_gpg_keys'
106
116
  require 'cloudsmith-api/models/repos_partial_update'
117
+ require 'cloudsmith-api/models/repos_rsa_create'
107
118
  require 'cloudsmith-api/models/repository'
119
+ require 'cloudsmith-api/models/repository_audit_log'
108
120
  require 'cloudsmith-api/models/repository_create'
121
+ require 'cloudsmith-api/models/repository_gpg_key'
122
+ require 'cloudsmith-api/models/repository_privilege_list'
123
+ require 'cloudsmith-api/models/repository_rsa_key'
109
124
  require 'cloudsmith-api/models/repository_token'
110
125
  require 'cloudsmith-api/models/repository_token_refresh'
111
126
  require 'cloudsmith-api/models/repository_token_sync'
@@ -127,6 +142,7 @@ require 'cloudsmith-api/models/webhooks_partial_update'
127
142
  require 'cloudsmith-api/models/webhooksownerrepo_templates'
128
143
 
129
144
  # APIs
145
+ require 'cloudsmith-api/api/audit_log_api'
130
146
  require 'cloudsmith-api/api/badges_api'
131
147
  require 'cloudsmith-api/api/distros_api'
132
148
  require 'cloudsmith-api/api/entitlements_api'
@@ -0,0 +1,66 @@
1
+ =begin
2
+ #Cloudsmith API
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 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for CloudsmithApi::AuditLogApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'AuditLogApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = CloudsmithApi::AuditLogApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of AuditLogApi' do
30
+ it 'should create an instance of AuditLogApi' do
31
+ expect(@instance).to be_instance_of(CloudsmithApi::AuditLogApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for audit_log_list
36
+ # Lists audit log entries for a specific namespace.
37
+ # Lists audit log entries for a specific namespace.
38
+ # @param owner
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [Integer] :page A page number within the paginated result set.
41
+ # @option opts [Integer] :page_size Number of results to return per page.
42
+ # @option opts [String] :query A search term for querying events, actors, or timestamps of log records.
43
+ # @return [Array<NamespaceAuditLog>]
44
+ describe 'audit_log_list test' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ end
48
+ end
49
+
50
+ # unit tests for audit_log_list0
51
+ # Lists audit log entries for a specific repository.
52
+ # Lists audit log entries for a specific repository.
53
+ # @param owner
54
+ # @param repo
55
+ # @param [Hash] opts the optional parameters
56
+ # @option opts [Integer] :page A page number within the paginated result set.
57
+ # @option opts [Integer] :page_size Number of results to return per page.
58
+ # @option opts [String] :query A search term for querying events, actors, or timestamps of log records.
59
+ # @return [Array<RepositoryAuditLog>]
60
+ describe 'audit_log_list0 test' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
63
+ end
64
+ end
65
+
66
+ end
@@ -77,12 +77,14 @@ describe 'FilesApi' do
77
77
  end
78
78
 
79
79
  # unit tests for files_info
80
- # Get upload information for a multipart file upload.
81
- # Get upload information for a multipart file upload.
80
+ # Get upload information to perform a multipart file upload.
81
+ # Get upload information to perform a multipart file upload.
82
82
  # @param owner
83
83
  # @param repo
84
84
  # @param identifier
85
+ # @param filename The filename of the file being uploaded
85
86
  # @param [Hash] opts the optional parameters
87
+ # @option opts [Integer] :part_number The part number to be uploaded next
86
88
  # @return [PackageFilePartsUpload]
87
89
  describe 'files_info test' do
88
90
  it 'should work' do
@@ -32,6 +32,60 @@ describe 'OrgsApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for orgs_invites_create
36
+ # Create an organization invite for a specific user
37
+ # Create an organization invite for a specific user
38
+ # @param org
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [OrgsInvitesCreate] :data
41
+ # @return [OrganizationInvite]
42
+ describe 'orgs_invites_create test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ # unit tests for orgs_invites_delete
49
+ # Delete a specific organization invite
50
+ # Delete a specific organization invite
51
+ # @param org
52
+ # @param slug_perm
53
+ # @param [Hash] opts the optional parameters
54
+ # @return [nil]
55
+ describe 'orgs_invites_delete test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ # unit tests for orgs_invites_extend
62
+ # Extend an organization invite.
63
+ # Extend an organization invite.
64
+ # @param org
65
+ # @param slug_perm
66
+ # @param [Hash] opts the optional parameters
67
+ # @option opts [OrgsInvitesExtend] :data
68
+ # @return [OrganizationInvite]
69
+ describe 'orgs_invites_extend test' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ # unit tests for orgs_invites_list
76
+ # Get a list of all invites for an organization.
77
+ # Get a list of all invites for an organization.
78
+ # @param org
79
+ # @param [Hash] opts the optional parameters
80
+ # @option opts [Integer] :page A page number within the paginated result set.
81
+ # @option opts [Integer] :page_size Number of results to return per page.
82
+ # @return [Array<OrganizationInvite>]
83
+ describe 'orgs_invites_list test' do
84
+ it 'should work' do
85
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
+ end
87
+ end
88
+
35
89
  # unit tests for orgs_list
36
90
  # Get a list of all the organizations you are associated with.
37
91
  # Get a list of all the organizations you are associated with.
@@ -97,4 +151,111 @@ describe 'OrgsApi' do
97
151
  end
98
152
  end
99
153
 
154
+ # unit tests for orgs_saml_group_sync_create
155
+ # Create a new SAML Group Sync mapping within an organization.
156
+ # Create a new SAML Group Sync mapping within an organization.
157
+ # @param org
158
+ # @param [Hash] opts the optional parameters
159
+ # @option opts [OrgsSamlgroupsyncCreate] :data
160
+ # @return [OrganizationGroupSync]
161
+ describe 'orgs_saml_group_sync_create test' do
162
+ it 'should work' do
163
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
164
+ end
165
+ end
166
+
167
+ # unit tests for orgs_saml_group_sync_delete
168
+ # Delete a SAML Group Sync mapping from an organization.
169
+ # Delete a SAML Group Sync mapping from an organization.
170
+ # @param org
171
+ # @param slug_perm
172
+ # @param [Hash] opts the optional parameters
173
+ # @return [nil]
174
+ describe 'orgs_saml_group_sync_delete test' do
175
+ it 'should work' do
176
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
177
+ end
178
+ end
179
+
180
+ # unit tests for orgs_saml_group_sync_list
181
+ # Get the details of all SAML Group Sync mapping within an organization.
182
+ # Get the details of all SAML Group Sync mapping within an organization.
183
+ # @param org
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [Integer] :page A page number within the paginated result set.
186
+ # @option opts [Integer] :page_size Number of results to return per page.
187
+ # @return [Array<OrganizationGroupSync>]
188
+ describe 'orgs_saml_group_sync_list test' do
189
+ it 'should work' do
190
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
191
+ end
192
+ end
193
+
194
+ # unit tests for orgs_teams_create
195
+ # Create a team for this organization.
196
+ # Create a team for this organization.
197
+ # @param org
198
+ # @param [Hash] opts the optional parameters
199
+ # @option opts [OrgsTeamsCreate] :data
200
+ # @return [OrganizationTeam]
201
+ describe 'orgs_teams_create test' do
202
+ it 'should work' do
203
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
204
+ end
205
+ end
206
+
207
+ # unit tests for orgs_teams_delete
208
+ # Delete a specific team in a organization.
209
+ # Delete a specific team in a organization.
210
+ # @param org
211
+ # @param slug_perm
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [nil]
214
+ describe 'orgs_teams_delete test' do
215
+ it 'should work' do
216
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
217
+ end
218
+ end
219
+
220
+ # unit tests for orgs_teams_list
221
+ # Get the details of all teams within an organization.
222
+ # Get the details of all teams within an organization.
223
+ # @param org
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [Integer] :page A page number within the paginated result set.
226
+ # @option opts [Integer] :page_size Number of results to return per page.
227
+ # @return [Array<OrganizationTeam>]
228
+ describe 'orgs_teams_list test' do
229
+ it 'should work' do
230
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
231
+ end
232
+ end
233
+
234
+ # unit tests for orgs_teams_partial_update
235
+ # Update a specific team in a organization.
236
+ # Update a specific team in a organization.
237
+ # @param org
238
+ # @param slug_perm
239
+ # @param [Hash] opts the optional parameters
240
+ # @option opts [OrgsTeamsPartialUpdate] :data
241
+ # @return [OrganizationTeam]
242
+ describe 'orgs_teams_partial_update test' do
243
+ it 'should work' do
244
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
245
+ end
246
+ end
247
+
248
+ # unit tests for orgs_teams_read
249
+ # Viewset for working with Organization teams.
250
+ # Viewset for working with Organization teams.
251
+ # @param org
252
+ # @param slug_perm
253
+ # @param [Hash] opts the optional parameters
254
+ # @return [OrganizationTeam]
255
+ describe 'orgs_teams_read test' do
256
+ it 'should work' do
257
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
258
+ end
259
+ end
260
+
100
261
  end