lib/cloudsmith-api/api/orgs_api.rb in cloudsmith-api-2.0.6 vs lib/cloudsmith-api/api/orgs_api.rb in cloudsmith-api-2.0.7
- old
+ new
@@ -489,10 +489,204 @@
if @api_client.config.debugging
@api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Create an evaluation request for this policy.
+ # Create an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [PackageLicensePolicyEvaluationRequestRequest] :data
+ # @return [PackageLicensePolicyEvaluationRequest]
+ def orgs_license_policy_evaluation_create(org, policy_slug_perm, opts = {})
+ data, _status_code, _headers = orgs_license_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts)
+ data
+ end
+
+ # Create an evaluation request for this policy.
+ # Create an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [PackageLicensePolicyEvaluationRequestRequest] :data
+ # @return [Array<(PackageLicensePolicyEvaluationRequest, Fixnum, Hash)>] PackageLicensePolicyEvaluationRequest data, response status code and response headers
+ def orgs_license_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_evaluation_create ...'
+ end
+ # verify the required parameter 'org' is set
+ if @api_client.config.client_side_validation && org.nil?
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_evaluation_create"
+ end
+ # verify the required parameter 'policy_slug_perm' is set
+ if @api_client.config.client_side_validation && policy_slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_create"
+ end
+ # resource path
+ local_var_path = '/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = @api_client.object_to_http_body(opts[:'data'])
+ auth_names = ['apikey']
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'PackageLicensePolicyEvaluationRequest')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_evaluation_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ # List evaluation requests for this policy.
+ # List evaluation requests for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page A page number within the paginated result set.
+ # @option opts [Integer] :page_size Number of results to return per page.
+ # @return [Array<PackageLicensePolicyEvaluationRequest>]
+ def orgs_license_policy_evaluation_list(org, policy_slug_perm, opts = {})
+ data, _status_code, _headers = orgs_license_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts)
+ data
+ end
+
+ # List evaluation requests for this policy.
+ # List evaluation requests for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page A page number within the paginated result set.
+ # @option opts [Integer] :page_size Number of results to return per page.
+ # @return [Array<(Array<PackageLicensePolicyEvaluationRequest>, Fixnum, Hash)>] Array<PackageLicensePolicyEvaluationRequest> data, response status code and response headers
+ def orgs_license_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_evaluation_list ...'
+ end
+ # verify the required parameter 'org' is set
+ if @api_client.config.client_side_validation && org.nil?
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_evaluation_list"
+ end
+ # verify the required parameter 'policy_slug_perm' is set
+ if @api_client.config.client_side_validation && policy_slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_list"
+ end
+ # resource path
+ local_var_path = '/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s)
+
+ # query parameters
+ query_params = {}
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
+
+ # header parameters
+ header_params = {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+ auth_names = ['apikey']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'Array<PackageLicensePolicyEvaluationRequest>')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_evaluation_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ # Retrieve an evaluation request for this policy.
+ # Retrieve an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param slug_perm
+ # @param [Hash] opts the optional parameters
+ # @return [PackageLicensePolicyEvaluationRequest]
+ def orgs_license_policy_evaluation_read(org, policy_slug_perm, slug_perm, opts = {})
+ data, _status_code, _headers = orgs_license_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts)
+ data
+ end
+
+ # Retrieve an evaluation request for this policy.
+ # Retrieve an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param slug_perm
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PackageLicensePolicyEvaluationRequest, Fixnum, Hash)>] PackageLicensePolicyEvaluationRequest data, response status code and response headers
+ def orgs_license_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_license_policy_evaluation_read ...'
+ end
+ # verify the required parameter 'org' is set
+ if @api_client.config.client_side_validation && org.nil?
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_license_policy_evaluation_read"
+ end
+ # verify the required parameter 'policy_slug_perm' is set
+ if @api_client.config.client_side_validation && policy_slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_read"
+ end
+ # verify the required parameter 'slug_perm' is set
+ if @api_client.config.client_side_validation && slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_license_policy_evaluation_read"
+ end
+ # resource path
+ local_var_path = '/orgs/{org}/license-policy/{policy_slug_perm}/evaluation/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+ auth_names = ['apikey']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'PackageLicensePolicyEvaluationRequest')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgsApi#orgs_license_policy_evaluation_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
# Get a list of all package license policies.
# Get a list of all package license policies.
# @param org
# @param [Hash] opts the optional parameters
# @option opts [Integer] :page A page number within the paginated result set.
@@ -2321,9 +2515,203 @@
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ # Create an evaluation request for this policy.
+ # Create an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [PackageVulnerabilityPolicyEvaluationRequestRequest] :data
+ # @return [PackageVulnerabilityPolicyEvaluationRequest]
+ def orgs_vulnerability_policy_evaluation_create(org, policy_slug_perm, opts = {})
+ data, _status_code, _headers = orgs_vulnerability_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts)
+ data
+ end
+
+ # Create an evaluation request for this policy.
+ # Create an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [PackageVulnerabilityPolicyEvaluationRequestRequest] :data
+ # @return [Array<(PackageVulnerabilityPolicyEvaluationRequest, Fixnum, Hash)>] PackageVulnerabilityPolicyEvaluationRequest data, response status code and response headers
+ def orgs_vulnerability_policy_evaluation_create_with_http_info(org, policy_slug_perm, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_evaluation_create ...'
+ end
+ # verify the required parameter 'org' is set
+ if @api_client.config.client_side_validation && org.nil?
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_evaluation_create"
+ end
+ # verify the required parameter 'policy_slug_perm' is set
+ if @api_client.config.client_side_validation && policy_slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_create"
+ end
+ # resource path
+ local_var_path = '/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = @api_client.object_to_http_body(opts[:'data'])
+ auth_names = ['apikey']
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'PackageVulnerabilityPolicyEvaluationRequest')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_evaluation_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ # List evaluation requests for this policy.
+ # List evaluation requests for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page A page number within the paginated result set.
+ # @option opts [Integer] :page_size Number of results to return per page.
+ # @return [Array<PackageVulnerabilityPolicyEvaluationRequest>]
+ def orgs_vulnerability_policy_evaluation_list(org, policy_slug_perm, opts = {})
+ data, _status_code, _headers = orgs_vulnerability_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts)
+ data
+ end
+
+ # List evaluation requests for this policy.
+ # List evaluation requests for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :page A page number within the paginated result set.
+ # @option opts [Integer] :page_size Number of results to return per page.
+ # @return [Array<(Array<PackageVulnerabilityPolicyEvaluationRequest>, Fixnum, Hash)>] Array<PackageVulnerabilityPolicyEvaluationRequest> data, response status code and response headers
+ def orgs_vulnerability_policy_evaluation_list_with_http_info(org, policy_slug_perm, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_evaluation_list ...'
+ end
+ # verify the required parameter 'org' is set
+ if @api_client.config.client_side_validation && org.nil?
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_evaluation_list"
+ end
+ # verify the required parameter 'policy_slug_perm' is set
+ if @api_client.config.client_side_validation && policy_slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_list"
+ end
+ # resource path
+ local_var_path = '/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s)
+
+ # query parameters
+ query_params = {}
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
+
+ # header parameters
+ header_params = {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+ auth_names = ['apikey']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'Array<PackageVulnerabilityPolicyEvaluationRequest>')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_evaluation_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ # Retrieve an evaluation request for this policy.
+ # Retrieve an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param slug_perm
+ # @param [Hash] opts the optional parameters
+ # @return [PackageVulnerabilityPolicyEvaluationRequest]
+ def orgs_vulnerability_policy_evaluation_read(org, policy_slug_perm, slug_perm, opts = {})
+ data, _status_code, _headers = orgs_vulnerability_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts)
+ data
+ end
+
+ # Retrieve an evaluation request for this policy.
+ # Retrieve an evaluation request for this policy.
+ # @param org
+ # @param policy_slug_perm
+ # @param slug_perm
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PackageVulnerabilityPolicyEvaluationRequest, Fixnum, Hash)>] PackageVulnerabilityPolicyEvaluationRequest data, response status code and response headers
+ def orgs_vulnerability_policy_evaluation_read_with_http_info(org, policy_slug_perm, slug_perm, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrgsApi.orgs_vulnerability_policy_evaluation_read ...'
+ end
+ # verify the required parameter 'org' is set
+ if @api_client.config.client_side_validation && org.nil?
+ fail ArgumentError, "Missing the required parameter 'org' when calling OrgsApi.orgs_vulnerability_policy_evaluation_read"
+ end
+ # verify the required parameter 'policy_slug_perm' is set
+ if @api_client.config.client_side_validation && policy_slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'policy_slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_read"
+ end
+ # verify the required parameter 'slug_perm' is set
+ if @api_client.config.client_side_validation && slug_perm.nil?
+ fail ArgumentError, "Missing the required parameter 'slug_perm' when calling OrgsApi.orgs_vulnerability_policy_evaluation_read"
+ end
+ # resource path
+ local_var_path = '/orgs/{org}/vulnerability-policy/{policy_slug_perm}/evaluation/{slug_perm}/'.sub('{' + 'org' + '}', org.to_s).sub('{' + 'policy_slug_perm' + '}', policy_slug_perm.to_s).sub('{' + 'slug_perm' + '}', slug_perm.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+ auth_names = ['apikey']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'PackageVulnerabilityPolicyEvaluationRequest')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrgsApi#orgs_vulnerability_policy_evaluation_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get a list of all package vulnerability policies.
# Get a list of all package vulnerability policies.