cloudsmith-api 2.0.29 → 2.0.30

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 (290) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +26 -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/OrganizationUsage.md +11 -0
  56. data/docs/OrganizationUsageUpdate.md +10 -0
  57. data/docs/OrganizationUsageUpdateRequestPatch.md +10 -0
  58. data/docs/OrgsApi.md +120 -0
  59. data/docs/P2PackageUpload.md +4 -0
  60. data/docs/P2PackageUploadRequest.md +2 -0
  61. data/docs/Package.md +4 -0
  62. data/docs/PackageCopy.md +4 -0
  63. data/docs/PackageCopyRequest.md +2 -0
  64. data/docs/PackageDetail.md +100 -0
  65. data/docs/PackageLicense.md +2 -0
  66. data/docs/PackageLicenseRequestPatch.md +3 -1
  67. data/docs/PackageMove.md +4 -0
  68. data/docs/PackageMoveRequest.md +2 -0
  69. data/docs/PackageQuarantine.md +4 -0
  70. data/docs/PackageQuarantineRequest.md +2 -0
  71. data/docs/PackageResync.md +4 -0
  72. data/docs/PackageTag.md +4 -0
  73. data/docs/PackageTagRequest.md +2 -0
  74. data/docs/PackageVulnerability.md +2 -0
  75. data/docs/PackagesApi.md +135 -4
  76. data/docs/PythonPackageUpload.md +4 -0
  77. data/docs/PythonPackageUploadRequest.md +2 -0
  78. data/docs/RawPackageUpload.md +4 -0
  79. data/docs/RawPackageUploadRequest.md +2 -0
  80. data/docs/RecycleBinPackage.md +2 -0
  81. data/docs/ReposApi.md +403 -2
  82. data/docs/RpmPackageUpload.md +4 -0
  83. data/docs/RpmPackageUploadRequest.md +2 -0
  84. data/docs/RubyPackageUpload.md +4 -0
  85. data/docs/RubyPackageUploadRequest.md +2 -0
  86. data/docs/SwiftPackageUpload.md +4 -0
  87. data/docs/SwiftPackageUploadRequest.md +2 -0
  88. data/docs/TerraformPackageUpload.md +4 -0
  89. data/docs/TerraformPackageUploadRequest.md +2 -0
  90. data/docs/UserApi.md +2 -2
  91. data/docs/VagrantPackageUpload.md +4 -0
  92. data/docs/VagrantPackageUploadRequest.md +2 -0
  93. data/docs/VsxPackageUpload.md +4 -0
  94. data/docs/VsxPackageUploadRequest.md +2 -0
  95. data/docs/WebOSVSeverityCounts.md +14 -0
  96. data/lib/cloudsmith-api/api/orgs_api.rb +106 -0
  97. data/lib/cloudsmith-api/api/packages_api.rb +129 -6
  98. data/lib/cloudsmith-api/api/repos_api.rb +398 -3
  99. data/lib/cloudsmith-api/api/user_api.rb +3 -3
  100. data/lib/cloudsmith-api/models/alpine_package_upload.rb +42 -1
  101. data/lib/cloudsmith-api/models/alpine_package_upload_request.rb +23 -4
  102. data/lib/cloudsmith-api/models/cargo_package_upload.rb +42 -1
  103. data/lib/cloudsmith-api/models/cargo_package_upload_request.rb +23 -4
  104. data/lib/cloudsmith-api/models/cocoapods_package_upload.rb +42 -1
  105. data/lib/cloudsmith-api/models/cocoapods_package_upload_request.rb +23 -4
  106. data/lib/cloudsmith-api/models/composer_package_upload.rb +42 -1
  107. data/lib/cloudsmith-api/models/composer_package_upload_request.rb +23 -4
  108. data/lib/cloudsmith-api/models/conan_package_upload.rb +42 -1
  109. data/lib/cloudsmith-api/models/conan_package_upload_request.rb +23 -4
  110. data/lib/cloudsmith-api/models/conda_package_upload.rb +42 -1
  111. data/lib/cloudsmith-api/models/conda_package_upload_request.rb +23 -4
  112. data/lib/cloudsmith-api/models/cran_package_upload.rb +42 -1
  113. data/lib/cloudsmith-api/models/cran_package_upload_request.rb +23 -4
  114. data/lib/cloudsmith-api/models/dart_package_upload.rb +42 -1
  115. data/lib/cloudsmith-api/models/dart_package_upload_request.rb +23 -4
  116. data/lib/cloudsmith-api/models/deb_package_upload.rb +42 -1
  117. data/lib/cloudsmith-api/models/deb_package_upload_request.rb +23 -4
  118. data/lib/cloudsmith-api/models/docker_package_upload.rb +42 -1
  119. data/lib/cloudsmith-api/models/docker_package_upload_request.rb +23 -4
  120. data/lib/cloudsmith-api/models/generic_package_upload.rb +42 -1
  121. data/lib/cloudsmith-api/models/generic_package_upload_request.rb +23 -4
  122. data/lib/cloudsmith-api/models/go_package_upload.rb +42 -1
  123. data/lib/cloudsmith-api/models/go_package_upload_request.rb +23 -4
  124. data/lib/cloudsmith-api/models/helm_package_upload.rb +42 -1
  125. data/lib/cloudsmith-api/models/helm_package_upload_request.rb +23 -4
  126. data/lib/cloudsmith-api/models/hex_package_upload.rb +42 -1
  127. data/lib/cloudsmith-api/models/hex_package_upload_request.rb +23 -4
  128. data/lib/cloudsmith-api/models/huggingface_package_upload.rb +42 -1
  129. data/lib/cloudsmith-api/models/huggingface_package_upload_request.rb +23 -4
  130. data/lib/cloudsmith-api/models/inline_response_200.rb +48 -14
  131. data/lib/cloudsmith-api/models/inline_response_200_1.rb +28 -14
  132. data/lib/cloudsmith-api/models/inline_response_200_2.rb +1 -1
  133. data/lib/cloudsmith-api/models/inline_response_200_3.rb +191 -0
  134. data/lib/cloudsmith-api/models/inline_response_200_4.rb +191 -0
  135. data/lib/cloudsmith-api/models/luarocks_package_upload.rb +42 -1
  136. data/lib/cloudsmith-api/models/luarocks_package_upload_request.rb +23 -4
  137. data/lib/cloudsmith-api/models/maven_package_upload.rb +42 -1
  138. data/lib/cloudsmith-api/models/maven_package_upload_request.rb +23 -4
  139. data/lib/cloudsmith-api/models/mcp_package_upload.rb +42 -1
  140. data/lib/cloudsmith-api/models/mcp_package_upload_request.rb +23 -4
  141. data/lib/cloudsmith-api/models/nix_package_upload.rb +1061 -0
  142. data/lib/cloudsmith-api/models/nix_package_upload_request.rb +249 -0
  143. data/lib/cloudsmith-api/models/nix_upstream.rb +496 -0
  144. data/lib/cloudsmith-api/models/nix_upstream_request.rb +365 -0
  145. data/lib/cloudsmith-api/models/nix_upstream_request_patch.rb +355 -0
  146. data/lib/cloudsmith-api/models/npm_package_upload.rb +42 -1
  147. data/lib/cloudsmith-api/models/npm_package_upload_request.rb +23 -4
  148. data/lib/cloudsmith-api/models/nuget_package_upload.rb +42 -1
  149. data/lib/cloudsmith-api/models/nuget_package_upload_request.rb +23 -4
  150. data/lib/cloudsmith-api/models/organization_usage.rb +215 -0
  151. data/lib/cloudsmith-api/models/organization_usage_update.rb +202 -0
  152. data/lib/cloudsmith-api/models/organization_usage_update_request_patch.rb +202 -0
  153. data/lib/cloudsmith-api/models/p2_package_upload.rb +42 -1
  154. data/lib/cloudsmith-api/models/p2_package_upload_request.rb +23 -4
  155. data/lib/cloudsmith-api/models/package.rb +42 -1
  156. data/lib/cloudsmith-api/models/package_copy.rb +42 -1
  157. data/lib/cloudsmith-api/models/package_copy_request.rb +23 -4
  158. data/lib/cloudsmith-api/models/package_detail.rb +1090 -0
  159. data/lib/cloudsmith-api/models/package_license.rb +23 -4
  160. data/lib/cloudsmith-api/models/package_license_request_patch.rb +28 -4
  161. data/lib/cloudsmith-api/models/package_move.rb +42 -1
  162. data/lib/cloudsmith-api/models/package_move_request.rb +23 -4
  163. data/lib/cloudsmith-api/models/package_quarantine.rb +42 -1
  164. data/lib/cloudsmith-api/models/package_quarantine_request.rb +23 -4
  165. data/lib/cloudsmith-api/models/package_resync.rb +42 -1
  166. data/lib/cloudsmith-api/models/package_tag.rb +42 -1
  167. data/lib/cloudsmith-api/models/package_tag_request.rb +23 -4
  168. data/lib/cloudsmith-api/models/package_vulnerability.rb +23 -4
  169. data/lib/cloudsmith-api/models/python_package_upload.rb +42 -1
  170. data/lib/cloudsmith-api/models/python_package_upload_request.rb +23 -4
  171. data/lib/cloudsmith-api/models/raw_package_upload.rb +42 -1
  172. data/lib/cloudsmith-api/models/raw_package_upload_request.rb +23 -4
  173. data/lib/cloudsmith-api/models/recycle_bin_package.rb +23 -4
  174. data/lib/cloudsmith-api/models/rpm_package_upload.rb +42 -1
  175. data/lib/cloudsmith-api/models/rpm_package_upload_request.rb +23 -4
  176. data/lib/cloudsmith-api/models/ruby_package_upload.rb +42 -1
  177. data/lib/cloudsmith-api/models/ruby_package_upload_request.rb +23 -4
  178. data/lib/cloudsmith-api/models/swift_package_upload.rb +42 -1
  179. data/lib/cloudsmith-api/models/swift_package_upload_request.rb +23 -4
  180. data/lib/cloudsmith-api/models/terraform_package_upload.rb +42 -1
  181. data/lib/cloudsmith-api/models/terraform_package_upload_request.rb +23 -4
  182. data/lib/cloudsmith-api/models/vagrant_package_upload.rb +42 -1
  183. data/lib/cloudsmith-api/models/vagrant_package_upload_request.rb +23 -4
  184. data/lib/cloudsmith-api/models/vsx_package_upload.rb +42 -1
  185. data/lib/cloudsmith-api/models/vsx_package_upload_request.rb +23 -4
  186. data/lib/cloudsmith-api/models/web_osv_severity_counts.rb +239 -0
  187. data/lib/cloudsmith-api/version.rb +1 -1
  188. data/lib/cloudsmith-api.rb +12 -0
  189. data/spec/api/orgs_api_spec.rb +23 -0
  190. data/spec/api/packages_api_spec.rb +30 -2
  191. data/spec/api/repos_api_spec.rb +88 -1
  192. data/spec/api/user_api_spec.rb +1 -1
  193. data/spec/models/alpine_package_upload_request_spec.rb +12 -0
  194. data/spec/models/alpine_package_upload_spec.rb +24 -0
  195. data/spec/models/cargo_package_upload_request_spec.rb +12 -0
  196. data/spec/models/cargo_package_upload_spec.rb +24 -0
  197. data/spec/models/cocoapods_package_upload_request_spec.rb +12 -0
  198. data/spec/models/cocoapods_package_upload_spec.rb +24 -0
  199. data/spec/models/composer_package_upload_request_spec.rb +12 -0
  200. data/spec/models/composer_package_upload_spec.rb +24 -0
  201. data/spec/models/conan_package_upload_request_spec.rb +12 -0
  202. data/spec/models/conan_package_upload_spec.rb +24 -0
  203. data/spec/models/conda_package_upload_request_spec.rb +12 -0
  204. data/spec/models/conda_package_upload_spec.rb +24 -0
  205. data/spec/models/cran_package_upload_request_spec.rb +12 -0
  206. data/spec/models/cran_package_upload_spec.rb +24 -0
  207. data/spec/models/dart_package_upload_request_spec.rb +12 -0
  208. data/spec/models/dart_package_upload_spec.rb +24 -0
  209. data/spec/models/deb_package_upload_request_spec.rb +12 -0
  210. data/spec/models/deb_package_upload_spec.rb +24 -0
  211. data/spec/models/docker_package_upload_request_spec.rb +12 -0
  212. data/spec/models/docker_package_upload_spec.rb +24 -0
  213. data/spec/models/generic_package_upload_request_spec.rb +12 -0
  214. data/spec/models/generic_package_upload_spec.rb +24 -0
  215. data/spec/models/go_package_upload_request_spec.rb +12 -0
  216. data/spec/models/go_package_upload_spec.rb +24 -0
  217. data/spec/models/helm_package_upload_request_spec.rb +12 -0
  218. data/spec/models/helm_package_upload_spec.rb +24 -0
  219. data/spec/models/hex_package_upload_request_spec.rb +12 -0
  220. data/spec/models/hex_package_upload_spec.rb +24 -0
  221. data/spec/models/huggingface_package_upload_request_spec.rb +12 -0
  222. data/spec/models/huggingface_package_upload_spec.rb +24 -0
  223. data/spec/models/inline_response_200_1_spec.rb +13 -1
  224. data/spec/models/inline_response_200_3_spec.rb +41 -0
  225. data/spec/models/inline_response_200_4_spec.rb +41 -0
  226. data/spec/models/inline_response_200_spec.rb +25 -1
  227. data/spec/models/luarocks_package_upload_request_spec.rb +12 -0
  228. data/spec/models/luarocks_package_upload_spec.rb +24 -0
  229. data/spec/models/maven_package_upload_request_spec.rb +12 -0
  230. data/spec/models/maven_package_upload_spec.rb +24 -0
  231. data/spec/models/mcp_package_upload_request_spec.rb +12 -0
  232. data/spec/models/mcp_package_upload_spec.rb +24 -0
  233. data/spec/models/nix_package_upload_request_spec.rb +77 -0
  234. data/spec/models/nix_package_upload_spec.rb +579 -0
  235. data/spec/models/nix_upstream_request_patch_spec.rb +121 -0
  236. data/spec/models/nix_upstream_request_spec.rb +121 -0
  237. data/spec/models/nix_upstream_spec.rb +197 -0
  238. data/spec/models/npm_package_upload_request_spec.rb +12 -0
  239. data/spec/models/npm_package_upload_spec.rb +24 -0
  240. data/spec/models/nuget_package_upload_request_spec.rb +12 -0
  241. data/spec/models/nuget_package_upload_spec.rb +24 -0
  242. data/spec/models/organization_usage_spec.rb +59 -0
  243. data/spec/models/organization_usage_update_request_patch_spec.rb +53 -0
  244. data/spec/models/organization_usage_update_spec.rb +53 -0
  245. data/spec/models/p2_package_upload_request_spec.rb +12 -0
  246. data/spec/models/p2_package_upload_spec.rb +24 -0
  247. data/spec/models/package_copy_request_spec.rb +12 -0
  248. data/spec/models/package_copy_spec.rb +24 -0
  249. data/spec/models/package_detail_spec.rb +597 -0
  250. data/spec/models/package_license_request_patch_spec.rb +12 -0
  251. data/spec/models/package_license_spec.rb +12 -0
  252. data/spec/models/package_move_request_spec.rb +12 -0
  253. data/spec/models/package_move_spec.rb +24 -0
  254. data/spec/models/package_quarantine_request_spec.rb +12 -0
  255. data/spec/models/package_quarantine_spec.rb +24 -0
  256. data/spec/models/package_resync_spec.rb +24 -0
  257. data/spec/models/package_spec.rb +24 -0
  258. data/spec/models/package_tag_request_spec.rb +12 -0
  259. data/spec/models/package_tag_spec.rb +24 -0
  260. data/spec/models/package_vulnerability_spec.rb +12 -0
  261. data/spec/models/python_package_upload_request_spec.rb +12 -0
  262. data/spec/models/python_package_upload_spec.rb +24 -0
  263. data/spec/models/raw_package_upload_request_spec.rb +12 -0
  264. data/spec/models/raw_package_upload_spec.rb +24 -0
  265. data/spec/models/recycle_bin_package_spec.rb +12 -0
  266. data/spec/models/rpm_package_upload_request_spec.rb +12 -0
  267. data/spec/models/rpm_package_upload_spec.rb +24 -0
  268. data/spec/models/ruby_package_upload_request_spec.rb +12 -0
  269. data/spec/models/ruby_package_upload_spec.rb +24 -0
  270. data/spec/models/swift_package_upload_request_spec.rb +12 -0
  271. data/spec/models/swift_package_upload_spec.rb +24 -0
  272. data/spec/models/terraform_package_upload_request_spec.rb +12 -0
  273. data/spec/models/terraform_package_upload_spec.rb +24 -0
  274. data/spec/models/vagrant_package_upload_request_spec.rb +12 -0
  275. data/spec/models/vagrant_package_upload_spec.rb +24 -0
  276. data/spec/models/vsx_package_upload_request_spec.rb +12 -0
  277. data/spec/models/vsx_package_upload_spec.rb +24 -0
  278. data/spec/models/web_osv_severity_counts_spec.rb +77 -0
  279. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.3.2/gem_make.out +1 -1
  280. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-4.1.2/gem_make.out +2 -2
  281. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bigdecimal-4.1.2/mkmf.log +4 -4
  282. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.17.4/gem_make.out +2 -2
  283. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.17.4/mkmf.log +1 -1
  284. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.6/gem_make.out +2 -2
  285. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.7.6/mkmf.log +1 -1
  286. data/vendor/bundle/ruby/2.6.0/gems/bigdecimal-4.1.2/ext/bigdecimal/Makefile +2 -2
  287. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.17.4/ext/ffi_c/Makefile +2 -2
  288. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.6/ext/json/ext/generator/Makefile +2 -2
  289. data/vendor/bundle/ruby/2.6.0/gems/json-2.7.6/ext/json/ext/parser/Makefile +2 -2
  290. metadata +51 -3
