cloudsmith-api 2.0.29 → 2.0.31

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 (302) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +30 -4
  4. data/build.json +1 -1
  5. data/docs/AlpinePackageUpload.md +4 -0
  6. data/docs/AlpinePackageUploadRequest.md +2 -0
  7. data/docs/CargoPackageUpload.md +4 -0
  8. data/docs/CargoPackageUploadRequest.md +2 -0
  9. data/docs/CocoapodsPackageUpload.md +4 -0
  10. data/docs/CocoapodsPackageUploadRequest.md +2 -0
  11. data/docs/ComposerPackageUpload.md +4 -0
  12. data/docs/ComposerPackageUploadRequest.md +2 -0
  13. data/docs/ConanPackageUpload.md +4 -0
  14. data/docs/ConanPackageUploadRequest.md +2 -0
  15. data/docs/CondaPackageUpload.md +4 -0
  16. data/docs/CondaPackageUploadRequest.md +2 -0
  17. data/docs/CranPackageUpload.md +4 -0
  18. data/docs/CranPackageUploadRequest.md +2 -0
  19. data/docs/DartPackageUpload.md +4 -0
  20. data/docs/DartPackageUploadRequest.md +2 -0
  21. data/docs/DebPackageUpload.md +4 -0
  22. data/docs/DebPackageUploadRequest.md +2 -0
  23. data/docs/DockerPackageUpload.md +4 -0
  24. data/docs/DockerPackageUploadRequest.md +2 -0
  25. data/docs/GenericPackageUpload.md +4 -0
  26. data/docs/GenericPackageUploadRequest.md +2 -0
  27. data/docs/GoPackageUpload.md +4 -0
  28. data/docs/GoPackageUploadRequest.md +2 -0
  29. data/docs/HelmPackageUpload.md +4 -0
  30. data/docs/HelmPackageUploadRequest.md +2 -0
  31. data/docs/HexPackageUpload.md +4 -0
  32. data/docs/HexPackageUploadRequest.md +2 -0
  33. data/docs/HuggingfacePackageUpload.md +4 -0
  34. data/docs/HuggingfacePackageUploadRequest.md +2 -0
  35. data/docs/InlineResponse200.md +5 -1
  36. data/docs/InlineResponse2001.md +3 -1
  37. data/docs/InlineResponse2002.md +1 -1
  38. data/docs/InlineResponse2003.md +8 -0
  39. data/docs/InlineResponse2004.md +8 -0
  40. data/docs/LuarocksPackageUpload.md +4 -0
  41. data/docs/LuarocksPackageUploadRequest.md +2 -0
  42. data/docs/MavenPackageUpload.md +4 -0
  43. data/docs/MavenPackageUploadRequest.md +2 -0
  44. data/docs/McpPackageUpload.md +4 -0
  45. data/docs/McpPackageUploadRequest.md +2 -0
  46. data/docs/NixPackageUpload.md +97 -0
  47. data/docs/NixPackageUploadRequest.md +14 -0
  48. data/docs/NixUpstream.md +32 -0
  49. data/docs/NixUpstreamRequest.md +20 -0
  50. data/docs/NixUpstreamRequestPatch.md +20 -0
  51. data/docs/NpmPackageUpload.md +4 -0
  52. data/docs/NpmPackageUploadRequest.md +2 -0
  53. data/docs/NugetPackageUpload.md +4 -0
  54. data/docs/NugetPackageUploadRequest.md +2 -0
  55. data/docs/Oidc.md +7 -0
  56. data/docs/Oidc1.md +8 -0
  57. data/docs/OidcRequest.md +9 -0
  58. data/docs/OpenidApi.md +71 -0
  59. data/docs/OrganizationUsage.md +11 -0
  60. data/docs/OrganizationUsageUpdate.md +10 -0
  61. data/docs/OrganizationUsageUpdateRequestPatch.md +10 -0
  62. data/docs/OrgsApi.md +120 -0
  63. data/docs/P2PackageUpload.md +4 -0
  64. data/docs/P2PackageUploadRequest.md +2 -0
  65. data/docs/Package.md +4 -0
  66. data/docs/PackageCopy.md +4 -0
  67. data/docs/PackageCopyRequest.md +2 -0
  68. data/docs/PackageDetail.md +100 -0
  69. data/docs/PackageLicense.md +2 -0
  70. data/docs/PackageLicenseRequestPatch.md +3 -1
  71. data/docs/PackageMove.md +4 -0
  72. data/docs/PackageMoveRequest.md +2 -0
  73. data/docs/PackageQuarantine.md +4 -0
  74. data/docs/PackageQuarantineRequest.md +2 -0
  75. data/docs/PackageResync.md +4 -0
  76. data/docs/PackageTag.md +4 -0
  77. data/docs/PackageTagRequest.md +2 -0
  78. data/docs/PackageVulnerability.md +2 -0
  79. data/docs/PackagesApi.md +135 -4
  80. data/docs/PythonPackageUpload.md +4 -0
  81. data/docs/PythonPackageUploadRequest.md +2 -0
  82. data/docs/RawPackageUpload.md +4 -0
  83. data/docs/RawPackageUploadRequest.md +2 -0
  84. data/docs/RecycleBinPackage.md +2 -0
  85. data/docs/ReposApi.md +403 -2
  86. data/docs/RpmPackageUpload.md +4 -0
  87. data/docs/RpmPackageUploadRequest.md +2 -0
  88. data/docs/RubyPackageUpload.md +4 -0
  89. data/docs/RubyPackageUploadRequest.md +2 -0
  90. data/docs/SwiftPackageUpload.md +4 -0
  91. data/docs/SwiftPackageUploadRequest.md +2 -0
  92. data/docs/TerraformPackageUpload.md +4 -0
  93. data/docs/TerraformPackageUploadRequest.md +2 -0
  94. data/docs/UserApi.md +2 -2
  95. data/docs/VagrantPackageUpload.md +4 -0
  96. data/docs/VagrantPackageUploadRequest.md +2 -0
  97. data/docs/VsxPackageUpload.md +4 -0
  98. data/docs/VsxPackageUploadRequest.md +2 -0
  99. data/docs/WebOSVSeverityCounts.md +14 -0
  100. data/lib/cloudsmith-api/api/openid_api.rb +79 -0
  101. data/lib/cloudsmith-api/api/orgs_api.rb +106 -0
  102. data/lib/cloudsmith-api/api/packages_api.rb +129 -6
  103. data/lib/cloudsmith-api/api/repos_api.rb +398 -3
  104. data/lib/cloudsmith-api/api/user_api.rb +3 -3
  105. data/lib/cloudsmith-api/models/alpine_package_upload.rb +42 -1
  106. data/lib/cloudsmith-api/models/alpine_package_upload_request.rb +23 -4
  107. data/lib/cloudsmith-api/models/cargo_package_upload.rb +42 -1
  108. data/lib/cloudsmith-api/models/cargo_package_upload_request.rb +23 -4
  109. data/lib/cloudsmith-api/models/cocoapods_package_upload.rb +42 -1
  110. data/lib/cloudsmith-api/models/cocoapods_package_upload_request.rb +23 -4
  111. data/lib/cloudsmith-api/models/composer_package_upload.rb +42 -1
  112. data/lib/cloudsmith-api/models/composer_package_upload_request.rb +23 -4
  113. data/lib/cloudsmith-api/models/conan_package_upload.rb +42 -1
  114. data/lib/cloudsmith-api/models/conan_package_upload_request.rb +23 -4
  115. data/lib/cloudsmith-api/models/conda_package_upload.rb +42 -1
  116. data/lib/cloudsmith-api/models/conda_package_upload_request.rb +23 -4
  117. data/lib/cloudsmith-api/models/cran_package_upload.rb +42 -1
  118. data/lib/cloudsmith-api/models/cran_package_upload_request.rb +23 -4
  119. data/lib/cloudsmith-api/models/dart_package_upload.rb +42 -1
  120. data/lib/cloudsmith-api/models/dart_package_upload_request.rb +23 -4
  121. data/lib/cloudsmith-api/models/deb_package_upload.rb +42 -1
  122. data/lib/cloudsmith-api/models/deb_package_upload_request.rb +23 -4
  123. data/lib/cloudsmith-api/models/docker_package_upload.rb +42 -1
  124. data/lib/cloudsmith-api/models/docker_package_upload_request.rb +23 -4
  125. data/lib/cloudsmith-api/models/generic_package_upload.rb +42 -1
  126. data/lib/cloudsmith-api/models/generic_package_upload_request.rb +23 -4
  127. data/lib/cloudsmith-api/models/go_package_upload.rb +42 -1
  128. data/lib/cloudsmith-api/models/go_package_upload_request.rb +23 -4
  129. data/lib/cloudsmith-api/models/helm_package_upload.rb +42 -1
  130. data/lib/cloudsmith-api/models/helm_package_upload_request.rb +23 -4
  131. data/lib/cloudsmith-api/models/hex_package_upload.rb +42 -1
  132. data/lib/cloudsmith-api/models/hex_package_upload_request.rb +23 -4
  133. data/lib/cloudsmith-api/models/huggingface_package_upload.rb +42 -1
  134. data/lib/cloudsmith-api/models/huggingface_package_upload_request.rb +23 -4
  135. data/lib/cloudsmith-api/models/inline_response_200.rb +48 -14
  136. data/lib/cloudsmith-api/models/inline_response_200_1.rb +28 -14
  137. data/lib/cloudsmith-api/models/inline_response_200_2.rb +1 -1
  138. data/lib/cloudsmith-api/models/inline_response_200_3.rb +191 -0
  139. data/lib/cloudsmith-api/models/inline_response_200_4.rb +191 -0
  140. data/lib/cloudsmith-api/models/luarocks_package_upload.rb +42 -1
  141. data/lib/cloudsmith-api/models/luarocks_package_upload_request.rb +23 -4
  142. data/lib/cloudsmith-api/models/maven_package_upload.rb +42 -1
  143. data/lib/cloudsmith-api/models/maven_package_upload_request.rb +23 -4
  144. data/lib/cloudsmith-api/models/mcp_package_upload.rb +42 -1
  145. data/lib/cloudsmith-api/models/mcp_package_upload_request.rb +23 -4
  146. data/lib/cloudsmith-api/models/nix_package_upload.rb +1061 -0
  147. data/lib/cloudsmith-api/models/nix_package_upload_request.rb +249 -0
  148. data/lib/cloudsmith-api/models/nix_upstream.rb +496 -0
  149. data/lib/cloudsmith-api/models/nix_upstream_request.rb +365 -0
  150. data/lib/cloudsmith-api/models/nix_upstream_request_patch.rb +355 -0
  151. data/lib/cloudsmith-api/models/npm_package_upload.rb +42 -1
  152. data/lib/cloudsmith-api/models/npm_package_upload_request.rb +23 -4
  153. data/lib/cloudsmith-api/models/nuget_package_upload.rb +42 -1
  154. data/lib/cloudsmith-api/models/nuget_package_upload_request.rb +23 -4
  155. data/lib/cloudsmith-api/models/oidc.rb +175 -0
  156. data/lib/cloudsmith-api/models/oidc_1.rb +185 -0
  157. data/lib/cloudsmith-api/models/oidc_request.rb +205 -0
  158. data/lib/cloudsmith-api/models/organization_usage.rb +215 -0
  159. data/lib/cloudsmith-api/models/organization_usage_update.rb +202 -0
  160. data/lib/cloudsmith-api/models/organization_usage_update_request_patch.rb +202 -0
  161. data/lib/cloudsmith-api/models/p2_package_upload.rb +42 -1
  162. data/lib/cloudsmith-api/models/p2_package_upload_request.rb +23 -4
  163. data/lib/cloudsmith-api/models/package.rb +42 -1
  164. data/lib/cloudsmith-api/models/package_copy.rb +42 -1
  165. data/lib/cloudsmith-api/models/package_copy_request.rb +23 -4
  166. data/lib/cloudsmith-api/models/package_detail.rb +1090 -0
  167. data/lib/cloudsmith-api/models/package_license.rb +23 -4
  168. data/lib/cloudsmith-api/models/package_license_request_patch.rb +28 -4
  169. data/lib/cloudsmith-api/models/package_move.rb +42 -1
  170. data/lib/cloudsmith-api/models/package_move_request.rb +23 -4
  171. data/lib/cloudsmith-api/models/package_quarantine.rb +42 -1
  172. data/lib/cloudsmith-api/models/package_quarantine_request.rb +23 -4
  173. data/lib/cloudsmith-api/models/package_resync.rb +42 -1
  174. data/lib/cloudsmith-api/models/package_tag.rb +42 -1
  175. data/lib/cloudsmith-api/models/package_tag_request.rb +23 -4
  176. data/lib/cloudsmith-api/models/package_vulnerability.rb +23 -4
  177. data/lib/cloudsmith-api/models/python_package_upload.rb +42 -1
  178. data/lib/cloudsmith-api/models/python_package_upload_request.rb +23 -4
  179. data/lib/cloudsmith-api/models/raw_package_upload.rb +42 -1
  180. data/lib/cloudsmith-api/models/raw_package_upload_request.rb +23 -4
  181. data/lib/cloudsmith-api/models/recycle_bin_package.rb +23 -4
  182. data/lib/cloudsmith-api/models/rpm_package_upload.rb +42 -1
  183. data/lib/cloudsmith-api/models/rpm_package_upload_request.rb +23 -4
  184. data/lib/cloudsmith-api/models/ruby_package_upload.rb +42 -1
  185. data/lib/cloudsmith-api/models/ruby_package_upload_request.rb +23 -4
  186. data/lib/cloudsmith-api/models/swift_package_upload.rb +42 -1
  187. data/lib/cloudsmith-api/models/swift_package_upload_request.rb +23 -4
  188. data/lib/cloudsmith-api/models/terraform_package_upload.rb +42 -1
  189. data/lib/cloudsmith-api/models/terraform_package_upload_request.rb +23 -4
  190. data/lib/cloudsmith-api/models/vagrant_package_upload.rb +42 -1
  191. data/lib/cloudsmith-api/models/vagrant_package_upload_request.rb +23 -4
  192. data/lib/cloudsmith-api/models/vsx_package_upload.rb +42 -1
  193. data/lib/cloudsmith-api/models/vsx_package_upload_request.rb +23 -4
  194. data/lib/cloudsmith-api/models/web_osv_severity_counts.rb +239 -0
  195. data/lib/cloudsmith-api/version.rb +1 -1
  196. data/lib/cloudsmith-api.rb +16 -0
  197. data/spec/api/openid_api_spec.rb +48 -0
  198. data/spec/api/orgs_api_spec.rb +23 -0
  199. data/spec/api/packages_api_spec.rb +30 -2
  200. data/spec/api/repos_api_spec.rb +88 -1
  201. data/spec/api/user_api_spec.rb +1 -1
  202. data/spec/models/alpine_package_upload_request_spec.rb +12 -0
  203. data/spec/models/alpine_package_upload_spec.rb +24 -0
  204. data/spec/models/cargo_package_upload_request_spec.rb +12 -0
  205. data/spec/models/cargo_package_upload_spec.rb +24 -0
  206. data/spec/models/cocoapods_package_upload_request_spec.rb +12 -0
  207. data/spec/models/cocoapods_package_upload_spec.rb +24 -0
  208. data/spec/models/composer_package_upload_request_spec.rb +12 -0
  209. data/spec/models/composer_package_upload_spec.rb +24 -0
  210. data/spec/models/conan_package_upload_request_spec.rb +12 -0
  211. data/spec/models/conan_package_upload_spec.rb +24 -0
  212. data/spec/models/conda_package_upload_request_spec.rb +12 -0
  213. data/spec/models/conda_package_upload_spec.rb +24 -0
  214. data/spec/models/cran_package_upload_request_spec.rb +12 -0
  215. data/spec/models/cran_package_upload_spec.rb +24 -0
  216. data/spec/models/dart_package_upload_request_spec.rb +12 -0
  217. data/spec/models/dart_package_upload_spec.rb +24 -0
  218. data/spec/models/deb_package_upload_request_spec.rb +12 -0
  219. data/spec/models/deb_package_upload_spec.rb +24 -0
  220. data/spec/models/docker_package_upload_request_spec.rb +12 -0
  221. data/spec/models/docker_package_upload_spec.rb +24 -0
  222. data/spec/models/generic_package_upload_request_spec.rb +12 -0
  223. data/spec/models/generic_package_upload_spec.rb +24 -0
  224. data/spec/models/go_package_upload_request_spec.rb +12 -0
  225. data/spec/models/go_package_upload_spec.rb +24 -0
  226. data/spec/models/helm_package_upload_request_spec.rb +12 -0
  227. data/spec/models/helm_package_upload_spec.rb +24 -0
  228. data/spec/models/hex_package_upload_request_spec.rb +12 -0
  229. data/spec/models/hex_package_upload_spec.rb +24 -0
  230. data/spec/models/huggingface_package_upload_request_spec.rb +12 -0
  231. data/spec/models/huggingface_package_upload_spec.rb +24 -0
  232. data/spec/models/inline_response_200_1_spec.rb +13 -1
  233. data/spec/models/inline_response_200_3_spec.rb +41 -0
  234. data/spec/models/inline_response_200_4_spec.rb +41 -0
  235. data/spec/models/inline_response_200_spec.rb +25 -1
  236. data/spec/models/luarocks_package_upload_request_spec.rb +12 -0
  237. data/spec/models/luarocks_package_upload_spec.rb +24 -0
  238. data/spec/models/maven_package_upload_request_spec.rb +12 -0
  239. data/spec/models/maven_package_upload_spec.rb +24 -0
  240. data/spec/models/mcp_package_upload_request_spec.rb +12 -0
  241. data/spec/models/mcp_package_upload_spec.rb +24 -0
  242. data/spec/models/nix_package_upload_request_spec.rb +77 -0
  243. data/spec/models/nix_package_upload_spec.rb +579 -0
  244. data/spec/models/nix_upstream_request_patch_spec.rb +121 -0
  245. data/spec/models/nix_upstream_request_spec.rb +121 -0
  246. data/spec/models/nix_upstream_spec.rb +197 -0
  247. data/spec/models/npm_package_upload_request_spec.rb +12 -0
  248. data/spec/models/npm_package_upload_spec.rb +24 -0
  249. data/spec/models/nuget_package_upload_request_spec.rb +12 -0
  250. data/spec/models/nuget_package_upload_spec.rb +24 -0
  251. data/spec/models/oidc_1_spec.rb +41 -0
  252. data/spec/models/oidc_request_spec.rb +47 -0
  253. data/spec/models/oidc_spec.rb +35 -0
  254. data/spec/models/organization_usage_spec.rb +59 -0
  255. data/spec/models/organization_usage_update_request_patch_spec.rb +53 -0
  256. data/spec/models/organization_usage_update_spec.rb +53 -0
  257. data/spec/models/p2_package_upload_request_spec.rb +12 -0
  258. data/spec/models/p2_package_upload_spec.rb +24 -0
  259. data/spec/models/package_copy_request_spec.rb +12 -0
  260. data/spec/models/package_copy_spec.rb +24 -0
  261. data/spec/models/package_detail_spec.rb +597 -0
  262. data/spec/models/package_license_request_patch_spec.rb +12 -0
  263. data/spec/models/package_license_spec.rb +12 -0
  264. data/spec/models/package_move_request_spec.rb +12 -0
  265. data/spec/models/package_move_spec.rb +24 -0
  266. data/spec/models/package_quarantine_request_spec.rb +12 -0
  267. data/spec/models/package_quarantine_spec.rb +24 -0
  268. data/spec/models/package_resync_spec.rb +24 -0
  269. data/spec/models/package_spec.rb +24 -0
  270. data/spec/models/package_tag_request_spec.rb +12 -0
  271. data/spec/models/package_tag_spec.rb +24 -0
  272. data/spec/models/package_vulnerability_spec.rb +12 -0
  273. data/spec/models/python_package_upload_request_spec.rb +12 -0
  274. data/spec/models/python_package_upload_spec.rb +24 -0
  275. data/spec/models/raw_package_upload_request_spec.rb +12 -0
  276. data/spec/models/raw_package_upload_spec.rb +24 -0
  277. data/spec/models/recycle_bin_package_spec.rb +12 -0
  278. data/spec/models/rpm_package_upload_request_spec.rb +12 -0
  279. data/spec/models/rpm_package_upload_spec.rb +24 -0
  280. data/spec/models/ruby_package_upload_request_spec.rb +12 -0
  281. data/spec/models/ruby_package_upload_spec.rb +24 -0
  282. data/spec/models/swift_package_upload_request_spec.rb +12 -0
  283. data/spec/models/swift_package_upload_spec.rb +24 -0
  284. data/spec/models/terraform_package_upload_request_spec.rb +12 -0
  285. data/spec/models/terraform_package_upload_spec.rb +24 -0
  286. data/spec/models/vagrant_package_upload_request_spec.rb +12 -0
  287. data/spec/models/vagrant_package_upload_spec.rb +24 -0
  288. data/spec/models/vsx_package_upload_request_spec.rb +12 -0
  289. data/spec/models/vsx_package_upload_spec.rb +24 -0
  290. data/spec/models/web_osv_severity_counts_spec.rb +77 -0
  291. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.3.2/gem_make.out +1 -1
  292. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-4.1.2/gem_make.out +2 -2
  293. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-4.1.2/mkmf.log +4 -4
  294. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.17.4/gem_make.out +2 -2
  295. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.17.4/mkmf.log +1 -1
  296. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.6/gem_make.out +2 -2
  297. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.6/mkmf.log +1 -1
  298. data/vendor/bundle/ruby/2.6.0/gems/bigdecimal-4.1.2/ext/bigdecimal/Makefile +2 -2
  299. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.17.4/ext/ffi_c/Makefile +2 -2
  300. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.6/ext/json/ext/generator/Makefile +2 -2
  301. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.6/ext/json/ext/parser/Makefile +2 -2
  302. metadata +69 -5
