require "uri" module HelixWebServices class AlphaApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # # Create a new changelist that can affect multiple files using different kinds of actions.\nIf you require the ability to integrate or move, for example, you can use this method. # @param server The server ID that we execute this particular method against. # @param changelist_request Description of changes to make # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_changes_post(server, changelist_request, opts = {}) data, status_code, headers = server_changes_post_with_http_info(server, changelist_request, opts) return data end # # Create a new changelist that can affect multiple files using different kinds of actions.\nIf you require the ability to integrate or move, for example, you can use this method. # @param server The server ID that we execute this particular method against. # @param changelist_request Description of changes to make # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_changes_post_with_http_info(server, changelist_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlphaApi#server_changes_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_changes_post" if server.nil? # verify the required parameter 'changelist_request' is set fail "Missing the required parameter 'changelist_request' when calling server_changes_post" if changelist_request.nil? # resource path path = "/p4d/v16.1/{server}/changes".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(changelist_request) auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CommandResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlphaApi#server_changes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists all configured repositories readable by the current user. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_git_fusion_repos_get(server, opts = {}) data, status_code, headers = server_git_fusion_repos_get_with_http_info(server, opts) return data end # # Lists all configured repositories readable by the current user. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def server_git_fusion_repos_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlphaApi#server_git_fusion_repos_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_git_fusion_repos_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/git-fusion-repos".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlphaApi#server_git_fusion_repos_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Submits a [p4gf_config](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j) file to create or update a repository configuration.\n\nIf the repository does not exist or has been previously deleted, this method saves contents of the config file to a new `p4gf_config` file.\nIf the repository has already been initialised, this method replaces all of the file contents of the specified repository's `p4gf_config` file. # @param server The server ID that we execute this particular method against. # @param body The new configuration # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_git_fusion_repos_post(server, body, opts = {}) data, status_code, headers = server_git_fusion_repos_post_with_http_info(server, body, opts) return data end # # Submits a [p4gf_config](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j) file to create or update a repository configuration.\n\nIf the repository does not exist or has been previously deleted, this method saves contents of the config file to a new `p4gf_config` file.\nIf the repository has already been initialised, this method replaces all of the file contents of the specified repository's `p4gf_config` file. # @param server The server ID that we execute this particular method against. # @param body The new configuration # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_git_fusion_repos_post_with_http_info(server, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlphaApi#server_git_fusion_repos_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_git_fusion_repos_post" if server.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_git_fusion_repos_post" if body.nil? # resource path path = "/p4d/v16.1/{server}/git-fusion-repos".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CommandResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlphaApi#server_git_fusion_repos_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Return configuration for the specified repository.\nGrabs and returns contents of the [p4gf_config](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j) file for given repository. # @param server The server ID that we execute this particular method against. # @param repo The Git Fusion Repo ID # @param [Hash] opts the optional parameters # @return [GitFusionRepoConfig] def server_git_fusion_repos_repo_get(server, repo, opts = {}) data, status_code, headers = server_git_fusion_repos_repo_get_with_http_info(server, repo, opts) return data end # # Return configuration for the specified repository.\nGrabs and returns contents of the [p4gf_config](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j) file for given repository. # @param server The server ID that we execute this particular method against. # @param repo The Git Fusion Repo ID # @param [Hash] opts the optional parameters # @return [Array<(GitFusionRepoConfig, Fixnum, Hash)>] GitFusionRepoConfig data, response status code and response headers def server_git_fusion_repos_repo_get_with_http_info(server, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlphaApi#server_git_fusion_repos_repo_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_git_fusion_repos_repo_get" if server.nil? # verify the required parameter 'repo' is set fail "Missing the required parameter 'repo' when calling server_git_fusion_repos_repo_get" if repo.nil? # resource path path = "/p4d/v16.1/{server}/git-fusion-repos/{repo}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'repo' + '}', repo.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GitFusionRepoConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlphaApi#server_git_fusion_repos_repo_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Deletes the repository configuration (The [p4gf_config file](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j)).\nContents of the repository are not deleted from Perforce. # @param server The server ID that we execute this particular method against. # @param repo The Git Fusion Repo ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_git_fusion_repos_repo_delete(server, repo, opts = {}) data, status_code, headers = server_git_fusion_repos_repo_delete_with_http_info(server, repo, opts) return data end # # Deletes the repository configuration (The [p4gf_config file](http://www.perforce.com/perforce/r15.1/manuals/git-fusion/chapter_dyn_ngj_3l.html#section_jgz_nz2_2j)).\nContents of the repository are not deleted from Perforce. # @param server The server ID that we execute this particular method against. # @param repo The Git Fusion Repo ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_git_fusion_repos_repo_delete_with_http_info(server, repo, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlphaApi#server_git_fusion_repos_repo_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_git_fusion_repos_repo_delete" if server.nil? # verify the required parameter 'repo' is set fail "Missing the required parameter 'repo' when calling server_git_fusion_repos_repo_delete" if repo.nil? # resource path path = "/p4d/v16.1/{server}/git-fusion-repos/{repo}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'repo' + '}', repo.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CommandResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlphaApi#server_git_fusion_repos_repo_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Updates values in the repository configuration.\nThis method will find all specified parameters and update each value for the specified repository's configuration file. # @param server The server ID that we execute this particular method against. # @param repo The Git Fusion Repo ID # @param body The new configuration # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_git_fusion_repos_repo_patch(server, repo, body, opts = {}) data, status_code, headers = server_git_fusion_repos_repo_patch_with_http_info(server, repo, body, opts) return data end # # Updates values in the repository configuration.\nThis method will find all specified parameters and update each value for the specified repository's configuration file. # @param server The server ID that we execute this particular method against. # @param repo The Git Fusion Repo ID # @param body The new configuration # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_git_fusion_repos_repo_patch_with_http_info(server, repo, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlphaApi#server_git_fusion_repos_repo_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_git_fusion_repos_repo_patch" if server.nil? # verify the required parameter 'repo' is set fail "Missing the required parameter 'repo' when calling server_git_fusion_repos_repo_patch" if repo.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_git_fusion_repos_repo_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/git-fusion-repos/{repo}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'repo' + '}', repo.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:PATCH, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CommandResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlphaApi#server_git_fusion_repos_repo_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end