@@ -0,0 +1,1090 @@
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 PackageDetail
17
+ attr_accessor :architectures
18
+
19
+ attr_accessor :cdn_url
20
+
21
+ attr_accessor :checksum_md5
22
+
23
+ attr_accessor :checksum_sha1
24
+
25
+ attr_accessor :checksum_sha256
26
+
27
+ attr_accessor :checksum_sha512
28
+
29
+ # A checksum of all of the package's dependencies.
30
+ attr_accessor :dependencies_checksum_md5
31
+
32
+ attr_accessor :dependencies_url
33
+
34
+ # A textual description of this package.
35
+ attr_accessor :description
36
+
37
+ attr_accessor :display_name
38
+
39
+ attr_accessor :distro
40
+
41
+ attr_accessor :distro_version
42
+
43
+ attr_accessor :downloads
44
+
45
+ # The epoch of the package version (if any).
46
+ attr_accessor :epoch
47
+
48
+ attr_accessor :extension
49
+
50
+ attr_accessor :filename
51
+
52
+ # Full path to the file, including filename e.g. bin/utils/tool.tar.gz
53
+ attr_accessor :filepath
54
+
55
+ attr_accessor :files
56
+
57
+ attr_accessor :format
58
+
59
+ attr_accessor :format_url
60
+
61
+ # Amount of storage that will be freed if this package is deleted
62
+ attr_accessor :freeable_storage
63
+
64
+ attr_accessor :fully_qualified_name
65
+
66
+ # Whether the package has any dependencies (top-level or from its SBOM).
67
+ attr_accessor :has_dependencies
68
+
69
+ # Unique and permanent identifier for the package.
70
+ attr_accessor :identifier_perm
71
+
72
+ # Return a map of identifier field names and their values.
73
+ attr_accessor :identifiers
74
+
75
+ attr_accessor :indexed
76
+
77
+ attr_accessor :is_cancellable
78
+
79
+ attr_accessor :is_copyable
80
+
81
+ attr_accessor :is_deleteable
82
+
83
+ attr_accessor :is_downloadable
84
+
85
+ attr_accessor :is_hidden
86
+
87
+ # Whether the package has been detected as containing malware. Requires Ultra plan.
88
+ attr_accessor :is_malware_detected
89
+
90
+ attr_accessor :is_moveable
91
+
92
+ attr_accessor :is_quarantinable
93
+
94
+ attr_accessor :is_quarantined
95
+
96
+ attr_accessor :is_resyncable
97
+
98
+ attr_accessor :is_security_scannable
99
+
100
+ attr_accessor :is_sync_awaiting
101
+
102
+ attr_accessor :is_sync_completed
103
+
104
+ attr_accessor :is_sync_failed
105
+
106
+ attr_accessor :is_sync_in_flight
107
+
108
+ attr_accessor :is_sync_in_progress
109
+
110
+ # The license of this package.
111
+ attr_accessor :license
112
+
113
+ # The name of this package.
114
+ attr_accessor :name
115
+
116
+ attr_accessor :namespace
117
+
118
+ attr_accessor :namespace_url
119
+
120
+ attr_accessor :num_files
121
+
122
+ attr_accessor :origin_repository
123
+
124
+ attr_accessor :origin_repository_url
125
+
126
+ # Whether the package's SPDX license is OSI-approved.
127
+ attr_accessor :osi_approved
128
+
129
+ # The type of package contents.
130
+ attr_accessor :package_type
131
+
132
+ # Whether or not the package has violated any policy.
133
+ attr_accessor :policy_violated
134
+
135
+ # The raw license string.
136
+ attr_accessor :raw_license
137
+
138
+ # The release of the package version (if any).
139
+ attr_accessor :release
140
+
141
+ attr_accessor :repository
142
+
143
+ attr_accessor :repository_url
144
+
145
+ # The datetime the security scanning was completed.
146
+ attr_accessor :security_scan_completed_at
147
+
148
+ # The datetime the security scanning was started.
149
+ attr_accessor :security_scan_started_at
150
+
151
+ attr_accessor :security_scan_status
152
+
153
+ # The datetime the security scanning status was updated.
154
+ attr_accessor :security_scan_status_updated_at
155
+
156
+ attr_accessor :self_html_url
157
+
158
+ attr_accessor :self_url
159
+
160
+ attr_accessor :self_webapp_url
161
+
162
+ attr_accessor :signature_url
163
+
164
+ # The calculated size of the package.
165
+ attr_accessor :size
166
+
167
+ # The public unique identifier for the package.
168
+ attr_accessor :slug
169
+
170
+ attr_accessor :slug_perm
171
+
172
+ # The SPDX license identifier for this package.
173
+ attr_accessor :spdx_license
174
+
175
+ # The synchronisation (in progress) stage of the package.
176
+ attr_accessor :stage
177
+
178
+ attr_accessor :stage_str
179
+
180
+ # The datetime the package stage was updated at.
181
+ attr_accessor :stage_updated_at
182
+
183
+ # The synchronisation status of the package.
184
+ attr_accessor :status
185
+
186
+ # A textual description for the synchronous status reason (if any
187
+ attr_accessor :status_reason
188
+
189
+ attr_accessor :status_str
190
+
191
+ # The datetime the package status was updated at.
192
+ attr_accessor :status_updated_at
193
+
194
+ attr_accessor :status_url
195
+
196
+ # Absolute store path for the package, including store hash and name.
197
+ attr_accessor :store_path
198
+
199
+ attr_accessor :subtype
200
+
201
+ # A one-liner synopsis of this package.
202
+ attr_accessor :summary
203
+
204
+ # The datetime the package sync was finished at.
205
+ attr_accessor :sync_finished_at
206
+
207
+ # Synchronisation progress (from 0-100)
208
+ attr_accessor :sync_progress
209
+
210
+ attr_accessor :tags
211
+
212
+ attr_accessor :tags_automatic
213
+
214
+ attr_accessor :tags_immutable
215
+
216
+ # All static tags on the package, grouped by context. Static tags are derived from the package's properties at request time and carry a 'context' (rather than a tag type). Includes format-specific badges and the package's architecture, subtype, and extension.
217
+ attr_accessor :tags_static
218
+
219
+ attr_accessor :type_display
220
+
221
+ # The date this package was uploaded.
222
+ attr_accessor :uploaded_at
223
+
224
+ attr_accessor :uploader
225
+
226
+ attr_accessor :uploader_url
227
+
228
+ # The raw version for this package.
229
+ attr_accessor :version
230
+
231
+ attr_accessor :version_orig
232
+
233
+ attr_accessor :vulnerability_counts
234
+
235
+ attr_accessor :vulnerability_scan_results_url
236
+
237
+ class EnumAttributeValidator
238
+ attr_reader :datatype
239
+ attr_reader :allowable_values
240
+
241
+ def initialize(datatype, allowable_values)
242
+ @allowable_values = allowable_values.map do |value|
243
+ case datatype.to_s
244
+ when /Integer/i
245
+ value.to_i
246
+ when /Float/i
247
+ value.to_f
248
+ else
249
+ value
250
+ end
251
+ end
252
+ end
253
+
254
+ def valid?(value)
255
+ !value || allowable_values.include?(value)
256
+ end
257
+ end
258
+
259
+ # Attribute mapping from ruby-style variable name to JSON key.
260
+ def self.attribute_map
261
+ {
262
+ :'architectures' => :'architectures',
263
+ :'cdn_url' => :'cdn_url',
264
+ :'checksum_md5' => :'checksum_md5',
265
+ :'checksum_sha1' => :'checksum_sha1',
266
+ :'checksum_sha256' => :'checksum_sha256',
267
+ :'checksum_sha512' => :'checksum_sha512',
268
+ :'dependencies_checksum_md5' => :'dependencies_checksum_md5',
269
+ :'dependencies_url' => :'dependencies_url',
270
+ :'description' => :'description',
271
+ :'display_name' => :'display_name',
272
+ :'distro' => :'distro',
273
+ :'distro_version' => :'distro_version',
274
+ :'downloads' => :'downloads',
275
+ :'epoch' => :'epoch',
276
+ :'extension' => :'extension',
277
+ :'filename' => :'filename',
278
+ :'filepath' => :'filepath',
279
+ :'files' => :'files',
280
+ :'format' => :'format',
281
+ :'format_url' => :'format_url',
282
+ :'freeable_storage' => :'freeable_storage',
283
+ :'fully_qualified_name' => :'fully_qualified_name',
284
+ :'has_dependencies' => :'has_dependencies',
285
+ :'identifier_perm' => :'identifier_perm',
286
+ :'identifiers' => :'identifiers',
287
+ :'indexed' => :'indexed',
288
+ :'is_cancellable' => :'is_cancellable',
289
+ :'is_copyable' => :'is_copyable',
290
+ :'is_deleteable' => :'is_deleteable',
291
+ :'is_downloadable' => :'is_downloadable',
292
+ :'is_hidden' => :'is_hidden',
293
+ :'is_malware_detected' => :'is_malware_detected',
294
+ :'is_moveable' => :'is_moveable',
295
+ :'is_quarantinable' => :'is_quarantinable',
296
+ :'is_quarantined' => :'is_quarantined',
297
+ :'is_resyncable' => :'is_resyncable',
298
+ :'is_security_scannable' => :'is_security_scannable',
299
+ :'is_sync_awaiting' => :'is_sync_awaiting',
300
+ :'is_sync_completed' => :'is_sync_completed',
301
+ :'is_sync_failed' => :'is_sync_failed',
302
+ :'is_sync_in_flight' => :'is_sync_in_flight',
303
+ :'is_sync_in_progress' => :'is_sync_in_progress',
304
+ :'license' => :'license',
305
+ :'name' => :'name',
306
+ :'namespace' => :'namespace',
307
+ :'namespace_url' => :'namespace_url',
308
+ :'num_files' => :'num_files',
309
+ :'origin_repository' => :'origin_repository',
310
+ :'origin_repository_url' => :'origin_repository_url',
311
+ :'osi_approved' => :'osi_approved',
312
+ :'package_type' => :'package_type',
313
+ :'policy_violated' => :'policy_violated',
314
+ :'raw_license' => :'raw_license',
315
+ :'release' => :'release',
316
+ :'repository' => :'repository',
317
+ :'repository_url' => :'repository_url',
318
+ :'security_scan_completed_at' => :'security_scan_completed_at',
319
+ :'security_scan_started_at' => :'security_scan_started_at',
320
+ :'security_scan_status' => :'security_scan_status',
321
+ :'security_scan_status_updated_at' => :'security_scan_status_updated_at',
322
+ :'self_html_url' => :'self_html_url',
323
+ :'self_url' => :'self_url',
324
+ :'self_webapp_url' => :'self_webapp_url',
325
+ :'signature_url' => :'signature_url',
326
+ :'size' => :'size',
327
+ :'slug' => :'slug',
328
+ :'slug_perm' => :'slug_perm',
329
+ :'spdx_license' => :'spdx_license',
330
+ :'stage' => :'stage',
331
+ :'stage_str' => :'stage_str',
332
+ :'stage_updated_at' => :'stage_updated_at',
333
+ :'status' => :'status',
334
+ :'status_reason' => :'status_reason',
335
+ :'status_str' => :'status_str',
336
+ :'status_updated_at' => :'status_updated_at',
337
+ :'status_url' => :'status_url',
338
+ :'store_path' => :'store_path',
339
+ :'subtype' => :'subtype',
340
+ :'summary' => :'summary',
341
+ :'sync_finished_at' => :'sync_finished_at',
342
+ :'sync_progress' => :'sync_progress',
343
+ :'tags' => :'tags',
344
+ :'tags_automatic' => :'tags_automatic',
345
+ :'tags_immutable' => :'tags_immutable',
346
+ :'tags_static' => :'tags_static',
347
+ :'type_display' => :'type_display',
348
+ :'uploaded_at' => :'uploaded_at',
349
+ :'uploader' => :'uploader',
350
+ :'uploader_url' => :'uploader_url',
351
+ :'version' => :'version',
352
+ :'version_orig' => :'version_orig',
353
+ :'vulnerability_counts' => :'vulnerability_counts',
354
+ :'vulnerability_scan_results_url' => :'vulnerability_scan_results_url'
355
+ }
356
+ end
357
+
358
+ # Attribute type mapping.
359
+ def self.swagger_types
360
+ {
361
+ :'architectures' => :'Array<Architecture>',
362
+ :'cdn_url' => :'String',
363
+ :'checksum_md5' => :'String',
364
+ :'checksum_sha1' => :'String',
365
+ :'checksum_sha256' => :'String',
366
+ :'checksum_sha512' => :'String',
367
+ :'dependencies_checksum_md5' => :'String',
368
+ :'dependencies_url' => :'String',
369
+ :'description' => :'String',
370
+ :'display_name' => :'String',
371
+ :'distro' => :'Distribution',
372
+ :'distro_version' => :'DistributionVersion',
373
+ :'downloads' => :'Integer',
374
+ :'epoch' => :'Integer',
375
+ :'extension' => :'String',
376
+ :'filename' => :'String',
377
+ :'filepath' => :'String',
378
+ :'files' => :'Array<PackageFile>',
379
+ :'format' => :'String',
380
+ :'format_url' => :'String',
381
+ :'freeable_storage' => :'Integer',
382
+ :'fully_qualified_name' => :'String',
383
+ :'has_dependencies' => :'BOOLEAN',
384
+ :'identifier_perm' => :'String',
385
+ :'identifiers' => :'Hash<String, String>',
386
+ :'indexed' => :'BOOLEAN',
387
+ :'is_cancellable' => :'BOOLEAN',
388
+ :'is_copyable' => :'BOOLEAN',
389
+ :'is_deleteable' => :'BOOLEAN',
390
+ :'is_downloadable' => :'BOOLEAN',
391
+ :'is_hidden' => :'BOOLEAN',
392
+ :'is_malware_detected' => :'BOOLEAN',
393
+ :'is_moveable' => :'BOOLEAN',
394
+ :'is_quarantinable' => :'BOOLEAN',
395
+ :'is_quarantined' => :'BOOLEAN',
396
+ :'is_resyncable' => :'BOOLEAN',
397
+ :'is_security_scannable' => :'BOOLEAN',
398
+ :'is_sync_awaiting' => :'BOOLEAN',
399
+ :'is_sync_completed' => :'BOOLEAN',
400
+ :'is_sync_failed' => :'BOOLEAN',
401
+ :'is_sync_in_flight' => :'BOOLEAN',
402
+ :'is_sync_in_progress' => :'BOOLEAN',
403
+ :'license' => :'String',
404
+ :'name' => :'String',
405
+ :'namespace' => :'String',
406
+ :'namespace_url' => :'String',
407
+ :'num_files' => :'Integer',
408
+ :'origin_repository' => :'String',
409
+ :'origin_repository_url' => :'String',
410
+ :'osi_approved' => :'BOOLEAN',
411
+ :'package_type' => :'Integer',
412
+ :'policy_violated' => :'BOOLEAN',
413
+ :'raw_license' => :'String',
414
+ :'release' => :'String',
415
+ :'repository' => :'String',
416
+ :'repository_url' => :'String',
417
+ :'security_scan_completed_at' => :'DateTime',
418
+ :'security_scan_started_at' => :'DateTime',
419
+ :'security_scan_status' => :'String',
420
+ :'security_scan_status_updated_at' => :'DateTime',
421
+ :'self_html_url' => :'String',
422
+ :'self_url' => :'String',
423
+ :'self_webapp_url' => :'String',
424
+ :'signature_url' => :'String',
425
+ :'size' => :'Integer',
426
+ :'slug' => :'String',
427
+ :'slug_perm' => :'String',
428
+ :'spdx_license' => :'String',
429
+ :'stage' => :'Integer',
430
+ :'stage_str' => :'String',
431
+ :'stage_updated_at' => :'DateTime',
432
+ :'status' => :'Integer',
433
+ :'status_reason' => :'String',
434
+ :'status_str' => :'String',
435
+ :'status_updated_at' => :'DateTime',
436
+ :'status_url' => :'String',
437
+ :'store_path' => :'String',
438
+ :'subtype' => :'String',
439
+ :'summary' => :'String',
440
+ :'sync_finished_at' => :'DateTime',
441
+ :'sync_progress' => :'Integer',
442
+ :'tags' => :'Tags',
443
+ :'tags_automatic' => :'Tags',
444
+ :'tags_immutable' => :'Tags',
445
+ :'tags_static' => :'Hash<String, Array<String>>',
446
+ :'type_display' => :'String',
447
+ :'uploaded_at' => :'DateTime',
448
+ :'uploader' => :'String',
449
+ :'uploader_url' => :'String',
450
+ :'version' => :'String',
451
+ :'version_orig' => :'String',
452
+ :'vulnerability_counts' => :'WebOSVSeverityCounts',
453
+ :'vulnerability_scan_results_url' => :'String'
454
+ }
455
+ end
456
+
457
+ # Initializes the object
458
+ # @param [Hash] attributes Model attributes in the form of hash
459
+ def initialize(attributes = {})
460
+ return unless attributes.is_a?(Hash)
461
+
462
+ # convert string to symbol for hash key
463
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
464
+
465
+ if attributes.has_key?(:'architectures')
466
+ if (value = attributes[:'architectures']).is_a?(Array)
467
+ self.architectures = value
468
+ end
469
+ end
470
+
471
+ if attributes.has_key?(:'cdn_url')
472
+ self.cdn_url = attributes[:'cdn_url']
473
+ end
474
+
475
+ if attributes.has_key?(:'checksum_md5')
476
+ self.checksum_md5 = attributes[:'checksum_md5']
477
+ end
478
+
479
+ if attributes.has_key?(:'checksum_sha1')
480
+ self.checksum_sha1 = attributes[:'checksum_sha1']
481
+ end
482
+
483
+ if attributes.has_key?(:'checksum_sha256')
484
+ self.checksum_sha256 = attributes[:'checksum_sha256']
485
+ end
486
+
487
+ if attributes.has_key?(:'checksum_sha512')
488
+ self.checksum_sha512 = attributes[:'checksum_sha512']
489
+ end
490
+
491
+ if attributes.has_key?(:'dependencies_checksum_md5')
492
+ self.dependencies_checksum_md5 = attributes[:'dependencies_checksum_md5']
493
+ end
494
+
495
+ if attributes.has_key?(:'dependencies_url')
496
+ self.dependencies_url = attributes[:'dependencies_url']
497
+ end
498
+
499
+ if attributes.has_key?(:'description')
500
+ self.description = attributes[:'description']
501
+ end
502
+
503
+ if attributes.has_key?(:'display_name')
504
+ self.display_name = attributes[:'display_name']
505
+ end
506
+
507
+ if attributes.has_key?(:'distro')
508
+ self.distro = attributes[:'distro']
509
+ end
510
+
511
+ if attributes.has_key?(:'distro_version')
512
+ self.distro_version = attributes[:'distro_version']
513
+ end
514
+
515
+ if attributes.has_key?(:'downloads')
516
+ self.downloads = attributes[:'downloads']
517
+ end
518
+
519
+ if attributes.has_key?(:'epoch')
520
+ self.epoch = attributes[:'epoch']
521
+ end
522
+
523
+ if attributes.has_key?(:'extension')
524
+ self.extension = attributes[:'extension']
525
+ end
526
+
527
+ if attributes.has_key?(:'filename')
528
+ self.filename = attributes[:'filename']
529
+ end
530
+
531
+ if attributes.has_key?(:'filepath')
532
+ self.filepath = attributes[:'filepath']
533
+ end
534
+
535
+ if attributes.has_key?(:'files')
536
+ if (value = attributes[:'files']).is_a?(Array)
537
+ self.files = value
538
+ end
539
+ end
540
+
541
+ if attributes.has_key?(:'format')
542
+ self.format = attributes[:'format']
543
+ end
544
+
545
+ if attributes.has_key?(:'format_url')
546
+ self.format_url = attributes[:'format_url']
547
+ end
548
+
549
+ if attributes.has_key?(:'freeable_storage')
550
+ self.freeable_storage = attributes[:'freeable_storage']
551
+ end
552
+
553
+ if attributes.has_key?(:'fully_qualified_name')
554
+ self.fully_qualified_name = attributes[:'fully_qualified_name']
555
+ end
556
+
557
+ if attributes.has_key?(:'has_dependencies')
558
+ self.has_dependencies = attributes[:'has_dependencies']
559
+ end
560
+
561
+ if attributes.has_key?(:'identifier_perm')
562
+ self.identifier_perm = attributes[:'identifier_perm']
563
+ end
564
+
565
+ if attributes.has_key?(:'identifiers')
566
+ if (value = attributes[:'identifiers']).is_a?(Hash)
567
+ self.identifiers = value
568
+ end
569
+ end
570
+
571
+ if attributes.has_key?(:'indexed')
572
+ self.indexed = attributes[:'indexed']
573
+ end
574
+
575
+ if attributes.has_key?(:'is_cancellable')
576
+ self.is_cancellable = attributes[:'is_cancellable']
577
+ end
578
+
579
+ if attributes.has_key?(:'is_copyable')
580
+ self.is_copyable = attributes[:'is_copyable']
581
+ end
582
+
583
+ if attributes.has_key?(:'is_deleteable')
584
+ self.is_deleteable = attributes[:'is_deleteable']
585
+ end
586
+
587
+ if attributes.has_key?(:'is_downloadable')
588
+ self.is_downloadable = attributes[:'is_downloadable']
589
+ end
590
+
591
+ if attributes.has_key?(:'is_hidden')
592
+ self.is_hidden = attributes[:'is_hidden']
593
+ end
594
+
595
+ if attributes.has_key?(:'is_malware_detected')
596
+ self.is_malware_detected = attributes[:'is_malware_detected']
597
+ end
598
+
599
+ if attributes.has_key?(:'is_moveable')
600
+ self.is_moveable = attributes[:'is_moveable']
601
+ end
602
+
603
+ if attributes.has_key?(:'is_quarantinable')
604
+ self.is_quarantinable = attributes[:'is_quarantinable']
605
+ end
606
+
607
+ if attributes.has_key?(:'is_quarantined')
608
+ self.is_quarantined = attributes[:'is_quarantined']
609
+ end
610
+
611
+ if attributes.has_key?(:'is_resyncable')
612
+ self.is_resyncable = attributes[:'is_resyncable']
613
+ end
614
+
615
+ if attributes.has_key?(:'is_security_scannable')
616
+ self.is_security_scannable = attributes[:'is_security_scannable']
617
+ end
618
+
619
+ if attributes.has_key?(:'is_sync_awaiting')
620
+ self.is_sync_awaiting = attributes[:'is_sync_awaiting']
621
+ end
622
+
623
+ if attributes.has_key?(:'is_sync_completed')
624
+ self.is_sync_completed = attributes[:'is_sync_completed']
625
+ end
626
+
627
+ if attributes.has_key?(:'is_sync_failed')
628
+ self.is_sync_failed = attributes[:'is_sync_failed']
629
+ end
630
+
631
+ if attributes.has_key?(:'is_sync_in_flight')
632
+ self.is_sync_in_flight = attributes[:'is_sync_in_flight']
633
+ end
634
+
635
+ if attributes.has_key?(:'is_sync_in_progress')
636
+ self.is_sync_in_progress = attributes[:'is_sync_in_progress']
637
+ end
638
+
639
+ if attributes.has_key?(:'license')
640
+ self.license = attributes[:'license']
641
+ end
642
+
643
+ if attributes.has_key?(:'name')
644
+ self.name = attributes[:'name']
645
+ end
646
+
647
+ if attributes.has_key?(:'namespace')
648
+ self.namespace = attributes[:'namespace']
649
+ end
650
+
651
+ if attributes.has_key?(:'namespace_url')
652
+ self.namespace_url = attributes[:'namespace_url']
653
+ end
654
+
655
+ if attributes.has_key?(:'num_files')
656
+ self.num_files = attributes[:'num_files']
657
+ end
658
+
659
+ if attributes.has_key?(:'origin_repository')
660
+ self.origin_repository = attributes[:'origin_repository']
661
+ end
662
+
663
+ if attributes.has_key?(:'origin_repository_url')
664
+ self.origin_repository_url = attributes[:'origin_repository_url']
665
+ end
666
+
667
+ if attributes.has_key?(:'osi_approved')
668
+ self.osi_approved = attributes[:'osi_approved']
669
+ end
670
+
671
+ if attributes.has_key?(:'package_type')
672
+ self.package_type = attributes[:'package_type']
673
+ end
674
+
675
+ if attributes.has_key?(:'policy_violated')
676
+ self.policy_violated = attributes[:'policy_violated']
677
+ end
678
+
679
+ if attributes.has_key?(:'raw_license')
680
+ self.raw_license = attributes[:'raw_license']
681
+ end
682
+
683
+ if attributes.has_key?(:'release')
684
+ self.release = attributes[:'release']
685
+ end
686
+
687
+ if attributes.has_key?(:'repository')
688
+ self.repository = attributes[:'repository']
689
+ end
690
+
691
+ if attributes.has_key?(:'repository_url')
692
+ self.repository_url = attributes[:'repository_url']
693
+ end
694
+
695
+ if attributes.has_key?(:'security_scan_completed_at')
696
+ self.security_scan_completed_at = attributes[:'security_scan_completed_at']
697
+ end
698
+
699
+ if attributes.has_key?(:'security_scan_started_at')
700
+ self.security_scan_started_at = attributes[:'security_scan_started_at']
701
+ end
702
+
703
+ if attributes.has_key?(:'security_scan_status')
704
+ self.security_scan_status = attributes[:'security_scan_status']
705
+ else
706
+ self.security_scan_status = 'Awaiting Security Scan'
707
+ end
708
+
709
+ if attributes.has_key?(:'security_scan_status_updated_at')
710
+ self.security_scan_status_updated_at = attributes[:'security_scan_status_updated_at']
711
+ end
712
+
713
+ if attributes.has_key?(:'self_html_url')
714
+ self.self_html_url = attributes[:'self_html_url']
715
+ end
716
+
717
+ if attributes.has_key?(:'self_url')
718
+ self.self_url = attributes[:'self_url']
719
+ end
720
+
721
+ if attributes.has_key?(:'self_webapp_url')
722
+ self.self_webapp_url = attributes[:'self_webapp_url']
723
+ end
724
+
725
+ if attributes.has_key?(:'signature_url')
726
+ self.signature_url = attributes[:'signature_url']
727
+ end
728
+
729
+ if attributes.has_key?(:'size')
730
+ self.size = attributes[:'size']
731
+ end
732
+
733
+ if attributes.has_key?(:'slug')
734
+ self.slug = attributes[:'slug']
735
+ end
736
+
737
+ if attributes.has_key?(:'slug_perm')
738
+ self.slug_perm = attributes[:'slug_perm']
739
+ end
740
+
741
+ if attributes.has_key?(:'spdx_license')
742
+ self.spdx_license = attributes[:'spdx_license']
743
+ end
744
+
745
+ if attributes.has_key?(:'stage')
746
+ self.stage = attributes[:'stage']
747
+ end
748
+
749
+ if attributes.has_key?(:'stage_str')
750
+ self.stage_str = attributes[:'stage_str']
751
+ end
752
+
753
+ if attributes.has_key?(:'stage_updated_at')
754
+ self.stage_updated_at = attributes[:'stage_updated_at']
755
+ end
756
+
757
+ if attributes.has_key?(:'status')
758
+ self.status = attributes[:'status']
759
+ end
760
+
761
+ if attributes.has_key?(:'status_reason')
762
+ self.status_reason = attributes[:'status_reason']
763
+ end
764
+
765
+ if attributes.has_key?(:'status_str')
766
+ self.status_str = attributes[:'status_str']
767
+ end
768
+
769
+ if attributes.has_key?(:'status_updated_at')
770
+ self.status_updated_at = attributes[:'status_updated_at']
771
+ end
772
+
773
+ if attributes.has_key?(:'status_url')
774
+ self.status_url = attributes[:'status_url']
775
+ end
776
+
777
+ if attributes.has_key?(:'store_path')
778
+ self.store_path = attributes[:'store_path']
779
+ end
780
+
781
+ if attributes.has_key?(:'subtype')
782
+ self.subtype = attributes[:'subtype']
783
+ end
784
+
785
+ if attributes.has_key?(:'summary')
786
+ self.summary = attributes[:'summary']
787
+ end
788
+
789
+ if attributes.has_key?(:'sync_finished_at')
790
+ self.sync_finished_at = attributes[:'sync_finished_at']
791
+ end
792
+
793
+ if attributes.has_key?(:'sync_progress')
794
+ self.sync_progress = attributes[:'sync_progress']
795
+ end
796
+
797
+ if attributes.has_key?(:'tags')
798
+ self.tags = attributes[:'tags']
799
+ end
800
+
801
+ if attributes.has_key?(:'tags_automatic')
802
+ self.tags_automatic = attributes[:'tags_automatic']
803
+ end
804
+
805
+ if attributes.has_key?(:'tags_immutable')
806
+ self.tags_immutable = attributes[:'tags_immutable']
807
+ end
808
+
809
+ if attributes.has_key?(:'tags_static')
810
+ if (value = attributes[:'tags_static']).is_a?(Hash)
811
+ self.tags_static = value
812
+ end
813
+ end
814
+
815
+ if attributes.has_key?(:'type_display')
816
+ self.type_display = attributes[:'type_display']
817
+ end
818
+
819
+ if attributes.has_key?(:'uploaded_at')
820
+ self.uploaded_at = attributes[:'uploaded_at']
821
+ end
822
+
823
+ if attributes.has_key?(:'uploader')
824
+ self.uploader = attributes[:'uploader']
825
+ end
826
+
827
+ if attributes.has_key?(:'uploader_url')
828
+ self.uploader_url = attributes[:'uploader_url']
829
+ end
830
+
831
+ if attributes.has_key?(:'version')
832
+ self.version = attributes[:'version']
833
+ end
834
+
835
+ if attributes.has_key?(:'version_orig')
836
+ self.version_orig = attributes[:'version_orig']
837
+ end
838
+
839
+ if attributes.has_key?(:'vulnerability_counts')
840
+ self.vulnerability_counts = attributes[:'vulnerability_counts']
841
+ end
842
+
843
+ if attributes.has_key?(:'vulnerability_scan_results_url')
844
+ self.vulnerability_scan_results_url = attributes[:'vulnerability_scan_results_url']
845
+ end
846
+ end
847
+
848
+ # Show invalid properties with the reasons. Usually used together with valid?
849
+ # @return Array for valid properties with the reasons
850
+ def list_invalid_properties
851
+ invalid_properties = Array.new
852
+ invalid_properties
853
+ end
854
+
855
+ # Check to see if the all the properties in the model are valid
856
+ # @return true if the model is valid
857
+ def valid?
858
+ 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'])
859
+ return false unless security_scan_status_validator.valid?(@security_scan_status)
860
+ true
861
+ end
862
+
863
+ # Custom attribute writer method checking allowed values (enum).
864
+ # @param [Object] security_scan_status Object to be assigned
865
+ def security_scan_status=(security_scan_status)
866
+ 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'])
867
+ unless validator.valid?(security_scan_status)
868
+ fail ArgumentError, 'invalid value for "security_scan_status", must be one of #{validator.allowable_values}.'
869
+ end
870
+ @security_scan_status = security_scan_status
871
+ end
872
+
873
+ # Checks equality by comparing each attribute.
874
+ # @param [Object] Object to be compared
875
+ def ==(o)
876
+ return true if self.equal?(o)
877
+ self.class == o.class &&
878
+ architectures == o.architectures &&
879
+ cdn_url == o.cdn_url &&
880
+ checksum_md5 == o.checksum_md5 &&
881
+ checksum_sha1 == o.checksum_sha1 &&
882
+ checksum_sha256 == o.checksum_sha256 &&
883
+ checksum_sha512 == o.checksum_sha512 &&
884
+ dependencies_checksum_md5 == o.dependencies_checksum_md5 &&
885
+ dependencies_url == o.dependencies_url &&
886
+ description == o.description &&
887
+ display_name == o.display_name &&
888
+ distro == o.distro &&
889
+ distro_version == o.distro_version &&
890
+ downloads == o.downloads &&
891
+ epoch == o.epoch &&
892
+ extension == o.extension &&
893
+ filename == o.filename &&
894
+ filepath == o.filepath &&
895
+ files == o.files &&
896
+ format == o.format &&
897
+ format_url == o.format_url &&
898
+ freeable_storage == o.freeable_storage &&
899
+ fully_qualified_name == o.fully_qualified_name &&
900
+ has_dependencies == o.has_dependencies &&
901
+ identifier_perm == o.identifier_perm &&
902
+ identifiers == o.identifiers &&
903
+ indexed == o.indexed &&
904
+ is_cancellable == o.is_cancellable &&
905
+ is_copyable == o.is_copyable &&
906
+ is_deleteable == o.is_deleteable &&
907
+ is_downloadable == o.is_downloadable &&
908
+ is_hidden == o.is_hidden &&
909
+ is_malware_detected == o.is_malware_detected &&
910
+ is_moveable == o.is_moveable &&
911
+ is_quarantinable == o.is_quarantinable &&
912
+ is_quarantined == o.is_quarantined &&
913
+ is_resyncable == o.is_resyncable &&
914
+ is_security_scannable == o.is_security_scannable &&
915
+ is_sync_awaiting == o.is_sync_awaiting &&
916
+ is_sync_completed == o.is_sync_completed &&
917
+ is_sync_failed == o.is_sync_failed &&
918
+ is_sync_in_flight == o.is_sync_in_flight &&
919
+ is_sync_in_progress == o.is_sync_in_progress &&
920
+ license == o.license &&
921
+ name == o.name &&
922
+ namespace == o.namespace &&
923
+ namespace_url == o.namespace_url &&
924
+ num_files == o.num_files &&
925
+ origin_repository == o.origin_repository &&
926
+ origin_repository_url == o.origin_repository_url &&
927
+ osi_approved == o.osi_approved &&
928
+ package_type == o.package_type &&
929
+ policy_violated == o.policy_violated &&
930
+ raw_license == o.raw_license &&
931
+ release == o.release &&
932
+ repository == o.repository &&
933
+ repository_url == o.repository_url &&
934
+ security_scan_completed_at == o.security_scan_completed_at &&
935
+ security_scan_started_at == o.security_scan_started_at &&
936
+ security_scan_status == o.security_scan_status &&
937
+ security_scan_status_updated_at == o.security_scan_status_updated_at &&
938
+ self_html_url == o.self_html_url &&
939
+ self_url == o.self_url &&
940
+ self_webapp_url == o.self_webapp_url &&
941
+ signature_url == o.signature_url &&
942
+ size == o.size &&
943
+ slug == o.slug &&
944
+ slug_perm == o.slug_perm &&
945
+ spdx_license == o.spdx_license &&
946
+ stage == o.stage &&
947
+ stage_str == o.stage_str &&
948
+ stage_updated_at == o.stage_updated_at &&
949
+ status == o.status &&
950
+ status_reason == o.status_reason &&
951
+ status_str == o.status_str &&
952
+ status_updated_at == o.status_updated_at &&
953
+ status_url == o.status_url &&
954
+ store_path == o.store_path &&
955
+ subtype == o.subtype &&
956
+ summary == o.summary &&
957
+ sync_finished_at == o.sync_finished_at &&
958
+ sync_progress == o.sync_progress &&
959
+ tags == o.tags &&
960
+ tags_automatic == o.tags_automatic &&
961
+ tags_immutable == o.tags_immutable &&
962
+ tags_static == o.tags_static &&
963
+ type_display == o.type_display &&
964
+ uploaded_at == o.uploaded_at &&
965
+ uploader == o.uploader &&
966
+ uploader_url == o.uploader_url &&
967
+ version == o.version &&
968
+ version_orig == o.version_orig &&
969
+ vulnerability_counts == o.vulnerability_counts &&
970
+ vulnerability_scan_results_url == o.vulnerability_scan_results_url
971
+ end
972
+
973
+ # @see the `==` method
974
+ # @param [Object] Object to be compared
975
+ def eql?(o)
976
+ self == o
977
+ end
978
+
979
+ # Calculates hash code according to all attributes.
980
+ # @return [Fixnum] Hash code
981
+ def hash
982
+ [architectures, cdn_url, checksum_md5, checksum_sha1, checksum_sha256, checksum_sha512, dependencies_checksum_md5, dependencies_url, description, display_name, distro, distro_version, downloads, epoch, extension, filename, filepath, files, format, format_url, freeable_storage, fully_qualified_name, has_dependencies, identifier_perm, identifiers, indexed, is_cancellable, is_copyable, is_deleteable, is_downloadable, is_hidden, is_malware_detected, is_moveable, is_quarantinable, is_quarantined, is_resyncable, is_security_scannable, is_sync_awaiting, is_sync_completed, is_sync_failed, is_sync_in_flight, is_sync_in_progress, license, name, namespace, namespace_url, num_files, origin_repository, origin_repository_url, osi_approved, package_type, policy_violated, raw_license, release, repository, repository_url, security_scan_completed_at, security_scan_started_at, security_scan_status, security_scan_status_updated_at, self_html_url, self_url, self_webapp_url, signature_url, size, slug, slug_perm, spdx_license, stage, stage_str, stage_updated_at, status, status_reason, status_str, status_updated_at, status_url, store_path, subtype, summary, sync_finished_at, sync_progress, tags, tags_automatic, tags_immutable, tags_static, type_display, uploaded_at, uploader, uploader_url, version, version_orig, vulnerability_counts, vulnerability_scan_results_url].hash
983
+ end
984
+
985
+ # Builds the object from hash
986
+ # @param [Hash] attributes Model attributes in the form of hash
987
+ # @return [Object] Returns the model itself
988
+ def build_from_hash(attributes)
989
+ return nil unless attributes.is_a?(Hash)
990
+ self.class.swagger_types.each_pair do |key, type|
991
+ if type =~ /\AArray<(.*)>/i
992
+ # check to ensure the input is an array given that the attribute
993
+ # is documented as an array but the input is not
994
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
995
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
996
+ end
997
+ elsif !attributes[self.class.attribute_map[key]].nil?
998
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
999
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
1000
+ end
1001
+
1002
+ self
1003
+ end
1004
+
1005
+ # Deserializes the data based on type
1006
+ # @param string type Data type
1007
+ # @param string value Value to be deserialized
1008
+ # @return [Object] Deserialized data
1009
+ def _deserialize(type, value)
1010
+ case type.to_sym
1011
+ when :DateTime
1012
+ DateTime.parse(value)
1013
+ when :Date
1014
+ Date.parse(value)
1015
+ when :String
1016
+ value.to_s
1017
+ when :Integer
1018
+ value.to_i
1019
+ when :Float
1020
+ value.to_f
1021
+ when :BOOLEAN
1022
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1023
+ true
1024
+ else
1025
+ false
1026
+ end
1027
+ when :Object
1028
+ # generic object (usually a Hash), return directly
1029
+ value
1030
+ when /\AArray<(?<inner_type>.+)>\z/
1031
+ inner_type = Regexp.last_match[:inner_type]
1032
+ value.map { |v| _deserialize(inner_type, v) }
1033
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1034
+ k_type = Regexp.last_match[:k_type]
1035
+ v_type = Regexp.last_match[:v_type]
1036
+ {}.tap do |hash|
1037
+ value.each do |k, v|
1038
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1039
+ end
1040
+ end
1041
+ else # model
1042
+ temp_model = CloudsmithApi.const_get(type).new
1043
+ temp_model.build_from_hash(value)
1044
+ end
1045
+ end
1046
+
1047
+ # Returns the string representation of the object
1048
+ # @return [String] String presentation of the object
1049
+ def to_s
1050
+ to_hash.to_s
1051
+ end
1052
+
1053
+ # to_body is an alias to to_hash (backward compatibility)
1054
+ # @return [Hash] Returns the object in the form of hash
1055
+ def to_body
1056
+ to_hash
1057
+ end
1058
+
1059
+ # Returns the object in the form of hash
1060
+ # @return [Hash] Returns the object in the form of hash
1061
+ def to_hash
1062
+ hash = {}
1063
+ self.class.attribute_map.each_pair do |attr, param|
1064
+ value = self.send(attr)
1065
+ next if value.nil?
1066
+ hash[param] = _to_hash(value)
1067
+ end
1068
+ hash
1069
+ end
1070
+
1071
+ # Outputs non-array value in the form of hash
1072
+ # For object, use to_hash. Otherwise, just return the value
1073
+ # @param [Object] value Any valid value
1074
+ # @return [Hash] Returns the value in the form of hash
1075
+ def _to_hash(value)
1076
+ if value.is_a?(Array)
1077
+ value.compact.map { |v| _to_hash(v) }
1078
+ elsif value.is_a?(Hash)
1079
+ {}.tap do |hash|
1080
+ value.each { |k, v| hash[k] = _to_hash(v) }
1081
+ end
1082
+ elsif value.respond_to? :to_hash
1083
+ value.to_hash
1084
+ else
1085
+ value
1086
+ end
1087
+ end
1088
+
1089
+ end
1090
+ end