require "uri" module HelixWebServices class DefaultApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # # The list of registered p4d servers in your cluster.\n\nThis is provided by a special set of configuration files in the system.\nFor more information, consult the Helix Web Services user guide. # @param [Hash] opts the optional parameters # @return [Array] def config_p4ds_get(opts = {}) data, status_code, headers = config_p4ds_get_with_http_info(opts) return data end # # The list of registered p4d servers in your cluster.\n\nThis is provided by a special set of configuration files in the system.\nFor more information, consult the Helix Web Services user guide. # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def config_p4ds_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#config_p4ds_get ..." end # resource path path = "/hws/v16.1/config/p4ds".sub('{format}','json') # 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: DefaultApi#config_p4ds_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Logs into Helix Web Services.\n\nThis can either be a p4d instance or Helix Cloud, depending upon the\nconfiguration of your Helix Web Services instance. # @param login_request The user login and password. # @param [Hash] opts the optional parameters # @return [LoginResponse] def login_post(login_request, opts = {}) data, status_code, headers = login_post_with_http_info(login_request, opts) return data end # # Logs into Helix Web Services.\n\nThis can either be a p4d instance or Helix Cloud, depending upon the\nconfiguration of your Helix Web Services instance. # @param login_request The user login and password. # @param [Hash] opts the optional parameters # @return [Array<(LoginResponse, Fixnum, Hash)>] LoginResponse data, response status code and response headers def login_post_with_http_info(login_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#login_post ..." end # verify the required parameter 'login_request' is set fail "Missing the required parameter 'login_request' when calling login_post" if login_request.nil? # resource path path = "/hws/v16.1/login".sub('{format}','json') # 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(login_request) auth_names = [] 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 => 'LoginResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#login_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # A simple structure to monitor for \"problems\" an admin should take care of, and, report the current application version.\n\nThis method does not require authentication. # @param [Hash] opts the optional parameters # @return [HWSStatus] def status_get(opts = {}) data, status_code, headers = status_get_with_http_info(opts) return data end # # A simple structure to monitor for \"problems\" an admin should take care of, and, report the current application version.\n\nThis method does not require authentication. # @param [Hash] opts the optional parameters # @return [Array<(HWSStatus, Fixnum, Hash)>] HWSStatus data, response status code and response headers def status_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#status_get ..." end # resource path path = "/hws/v16.1/status".sub('{format}','json') # 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 => 'HWSStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#status_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available branches in the system.\nThe resources of this list are summaries of branches in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_branches_get(server, opts = {}) data, status_code, headers = server_branches_get_with_http_info(server, opts) return data end # # Lists available branches in the system.\nThe resources of this list are summaries of branches in the system. # @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_branches_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_branches_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_branches_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/branches".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: DefaultApi#server_branches_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new branch specification, like the `p4 branch` command. # @param server The server ID that we execute this particular method against. # @param body The branch specification. # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_branches_post(server, body, opts = {}) data, status_code, headers = server_branches_post_with_http_info(server, body, opts) return data end # # Creates a new branch specification, like the `p4 branch` command. # @param server The server ID that we execute this particular method against. # @param body The branch specification. # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_branches_post_with_http_info(server, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_branches_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_branches_post" if server.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_branches_post" if body.nil? # resource path path = "/p4d/v16.1/{server}/branches".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: DefaultApi#server_branches_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the branch spec details of the particular branch. # @param server The server ID that we execute this particular method against. # @param branch The branch ID # @param [Hash] opts the optional parameters # @return [BranchCommand] def server_branches_branch_get(server, branch, opts = {}) data, status_code, headers = server_branches_branch_get_with_http_info(server, branch, opts) return data end # # Returns the branch spec details of the particular branch. # @param server The server ID that we execute this particular method against. # @param branch The branch ID # @param [Hash] opts the optional parameters # @return [Array<(BranchCommand, Fixnum, Hash)>] BranchCommand data, response status code and response headers def server_branches_branch_get_with_http_info(server, branch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_branches_branch_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_branches_branch_get" if server.nil? # verify the required parameter 'branch' is set fail "Missing the required parameter 'branch' when calling server_branches_branch_get" if branch.nil? # resource path path = "/p4d/v16.1/{server}/branches/{branch}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'branch' + '}', branch.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 => 'BranchCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_branches_branch_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the branch specification, similar to the `p4 branch -d` command. # @param server The server ID that we execute this particular method against. # @param branch The branch ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_branches_branch_delete(server, branch, opts = {}) data, status_code, headers = server_branches_branch_delete_with_http_info(server, branch, opts) return data end # # Removes the branch specification, similar to the `p4 branch -d` command. # @param server The server ID that we execute this particular method against. # @param branch The branch ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_branches_branch_delete_with_http_info(server, branch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_branches_branch_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_branches_branch_delete" if server.nil? # verify the required parameter 'branch' is set fail "Missing the required parameter 'branch' when calling server_branches_branch_delete" if branch.nil? # resource path path = "/p4d/v16.1/{server}/branches/{branch}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'branch' + '}', branch.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: DefaultApi#server_branches_branch_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update branch specifications, similar to the `p4 branch` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param branch The branch ID # @param body Fields of the branch to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_branches_branch_patch(server, branch, body, opts = {}) data, status_code, headers = server_branches_branch_patch_with_http_info(server, branch, body, opts) return data end # # Update branch specifications, similar to the `p4 branch` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param branch The branch ID # @param body Fields of the branch to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_branches_branch_patch_with_http_info(server, branch, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_branches_branch_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_branches_branch_patch" if server.nil? # verify the required parameter 'branch' is set fail "Missing the required parameter 'branch' when calling server_branches_branch_patch" if branch.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_branches_branch_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/branches/{branch}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'branch' + '}', branch.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: DefaultApi#server_branches_branch_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available changes in the system.\nThe resources of this list are summaries of changes in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @option opts [Integer] :max Limit the number of change results # @option opts [String] :status The status of the changes, e.g., `submitted` # @option opts [String] :user The user's login who submitted the change # @option opts [String] :files Limit changes to the depot path expressions. See the link:http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_changes.html[changes] command description. # @return [Array] def server_changes_get(server, opts = {}) data, status_code, headers = server_changes_get_with_http_info(server, opts) return data end # # Lists available changes in the system.\nThe resources of this list are summaries of changes in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @option opts [Integer] :max Limit the number of change results # @option opts [String] :status The status of the changes, e.g., `submitted` # @option opts [String] :user The user's login who submitted the change # @option opts [String] :files Limit changes to the depot path expressions. See the link:http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_changes.html[changes] command description. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def server_changes_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_changes_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_changes_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/changes".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} query_params[:'max'] = opts[:'max'] if opts[:'max'] query_params[:'status'] = opts[:'status'] if opts[:'status'] query_params[:'user'] = opts[:'user'] if opts[:'user'] query_params[:'files'] = opts[:'files'] if opts[:'files'] # 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: DefaultApi#server_changes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the change spec details of the particular change. # @param server The server ID that we execute this particular method against. # @param change The change ID # @param [Hash] opts the optional parameters # @return [ChangeCommand] def server_changes_change_get(server, change, opts = {}) data, status_code, headers = server_changes_change_get_with_http_info(server, change, opts) return data end # # Returns the change spec details of the particular change. # @param server The server ID that we execute this particular method against. # @param change The change ID # @param [Hash] opts the optional parameters # @return [Array<(ChangeCommand, Fixnum, Hash)>] ChangeCommand data, response status code and response headers def server_changes_change_get_with_http_info(server, change, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_changes_change_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_changes_change_get" if server.nil? # verify the required parameter 'change' is set fail "Missing the required parameter 'change' when calling server_changes_change_get" if change.nil? # resource path path = "/p4d/v16.1/{server}/changes/{change}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'change' + '}', change.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 => 'ChangeCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_changes_change_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available clients in the system.\nThe resources of this list are summaries of clients in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_clients_get(server, opts = {}) data, status_code, headers = server_clients_get_with_http_info(server, opts) return data end # # Lists available clients in the system.\nThe resources of this list are summaries of clients in the system. # @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_clients_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_clients_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_clients_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/clients".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: DefaultApi#server_clients_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new client specification, like the `p4 client` command. # @param server The server ID that we execute this particular method against. # @param client The client spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_clients_post(server, client, opts = {}) data, status_code, headers = server_clients_post_with_http_info(server, client, opts) return data end # # Creates a new client specification, like the `p4 client` command. # @param server The server ID that we execute this particular method against. # @param client The client spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_clients_post_with_http_info(server, client, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_clients_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_clients_post" if server.nil? # verify the required parameter 'client' is set fail "Missing the required parameter 'client' when calling server_clients_post" if client.nil? # resource path path = "/p4d/v16.1/{server}/clients".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(client) 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: DefaultApi#server_clients_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the client spec details of the particular client. # @param server The server ID that we execute this particular method against. # @param client The client ID # @param [Hash] opts the optional parameters # @return [ClientCommand] def server_clients_client_get(server, client, opts = {}) data, status_code, headers = server_clients_client_get_with_http_info(server, client, opts) return data end # # Returns the client spec details of the particular client. # @param server The server ID that we execute this particular method against. # @param client The client ID # @param [Hash] opts the optional parameters # @return [Array<(ClientCommand, Fixnum, Hash)>] ClientCommand data, response status code and response headers def server_clients_client_get_with_http_info(server, client, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_clients_client_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_clients_client_get" if server.nil? # verify the required parameter 'client' is set fail "Missing the required parameter 'client' when calling server_clients_client_get" if client.nil? # resource path path = "/p4d/v16.1/{server}/clients/{client}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'client' + '}', client.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 => 'ClientCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_clients_client_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the client specification, similar to the `p4 client -d` command. # @param server The server ID that we execute this particular method against. # @param client The client ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_clients_client_delete(server, client, opts = {}) data, status_code, headers = server_clients_client_delete_with_http_info(server, client, opts) return data end # # Removes the client specification, similar to the `p4 client -d` command. # @param server The server ID that we execute this particular method against. # @param client The client ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_clients_client_delete_with_http_info(server, client, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_clients_client_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_clients_client_delete" if server.nil? # verify the required parameter 'client' is set fail "Missing the required parameter 'client' when calling server_clients_client_delete" if client.nil? # resource path path = "/p4d/v16.1/{server}/clients/{client}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'client' + '}', client.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: DefaultApi#server_clients_client_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update client specifications, similar to the `p4 client` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param client The client ID # @param body Fields of the client to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_clients_client_patch(server, client, body, opts = {}) data, status_code, headers = server_clients_client_patch_with_http_info(server, client, body, opts) return data end # # Update client specifications, similar to the `p4 client` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param client The client ID # @param body Fields of the client to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_clients_client_patch_with_http_info(server, client, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_clients_client_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_clients_client_patch" if server.nil? # verify the required parameter 'client' is set fail "Missing the required parameter 'client' when calling server_clients_client_patch" if client.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_clients_client_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/clients/{client}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'client' + '}', client.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: DefaultApi#server_clients_client_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Execute a Perforce command that requires no input.\nThis only allows commands that have been whitelisted on your system.\nSee the <<system_configuration>> section for details. # @param server The server ID that we execute this particular method against. # @param command The command name # @param [Hash] opts the optional parameters # @option opts [Array] :arg Command arguments # @return [CommandResponse] def server_commands_command_get(server, command, opts = {}) data, status_code, headers = server_commands_command_get_with_http_info(server, command, opts) return data end # # Execute a Perforce command that requires no input.\nThis only allows commands that have been whitelisted on your system.\nSee the <<system_configuration>> section for details. # @param server The server ID that we execute this particular method against. # @param command The command name # @param [Hash] opts the optional parameters # @option opts [Array] :arg Command arguments # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_commands_command_get_with_http_info(server, command, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_commands_command_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_commands_command_get" if server.nil? # verify the required parameter 'command' is set fail "Missing the required parameter 'command' when calling server_commands_command_get" if command.nil? # resource path path = "/p4d/v16.1/{server}/commands/{command}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'command' + '}', command.to_s) # query parameters query_params = {} query_params[:'arg'] = @api_client.build_collection_param(opts[:'arg'], :multi) if opts[:'arg'] # 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 => 'CommandResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_commands_command_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Execute a Perforce command that accepts input, like a spec.\nThis only allows commands that have been whitelisted on your system.\nSee the <<system_configuration>> section for details. # @param server The server ID that we execute this particular method against. # @param command The command name # @param [Hash] opts the optional parameters # @option opts [Array] :arg Command arguments # @option opts [CommandRequest] :input A hash used as input to the command # @return [CommandResponse] def server_commands_command_post(server, command, opts = {}) data, status_code, headers = server_commands_command_post_with_http_info(server, command, opts) return data end # # Execute a Perforce command that accepts input, like a spec.\nThis only allows commands that have been whitelisted on your system.\nSee the <<system_configuration>> section for details. # @param server The server ID that we execute this particular method against. # @param command The command name # @param [Hash] opts the optional parameters # @option opts [Array] :arg Command arguments # @option opts [CommandRequest] :input A hash used as input to the command # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_commands_command_post_with_http_info(server, command, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_commands_command_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_commands_command_post" if server.nil? # verify the required parameter 'command' is set fail "Missing the required parameter 'command' when calling server_commands_command_post" if command.nil? # resource path path = "/p4d/v16.1/{server}/commands/{command}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'command' + '}', command.to_s) # query parameters query_params = {} query_params[:'arg'] = @api_client.build_collection_param(opts[:'arg'], :multi) if opts[:'arg'] # 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(opts[:'input']) 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: DefaultApi#server_commands_command_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available counters in the system.\nThe resources of this list are summaries of counters in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_counters_get(server, opts = {}) data, status_code, headers = server_counters_get_with_http_info(server, opts) return data end # # Lists available counters in the system.\nThe resources of this list are summaries of counters in the system. # @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_counters_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_counters_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_counters_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/counters".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: DefaultApi#server_counters_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the counter spec details of the particular counter. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param [Hash] opts the optional parameters # @return [Counter] def server_counters_counter_get(server, counter, opts = {}) data, status_code, headers = server_counters_counter_get_with_http_info(server, counter, opts) return data end # # Returns the counter spec details of the particular counter. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param [Hash] opts the optional parameters # @return [Array<(Counter, Fixnum, Hash)>] Counter data, response status code and response headers def server_counters_counter_get_with_http_info(server, counter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_counters_counter_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_counters_counter_get" if server.nil? # verify the required parameter 'counter' is set fail "Missing the required parameter 'counter' when calling server_counters_counter_get" if counter.nil? # resource path path = "/p4d/v16.1/{server}/counters/{counter}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'counter' + '}', counter.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 => 'Counter') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_counters_counter_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update counter specifications, similar to the `p4 counter` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param body Fields of the counter to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_counters_counter_put(server, counter, body, opts = {}) data, status_code, headers = server_counters_counter_put_with_http_info(server, counter, body, opts) return data end # # Update counter specifications, similar to the `p4 counter` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param body Fields of the counter to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_counters_counter_put_with_http_info(server, counter, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_counters_counter_put ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_counters_counter_put" if server.nil? # verify the required parameter 'counter' is set fail "Missing the required parameter 'counter' when calling server_counters_counter_put" if counter.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_counters_counter_put" if body.nil? # resource path path = "/p4d/v16.1/{server}/counters/{counter}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'counter' + '}', counter.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(:PUT, 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: DefaultApi#server_counters_counter_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the counter specification, similar to the `p4 counter -d` command. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_counters_counter_delete(server, counter, opts = {}) data, status_code, headers = server_counters_counter_delete_with_http_info(server, counter, opts) return data end # # Removes the counter specification, similar to the `p4 counter -d` command. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_counters_counter_delete_with_http_info(server, counter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_counters_counter_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_counters_counter_delete" if server.nil? # verify the required parameter 'counter' is set fail "Missing the required parameter 'counter' when calling server_counters_counter_delete" if counter.nil? # resource path path = "/p4d/v16.1/{server}/counters/{counter}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'counter' + '}', counter.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: DefaultApi#server_counters_counter_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Increments a numerical counter, similar to the `p4 counter -i` command. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_counters_counter_increment_post(server, counter, opts = {}) data, status_code, headers = server_counters_counter_increment_post_with_http_info(server, counter, opts) return data end # # Increments a numerical counter, similar to the `p4 counter -i` command. # @param server The server ID that we execute this particular method against. # @param counter The counter ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_counters_counter_increment_post_with_http_info(server, counter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_counters_counter_increment_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_counters_counter_increment_post" if server.nil? # verify the required parameter 'counter' is set fail "Missing the required parameter 'counter' when calling server_counters_counter_increment_post" if counter.nil? # resource path path = "/p4d/v16.1/{server}/counters/{counter}/increment".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'counter' + '}', counter.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(: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: DefaultApi#server_counters_counter_increment_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available depots in the system.\nThe resources of this list are summaries of depots in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_depots_get(server, opts = {}) data, status_code, headers = server_depots_get_with_http_info(server, opts) return data end # # Lists available depots in the system.\nThe resources of this list are summaries of depots in the system. # @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_depots_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_depots_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_depots_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/depots".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: DefaultApi#server_depots_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new depot specification, like the `p4 depot` command. # @param server The server ID that we execute this particular method against. # @param depot The depot spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_depots_post(server, depot, opts = {}) data, status_code, headers = server_depots_post_with_http_info(server, depot, opts) return data end # # Creates a new depot specification, like the `p4 depot` command. # @param server The server ID that we execute this particular method against. # @param depot The depot spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_depots_post_with_http_info(server, depot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_depots_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_depots_post" if server.nil? # verify the required parameter 'depot' is set fail "Missing the required parameter 'depot' when calling server_depots_post" if depot.nil? # resource path path = "/p4d/v16.1/{server}/depots".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(depot) 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: DefaultApi#server_depots_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the depot spec details of the particular depot. # @param server The server ID that we execute this particular method against. # @param depot The depot ID # @param [Hash] opts the optional parameters # @return [DepotCommand] def server_depots_depot_get(server, depot, opts = {}) data, status_code, headers = server_depots_depot_get_with_http_info(server, depot, opts) return data end # # Returns the depot spec details of the particular depot. # @param server The server ID that we execute this particular method against. # @param depot The depot ID # @param [Hash] opts the optional parameters # @return [Array<(DepotCommand, Fixnum, Hash)>] DepotCommand data, response status code and response headers def server_depots_depot_get_with_http_info(server, depot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_depots_depot_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_depots_depot_get" if server.nil? # verify the required parameter 'depot' is set fail "Missing the required parameter 'depot' when calling server_depots_depot_get" if depot.nil? # resource path path = "/p4d/v16.1/{server}/depots/{depot}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'depot' + '}', depot.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 => 'DepotCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_depots_depot_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the depot specification, similar to the `p4 depot -d` command. # @param server The server ID that we execute this particular method against. # @param depot The depot ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_depots_depot_delete(server, depot, opts = {}) data, status_code, headers = server_depots_depot_delete_with_http_info(server, depot, opts) return data end # # Removes the depot specification, similar to the `p4 depot -d` command. # @param server The server ID that we execute this particular method against. # @param depot The depot ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_depots_depot_delete_with_http_info(server, depot, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_depots_depot_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_depots_depot_delete" if server.nil? # verify the required parameter 'depot' is set fail "Missing the required parameter 'depot' when calling server_depots_depot_delete" if depot.nil? # resource path path = "/p4d/v16.1/{server}/depots/{depot}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'depot' + '}', depot.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: DefaultApi#server_depots_depot_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update depot specifications, similar to the `p4 depot` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param depot The depot ID # @param body Fields of the depot to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_depots_depot_patch(server, depot, body, opts = {}) data, status_code, headers = server_depots_depot_patch_with_http_info(server, depot, body, opts) return data end # # Update depot specifications, similar to the `p4 depot` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param depot The depot ID # @param body Fields of the depot to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_depots_depot_patch_with_http_info(server, depot, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_depots_depot_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_depots_depot_patch" if server.nil? # verify the required parameter 'depot' is set fail "Missing the required parameter 'depot' when calling server_depots_depot_patch" if depot.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_depots_depot_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/depots/{depot}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'depot' + '}', depot.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: DefaultApi#server_depots_depot_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available groups in the system.\nThe resources of this list are summaries of groups in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_groups_get(server, opts = {}) data, status_code, headers = server_groups_get_with_http_info(server, opts) return data end # # Lists available groups in the system.\nThe resources of this list are summaries of groups in the system. # @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_groups_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_groups_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_groups_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/groups".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: DefaultApi#server_groups_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new group specification, like the `p4 group` command. # @param server The server ID that we execute this particular method against. # @param body The group spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_groups_post(server, body, opts = {}) data, status_code, headers = server_groups_post_with_http_info(server, body, opts) return data end # # Creates a new group specification, like the `p4 group` command. # @param server The server ID that we execute this particular method against. # @param body The group spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_groups_post_with_http_info(server, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_groups_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_groups_post" if server.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_groups_post" if body.nil? # resource path path = "/p4d/v16.1/{server}/groups".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: DefaultApi#server_groups_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the group spec details of the particular group. # @param server The server ID that we execute this particular method against. # @param group The group ID # @param [Hash] opts the optional parameters # @return [GroupCommand] def server_groups_group_get(server, group, opts = {}) data, status_code, headers = server_groups_group_get_with_http_info(server, group, opts) return data end # # Returns the group spec details of the particular group. # @param server The server ID that we execute this particular method against. # @param group The group ID # @param [Hash] opts the optional parameters # @return [Array<(GroupCommand, Fixnum, Hash)>] GroupCommand data, response status code and response headers def server_groups_group_get_with_http_info(server, group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_groups_group_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_groups_group_get" if server.nil? # verify the required parameter 'group' is set fail "Missing the required parameter 'group' when calling server_groups_group_get" if group.nil? # resource path path = "/p4d/v16.1/{server}/groups/{group}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'group' + '}', group.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 => 'GroupCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_groups_group_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the group specification, similar to the `p4 group -d` command. # @param server The server ID that we execute this particular method against. # @param group The group ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_groups_group_delete(server, group, opts = {}) data, status_code, headers = server_groups_group_delete_with_http_info(server, group, opts) return data end # # Removes the group specification, similar to the `p4 group -d` command. # @param server The server ID that we execute this particular method against. # @param group The group ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_groups_group_delete_with_http_info(server, group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_groups_group_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_groups_group_delete" if server.nil? # verify the required parameter 'group' is set fail "Missing the required parameter 'group' when calling server_groups_group_delete" if group.nil? # resource path path = "/p4d/v16.1/{server}/groups/{group}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'group' + '}', group.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: DefaultApi#server_groups_group_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update group specifications, similar to the `p4 group` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param group The group ID # @param body Fields of the group to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_groups_group_patch(server, group, body, opts = {}) data, status_code, headers = server_groups_group_patch_with_http_info(server, group, body, opts) return data end # # Update group specifications, similar to the `p4 group` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param group The group ID # @param body Fields of the group to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_groups_group_patch_with_http_info(server, group, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_groups_group_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_groups_group_patch" if server.nil? # verify the required parameter 'group' is set fail "Missing the required parameter 'group' when calling server_groups_group_patch" if group.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_groups_group_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/groups/{group}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'group' + '}', group.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: DefaultApi#server_groups_group_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available jobs in the system.\nThe resources of this list are summaries of jobs in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_jobs_get(server, opts = {}) data, status_code, headers = server_jobs_get_with_http_info(server, opts) return data end # # Lists available jobs in the system.\nThe resources of this list are summaries of jobs in the system. # @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_jobs_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/jobs".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: DefaultApi#server_jobs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new job specification, like the `p4 job` command. # @param server The server ID that we execute this particular method against. # @param job The job spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_jobs_post(server, job, opts = {}) data, status_code, headers = server_jobs_post_with_http_info(server, job, opts) return data end # # Creates a new job specification, like the `p4 job` command. # @param server The server ID that we execute this particular method against. # @param job The job spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_jobs_post_with_http_info(server, job, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_post" if server.nil? # verify the required parameter 'job' is set fail "Missing the required parameter 'job' when calling server_jobs_post" if job.nil? # resource path path = "/p4d/v16.1/{server}/jobs".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(job) 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: DefaultApi#server_jobs_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the job spec details of the particular job. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param [Hash] opts the optional parameters # @return [JobCommand] def server_jobs_job_get(server, job, opts = {}) data, status_code, headers = server_jobs_job_get_with_http_info(server, job, opts) return data end # # Returns the job spec details of the particular job. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param [Hash] opts the optional parameters # @return [Array<(JobCommand, Fixnum, Hash)>] JobCommand data, response status code and response headers def server_jobs_job_get_with_http_info(server, job, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_job_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_job_get" if server.nil? # verify the required parameter 'job' is set fail "Missing the required parameter 'job' when calling server_jobs_job_get" if job.nil? # resource path path = "/p4d/v16.1/{server}/jobs/{job}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'job' + '}', job.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 => 'JobCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_jobs_job_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the job specification, similar to the `p4 job -d` command. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_jobs_job_delete(server, job, opts = {}) data, status_code, headers = server_jobs_job_delete_with_http_info(server, job, opts) return data end # # Removes the job specification, similar to the `p4 job -d` command. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_jobs_job_delete_with_http_info(server, job, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_job_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_job_delete" if server.nil? # verify the required parameter 'job' is set fail "Missing the required parameter 'job' when calling server_jobs_job_delete" if job.nil? # resource path path = "/p4d/v16.1/{server}/jobs/{job}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'job' + '}', job.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: DefaultApi#server_jobs_job_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update job specifications, similar to the `p4 job` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param job_command Fields of the job to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_jobs_job_patch(server, job, job_command, opts = {}) data, status_code, headers = server_jobs_job_patch_with_http_info(server, job, job_command, opts) return data end # # Update job specifications, similar to the `p4 job` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param job_command Fields of the job to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_jobs_job_patch_with_http_info(server, job, job_command, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_job_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_job_patch" if server.nil? # verify the required parameter 'job' is set fail "Missing the required parameter 'job' when calling server_jobs_job_patch" if job.nil? # verify the required parameter 'job_command' is set fail "Missing the required parameter 'job_command' when calling server_jobs_job_patch" if job_command.nil? # resource path path = "/p4d/v16.1/{server}/jobs/{job}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'job' + '}', job.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(job_command) 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: DefaultApi#server_jobs_job_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Adds a fix record to the job for a particular changelist. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param change The change ID # @param [Hash] opts the optional parameters # @option opts [String] :status Specify the job status instead of using the default.\nThe default is typically `closed` or some other value defined in the `Presets` field specified in the `p4 jobspec` form.\n\nIf the changelist to which you're linking the job been submitted, the status value is immediately reflected in the job's status.\n\nIf the changelist is pending, the job status is changed on submission of the changelist, provided that the -s option is also supplied to p4 submit and the desired status appears next to the job in the p4 submit form's Jobs: field.\nTo leave a job unchanged, use the special status of same. # @return [CommandResponse] def server_jobs_job_fixes_change_post(server, job, change, opts = {}) data, status_code, headers = server_jobs_job_fixes_change_post_with_http_info(server, job, change, opts) return data end # # Adds a fix record to the job for a particular changelist. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param change The change ID # @param [Hash] opts the optional parameters # @option opts [String] :status Specify the job status instead of using the default.\nThe default is typically `closed` or some other value defined in the `Presets` field specified in the `p4 jobspec` form.\n\nIf the changelist to which you're linking the job been submitted, the status value is immediately reflected in the job's status.\n\nIf the changelist is pending, the job status is changed on submission of the changelist, provided that the -s option is also supplied to p4 submit and the desired status appears next to the job in the p4 submit form's Jobs: field.\nTo leave a job unchanged, use the special status of same. # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_jobs_job_fixes_change_post_with_http_info(server, job, change, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_job_fixes_change_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_job_fixes_change_post" if server.nil? # verify the required parameter 'job' is set fail "Missing the required parameter 'job' when calling server_jobs_job_fixes_change_post" if job.nil? # verify the required parameter 'change' is set fail "Missing the required parameter 'change' when calling server_jobs_job_fixes_change_post" if change.nil? # resource path path = "/p4d/v16.1/{server}/jobs/{job}/fixes/{change}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'job' + '}', job.to_s).sub('{' + 'change' + '}', change.to_s) # query parameters query_params = {} query_params[:'status'] = opts[:'status'] if opts[:'status'] # 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(: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: DefaultApi#server_jobs_job_fixes_change_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the fix record association for the job for a particular changelist. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param change The change ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_jobs_job_fixes_change_delete(server, job, change, opts = {}) data, status_code, headers = server_jobs_job_fixes_change_delete_with_http_info(server, job, change, opts) return data end # # Removes the fix record association for the job for a particular changelist. # @param server The server ID that we execute this particular method against. # @param job The job ID # @param change The change ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_jobs_job_fixes_change_delete_with_http_info(server, job, change, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_jobs_job_fixes_change_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_jobs_job_fixes_change_delete" if server.nil? # verify the required parameter 'job' is set fail "Missing the required parameter 'job' when calling server_jobs_job_fixes_change_delete" if job.nil? # verify the required parameter 'change' is set fail "Missing the required parameter 'change' when calling server_jobs_job_fixes_change_delete" if change.nil? # resource path path = "/p4d/v16.1/{server}/jobs/{job}/fixes/{change}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'job' + '}', job.to_s).sub('{' + 'change' + '}', change.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: DefaultApi#server_jobs_job_fixes_change_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available labels in the system.\nThe resources of this list are summaries of labels in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_labels_get(server, opts = {}) data, status_code, headers = server_labels_get_with_http_info(server, opts) return data end # # Lists available labels in the system.\nThe resources of this list are summaries of labels in the system. # @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_labels_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_labels_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_labels_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/labels".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: DefaultApi#server_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new label specification, like the `p4 label` command. # @param server The server ID that we execute this particular method against. # @param label The label spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_labels_post(server, label, opts = {}) data, status_code, headers = server_labels_post_with_http_info(server, label, opts) return data end # # Creates a new label specification, like the `p4 label` command. # @param server The server ID that we execute this particular method against. # @param label The label spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_labels_post_with_http_info(server, label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_labels_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_labels_post" if server.nil? # verify the required parameter 'label' is set fail "Missing the required parameter 'label' when calling server_labels_post" if label.nil? # resource path path = "/p4d/v16.1/{server}/labels".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(label) 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: DefaultApi#server_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the label spec details of the particular label. # @param server The server ID that we execute this particular method against. # @param label The label ID # @param [Hash] opts the optional parameters # @return [LabelCommand] def server_labels_label_get(server, label, opts = {}) data, status_code, headers = server_labels_label_get_with_http_info(server, label, opts) return data end # # Returns the label spec details of the particular label. # @param server The server ID that we execute this particular method against. # @param label The label ID # @param [Hash] opts the optional parameters # @return [Array<(LabelCommand, Fixnum, Hash)>] LabelCommand data, response status code and response headers def server_labels_label_get_with_http_info(server, label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_labels_label_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_labels_label_get" if server.nil? # verify the required parameter 'label' is set fail "Missing the required parameter 'label' when calling server_labels_label_get" if label.nil? # resource path path = "/p4d/v16.1/{server}/labels/{label}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'label' + '}', label.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 => 'LabelCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_labels_label_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the label specification, similar to the `p4 label -d` command. # @param server The server ID that we execute this particular method against. # @param label The label ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_labels_label_delete(server, label, opts = {}) data, status_code, headers = server_labels_label_delete_with_http_info(server, label, opts) return data end # # Removes the label specification, similar to the `p4 label -d` command. # @param server The server ID that we execute this particular method against. # @param label The label ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_labels_label_delete_with_http_info(server, label, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_labels_label_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_labels_label_delete" if server.nil? # verify the required parameter 'label' is set fail "Missing the required parameter 'label' when calling server_labels_label_delete" if label.nil? # resource path path = "/p4d/v16.1/{server}/labels/{label}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'label' + '}', label.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: DefaultApi#server_labels_label_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update label specifications, similar to the `p4 label` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param label The label ID # @param label_command Fields of the label to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_labels_label_patch(server, label, label_command, opts = {}) data, status_code, headers = server_labels_label_patch_with_http_info(server, label, label_command, opts) return data end # # Update label specifications, similar to the `p4 label` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param label The label ID # @param label_command Fields of the label to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_labels_label_patch_with_http_info(server, label, label_command, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_labels_label_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_labels_label_patch" if server.nil? # verify the required parameter 'label' is set fail "Missing the required parameter 'label' when calling server_labels_label_patch" if label.nil? # verify the required parameter 'label_command' is set fail "Missing the required parameter 'label_command' when calling server_labels_label_patch" if label_command.nil? # resource path path = "/p4d/v16.1/{server}/labels/{label}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'label' + '}', label.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(label_command) 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: DefaultApi#server_labels_label_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Logs into a Helix Versioning Engine (p4d) server. # @param server The server ID that we execute this particular method against. # @param body The user login and password. # @param [Hash] opts the optional parameters # @return [LoginResponse] def server_login_post(server, body, opts = {}) data, status_code, headers = server_login_post_with_http_info(server, body, opts) return data end # # Logs into a Helix Versioning Engine (p4d) server. # @param server The server ID that we execute this particular method against. # @param body The user login and password. # @param [Hash] opts the optional parameters # @return [Array<(LoginResponse, Fixnum, Hash)>] LoginResponse data, response status code and response headers def server_login_post_with_http_info(server, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_login_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_login_post" if server.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_login_post" if body.nil? # resource path path = "/p4d/v16.1/{server}/login".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 = [] 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 => 'LoginResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_login_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists depots, files, and directories in the system.\nThis combines the output of the `p4 depots`, `p4 dirs`, and `p4 files` commands, depending upon your path. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @option opts [String] :_path The path \"under a depot\" to query under, e.g., `//depot/main`.\nThis will list the directories and files underneath that path. # @return [Array] def server_paths_get(server, opts = {}) data, status_code, headers = server_paths_get_with_http_info(server, opts) return data end # # Lists depots, files, and directories in the system.\nThis combines the output of the `p4 depots`, `p4 dirs`, and `p4 files` commands, depending upon your path. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @option opts [String] :_path The path \"under a depot\" to query under, e.g., `//depot/main`.\nThis will list the directories and files underneath that path. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def server_paths_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_paths_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_paths_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/paths".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} query_params[:'path'] = opts[:'_path'] if opts[:'_path'] # 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: DefaultApi#server_paths_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns a list of available protections in the system.\nThe elements of this list are rows of the system's protections table.\n\nThis method requires superuser access.\n\nSee the output of http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_protect.html[`p4 protect`] for more information. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Protections] def server_protections_get(server, opts = {}) data, status_code, headers = server_protections_get_with_http_info(server, opts) return data end # # Returns a list of available protections in the system.\nThe elements of this list are rows of the system's protections table.\n\nThis method requires superuser access.\n\nSee the output of http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_protect.html[`p4 protect`] for more information. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array<(Protections, Fixnum, Hash)>] Protections data, response status code and response headers def server_protections_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_protections_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_protections_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/protections".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 => 'Protections') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_protections_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Updates the protections table.\n\nThis method requires superuser access. # @param server The server ID that we execute this particular method against. # @param protections The new protections table # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_protections_put(server, protections, opts = {}) data, status_code, headers = server_protections_put_with_http_info(server, protections, opts) return data end # # Updates the protections table.\n\nThis method requires superuser access. # @param server The server ID that we execute this particular method against. # @param protections The new protections table # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_protections_put_with_http_info(server, protections, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_protections_put ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_protections_put" if server.nil? # verify the required parameter 'protections' is set fail "Missing the required parameter 'protections' when calling server_protections_put" if protections.nil? # resource path path = "/p4d/v16.1/{server}/protections".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(protections) auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:PUT, 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: DefaultApi#server_protections_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available servers in the system.\nThe resources of this list are summaries of servers in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_servers_get(server, opts = {}) data, status_code, headers = server_servers_get_with_http_info(server, opts) return data end # # Lists available servers in the system.\nThe resources of this list are summaries of servers in the system. # @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_servers_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_servers_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_servers_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/servers".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: DefaultApi#server_servers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new server specification, like the `p4 server` command. # @param server The server ID that we execute this particular method against. # @param server_command The server spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_servers_post(server, server_command, opts = {}) data, status_code, headers = server_servers_post_with_http_info(server, server_command, opts) return data end # # Creates a new server specification, like the `p4 server` command. # @param server The server ID that we execute this particular method against. # @param server_command The server spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_servers_post_with_http_info(server, server_command, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_servers_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_servers_post" if server.nil? # verify the required parameter 'server_command' is set fail "Missing the required parameter 'server_command' when calling server_servers_post" if server_command.nil? # resource path path = "/p4d/v16.1/{server}/servers".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(server_command) 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: DefaultApi#server_servers_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the server spec details of the particular server. # @param server The server ID that we execute this particular method against. # @param server_id The server ID of the server spec # @param [Hash] opts the optional parameters # @return [ServerCommand] def server_servers_server_id_get(server, server_id, opts = {}) data, status_code, headers = server_servers_server_id_get_with_http_info(server, server_id, opts) return data end # # Returns the server spec details of the particular server. # @param server The server ID that we execute this particular method against. # @param server_id The server ID of the server spec # @param [Hash] opts the optional parameters # @return [Array<(ServerCommand, Fixnum, Hash)>] ServerCommand data, response status code and response headers def server_servers_server_id_get_with_http_info(server, server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_servers_server_id_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_servers_server_id_get" if server.nil? # verify the required parameter 'server_id' is set fail "Missing the required parameter 'server_id' when calling server_servers_server_id_get" if server_id.nil? # resource path path = "/p4d/v16.1/{server}/servers/{serverId}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'serverId' + '}', server_id.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 => 'ServerCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_servers_server_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the server specification, similar to the `p4 server -d` command. # @param server The server ID that we execute this particular method against. # @param server_id The server ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_servers_server_id_delete(server, server_id, opts = {}) data, status_code, headers = server_servers_server_id_delete_with_http_info(server, server_id, opts) return data end # # Removes the server specification, similar to the `p4 server -d` command. # @param server The server ID that we execute this particular method against. # @param server_id The server ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_servers_server_id_delete_with_http_info(server, server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_servers_server_id_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_servers_server_id_delete" if server.nil? # verify the required parameter 'server_id' is set fail "Missing the required parameter 'server_id' when calling server_servers_server_id_delete" if server_id.nil? # resource path path = "/p4d/v16.1/{server}/servers/{serverId}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'serverId' + '}', server_id.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: DefaultApi#server_servers_server_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update server specifications, similar to the `p4 server` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param server_id The server ID # @param server_command Fields of the server to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_servers_server_id_patch(server, server_id, server_command, opts = {}) data, status_code, headers = server_servers_server_id_patch_with_http_info(server, server_id, server_command, opts) return data end # # Update server specifications, similar to the `p4 server` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param server_id The server ID # @param server_command Fields of the server to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_servers_server_id_patch_with_http_info(server, server_id, server_command, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_servers_server_id_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_servers_server_id_patch" if server.nil? # verify the required parameter 'server_id' is set fail "Missing the required parameter 'server_id' when calling server_servers_server_id_patch" if server_id.nil? # verify the required parameter 'server_command' is set fail "Missing the required parameter 'server_command' when calling server_servers_server_id_patch" if server_command.nil? # resource path path = "/p4d/v16.1/{server}/servers/{serverId}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'serverId' + '}', server_id.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(server_command) 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: DefaultApi#server_servers_server_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available streams in the system.\nThe resources of this list are summaries of streams in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array] def server_streams_get(server, opts = {}) data, status_code, headers = server_streams_get_with_http_info(server, opts) return data end # # Lists available streams in the system.\nThe resources of this list are summaries of streams in the system. # @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_streams_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_streams_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_streams_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/streams".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: DefaultApi#server_streams_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new stream specification, like the `p4 stream` command. # @param server The server ID that we execute this particular method against. # @param body The stream spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_streams_post(server, body, opts = {}) data, status_code, headers = server_streams_post_with_http_info(server, body, opts) return data end # # Creates a new stream specification, like the `p4 stream` command. # @param server The server ID that we execute this particular method against. # @param body The stream spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_streams_post_with_http_info(server, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_streams_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_streams_post" if server.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_streams_post" if body.nil? # resource path path = "/p4d/v16.1/{server}/streams".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: DefaultApi#server_streams_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the stream spec details of the particular stream. # @param server The server ID that we execute this particular method against. # @param stream The stream ID # @param [Hash] opts the optional parameters # @return [StreamCommand] def server_streams_stream_get(server, stream, opts = {}) data, status_code, headers = server_streams_stream_get_with_http_info(server, stream, opts) return data end # # Returns the stream spec details of the particular stream. # @param server The server ID that we execute this particular method against. # @param stream The stream ID # @param [Hash] opts the optional parameters # @return [Array<(StreamCommand, Fixnum, Hash)>] StreamCommand data, response status code and response headers def server_streams_stream_get_with_http_info(server, stream, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_streams_stream_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_streams_stream_get" if server.nil? # verify the required parameter 'stream' is set fail "Missing the required parameter 'stream' when calling server_streams_stream_get" if stream.nil? # resource path path = "/p4d/v16.1/{server}/streams/stream".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} query_params[:'stream'] = stream # 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 => 'StreamCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_streams_stream_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the stream specification, similar to the `p4 stream -d` command. # @param server The server ID that we execute this particular method against. # @param stream The stream ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_streams_stream_delete(server, stream, opts = {}) data, status_code, headers = server_streams_stream_delete_with_http_info(server, stream, opts) return data end # # Removes the stream specification, similar to the `p4 stream -d` command. # @param server The server ID that we execute this particular method against. # @param stream The stream ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_streams_stream_delete_with_http_info(server, stream, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_streams_stream_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_streams_stream_delete" if server.nil? # verify the required parameter 'stream' is set fail "Missing the required parameter 'stream' when calling server_streams_stream_delete" if stream.nil? # resource path path = "/p4d/v16.1/{server}/streams/stream".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} query_params[:'stream'] = stream # 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: DefaultApi#server_streams_stream_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update stream specifications, similar to the `p4 stream` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param stream The stream ID # @param body Fields of the stream to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_streams_stream_patch(server, stream, body, opts = {}) data, status_code, headers = server_streams_stream_patch_with_http_info(server, stream, body, opts) return data end # # Update stream specifications, similar to the `p4 stream` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param stream The stream ID # @param body Fields of the stream to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_streams_stream_patch_with_http_info(server, stream, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_streams_stream_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_streams_stream_patch" if server.nil? # verify the required parameter 'stream' is set fail "Missing the required parameter 'stream' when calling server_streams_stream_patch" if stream.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_streams_stream_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/streams/stream".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} query_params[:'stream'] = stream # 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: DefaultApi#server_streams_stream_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns a list of available triggers in the system.\nThe elements of this list are rows of the system's triggers table.\n\nThis method requires superuser access. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Triggers] def server_triggers_get(server, opts = {}) data, status_code, headers = server_triggers_get_with_http_info(server, opts) return data end # # Returns a list of available triggers in the system.\nThe elements of this list are rows of the system's triggers table.\n\nThis method requires superuser access. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @return [Array<(Triggers, Fixnum, Hash)>] Triggers data, response status code and response headers def server_triggers_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_triggers_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_triggers_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/triggers".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 => 'Triggers') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_triggers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Updates the triggers table.\n\nThis method requires superuser access. # @param server The server ID that we execute this particular method against. # @param triggers The new triggers table # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_triggers_put(server, triggers, opts = {}) data, status_code, headers = server_triggers_put_with_http_info(server, triggers, opts) return data end # # Updates the triggers table.\n\nThis method requires superuser access. # @param server The server ID that we execute this particular method against. # @param triggers The new triggers table # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_triggers_put_with_http_info(server, triggers, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_triggers_put ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_triggers_put" if server.nil? # verify the required parameter 'triggers' is set fail "Missing the required parameter 'triggers' when calling server_triggers_put" if triggers.nil? # resource path path = "/p4d/v16.1/{server}/triggers".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(triggers) auth_names = ['ticket_auth'] data, status_code, headers = @api_client.call_api(:PUT, 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: DefaultApi#server_triggers_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Lists available users in the system.\nThe resources of this list are summaries of users in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_service If true, shows service users in the list. # @option opts [Integer] :max Cap the number of users reported to this amount. # @return [Array] def server_users_get(server, opts = {}) data, status_code, headers = server_users_get_with_http_info(server, opts) return data end # # Lists available users in the system.\nThe resources of this list are summaries of users in the system. # @param server The server ID that we execute this particular method against. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :include_service If true, shows service users in the list. # @option opts [Integer] :max Cap the number of users reported to this amount. # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def server_users_get_with_http_info(server, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_users_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_users_get" if server.nil? # resource path path = "/p4d/v16.1/{server}/users".sub('{format}','json').sub('{' + 'server' + '}', server.to_s) # query parameters query_params = {} query_params[:'includeService'] = opts[:'include_service'] if opts[:'include_service'] query_params[:'max'] = opts[:'max'] if opts[:'max'] # 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: DefaultApi#server_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Creates a new user specification, like the `p4 user` command. # @param server The server ID that we execute this particular method against. # @param body The user spec # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_users_post(server, body, opts = {}) data, status_code, headers = server_users_post_with_http_info(server, body, opts) return data end # # Creates a new user specification, like the `p4 user` command. # @param server The server ID that we execute this particular method against. # @param body The user spec # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_users_post_with_http_info(server, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_users_post ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_users_post" if server.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_users_post" if body.nil? # resource path path = "/p4d/v16.1/{server}/users".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: DefaultApi#server_users_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Returns the user spec details of the particular user. # @param server The server ID that we execute this particular method against. # @param user The user ID # @param [Hash] opts the optional parameters # @return [UserCommand] def server_users_user_get(server, user, opts = {}) data, status_code, headers = server_users_user_get_with_http_info(server, user, opts) return data end # # Returns the user spec details of the particular user. # @param server The server ID that we execute this particular method against. # @param user The user ID # @param [Hash] opts the optional parameters # @return [Array<(UserCommand, Fixnum, Hash)>] UserCommand data, response status code and response headers def server_users_user_get_with_http_info(server, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_users_user_get ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_users_user_get" if server.nil? # verify the required parameter 'user' is set fail "Missing the required parameter 'user' when calling server_users_user_get" if user.nil? # resource path path = "/p4d/v16.1/{server}/users/{user}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'user' + '}', user.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 => 'UserCommand') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#server_users_user_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Removes the user specification, similar to the `p4 user -d` command. # @param server The server ID that we execute this particular method against. # @param user The user ID # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_users_user_delete(server, user, opts = {}) data, status_code, headers = server_users_user_delete_with_http_info(server, user, opts) return data end # # Removes the user specification, similar to the `p4 user -d` command. # @param server The server ID that we execute this particular method against. # @param user The user ID # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_users_user_delete_with_http_info(server, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_users_user_delete ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_users_user_delete" if server.nil? # verify the required parameter 'user' is set fail "Missing the required parameter 'user' when calling server_users_user_delete" if user.nil? # resource path path = "/p4d/v16.1/{server}/users/{user}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'user' + '}', user.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: DefaultApi#server_users_user_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # # Update user specifications, similar to the `p4 user` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param user The user ID # @param body Fields of the user to update # @param [Hash] opts the optional parameters # @return [CommandResponse] def server_users_user_patch(server, user, body, opts = {}) data, status_code, headers = server_users_user_patch_with_http_info(server, user, body, opts) return data end # # Update user specifications, similar to the `p4 user` command.\nOnly the specified parameters in the body will be changed. # @param server The server ID that we execute this particular method against. # @param user The user ID # @param body Fields of the user to update # @param [Hash] opts the optional parameters # @return [Array<(CommandResponse, Fixnum, Hash)>] CommandResponse data, response status code and response headers def server_users_user_patch_with_http_info(server, user, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: DefaultApi#server_users_user_patch ..." end # verify the required parameter 'server' is set fail "Missing the required parameter 'server' when calling server_users_user_patch" if server.nil? # verify the required parameter 'user' is set fail "Missing the required parameter 'user' when calling server_users_user_patch" if user.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling server_users_user_patch" if body.nil? # resource path path = "/p4d/v16.1/{server}/users/{user}".sub('{format}','json').sub('{' + 'server' + '}', server.to_s).sub('{' + 'user' + '}', user.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: DefaultApi#server_users_user_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end