dependency-tracker-client 1.0.0

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 (227) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +201 -0
  4. data/README.md +276 -0
  5. data/Rakefile +10 -0
  6. data/dependency-tracker-client.gemspec +39 -0
  7. data/docs/About.md +25 -0
  8. data/docs/Analysis.md +21 -0
  9. data/docs/AnalysisApi.md +177 -0
  10. data/docs/AnalysisComment.md +21 -0
  11. data/docs/AnalysisRequest.md +27 -0
  12. data/docs/ApiKey.md +17 -0
  13. data/docs/BadgeApi.md +102 -0
  14. data/docs/BodyPart.md +31 -0
  15. data/docs/BomApi.md +335 -0
  16. data/docs/BomSubmitRequest.md +25 -0
  17. data/docs/CalculatorApi.md +61 -0
  18. data/docs/CloneProjectRequest.md +19 -0
  19. data/docs/Component.md +69 -0
  20. data/docs/ComponentApi.md +373 -0
  21. data/docs/ComponentMetrics.md +43 -0
  22. data/docs/ConfigProperty.md +25 -0
  23. data/docs/ConfigPropertyApi.md +167 -0
  24. data/docs/ContentDisposition.md +29 -0
  25. data/docs/Cwe.md +19 -0
  26. data/docs/CweApi.md +110 -0
  27. data/docs/DefaultApi.md +434 -0
  28. data/docs/Dependency.md +27 -0
  29. data/docs/DependencyApi.md +222 -0
  30. data/docs/DependencyMetrics.md +45 -0
  31. data/docs/DependencyRequest.md +21 -0
  32. data/docs/Finding.md +23 -0
  33. data/docs/FindingApi.md +113 -0
  34. data/docs/FormDataBodyPart.md +39 -0
  35. data/docs/FormDataContentDisposition.md +31 -0
  36. data/docs/FormDataMultiPart.md +35 -0
  37. data/docs/Framework.md +23 -0
  38. data/docs/IdentifiableObject.md +17 -0
  39. data/docs/LdapApi.md +220 -0
  40. data/docs/LdapUser.md +25 -0
  41. data/docs/License.md +37 -0
  42. data/docs/LicenseApi.md +159 -0
  43. data/docs/ManagedUser.md +37 -0
  44. data/docs/MappedLdapGroup.md +19 -0
  45. data/docs/MappedLdapGroupRequest.md +19 -0
  46. data/docs/MediaType.md +25 -0
  47. data/docs/MetricsApi.md +922 -0
  48. data/docs/MultiPart.md +33 -0
  49. data/docs/NotificationPublisher.md +29 -0
  50. data/docs/NotificationRule.md +35 -0
  51. data/docs/PackageURL.md +29 -0
  52. data/docs/ParameterizedHeader.md +19 -0
  53. data/docs/Permission.md +19 -0
  54. data/docs/PermissionApi.md +279 -0
  55. data/docs/PortfolioMetrics.md +53 -0
  56. data/docs/Project.md +43 -0
  57. data/docs/ProjectApi.md +445 -0
  58. data/docs/ProjectMetrics.md +47 -0
  59. data/docs/ProjectProperty.md +27 -0
  60. data/docs/ProjectPropertyApi.md +232 -0
  61. data/docs/Repository.md +29 -0
  62. data/docs/RepositoryApi.md +325 -0
  63. data/docs/RepositoryMetaComponent.md +27 -0
  64. data/docs/Score.md +23 -0
  65. data/docs/SearchApi.md +120 -0
  66. data/docs/SearchResult.md +17 -0
  67. data/docs/Tag.md +19 -0
  68. data/docs/Team.md +29 -0
  69. data/docs/TeamApi.md +432 -0
  70. data/docs/UserApi.md +715 -0
  71. data/docs/UserPrincipal.md +27 -0
  72. data/docs/VersionApi.md +52 -0
  73. data/docs/Vulnerability.md +69 -0
  74. data/docs/VulnerabilityApi.md +666 -0
  75. data/docs/VulnerabilityMetrics.md +23 -0
  76. data/docs/VulnerableSoftware.md +69 -0
  77. data/lib/dependency-tracker-client/api/analysis_api.rb +209 -0
  78. data/lib/dependency-tracker-client/api/badge_api.rb +148 -0
  79. data/lib/dependency-tracker-client/api/bom_api.rb +382 -0
  80. data/lib/dependency-tracker-client/api/calculator_api.rb +83 -0
  81. data/lib/dependency-tracker-client/api/component_api.rb +422 -0
  82. data/lib/dependency-tracker-client/api/config_property_api.rb +192 -0
  83. data/lib/dependency-tracker-client/api/cwe_api.rb +136 -0
  84. data/lib/dependency-tracker-client/api/default_api.rb +491 -0
  85. data/lib/dependency-tracker-client/api/dependency_api.rb +254 -0
  86. data/lib/dependency-tracker-client/api/finding_api.rb +140 -0
  87. data/lib/dependency-tracker-client/api/ldap_api.rb +254 -0
  88. data/lib/dependency-tracker-client/api/license_api.rb +190 -0
  89. data/lib/dependency-tracker-client/api/metrics_api.rb +1086 -0
  90. data/lib/dependency-tracker-client/api/permission_api.rb +342 -0
  91. data/lib/dependency-tracker-client/api/project_api.rb +504 -0
  92. data/lib/dependency-tracker-client/api/project_property_api.rb +274 -0
  93. data/lib/dependency-tracker-client/api/repository_api.rb +376 -0
  94. data/lib/dependency-tracker-client/api/search_api.rb +143 -0
  95. data/lib/dependency-tracker-client/api/team_api.rb +486 -0
  96. data/lib/dependency-tracker-client/api/user_api.rb +796 -0
  97. data/lib/dependency-tracker-client/api/version_api.rb +78 -0
  98. data/lib/dependency-tracker-client/api/vulnerability_api.rb +780 -0
  99. data/lib/dependency-tracker-client/api_client.rb +388 -0
  100. data/lib/dependency-tracker-client/api_error.rb +57 -0
  101. data/lib/dependency-tracker-client/configuration.rb +261 -0
  102. data/lib/dependency-tracker-client/models/about.rb +242 -0
  103. data/lib/dependency-tracker-client/models/analysis.rb +265 -0
  104. data/lib/dependency-tracker-client/models/analysis_comment.rb +234 -0
  105. data/lib/dependency-tracker-client/models/analysis_request.rb +371 -0
  106. data/lib/dependency-tracker-client/models/api_key.rb +250 -0
  107. data/lib/dependency-tracker-client/models/body_part.rb +273 -0
  108. data/lib/dependency-tracker-client/models/bom_submit_request.rb +328 -0
  109. data/lib/dependency-tracker-client/models/clone_project_request.rb +267 -0
  110. data/lib/dependency-tracker-client/models/component.rb +900 -0
  111. data/lib/dependency-tracker-client/models/component_metrics.rb +338 -0
  112. data/lib/dependency-tracker-client/models/config_property.rb +421 -0
  113. data/lib/dependency-tracker-client/models/content_disposition.rb +262 -0
  114. data/lib/dependency-tracker-client/models/cwe.rb +259 -0
  115. data/lib/dependency-tracker-client/models/dependency.rb +266 -0
  116. data/lib/dependency-tracker-client/models/dependency_metrics.rb +352 -0
  117. data/lib/dependency-tracker-client/models/dependency_request.rb +257 -0
  118. data/lib/dependency-tracker-client/models/finding.rb +239 -0
  119. data/lib/dependency-tracker-client/models/form_data_body_part.rb +309 -0
  120. data/lib/dependency-tracker-client/models/form_data_content_disposition.rb +271 -0
  121. data/lib/dependency-tracker-client/models/form_data_multi_part.rb +295 -0
  122. data/lib/dependency-tracker-client/models/framework.rb +233 -0
  123. data/lib/dependency-tracker-client/models/identifiable_object.rb +206 -0
  124. data/lib/dependency-tracker-client/models/ldap_user.rb +351 -0
  125. data/lib/dependency-tracker-client/models/license.rb +373 -0
  126. data/lib/dependency-tracker-client/models/managed_user.rb +480 -0
  127. data/lib/dependency-tracker-client/models/mapped_ldap_group.rb +255 -0
  128. data/lib/dependency-tracker-client/models/mapped_ldap_group_request.rb +267 -0
  129. data/lib/dependency-tracker-client/models/media_type.rb +244 -0
  130. data/lib/dependency-tracker-client/models/multi_part.rb +284 -0
  131. data/lib/dependency-tracker-client/models/notification_publisher.rb +388 -0
  132. data/lib/dependency-tracker-client/models/notification_rule.rb +426 -0
  133. data/lib/dependency-tracker-client/models/package_url.rb +262 -0
  134. data/lib/dependency-tracker-client/models/parameterized_header.rb +217 -0
  135. data/lib/dependency-tracker-client/models/permission.rb +250 -0
  136. data/lib/dependency-tracker-client/models/portfolio_metrics.rb +378 -0
  137. data/lib/dependency-tracker-client/models/project.rb +420 -0
  138. data/lib/dependency-tracker-client/models/project_metrics.rb +356 -0
  139. data/lib/dependency-tracker-client/models/project_property.rb +430 -0
  140. data/lib/dependency-tracker-client/models/repository.rb +319 -0
  141. data/lib/dependency-tracker-client/models/repository_meta_component.rb +305 -0
  142. data/lib/dependency-tracker-client/models/score.rb +233 -0
  143. data/lib/dependency-tracker-client/models/search_result.rb +208 -0
  144. data/lib/dependency-tracker-client/models/tag.rb +252 -0
  145. data/lib/dependency-tracker-client/models/team.rb +310 -0
  146. data/lib/dependency-tracker-client/models/user_principal.rb +255 -0
  147. data/lib/dependency-tracker-client/models/vulnerability.rb +729 -0
  148. data/lib/dependency-tracker-client/models/vulnerability_metrics.rb +238 -0
  149. data/lib/dependency-tracker-client/models/vulnerable_software.rb +442 -0
  150. data/lib/dependency-tracker-client/version.rb +15 -0
  151. data/lib/dependency-tracker-client.rb +109 -0
  152. data/pkg/dependency-tracker-client-1.0.0.gem +0 -0
  153. data/spec/api/analysis_api_spec.rb +70 -0
  154. data/spec/api/badge_api_spec.rb +58 -0
  155. data/spec/api/bom_api_spec.rb +106 -0
  156. data/spec/api/calculator_api_spec.rb +46 -0
  157. data/spec/api/component_api_spec.rb +110 -0
  158. data/spec/api/config_property_api_spec.rb +67 -0
  159. data/spec/api/cwe_api_spec.rb +56 -0
  160. data/spec/api/default_api_spec.rb +123 -0
  161. data/spec/api/dependency_api_spec.rb +79 -0
  162. data/spec/api/finding_api_spec.rb +57 -0
  163. data/spec/api/ldap_api_spec.rb +79 -0
  164. data/spec/api/license_api_spec.rb +66 -0
  165. data/spec/api/metrics_api_spec.rb +233 -0
  166. data/spec/api/permission_api_spec.rb +94 -0
  167. data/spec/api/project_api_spec.rb +126 -0
  168. data/spec/api/project_property_api_spec.rb +82 -0
  169. data/spec/api/repository_api_spec.rb +100 -0
  170. data/spec/api/search_api_spec.rb +59 -0
  171. data/spec/api/team_api_spec.rb +122 -0
  172. data/spec/api/user_api_spec.rb +183 -0
  173. data/spec/api/version_api_spec.rb +46 -0
  174. data/spec/api/vulnerability_api_spec.rb +177 -0
  175. data/spec/api_client_spec.rb +226 -0
  176. data/spec/configuration_spec.rb +42 -0
  177. data/spec/models/about_spec.rb +65 -0
  178. data/spec/models/analysis_comment_spec.rb +53 -0
  179. data/spec/models/analysis_request_spec.rb +75 -0
  180. data/spec/models/analysis_spec.rb +57 -0
  181. data/spec/models/api_key_spec.rb +41 -0
  182. data/spec/models/body_part_spec.rb +83 -0
  183. data/spec/models/bom_submit_request_spec.rb +65 -0
  184. data/spec/models/clone_project_request_spec.rb +47 -0
  185. data/spec/models/component_metrics_spec.rb +119 -0
  186. data/spec/models/component_spec.rb +201 -0
  187. data/spec/models/config_property_spec.rb +69 -0
  188. data/spec/models/content_disposition_spec.rb +77 -0
  189. data/spec/models/cwe_spec.rb +47 -0
  190. data/spec/models/dependency_metrics_spec.rb +125 -0
  191. data/spec/models/dependency_request_spec.rb +53 -0
  192. data/spec/models/dependency_spec.rb +71 -0
  193. data/spec/models/finding_spec.rb +59 -0
  194. data/spec/models/form_data_body_part_spec.rb +107 -0
  195. data/spec/models/form_data_content_disposition_spec.rb +83 -0
  196. data/spec/models/form_data_multi_part_spec.rb +95 -0
  197. data/spec/models/framework_spec.rb +59 -0
  198. data/spec/models/identifiable_object_spec.rb +41 -0
  199. data/spec/models/ldap_user_spec.rb +65 -0
  200. data/spec/models/license_spec.rb +101 -0
  201. data/spec/models/managed_user_spec.rb +101 -0
  202. data/spec/models/mapped_ldap_group_request_spec.rb +47 -0
  203. data/spec/models/mapped_ldap_group_spec.rb +47 -0
  204. data/spec/models/media_type_spec.rb +65 -0
  205. data/spec/models/multi_part_spec.rb +89 -0
  206. data/spec/models/notification_publisher_spec.rb +77 -0
  207. data/spec/models/notification_rule_spec.rb +107 -0
  208. data/spec/models/package_url_spec.rb +77 -0
  209. data/spec/models/parameterized_header_spec.rb +47 -0
  210. data/spec/models/permission_spec.rb +47 -0
  211. data/spec/models/portfolio_metrics_spec.rb +149 -0
  212. data/spec/models/project_metrics_spec.rb +131 -0
  213. data/spec/models/project_property_spec.rb +75 -0
  214. data/spec/models/project_spec.rb +119 -0
  215. data/spec/models/repository_meta_component_spec.rb +75 -0
  216. data/spec/models/repository_spec.rb +81 -0
  217. data/spec/models/score_spec.rb +59 -0
  218. data/spec/models/search_result_spec.rb +41 -0
  219. data/spec/models/tag_spec.rb +47 -0
  220. data/spec/models/team_spec.rb +77 -0
  221. data/spec/models/user_principal_spec.rb +71 -0
  222. data/spec/models/vulnerability_metrics_spec.rb +59 -0
  223. data/spec/models/vulnerability_spec.rb +201 -0
  224. data/spec/models/vulnerable_software_spec.rb +197 -0
  225. data/spec/spec_helper.rb +111 -0
  226. data/tmp/tmp.rb +11 -0
  227. metadata +402 -0
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Dependency-Track API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 3.8.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module DependencyTracker
16
+ class VulnerabilityMetrics
17
+ attr_accessor :year
18
+
19
+ attr_accessor :month
20
+
21
+ attr_accessor :count
22
+
23
+ attr_accessor :measured_at
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'year' => :'year',
29
+ :'month' => :'month',
30
+ :'count' => :'count',
31
+ :'measured_at' => :'measuredAt'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'year' => :'Integer',
39
+ :'month' => :'Integer',
40
+ :'count' => :'Integer',
41
+ :'measured_at' => :'Integer'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DependencyTracker::VulnerabilityMetrics` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DependencyTracker::VulnerabilityMetrics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'year')
67
+ self.year = attributes[:'year']
68
+ end
69
+
70
+ if attributes.key?(:'month')
71
+ self.month = attributes[:'month']
72
+ end
73
+
74
+ if attributes.key?(:'count')
75
+ self.count = attributes[:'count']
76
+ end
77
+
78
+ if attributes.key?(:'measured_at')
79
+ self.measured_at = attributes[:'measured_at']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ if @measured_at.nil?
88
+ invalid_properties.push('invalid value for "measured_at", measured_at cannot be nil.')
89
+ end
90
+
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return false if @measured_at.nil?
98
+ true
99
+ end
100
+
101
+ # Checks equality by comparing each attribute.
102
+ # @param [Object] Object to be compared
103
+ def ==(o)
104
+ return true if self.equal?(o)
105
+ self.class == o.class &&
106
+ year == o.year &&
107
+ month == o.month &&
108
+ count == o.count &&
109
+ measured_at == o.measured_at
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [year, month, count, measured_at].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ new.build_from_hash(attributes)
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.openapi_types.each_pair do |key, type|
137
+ if type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def _deserialize(type, value)
156
+ case type.to_sym
157
+ when :DateTime
158
+ DateTime.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ DependencyTracker.const_get(type).build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+ end
238
+ end
@@ -0,0 +1,442 @@
1
+ =begin
2
+ #Dependency-Track API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 3.8.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module DependencyTracker
16
+ class VulnerableSoftware
17
+ attr_accessor :purl
18
+
19
+ attr_accessor :purl_type
20
+
21
+ attr_accessor :purl_namespace
22
+
23
+ attr_accessor :purl_name
24
+
25
+ attr_accessor :purl_version
26
+
27
+ attr_accessor :purl_qualifiers
28
+
29
+ attr_accessor :purl_subpath
30
+
31
+ attr_accessor :cpe22
32
+
33
+ attr_accessor :cpe23
34
+
35
+ attr_accessor :part
36
+
37
+ attr_accessor :vendor
38
+
39
+ attr_accessor :product
40
+
41
+ attr_accessor :version
42
+
43
+ attr_accessor :update
44
+
45
+ attr_accessor :edition
46
+
47
+ attr_accessor :language
48
+
49
+ attr_accessor :sw_edition
50
+
51
+ attr_accessor :target_sw
52
+
53
+ attr_accessor :target_hw
54
+
55
+ attr_accessor :other
56
+
57
+ attr_accessor :version_end_excluding
58
+
59
+ attr_accessor :version_end_including
60
+
61
+ attr_accessor :version_start_excluding
62
+
63
+ attr_accessor :version_start_including
64
+
65
+ attr_accessor :vulnerabilities
66
+
67
+ attr_accessor :uuid
68
+
69
+ attr_accessor :is_vulnerable
70
+
71
+ # Attribute mapping from ruby-style variable name to JSON key.
72
+ def self.attribute_map
73
+ {
74
+ :'purl' => :'purl',
75
+ :'purl_type' => :'purlType',
76
+ :'purl_namespace' => :'purlNamespace',
77
+ :'purl_name' => :'purlName',
78
+ :'purl_version' => :'purlVersion',
79
+ :'purl_qualifiers' => :'purlQualifiers',
80
+ :'purl_subpath' => :'purlSubpath',
81
+ :'cpe22' => :'cpe22',
82
+ :'cpe23' => :'cpe23',
83
+ :'part' => :'part',
84
+ :'vendor' => :'vendor',
85
+ :'product' => :'product',
86
+ :'version' => :'version',
87
+ :'update' => :'update',
88
+ :'edition' => :'edition',
89
+ :'language' => :'language',
90
+ :'sw_edition' => :'swEdition',
91
+ :'target_sw' => :'targetSw',
92
+ :'target_hw' => :'targetHw',
93
+ :'other' => :'other',
94
+ :'version_end_excluding' => :'versionEndExcluding',
95
+ :'version_end_including' => :'versionEndIncluding',
96
+ :'version_start_excluding' => :'versionStartExcluding',
97
+ :'version_start_including' => :'versionStartIncluding',
98
+ :'vulnerabilities' => :'vulnerabilities',
99
+ :'uuid' => :'uuid',
100
+ :'is_vulnerable' => :'isVulnerable'
101
+ }
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.openapi_types
106
+ {
107
+ :'purl' => :'String',
108
+ :'purl_type' => :'String',
109
+ :'purl_namespace' => :'String',
110
+ :'purl_name' => :'String',
111
+ :'purl_version' => :'String',
112
+ :'purl_qualifiers' => :'String',
113
+ :'purl_subpath' => :'String',
114
+ :'cpe22' => :'String',
115
+ :'cpe23' => :'String',
116
+ :'part' => :'String',
117
+ :'vendor' => :'String',
118
+ :'product' => :'String',
119
+ :'version' => :'String',
120
+ :'update' => :'String',
121
+ :'edition' => :'String',
122
+ :'language' => :'String',
123
+ :'sw_edition' => :'String',
124
+ :'target_sw' => :'String',
125
+ :'target_hw' => :'String',
126
+ :'other' => :'String',
127
+ :'version_end_excluding' => :'String',
128
+ :'version_end_including' => :'String',
129
+ :'version_start_excluding' => :'String',
130
+ :'version_start_including' => :'String',
131
+ :'vulnerabilities' => :'Array<Vulnerability>',
132
+ :'uuid' => :'String',
133
+ :'is_vulnerable' => :'Boolean'
134
+ }
135
+ end
136
+
137
+ # List of attributes with nullable: true
138
+ def self.openapi_nullable
139
+ Set.new([
140
+ ])
141
+ end
142
+
143
+ # Initializes the object
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ def initialize(attributes = {})
146
+ if (!attributes.is_a?(Hash))
147
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DependencyTracker::VulnerableSoftware` initialize method"
148
+ end
149
+
150
+ # check to see if the attribute exists and convert string to symbol for hash key
151
+ attributes = attributes.each_with_object({}) { |(k, v), h|
152
+ if (!self.class.attribute_map.key?(k.to_sym))
153
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DependencyTracker::VulnerableSoftware`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
154
+ end
155
+ h[k.to_sym] = v
156
+ }
157
+
158
+ if attributes.key?(:'purl')
159
+ self.purl = attributes[:'purl']
160
+ end
161
+
162
+ if attributes.key?(:'purl_type')
163
+ self.purl_type = attributes[:'purl_type']
164
+ end
165
+
166
+ if attributes.key?(:'purl_namespace')
167
+ self.purl_namespace = attributes[:'purl_namespace']
168
+ end
169
+
170
+ if attributes.key?(:'purl_name')
171
+ self.purl_name = attributes[:'purl_name']
172
+ end
173
+
174
+ if attributes.key?(:'purl_version')
175
+ self.purl_version = attributes[:'purl_version']
176
+ end
177
+
178
+ if attributes.key?(:'purl_qualifiers')
179
+ self.purl_qualifiers = attributes[:'purl_qualifiers']
180
+ end
181
+
182
+ if attributes.key?(:'purl_subpath')
183
+ self.purl_subpath = attributes[:'purl_subpath']
184
+ end
185
+
186
+ if attributes.key?(:'cpe22')
187
+ self.cpe22 = attributes[:'cpe22']
188
+ end
189
+
190
+ if attributes.key?(:'cpe23')
191
+ self.cpe23 = attributes[:'cpe23']
192
+ end
193
+
194
+ if attributes.key?(:'part')
195
+ self.part = attributes[:'part']
196
+ end
197
+
198
+ if attributes.key?(:'vendor')
199
+ self.vendor = attributes[:'vendor']
200
+ end
201
+
202
+ if attributes.key?(:'product')
203
+ self.product = attributes[:'product']
204
+ end
205
+
206
+ if attributes.key?(:'version')
207
+ self.version = attributes[:'version']
208
+ end
209
+
210
+ if attributes.key?(:'update')
211
+ self.update = attributes[:'update']
212
+ end
213
+
214
+ if attributes.key?(:'edition')
215
+ self.edition = attributes[:'edition']
216
+ end
217
+
218
+ if attributes.key?(:'language')
219
+ self.language = attributes[:'language']
220
+ end
221
+
222
+ if attributes.key?(:'sw_edition')
223
+ self.sw_edition = attributes[:'sw_edition']
224
+ end
225
+
226
+ if attributes.key?(:'target_sw')
227
+ self.target_sw = attributes[:'target_sw']
228
+ end
229
+
230
+ if attributes.key?(:'target_hw')
231
+ self.target_hw = attributes[:'target_hw']
232
+ end
233
+
234
+ if attributes.key?(:'other')
235
+ self.other = attributes[:'other']
236
+ end
237
+
238
+ if attributes.key?(:'version_end_excluding')
239
+ self.version_end_excluding = attributes[:'version_end_excluding']
240
+ end
241
+
242
+ if attributes.key?(:'version_end_including')
243
+ self.version_end_including = attributes[:'version_end_including']
244
+ end
245
+
246
+ if attributes.key?(:'version_start_excluding')
247
+ self.version_start_excluding = attributes[:'version_start_excluding']
248
+ end
249
+
250
+ if attributes.key?(:'version_start_including')
251
+ self.version_start_including = attributes[:'version_start_including']
252
+ end
253
+
254
+ if attributes.key?(:'vulnerabilities')
255
+ if (value = attributes[:'vulnerabilities']).is_a?(Array)
256
+ self.vulnerabilities = value
257
+ end
258
+ end
259
+
260
+ if attributes.key?(:'uuid')
261
+ self.uuid = attributes[:'uuid']
262
+ end
263
+
264
+ if attributes.key?(:'is_vulnerable')
265
+ self.is_vulnerable = attributes[:'is_vulnerable']
266
+ end
267
+ end
268
+
269
+ # Show invalid properties with the reasons. Usually used together with valid?
270
+ # @return Array for valid properties with the reasons
271
+ def list_invalid_properties
272
+ invalid_properties = Array.new
273
+ invalid_properties
274
+ end
275
+
276
+ # Check to see if the all the properties in the model are valid
277
+ # @return true if the model is valid
278
+ def valid?
279
+ true
280
+ end
281
+
282
+ # Checks equality by comparing each attribute.
283
+ # @param [Object] Object to be compared
284
+ def ==(o)
285
+ return true if self.equal?(o)
286
+ self.class == o.class &&
287
+ purl == o.purl &&
288
+ purl_type == o.purl_type &&
289
+ purl_namespace == o.purl_namespace &&
290
+ purl_name == o.purl_name &&
291
+ purl_version == o.purl_version &&
292
+ purl_qualifiers == o.purl_qualifiers &&
293
+ purl_subpath == o.purl_subpath &&
294
+ cpe22 == o.cpe22 &&
295
+ cpe23 == o.cpe23 &&
296
+ part == o.part &&
297
+ vendor == o.vendor &&
298
+ product == o.product &&
299
+ version == o.version &&
300
+ update == o.update &&
301
+ edition == o.edition &&
302
+ language == o.language &&
303
+ sw_edition == o.sw_edition &&
304
+ target_sw == o.target_sw &&
305
+ target_hw == o.target_hw &&
306
+ other == o.other &&
307
+ version_end_excluding == o.version_end_excluding &&
308
+ version_end_including == o.version_end_including &&
309
+ version_start_excluding == o.version_start_excluding &&
310
+ version_start_including == o.version_start_including &&
311
+ vulnerabilities == o.vulnerabilities &&
312
+ uuid == o.uuid &&
313
+ is_vulnerable == o.is_vulnerable
314
+ end
315
+
316
+ # @see the `==` method
317
+ # @param [Object] Object to be compared
318
+ def eql?(o)
319
+ self == o
320
+ end
321
+
322
+ # Calculates hash code according to all attributes.
323
+ # @return [Integer] Hash code
324
+ def hash
325
+ [purl, purl_type, purl_namespace, purl_name, purl_version, purl_qualifiers, purl_subpath, cpe22, cpe23, part, vendor, product, version, update, edition, language, sw_edition, target_sw, target_hw, other, version_end_excluding, version_end_including, version_start_excluding, version_start_including, vulnerabilities, uuid, is_vulnerable].hash
326
+ end
327
+
328
+ # Builds the object from hash
329
+ # @param [Hash] attributes Model attributes in the form of hash
330
+ # @return [Object] Returns the model itself
331
+ def self.build_from_hash(attributes)
332
+ new.build_from_hash(attributes)
333
+ end
334
+
335
+ # Builds the object from hash
336
+ # @param [Hash] attributes Model attributes in the form of hash
337
+ # @return [Object] Returns the model itself
338
+ def build_from_hash(attributes)
339
+ return nil unless attributes.is_a?(Hash)
340
+ self.class.openapi_types.each_pair do |key, type|
341
+ if type =~ /\AArray<(.*)>/i
342
+ # check to ensure the input is an array given that the attribute
343
+ # is documented as an array but the input is not
344
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
345
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
346
+ end
347
+ elsif !attributes[self.class.attribute_map[key]].nil?
348
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
349
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
350
+ end
351
+
352
+ self
353
+ end
354
+
355
+ # Deserializes the data based on type
356
+ # @param string type Data type
357
+ # @param string value Value to be deserialized
358
+ # @return [Object] Deserialized data
359
+ def _deserialize(type, value)
360
+ case type.to_sym
361
+ when :DateTime
362
+ DateTime.parse(value)
363
+ when :Date
364
+ Date.parse(value)
365
+ when :String
366
+ value.to_s
367
+ when :Integer
368
+ value.to_i
369
+ when :Float
370
+ value.to_f
371
+ when :Boolean
372
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
373
+ true
374
+ else
375
+ false
376
+ end
377
+ when :Object
378
+ # generic object (usually a Hash), return directly
379
+ value
380
+ when /\AArray<(?<inner_type>.+)>\z/
381
+ inner_type = Regexp.last_match[:inner_type]
382
+ value.map { |v| _deserialize(inner_type, v) }
383
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
384
+ k_type = Regexp.last_match[:k_type]
385
+ v_type = Regexp.last_match[:v_type]
386
+ {}.tap do |hash|
387
+ value.each do |k, v|
388
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
389
+ end
390
+ end
391
+ else # model
392
+ DependencyTracker.const_get(type).build_from_hash(value)
393
+ end
394
+ end
395
+
396
+ # Returns the string representation of the object
397
+ # @return [String] String presentation of the object
398
+ def to_s
399
+ to_hash.to_s
400
+ end
401
+
402
+ # to_body is an alias to to_hash (backward compatibility)
403
+ # @return [Hash] Returns the object in the form of hash
404
+ def to_body
405
+ to_hash
406
+ end
407
+
408
+ # Returns the object in the form of hash
409
+ # @return [Hash] Returns the object in the form of hash
410
+ def to_hash
411
+ hash = {}
412
+ self.class.attribute_map.each_pair do |attr, param|
413
+ value = self.send(attr)
414
+ if value.nil?
415
+ is_nullable = self.class.openapi_nullable.include?(attr)
416
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
417
+ end
418
+
419
+ hash[param] = _to_hash(value)
420
+ end
421
+ hash
422
+ end
423
+
424
+ # Outputs non-array value in the form of hash
425
+ # For object, use to_hash. Otherwise, just return the value
426
+ # @param [Object] value Any valid value
427
+ # @return [Hash] Returns the value in the form of hash
428
+ def _to_hash(value)
429
+ if value.is_a?(Array)
430
+ value.compact.map { |v| _to_hash(v) }
431
+ elsif value.is_a?(Hash)
432
+ {}.tap do |hash|
433
+ value.each { |k, v| hash[k] = _to_hash(v) }
434
+ end
435
+ elsif value.respond_to? :to_hash
436
+ value.to_hash
437
+ else
438
+ value
439
+ end
440
+ end
441
+ end
442
+ end
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #Dependency-Track API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 3.8.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ module DependencyTracker
14
+ VERSION = '1.0.0'
15
+ end