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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/README.md +276 -0
- data/Rakefile +10 -0
- data/dependency-tracker-client.gemspec +39 -0
- data/docs/About.md +25 -0
- data/docs/Analysis.md +21 -0
- data/docs/AnalysisApi.md +177 -0
- data/docs/AnalysisComment.md +21 -0
- data/docs/AnalysisRequest.md +27 -0
- data/docs/ApiKey.md +17 -0
- data/docs/BadgeApi.md +102 -0
- data/docs/BodyPart.md +31 -0
- data/docs/BomApi.md +335 -0
- data/docs/BomSubmitRequest.md +25 -0
- data/docs/CalculatorApi.md +61 -0
- data/docs/CloneProjectRequest.md +19 -0
- data/docs/Component.md +69 -0
- data/docs/ComponentApi.md +373 -0
- data/docs/ComponentMetrics.md +43 -0
- data/docs/ConfigProperty.md +25 -0
- data/docs/ConfigPropertyApi.md +167 -0
- data/docs/ContentDisposition.md +29 -0
- data/docs/Cwe.md +19 -0
- data/docs/CweApi.md +110 -0
- data/docs/DefaultApi.md +434 -0
- data/docs/Dependency.md +27 -0
- data/docs/DependencyApi.md +222 -0
- data/docs/DependencyMetrics.md +45 -0
- data/docs/DependencyRequest.md +21 -0
- data/docs/Finding.md +23 -0
- data/docs/FindingApi.md +113 -0
- data/docs/FormDataBodyPart.md +39 -0
- data/docs/FormDataContentDisposition.md +31 -0
- data/docs/FormDataMultiPart.md +35 -0
- data/docs/Framework.md +23 -0
- data/docs/IdentifiableObject.md +17 -0
- data/docs/LdapApi.md +220 -0
- data/docs/LdapUser.md +25 -0
- data/docs/License.md +37 -0
- data/docs/LicenseApi.md +159 -0
- data/docs/ManagedUser.md +37 -0
- data/docs/MappedLdapGroup.md +19 -0
- data/docs/MappedLdapGroupRequest.md +19 -0
- data/docs/MediaType.md +25 -0
- data/docs/MetricsApi.md +922 -0
- data/docs/MultiPart.md +33 -0
- data/docs/NotificationPublisher.md +29 -0
- data/docs/NotificationRule.md +35 -0
- data/docs/PackageURL.md +29 -0
- data/docs/ParameterizedHeader.md +19 -0
- data/docs/Permission.md +19 -0
- data/docs/PermissionApi.md +279 -0
- data/docs/PortfolioMetrics.md +53 -0
- data/docs/Project.md +43 -0
- data/docs/ProjectApi.md +445 -0
- data/docs/ProjectMetrics.md +47 -0
- data/docs/ProjectProperty.md +27 -0
- data/docs/ProjectPropertyApi.md +232 -0
- data/docs/Repository.md +29 -0
- data/docs/RepositoryApi.md +325 -0
- data/docs/RepositoryMetaComponent.md +27 -0
- data/docs/Score.md +23 -0
- data/docs/SearchApi.md +120 -0
- data/docs/SearchResult.md +17 -0
- data/docs/Tag.md +19 -0
- data/docs/Team.md +29 -0
- data/docs/TeamApi.md +432 -0
- data/docs/UserApi.md +715 -0
- data/docs/UserPrincipal.md +27 -0
- data/docs/VersionApi.md +52 -0
- data/docs/Vulnerability.md +69 -0
- data/docs/VulnerabilityApi.md +666 -0
- data/docs/VulnerabilityMetrics.md +23 -0
- data/docs/VulnerableSoftware.md +69 -0
- data/lib/dependency-tracker-client/api/analysis_api.rb +209 -0
- data/lib/dependency-tracker-client/api/badge_api.rb +148 -0
- data/lib/dependency-tracker-client/api/bom_api.rb +382 -0
- data/lib/dependency-tracker-client/api/calculator_api.rb +83 -0
- data/lib/dependency-tracker-client/api/component_api.rb +422 -0
- data/lib/dependency-tracker-client/api/config_property_api.rb +192 -0
- data/lib/dependency-tracker-client/api/cwe_api.rb +136 -0
- data/lib/dependency-tracker-client/api/default_api.rb +491 -0
- data/lib/dependency-tracker-client/api/dependency_api.rb +254 -0
- data/lib/dependency-tracker-client/api/finding_api.rb +140 -0
- data/lib/dependency-tracker-client/api/ldap_api.rb +254 -0
- data/lib/dependency-tracker-client/api/license_api.rb +190 -0
- data/lib/dependency-tracker-client/api/metrics_api.rb +1086 -0
- data/lib/dependency-tracker-client/api/permission_api.rb +342 -0
- data/lib/dependency-tracker-client/api/project_api.rb +504 -0
- data/lib/dependency-tracker-client/api/project_property_api.rb +274 -0
- data/lib/dependency-tracker-client/api/repository_api.rb +376 -0
- data/lib/dependency-tracker-client/api/search_api.rb +143 -0
- data/lib/dependency-tracker-client/api/team_api.rb +486 -0
- data/lib/dependency-tracker-client/api/user_api.rb +796 -0
- data/lib/dependency-tracker-client/api/version_api.rb +78 -0
- data/lib/dependency-tracker-client/api/vulnerability_api.rb +780 -0
- data/lib/dependency-tracker-client/api_client.rb +388 -0
- data/lib/dependency-tracker-client/api_error.rb +57 -0
- data/lib/dependency-tracker-client/configuration.rb +261 -0
- data/lib/dependency-tracker-client/models/about.rb +242 -0
- data/lib/dependency-tracker-client/models/analysis.rb +265 -0
- data/lib/dependency-tracker-client/models/analysis_comment.rb +234 -0
- data/lib/dependency-tracker-client/models/analysis_request.rb +371 -0
- data/lib/dependency-tracker-client/models/api_key.rb +250 -0
- data/lib/dependency-tracker-client/models/body_part.rb +273 -0
- data/lib/dependency-tracker-client/models/bom_submit_request.rb +328 -0
- data/lib/dependency-tracker-client/models/clone_project_request.rb +267 -0
- data/lib/dependency-tracker-client/models/component.rb +900 -0
- data/lib/dependency-tracker-client/models/component_metrics.rb +338 -0
- data/lib/dependency-tracker-client/models/config_property.rb +421 -0
- data/lib/dependency-tracker-client/models/content_disposition.rb +262 -0
- data/lib/dependency-tracker-client/models/cwe.rb +259 -0
- data/lib/dependency-tracker-client/models/dependency.rb +266 -0
- data/lib/dependency-tracker-client/models/dependency_metrics.rb +352 -0
- data/lib/dependency-tracker-client/models/dependency_request.rb +257 -0
- data/lib/dependency-tracker-client/models/finding.rb +239 -0
- data/lib/dependency-tracker-client/models/form_data_body_part.rb +309 -0
- data/lib/dependency-tracker-client/models/form_data_content_disposition.rb +271 -0
- data/lib/dependency-tracker-client/models/form_data_multi_part.rb +295 -0
- data/lib/dependency-tracker-client/models/framework.rb +233 -0
- data/lib/dependency-tracker-client/models/identifiable_object.rb +206 -0
- data/lib/dependency-tracker-client/models/ldap_user.rb +351 -0
- data/lib/dependency-tracker-client/models/license.rb +373 -0
- data/lib/dependency-tracker-client/models/managed_user.rb +480 -0
- data/lib/dependency-tracker-client/models/mapped_ldap_group.rb +255 -0
- data/lib/dependency-tracker-client/models/mapped_ldap_group_request.rb +267 -0
- data/lib/dependency-tracker-client/models/media_type.rb +244 -0
- data/lib/dependency-tracker-client/models/multi_part.rb +284 -0
- data/lib/dependency-tracker-client/models/notification_publisher.rb +388 -0
- data/lib/dependency-tracker-client/models/notification_rule.rb +426 -0
- data/lib/dependency-tracker-client/models/package_url.rb +262 -0
- data/lib/dependency-tracker-client/models/parameterized_header.rb +217 -0
- data/lib/dependency-tracker-client/models/permission.rb +250 -0
- data/lib/dependency-tracker-client/models/portfolio_metrics.rb +378 -0
- data/lib/dependency-tracker-client/models/project.rb +420 -0
- data/lib/dependency-tracker-client/models/project_metrics.rb +356 -0
- data/lib/dependency-tracker-client/models/project_property.rb +430 -0
- data/lib/dependency-tracker-client/models/repository.rb +319 -0
- data/lib/dependency-tracker-client/models/repository_meta_component.rb +305 -0
- data/lib/dependency-tracker-client/models/score.rb +233 -0
- data/lib/dependency-tracker-client/models/search_result.rb +208 -0
- data/lib/dependency-tracker-client/models/tag.rb +252 -0
- data/lib/dependency-tracker-client/models/team.rb +310 -0
- data/lib/dependency-tracker-client/models/user_principal.rb +255 -0
- data/lib/dependency-tracker-client/models/vulnerability.rb +729 -0
- data/lib/dependency-tracker-client/models/vulnerability_metrics.rb +238 -0
- data/lib/dependency-tracker-client/models/vulnerable_software.rb +442 -0
- data/lib/dependency-tracker-client/version.rb +15 -0
- data/lib/dependency-tracker-client.rb +109 -0
- data/pkg/dependency-tracker-client-1.0.0.gem +0 -0
- data/spec/api/analysis_api_spec.rb +70 -0
- data/spec/api/badge_api_spec.rb +58 -0
- data/spec/api/bom_api_spec.rb +106 -0
- data/spec/api/calculator_api_spec.rb +46 -0
- data/spec/api/component_api_spec.rb +110 -0
- data/spec/api/config_property_api_spec.rb +67 -0
- data/spec/api/cwe_api_spec.rb +56 -0
- data/spec/api/default_api_spec.rb +123 -0
- data/spec/api/dependency_api_spec.rb +79 -0
- data/spec/api/finding_api_spec.rb +57 -0
- data/spec/api/ldap_api_spec.rb +79 -0
- data/spec/api/license_api_spec.rb +66 -0
- data/spec/api/metrics_api_spec.rb +233 -0
- data/spec/api/permission_api_spec.rb +94 -0
- data/spec/api/project_api_spec.rb +126 -0
- data/spec/api/project_property_api_spec.rb +82 -0
- data/spec/api/repository_api_spec.rb +100 -0
- data/spec/api/search_api_spec.rb +59 -0
- data/spec/api/team_api_spec.rb +122 -0
- data/spec/api/user_api_spec.rb +183 -0
- data/spec/api/version_api_spec.rb +46 -0
- data/spec/api/vulnerability_api_spec.rb +177 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/about_spec.rb +65 -0
- data/spec/models/analysis_comment_spec.rb +53 -0
- data/spec/models/analysis_request_spec.rb +75 -0
- data/spec/models/analysis_spec.rb +57 -0
- data/spec/models/api_key_spec.rb +41 -0
- data/spec/models/body_part_spec.rb +83 -0
- data/spec/models/bom_submit_request_spec.rb +65 -0
- data/spec/models/clone_project_request_spec.rb +47 -0
- data/spec/models/component_metrics_spec.rb +119 -0
- data/spec/models/component_spec.rb +201 -0
- data/spec/models/config_property_spec.rb +69 -0
- data/spec/models/content_disposition_spec.rb +77 -0
- data/spec/models/cwe_spec.rb +47 -0
- data/spec/models/dependency_metrics_spec.rb +125 -0
- data/spec/models/dependency_request_spec.rb +53 -0
- data/spec/models/dependency_spec.rb +71 -0
- data/spec/models/finding_spec.rb +59 -0
- data/spec/models/form_data_body_part_spec.rb +107 -0
- data/spec/models/form_data_content_disposition_spec.rb +83 -0
- data/spec/models/form_data_multi_part_spec.rb +95 -0
- data/spec/models/framework_spec.rb +59 -0
- data/spec/models/identifiable_object_spec.rb +41 -0
- data/spec/models/ldap_user_spec.rb +65 -0
- data/spec/models/license_spec.rb +101 -0
- data/spec/models/managed_user_spec.rb +101 -0
- data/spec/models/mapped_ldap_group_request_spec.rb +47 -0
- data/spec/models/mapped_ldap_group_spec.rb +47 -0
- data/spec/models/media_type_spec.rb +65 -0
- data/spec/models/multi_part_spec.rb +89 -0
- data/spec/models/notification_publisher_spec.rb +77 -0
- data/spec/models/notification_rule_spec.rb +107 -0
- data/spec/models/package_url_spec.rb +77 -0
- data/spec/models/parameterized_header_spec.rb +47 -0
- data/spec/models/permission_spec.rb +47 -0
- data/spec/models/portfolio_metrics_spec.rb +149 -0
- data/spec/models/project_metrics_spec.rb +131 -0
- data/spec/models/project_property_spec.rb +75 -0
- data/spec/models/project_spec.rb +119 -0
- data/spec/models/repository_meta_component_spec.rb +75 -0
- data/spec/models/repository_spec.rb +81 -0
- data/spec/models/score_spec.rb +59 -0
- data/spec/models/search_result_spec.rb +41 -0
- data/spec/models/tag_spec.rb +47 -0
- data/spec/models/team_spec.rb +77 -0
- data/spec/models/user_principal_spec.rb +71 -0
- data/spec/models/vulnerability_metrics_spec.rb +59 -0
- data/spec/models/vulnerability_spec.rb +201 -0
- data/spec/models/vulnerable_software_spec.rb +197 -0
- data/spec/spec_helper.rb +111 -0
- data/tmp/tmp.rb +11 -0
- metadata +402 -0
@@ -0,0 +1,136 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module DependencyTracker
|
16
|
+
class CweApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Returns a specific CWE
|
23
|
+
# @param cwe_id [Integer] The CWE ID of the CWE to retrieve
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Cwe]
|
26
|
+
def get_cwe(cwe_id, opts = {})
|
27
|
+
data, _status_code, _headers = get_cwe_with_http_info(cwe_id, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns a specific CWE
|
32
|
+
# @param cwe_id [Integer] The CWE ID of the CWE to retrieve
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(Cwe, Integer, Hash)>] Cwe data, response status code and response headers
|
35
|
+
def get_cwe_with_http_info(cwe_id, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: CweApi.get_cwe ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'cwe_id' is set
|
40
|
+
if @api_client.config.client_side_validation && cwe_id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'cwe_id' when calling CweApi.get_cwe"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/v1/cwe/{cweId}'.sub('{' + 'cweId' + '}', CGI.escape(cwe_id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:return_type] || 'Cwe'
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => return_type
|
73
|
+
)
|
74
|
+
|
75
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
76
|
+
if @api_client.config.debugging
|
77
|
+
@api_client.config.logger.debug "API called: CweApi#get_cwe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
78
|
+
end
|
79
|
+
return data, status_code, headers
|
80
|
+
end
|
81
|
+
|
82
|
+
# Returns a list of all CWEs
|
83
|
+
# @param [Hash] opts the optional parameters
|
84
|
+
# @return [Array<Cwe>]
|
85
|
+
def get_cwes(opts = {})
|
86
|
+
data, _status_code, _headers = get_cwes_with_http_info(opts)
|
87
|
+
data
|
88
|
+
end
|
89
|
+
|
90
|
+
# Returns a list of all CWEs
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [Array<(Array<Cwe>, Integer, Hash)>] Array<Cwe> data, response status code and response headers
|
93
|
+
def get_cwes_with_http_info(opts = {})
|
94
|
+
if @api_client.config.debugging
|
95
|
+
@api_client.config.logger.debug 'Calling API: CweApi.get_cwes ...'
|
96
|
+
end
|
97
|
+
# resource path
|
98
|
+
local_var_path = '/v1/cwe'
|
99
|
+
|
100
|
+
# query parameters
|
101
|
+
query_params = opts[:query_params] || {}
|
102
|
+
|
103
|
+
# header parameters
|
104
|
+
header_params = opts[:header_params] || {}
|
105
|
+
# HTTP header 'Accept' (if needed)
|
106
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
107
|
+
|
108
|
+
# form parameters
|
109
|
+
form_params = opts[:form_params] || {}
|
110
|
+
|
111
|
+
# http body (model)
|
112
|
+
post_body = opts[:body]
|
113
|
+
|
114
|
+
# return_type
|
115
|
+
return_type = opts[:return_type] || 'Array<Cwe>'
|
116
|
+
|
117
|
+
# auth_names
|
118
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
119
|
+
|
120
|
+
new_options = opts.merge(
|
121
|
+
:header_params => header_params,
|
122
|
+
:query_params => query_params,
|
123
|
+
:form_params => form_params,
|
124
|
+
:body => post_body,
|
125
|
+
:auth_names => auth_names,
|
126
|
+
:return_type => return_type
|
127
|
+
)
|
128
|
+
|
129
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
130
|
+
if @api_client.config.debugging
|
131
|
+
@api_client.config.logger.debug "API called: CweApi#get_cwes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
132
|
+
end
|
133
|
+
return data, status_code, headers
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
@@ -0,0 +1,491 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module DependencyTracker
|
16
|
+
class DefaultApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Adds a project to a notification rule
|
23
|
+
# @param rule_uuid [String] The UUID of the rule to add a project to
|
24
|
+
# @param project_uuid [String] The UUID of the project to add to the rule
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NotificationRule]
|
27
|
+
def add_project_to_rule(rule_uuid, project_uuid, opts = {})
|
28
|
+
data, _status_code, _headers = add_project_to_rule_with_http_info(rule_uuid, project_uuid, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Adds a project to a notification rule
|
33
|
+
# @param rule_uuid [String] The UUID of the rule to add a project to
|
34
|
+
# @param project_uuid [String] The UUID of the project to add to the rule
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(NotificationRule, Integer, Hash)>] NotificationRule data, response status code and response headers
|
37
|
+
def add_project_to_rule_with_http_info(rule_uuid, project_uuid, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.add_project_to_rule ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'rule_uuid' is set
|
42
|
+
if @api_client.config.client_side_validation && rule_uuid.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'rule_uuid' when calling DefaultApi.add_project_to_rule"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'project_uuid' is set
|
46
|
+
if @api_client.config.client_side_validation && project_uuid.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'project_uuid' when calling DefaultApi.add_project_to_rule"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/v1/notification/rule/{ruleUuid}/project/{projectUuid}'.sub('{' + 'ruleUuid' + '}', CGI.escape(rule_uuid.to_s)).sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:body]
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:return_type] || 'NotificationRule'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => return_type
|
79
|
+
)
|
80
|
+
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: DefaultApi#add_project_to_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# Creates a new notification rule
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @option opts [NotificationRule] :body
|
91
|
+
# @return [NotificationRule]
|
92
|
+
def create_notification_rule(opts = {})
|
93
|
+
data, _status_code, _headers = create_notification_rule_with_http_info(opts)
|
94
|
+
data
|
95
|
+
end
|
96
|
+
|
97
|
+
# Creates a new notification rule
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [NotificationRule] :body
|
100
|
+
# @return [Array<(NotificationRule, Integer, Hash)>] NotificationRule data, response status code and response headers
|
101
|
+
def create_notification_rule_with_http_info(opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_notification_rule ...'
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/v1/notification/rule'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'NotificationRule'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# Deletes a notification rule
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @option opts [NotificationRule] :body
|
149
|
+
# @return [nil]
|
150
|
+
def delete_notification_rule(opts = {})
|
151
|
+
delete_notification_rule_with_http_info(opts)
|
152
|
+
nil
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deletes a notification rule
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @option opts [NotificationRule] :body
|
158
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
159
|
+
def delete_notification_rule_with_http_info(opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.delete_notification_rule ...'
|
162
|
+
end
|
163
|
+
# resource path
|
164
|
+
local_var_path = '/v1/notification/rule'
|
165
|
+
|
166
|
+
# query parameters
|
167
|
+
query_params = opts[:query_params] || {}
|
168
|
+
|
169
|
+
# header parameters
|
170
|
+
header_params = opts[:header_params] || {}
|
171
|
+
# HTTP header 'Content-Type'
|
172
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
173
|
+
|
174
|
+
# form parameters
|
175
|
+
form_params = opts[:form_params] || {}
|
176
|
+
|
177
|
+
# http body (model)
|
178
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
179
|
+
|
180
|
+
# return_type
|
181
|
+
return_type = opts[:return_type]
|
182
|
+
|
183
|
+
# auth_names
|
184
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
185
|
+
|
186
|
+
new_options = opts.merge(
|
187
|
+
:header_params => header_params,
|
188
|
+
:query_params => query_params,
|
189
|
+
:form_params => form_params,
|
190
|
+
:body => post_body,
|
191
|
+
:auth_names => auth_names,
|
192
|
+
:return_type => return_type
|
193
|
+
)
|
194
|
+
|
195
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
196
|
+
if @api_client.config.debugging
|
197
|
+
@api_client.config.logger.debug "API called: DefaultApi#delete_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
198
|
+
end
|
199
|
+
return data, status_code, headers
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns a list of all notification publishers
|
203
|
+
# @param [Hash] opts the optional parameters
|
204
|
+
# @return [Array<NotificationPublisher>]
|
205
|
+
def get_all_notification_publishers(opts = {})
|
206
|
+
data, _status_code, _headers = get_all_notification_publishers_with_http_info(opts)
|
207
|
+
data
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns a list of all notification publishers
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [Array<(Array<NotificationPublisher>, Integer, Hash)>] Array<NotificationPublisher> data, response status code and response headers
|
213
|
+
def get_all_notification_publishers_with_http_info(opts = {})
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_all_notification_publishers ...'
|
216
|
+
end
|
217
|
+
# resource path
|
218
|
+
local_var_path = '/v1/notification/publisher'
|
219
|
+
|
220
|
+
# query parameters
|
221
|
+
query_params = opts[:query_params] || {}
|
222
|
+
|
223
|
+
# header parameters
|
224
|
+
header_params = opts[:header_params] || {}
|
225
|
+
# HTTP header 'Accept' (if needed)
|
226
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
227
|
+
|
228
|
+
# form parameters
|
229
|
+
form_params = opts[:form_params] || {}
|
230
|
+
|
231
|
+
# http body (model)
|
232
|
+
post_body = opts[:body]
|
233
|
+
|
234
|
+
# return_type
|
235
|
+
return_type = opts[:return_type] || 'Array<NotificationPublisher>'
|
236
|
+
|
237
|
+
# auth_names
|
238
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
239
|
+
|
240
|
+
new_options = opts.merge(
|
241
|
+
:header_params => header_params,
|
242
|
+
:query_params => query_params,
|
243
|
+
:form_params => form_params,
|
244
|
+
:body => post_body,
|
245
|
+
:auth_names => auth_names,
|
246
|
+
:return_type => return_type
|
247
|
+
)
|
248
|
+
|
249
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_all_notification_publishers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
252
|
+
end
|
253
|
+
return data, status_code, headers
|
254
|
+
end
|
255
|
+
|
256
|
+
# Returns a list of all notification rules
|
257
|
+
# @param [Hash] opts the optional parameters
|
258
|
+
# @return [Array<NotificationRule>]
|
259
|
+
def get_all_notification_rules(opts = {})
|
260
|
+
data, _status_code, _headers = get_all_notification_rules_with_http_info(opts)
|
261
|
+
data
|
262
|
+
end
|
263
|
+
|
264
|
+
# Returns a list of all notification rules
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @return [Array<(Array<NotificationRule>, Integer, Hash)>] Array<NotificationRule> data, response status code and response headers
|
267
|
+
def get_all_notification_rules_with_http_info(opts = {})
|
268
|
+
if @api_client.config.debugging
|
269
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_all_notification_rules ...'
|
270
|
+
end
|
271
|
+
# resource path
|
272
|
+
local_var_path = '/v1/notification/rule'
|
273
|
+
|
274
|
+
# query parameters
|
275
|
+
query_params = opts[:query_params] || {}
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = opts[:header_params] || {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
281
|
+
|
282
|
+
# form parameters
|
283
|
+
form_params = opts[:form_params] || {}
|
284
|
+
|
285
|
+
# http body (model)
|
286
|
+
post_body = opts[:body]
|
287
|
+
|
288
|
+
# return_type
|
289
|
+
return_type = opts[:return_type] || 'Array<NotificationRule>'
|
290
|
+
|
291
|
+
# auth_names
|
292
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
293
|
+
|
294
|
+
new_options = opts.merge(
|
295
|
+
:header_params => header_params,
|
296
|
+
:query_params => query_params,
|
297
|
+
:form_params => form_params,
|
298
|
+
:body => post_body,
|
299
|
+
:auth_names => auth_names,
|
300
|
+
:return_type => return_type
|
301
|
+
)
|
302
|
+
|
303
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
304
|
+
if @api_client.config.debugging
|
305
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_all_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
306
|
+
end
|
307
|
+
return data, status_code, headers
|
308
|
+
end
|
309
|
+
|
310
|
+
# Removes a project from a notification rule
|
311
|
+
# @param rule_uuid [String] The UUID of the rule to remove the project from
|
312
|
+
# @param project_uuid [String] The UUID of the project to remove from the rule
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [NotificationRule]
|
315
|
+
def remove_project_from_rule(rule_uuid, project_uuid, opts = {})
|
316
|
+
data, _status_code, _headers = remove_project_from_rule_with_http_info(rule_uuid, project_uuid, opts)
|
317
|
+
data
|
318
|
+
end
|
319
|
+
|
320
|
+
# Removes a project from a notification rule
|
321
|
+
# @param rule_uuid [String] The UUID of the rule to remove the project from
|
322
|
+
# @param project_uuid [String] The UUID of the project to remove from the rule
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @return [Array<(NotificationRule, Integer, Hash)>] NotificationRule data, response status code and response headers
|
325
|
+
def remove_project_from_rule_with_http_info(rule_uuid, project_uuid, opts = {})
|
326
|
+
if @api_client.config.debugging
|
327
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.remove_project_from_rule ...'
|
328
|
+
end
|
329
|
+
# verify the required parameter 'rule_uuid' is set
|
330
|
+
if @api_client.config.client_side_validation && rule_uuid.nil?
|
331
|
+
fail ArgumentError, "Missing the required parameter 'rule_uuid' when calling DefaultApi.remove_project_from_rule"
|
332
|
+
end
|
333
|
+
# verify the required parameter 'project_uuid' is set
|
334
|
+
if @api_client.config.client_side_validation && project_uuid.nil?
|
335
|
+
fail ArgumentError, "Missing the required parameter 'project_uuid' when calling DefaultApi.remove_project_from_rule"
|
336
|
+
end
|
337
|
+
# resource path
|
338
|
+
local_var_path = '/v1/notification/rule/{ruleUuid}/project/{projectUuid}'.sub('{' + 'ruleUuid' + '}', CGI.escape(rule_uuid.to_s)).sub('{' + 'projectUuid' + '}', CGI.escape(project_uuid.to_s))
|
339
|
+
|
340
|
+
# query parameters
|
341
|
+
query_params = opts[:query_params] || {}
|
342
|
+
|
343
|
+
# header parameters
|
344
|
+
header_params = opts[:header_params] || {}
|
345
|
+
# HTTP header 'Accept' (if needed)
|
346
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
347
|
+
|
348
|
+
# form parameters
|
349
|
+
form_params = opts[:form_params] || {}
|
350
|
+
|
351
|
+
# http body (model)
|
352
|
+
post_body = opts[:body]
|
353
|
+
|
354
|
+
# return_type
|
355
|
+
return_type = opts[:return_type] || 'NotificationRule'
|
356
|
+
|
357
|
+
# auth_names
|
358
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
359
|
+
|
360
|
+
new_options = opts.merge(
|
361
|
+
:header_params => header_params,
|
362
|
+
:query_params => query_params,
|
363
|
+
:form_params => form_params,
|
364
|
+
:body => post_body,
|
365
|
+
:auth_names => auth_names,
|
366
|
+
:return_type => return_type
|
367
|
+
)
|
368
|
+
|
369
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
370
|
+
if @api_client.config.debugging
|
371
|
+
@api_client.config.logger.debug "API called: DefaultApi#remove_project_from_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
372
|
+
end
|
373
|
+
return data, status_code, headers
|
374
|
+
end
|
375
|
+
|
376
|
+
# Dispatches a SMTP notification test
|
377
|
+
# @param [Hash] opts the optional parameters
|
378
|
+
# @option opts [String] :destination
|
379
|
+
# @return [nil]
|
380
|
+
def test_smtp_publisher_config(opts = {})
|
381
|
+
test_smtp_publisher_config_with_http_info(opts)
|
382
|
+
nil
|
383
|
+
end
|
384
|
+
|
385
|
+
# Dispatches a SMTP notification test
|
386
|
+
# @param [Hash] opts the optional parameters
|
387
|
+
# @option opts [String] :destination
|
388
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
389
|
+
def test_smtp_publisher_config_with_http_info(opts = {})
|
390
|
+
if @api_client.config.debugging
|
391
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.test_smtp_publisher_config ...'
|
392
|
+
end
|
393
|
+
# resource path
|
394
|
+
local_var_path = '/v1/notification/publisher/test/smtp'
|
395
|
+
|
396
|
+
# query parameters
|
397
|
+
query_params = opts[:query_params] || {}
|
398
|
+
|
399
|
+
# header parameters
|
400
|
+
header_params = opts[:header_params] || {}
|
401
|
+
# HTTP header 'Content-Type'
|
402
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
403
|
+
|
404
|
+
# form parameters
|
405
|
+
form_params = opts[:form_params] || {}
|
406
|
+
form_params['destination'] = opts[:'destination'] if !opts[:'destination'].nil?
|
407
|
+
|
408
|
+
# http body (model)
|
409
|
+
post_body = opts[:body]
|
410
|
+
|
411
|
+
# return_type
|
412
|
+
return_type = opts[:return_type]
|
413
|
+
|
414
|
+
# auth_names
|
415
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
416
|
+
|
417
|
+
new_options = opts.merge(
|
418
|
+
:header_params => header_params,
|
419
|
+
:query_params => query_params,
|
420
|
+
:form_params => form_params,
|
421
|
+
:body => post_body,
|
422
|
+
:auth_names => auth_names,
|
423
|
+
:return_type => return_type
|
424
|
+
)
|
425
|
+
|
426
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
427
|
+
if @api_client.config.debugging
|
428
|
+
@api_client.config.logger.debug "API called: DefaultApi#test_smtp_publisher_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
429
|
+
end
|
430
|
+
return data, status_code, headers
|
431
|
+
end
|
432
|
+
|
433
|
+
# Updates a notification rule
|
434
|
+
# @param [Hash] opts the optional parameters
|
435
|
+
# @option opts [NotificationRule] :body
|
436
|
+
# @return [NotificationRule]
|
437
|
+
def update_notification_rule(opts = {})
|
438
|
+
data, _status_code, _headers = update_notification_rule_with_http_info(opts)
|
439
|
+
data
|
440
|
+
end
|
441
|
+
|
442
|
+
# Updates a notification rule
|
443
|
+
# @param [Hash] opts the optional parameters
|
444
|
+
# @option opts [NotificationRule] :body
|
445
|
+
# @return [Array<(NotificationRule, Integer, Hash)>] NotificationRule data, response status code and response headers
|
446
|
+
def update_notification_rule_with_http_info(opts = {})
|
447
|
+
if @api_client.config.debugging
|
448
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.update_notification_rule ...'
|
449
|
+
end
|
450
|
+
# resource path
|
451
|
+
local_var_path = '/v1/notification/rule'
|
452
|
+
|
453
|
+
# query parameters
|
454
|
+
query_params = opts[:query_params] || {}
|
455
|
+
|
456
|
+
# header parameters
|
457
|
+
header_params = opts[:header_params] || {}
|
458
|
+
# HTTP header 'Accept' (if needed)
|
459
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
460
|
+
# HTTP header 'Content-Type'
|
461
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
462
|
+
|
463
|
+
# form parameters
|
464
|
+
form_params = opts[:form_params] || {}
|
465
|
+
|
466
|
+
# http body (model)
|
467
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body'])
|
468
|
+
|
469
|
+
# return_type
|
470
|
+
return_type = opts[:return_type] || 'NotificationRule'
|
471
|
+
|
472
|
+
# auth_names
|
473
|
+
auth_names = opts[:auth_names] || ['X-Api-Key']
|
474
|
+
|
475
|
+
new_options = opts.merge(
|
476
|
+
:header_params => header_params,
|
477
|
+
:query_params => query_params,
|
478
|
+
:form_params => form_params,
|
479
|
+
:body => post_body,
|
480
|
+
:auth_names => auth_names,
|
481
|
+
:return_type => return_type
|
482
|
+
)
|
483
|
+
|
484
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug "API called: DefaultApi#update_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
487
|
+
end
|
488
|
+
return data, status_code, headers
|
489
|
+
end
|
490
|
+
end
|
491
|
+
end
|