=begin This is an automatically generated file. DO NOT EDIT. Generated from version 2.1.85 of the OpenAPI specification at https://github.com/athenianco/api-spec/releases/tag/2.1.85. Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.5.0 =end require 'cgi' module Athenian class EventsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Reset the precomputed data related to the pushed events. # @param [Hash] opts the optional parameters # @option opts [DeleteEventsCacheRequest] :body # @return [Object] def clear_precomputed_events(opts = {}) data, _status_code, _headers = clear_precomputed_events_with_http_info(opts) data end # Reset the precomputed data related to the pushed events. # @param [Hash] opts the optional parameters # @option opts [DeleteEventsCacheRequest] :body # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers def clear_precomputed_events_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.clear_precomputed_events ...' end # resource path local_var_path = '/events/clear_cache' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth', 'bearerAuth'] new_options = opts.merge( :operation => :"EventsApi.clear_precomputed_events", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#clear_precomputed_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve the labels associated with the deployment. # @param name [String] Name of the deployment. # @param [Hash] opts the optional parameters # @return [GetDeploymentLabels200Response] def get_deployment_labels(name, opts = {}) data, _status_code, _headers = get_deployment_labels_with_http_info(name, opts) data end # Retrieve the labels associated with the deployment. # @param name [String] Name of the deployment. # @param [Hash] opts the optional parameters # @return [Array<(GetDeploymentLabels200Response, Integer, Hash)>] GetDeploymentLabels200Response data, response status code and response headers def get_deployment_labels_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.get_deployment_labels ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling EventsApi.get_deployment_labels" end # resource path local_var_path = '/events/deployment/{name}/labels'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetDeploymentLabels200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth'] new_options = opts.merge( :operation => :"EventsApi.get_deployment_labels", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#get_deployment_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Modify the labels for the deployment applying the given instructions. # @param name [String] Name of the deployment. # @param [Hash] opts the optional parameters # @option opts [DeploymentModifyLabelsRequest] :body # @return [GetDeploymentLabels200Response] def modify_deployment_labels(name, opts = {}) data, _status_code, _headers = modify_deployment_labels_with_http_info(name, opts) data end # Modify the labels for the deployment applying the given instructions. # @param name [String] Name of the deployment. # @param [Hash] opts the optional parameters # @option opts [DeploymentModifyLabelsRequest] :body # @return [Array<(GetDeploymentLabels200Response, Integer, Hash)>] GetDeploymentLabels200Response data, response status code and response headers def modify_deployment_labels_with_http_info(name, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.modify_deployment_labels ...' end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling EventsApi.modify_deployment_labels" end # resource path local_var_path = '/events/deployment/{name}/labels'.sub('{' + 'name' + '}', CGI.escape(name.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'GetDeploymentLabels200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth'] new_options = opts.merge( :operation => :"EventsApi.modify_deployment_labels", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#modify_deployment_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Notify about new deployments. # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [NotifyDeployments200Response] def notify_deployments(opts = {}) data, _status_code, _headers = notify_deployments_with_http_info(opts) data end # Notify about new deployments. # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [Array<(NotifyDeployments200Response, Integer, Hash)>] NotifyDeployments200Response data, response status code and response headers def notify_deployments_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.notify_deployments ...' end # resource path local_var_path = '/events/deployments' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'NotifyDeployments200Response' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth'] new_options = opts.merge( :operation => :"EventsApi.notify_deployments", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#notify_deployments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Notify about new releases. The release settings must be set to \"event\". # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [Array] def notify_releases(opts = {}) data, _status_code, _headers = notify_releases_with_http_info(opts) data end # Notify about new releases. The release settings must be set to \"event\". # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def notify_releases_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: EventsApi.notify_releases ...' end # resource path local_var_path = '/events/releases' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:debug_return_type] || 'Array' # auth_names auth_names = opts[:debug_auth_names] || ['apiKeyAuth'] new_options = opts.merge( :operation => :"EventsApi.notify_releases", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: EventsApi#notify_releases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end