@@ -0,0 +1,205 @@
1
+ =begin
2
+ #Cloudsmith API (v1)
3
+
4
+ #The API to the Cloudsmith Service
5
+
6
+ OpenAPI spec version: v1
7
+ Contact: support@cloudsmith.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.50
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudsmithApi
16
+ class OidcRequest
17
+ # Serialized OIDC token.
18
+ attr_accessor :oidc_token
19
+
20
+ # Slug for the service account.
21
+ attr_accessor :service_slug
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'oidc_token' => :'oidc_token',
27
+ :'service_slug' => :'service_slug'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'oidc_token' => :'String',
35
+ :'service_slug' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'oidc_token')
48
+ self.oidc_token = attributes[:'oidc_token']
49
+ end
50
+
51
+ if attributes.has_key?(:'service_slug')
52
+ self.service_slug = attributes[:'service_slug']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ if @oidc_token.nil?
61
+ invalid_properties.push('invalid value for "oidc_token", oidc_token cannot be nil.')
62
+ end
63
+
64
+ if @service_slug.nil?
65
+ invalid_properties.push('invalid value for "service_slug", service_slug cannot be nil.')
66
+ end
67
+
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ return false if @oidc_token.nil?
75
+ return false if @service_slug.nil?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ oidc_token == o.oidc_token &&
85
+ service_slug == o.service_slug
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Fixnum] Hash code
96
+ def hash
97
+ [oidc_token, service_slug].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def build_from_hash(attributes)
104
+ return nil unless attributes.is_a?(Hash)
105
+ self.class.swagger_types.each_pair do |key, type|
106
+ if type =~ /\AArray<(.*)>/i
107
+ # check to ensure the input is an array given that the attribute
108
+ # is documented as an array but the input is not
109
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
110
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
111
+ end
112
+ elsif !attributes[self.class.attribute_map[key]].nil?
113
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
114
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :BOOLEAN
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ temp_model = CloudsmithApi.const_get(type).new
158
+ temp_model.build_from_hash(value)
159
+ end
160
+ end
161
+
162
+ # Returns the string representation of the object
163
+ # @return [String] String presentation of the object
164
+ def to_s
165
+ to_hash.to_s
166
+ end
167
+
168
+ # to_body is an alias to to_hash (backward compatibility)
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_body
171
+ to_hash
172
+ end
173
+
174
+ # Returns the object in the form of hash
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_hash
177
+ hash = {}
178
+ self.class.attribute_map.each_pair do |attr, param|
179
+ value = self.send(attr)
180
+ next if value.nil?
181
+ hash[param] = _to_hash(value)
182
+ end
183
+ hash
184
+ end
185
+
186
+ # Outputs non-array value in the form of hash
187
+ # For object, use to_hash. Otherwise, just return the value
188
+ # @param [Object] value Any valid value
189
+ # @return [Hash] Returns the value in the form of hash
190
+ def _to_hash(value)
191
+ if value.is_a?(Array)
192
+ value.compact.map { |v| _to_hash(v) }
193
+ elsif value.is_a?(Hash)
194
+ {}.tap do |hash|
195
+ value.each { |k, v| hash[k] = _to_hash(v) }
196
+ end
197
+ elsif value.respond_to? :to_hash
198
+ value.to_hash
199
+ else
200
+ value
201
+ end
202
+ end
203
+
204
+ end
205
+ end
@@ -0,0 +1,215 @@
1
+ =begin
2
+ #Cloudsmith API (v1)
3
+
4
+ #The API to the Cloudsmith Service
5
+
6
+ OpenAPI spec version: v1
7
+ Contact: support@cloudsmith.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.50
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudsmithApi
16
+ class OrganizationUsage
17
+ # The maximum allowed package delivery overage in GB for this product.
18
+ attr_accessor :bandwidth_maximum
19
+
20
+ # The on-demand limit for package delivery usage (in GBs).
21
+ attr_accessor :bandwidth_overage_limit
22
+
23
+ # The maximum allowed artifact data overage in GB for this product.
24
+ attr_accessor :storage_maximum
25
+
26
+ # The on-demand limit for artifact data usage (in GBs).
27
+ attr_accessor :storage_overage_limit
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'bandwidth_maximum' => :'bandwidth_maximum',
33
+ :'bandwidth_overage_limit' => :'bandwidth_overage_limit',
34
+ :'storage_maximum' => :'storage_maximum',
35
+ :'storage_overage_limit' => :'storage_overage_limit'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'bandwidth_maximum' => :'Integer',
43
+ :'bandwidth_overage_limit' => :'Integer',
44
+ :'storage_maximum' => :'Integer',
45
+ :'storage_overage_limit' => :'Integer'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'bandwidth_maximum')
58
+ self.bandwidth_maximum = attributes[:'bandwidth_maximum']
59
+ end
60
+
61
+ if attributes.has_key?(:'bandwidth_overage_limit')
62
+ self.bandwidth_overage_limit = attributes[:'bandwidth_overage_limit']
63
+ end
64
+
65
+ if attributes.has_key?(:'storage_maximum')
66
+ self.storage_maximum = attributes[:'storage_maximum']
67
+ end
68
+
69
+ if attributes.has_key?(:'storage_overage_limit')
70
+ self.storage_overage_limit = attributes[:'storage_overage_limit']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ bandwidth_maximum == o.bandwidth_maximum &&
93
+ bandwidth_overage_limit == o.bandwidth_overage_limit &&
94
+ storage_maximum == o.storage_maximum &&
95
+ storage_overage_limit == o.storage_overage_limit
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Fixnum] Hash code
106
+ def hash
107
+ [bandwidth_maximum, bandwidth_overage_limit, storage_maximum, storage_overage_limit].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.swagger_types.each_pair do |key, type|
116
+ if type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :DateTime
137
+ DateTime.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :BOOLEAN
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ temp_model = CloudsmithApi.const_get(type).new
168
+ temp_model.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ next if value.nil?
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+ end
@@ -0,0 +1,202 @@
1
+ =begin
2
+ #Cloudsmith API (v1)
3
+
4
+ #The API to the Cloudsmith Service
5
+
6
+ OpenAPI spec version: v1
7
+ Contact: support@cloudsmith.io
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.50
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CloudsmithApi
16
+ class OrganizationUsageUpdate
17
+ attr_accessor :allow_open_source_overage
18
+
19
+ attr_accessor :bandwidth_overage_limit
20
+
21
+ attr_accessor :storage_overage_limit
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'allow_open_source_overage' => :'allow_open_source_overage',
27
+ :'bandwidth_overage_limit' => :'bandwidth_overage_limit',
28
+ :'storage_overage_limit' => :'storage_overage_limit'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.swagger_types
34
+ {
35
+ :'allow_open_source_overage' => :'BOOLEAN',
36
+ :'bandwidth_overage_limit' => :'Integer',
37
+ :'storage_overage_limit' => :'Integer'
38
+ }
39
+ end
40
+
41
+ # Initializes the object
42
+ # @param [Hash] attributes Model attributes in the form of hash
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
48
+
49
+ if attributes.has_key?(:'allow_open_source_overage')
50
+ self.allow_open_source_overage = attributes[:'allow_open_source_overage']
51
+ end
52
+
53
+ if attributes.has_key?(:'bandwidth_overage_limit')
54
+ self.bandwidth_overage_limit = attributes[:'bandwidth_overage_limit']
55
+ end
56
+
57
+ if attributes.has_key?(:'storage_overage_limit')
58
+ self.storage_overage_limit = attributes[:'storage_overage_limit']
59
+ end
60
+ end
61
+
62
+ # Show invalid properties with the reasons. Usually used together with valid?
63
+ # @return Array for valid properties with the reasons
64
+ def list_invalid_properties
65
+ invalid_properties = Array.new
66
+ invalid_properties
67
+ end
68
+
69
+ # Check to see if the all the properties in the model are valid
70
+ # @return true if the model is valid
71
+ def valid?
72
+ true
73
+ end
74
+
75
+ # Checks equality by comparing each attribute.
76
+ # @param [Object] Object to be compared
77
+ def ==(o)
78
+ return true if self.equal?(o)
79
+ self.class == o.class &&
80
+ allow_open_source_overage == o.allow_open_source_overage &&
81
+ bandwidth_overage_limit == o.bandwidth_overage_limit &&
82
+ storage_overage_limit == o.storage_overage_limit
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Fixnum] Hash code
93
+ def hash
94
+ [allow_open_source_overage, bandwidth_overage_limit, storage_overage_limit].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+ self.class.swagger_types.each_pair do |key, type|
103
+ if type =~ /\AArray<(.*)>/i
104
+ # check to ensure the input is an array given that the attribute
105
+ # is documented as an array but the input is not
106
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
107
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
108
+ end
109
+ elsif !attributes[self.class.attribute_map[key]].nil?
110
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
111
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
112
+ end
113
+
114
+ self
115
+ end
116
+
117
+ # Deserializes the data based on type
118
+ # @param string type Data type
119
+ # @param string value Value to be deserialized
120
+ # @return [Object] Deserialized data
121
+ def _deserialize(type, value)
122
+ case type.to_sym
123
+ when :DateTime
124
+ DateTime.parse(value)
125
+ when :Date
126
+ Date.parse(value)
127
+ when :String
128
+ value.to_s
129
+ when :Integer
130
+ value.to_i
131
+ when :Float
132
+ value.to_f
133
+ when :BOOLEAN
134
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
135
+ true
136
+ else
137
+ false
138
+ end
139
+ when :Object
140
+ # generic object (usually a Hash), return directly
141
+ value
142
+ when /\AArray<(?<inner_type>.+)>\z/
143
+ inner_type = Regexp.last_match[:inner_type]
144
+ value.map { |v| _deserialize(inner_type, v) }
145
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
146
+ k_type = Regexp.last_match[:k_type]
147
+ v_type = Regexp.last_match[:v_type]
148
+ {}.tap do |hash|
149
+ value.each do |k, v|
150
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
151
+ end
152
+ end
153
+ else # model
154
+ temp_model = CloudsmithApi.const_get(type).new
155
+ temp_model.build_from_hash(value)
156
+ end
157
+ end
158
+
159
+ # Returns the string representation of the object
160
+ # @return [String] String presentation of the object
161
+ def to_s
162
+ to_hash.to_s
163
+ end
164
+
165
+ # to_body is an alias to to_hash (backward compatibility)
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_body
168
+ to_hash
169
+ end
170
+
171
+ # Returns the object in the form of hash
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_hash
174
+ hash = {}
175
+ self.class.attribute_map.each_pair do |attr, param|
176
+ value = self.send(attr)
177
+ next if value.nil?
178
+ hash[param] = _to_hash(value)
179
+ end
180
+ hash
181
+ end
182
+
183
+ # Outputs non-array value in the form of hash
184
+ # For object, use to_hash. Otherwise, just return the value
185
+ # @param [Object] value Any valid value
186
+ # @return [Hash] Returns the value in the form of hash
187
+ def _to_hash(value)
188
+ if value.is_a?(Array)
189
+ value.compact.map { |v| _to_hash(v) }
190
+ elsif value.is_a?(Hash)
191
+ {}.tap do |hash|
192
+ value.each { |k, v| hash[k] = _to_hash(v) }
193
+ end
194
+ elsif value.respond_to? :to_hash
195
+ value.to_hash
196
+ else
197
+ value
198
+ end
199
+ end
200
+
201
+ end
202
+ end