# coding: utf-8 """ DefaultApi.py Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from __future__ import absolute_import import sys import os # python 2 and python 3 compatibility library from six import iteritems from ..configuration import Configuration from ..api_client import ApiClient class DefaultApi(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen """ def __init__(self, api_client=None): config = Configuration() if api_client: self.api_client = api_client else: if not config.api_client: config.api_client = ApiClient() self.api_client = config.api_client def config_p4ds_get(self, **kwargs): """ 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. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.config_p4ds_get(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: list[P4dConfigId] If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method config_p4ds_get" % key ) params[key] = val del params['kwargs'] resource_path = '/hws/v16.1/config/p4ds'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[P4dConfigId]', auth_settings=auth_settings, callback=params.get('callback')) return response def login_post(self, login_request, **kwargs): """ 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. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.login_post(login_request, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param LoginRequest login_request: The user login and password. (required) :return: LoginResponse If the method is called asynchronously, returns the request thread. """ all_params = ['login_request'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method login_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'login_request' is set if ('login_request' not in params) or (params['login_request'] is None): raise ValueError("Missing the required parameter `login_request` when calling `login_post`") resource_path = '/hws/v16.1/login'.replace('{format}', 'json') method = 'POST' path_params = {} query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'login_request' in params: body_params = params['login_request'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='LoginResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def status_get(self, **kwargs): """ 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. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.status_get(callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :return: HWSStatus If the method is called asynchronously, returns the request thread. """ all_params = [] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method status_get" % key ) params[key] = val del params['kwargs'] resource_path = '/hws/v16.1/status'.replace('{format}', 'json') method = 'GET' path_params = {} query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='HWSStatus', auth_settings=auth_settings, callback=params.get('callback')) return response def server_branches_get(self, server, **kwargs): """ Lists available branches in the system.\nThe resources of this list are summaries of branches in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_branches_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[BranchesCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_branches_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_branches_get`") resource_path = '/p4d/v16.1/{server}/branches'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[BranchesCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_branches_post(self, server, body, **kwargs): """ Creates a new branch specification, like the `p4 branch` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_branches_post(server, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param BranchCommand body: The branch specification. (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_branches_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_branches_post`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_branches_post`") resource_path = '/p4d/v16.1/{server}/branches'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_branches_branch_get(self, server, branch, **kwargs): """ Returns the branch spec details of the particular branch. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_branches_branch_get(server, branch, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str branch: The branch ID (required) :return: BranchCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'branch'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_branches_branch_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_branches_branch_get`") # verify the required parameter 'branch' is set if ('branch' not in params) or (params['branch'] is None): raise ValueError("Missing the required parameter `branch` when calling `server_branches_branch_get`") resource_path = '/p4d/v16.1/{server}/branches/{branch}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'branch' in params: path_params['branch'] = params['branch'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='BranchCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_branches_branch_delete(self, server, branch, **kwargs): """ Removes the branch specification, similar to the `p4 branch -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_branches_branch_delete(server, branch, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str branch: The branch ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'branch'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_branches_branch_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_branches_branch_delete`") # verify the required parameter 'branch' is set if ('branch' not in params) or (params['branch'] is None): raise ValueError("Missing the required parameter `branch` when calling `server_branches_branch_delete`") resource_path = '/p4d/v16.1/{server}/branches/{branch}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'branch' in params: path_params['branch'] = params['branch'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_branches_branch_patch(self, server, branch, body, **kwargs): """ Update branch specifications, similar to the `p4 branch` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_branches_branch_patch(server, branch, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str branch: The branch ID (required) :param BranchCommand body: Fields of the branch to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'branch', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_branches_branch_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_branches_branch_patch`") # verify the required parameter 'branch' is set if ('branch' not in params) or (params['branch'] is None): raise ValueError("Missing the required parameter `branch` when calling `server_branches_branch_patch`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_branches_branch_patch`") resource_path = '/p4d/v16.1/{server}/branches/{branch}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'branch' in params: path_params['branch'] = params['branch'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_changes_get(self, server, **kwargs): """ Lists available changes in the system.\nThe resources of this list are summaries of changes in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_changes_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param int max: Limit the number of change results :param str status: The status of the changes, e.g., `submitted` :param str user: The user's login who submitted the change :param str _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: list[ChangesCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'max', 'status', 'user', '_files'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_changes_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_changes_get`") resource_path = '/p4d/v16.1/{server}/changes'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} if 'max' in params: query_params['max'] = params['max'] if 'status' in params: query_params['status'] = params['status'] if 'user' in params: query_params['user'] = params['user'] if '_files' in params: query_params['files'] = params['_files'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[ChangesCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_changes_change_get(self, server, change, **kwargs): """ Returns the change spec details of the particular change. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_changes_change_get(server, change, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str change: The change ID (required) :return: ChangeCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'change'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_changes_change_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_changes_change_get`") # verify the required parameter 'change' is set if ('change' not in params) or (params['change'] is None): raise ValueError("Missing the required parameter `change` when calling `server_changes_change_get`") resource_path = '/p4d/v16.1/{server}/changes/{change}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'change' in params: path_params['change'] = params['change'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='ChangeCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_clients_get(self, server, **kwargs): """ Lists available clients in the system.\nThe resources of this list are summaries of clients in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_clients_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[ClientsCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_clients_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_clients_get`") resource_path = '/p4d/v16.1/{server}/clients'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[ClientsCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_clients_post(self, server, client, **kwargs): """ Creates a new client specification, like the `p4 client` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_clients_post(server, client, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param ClientCommand client: The client spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'client'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_clients_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_clients_post`") # verify the required parameter 'client' is set if ('client' not in params) or (params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `server_clients_post`") resource_path = '/p4d/v16.1/{server}/clients'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'client' in params: body_params = params['client'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_clients_client_get(self, server, client, **kwargs): """ Returns the client spec details of the particular client. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_clients_client_get(server, client, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str client: The client ID (required) :return: ClientCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'client'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_clients_client_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_clients_client_get`") # verify the required parameter 'client' is set if ('client' not in params) or (params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `server_clients_client_get`") resource_path = '/p4d/v16.1/{server}/clients/{client}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'client' in params: path_params['client'] = params['client'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='ClientCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_clients_client_delete(self, server, client, **kwargs): """ Removes the client specification, similar to the `p4 client -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_clients_client_delete(server, client, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str client: The client ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'client'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_clients_client_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_clients_client_delete`") # verify the required parameter 'client' is set if ('client' not in params) or (params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `server_clients_client_delete`") resource_path = '/p4d/v16.1/{server}/clients/{client}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'client' in params: path_params['client'] = params['client'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_clients_client_patch(self, server, client, body, **kwargs): """ Update client specifications, similar to the `p4 client` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_clients_client_patch(server, client, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str client: The client ID (required) :param ClientCommand body: Fields of the client to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'client', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_clients_client_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_clients_client_patch`") # verify the required parameter 'client' is set if ('client' not in params) or (params['client'] is None): raise ValueError("Missing the required parameter `client` when calling `server_clients_client_patch`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_clients_client_patch`") resource_path = '/p4d/v16.1/{server}/clients/{client}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'client' in params: path_params['client'] = params['client'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_commands_command_get(self, server, command, **kwargs): """ Execute a Perforce command that requires no input.\nThis only allows commands that have been whitelisted on your system.\nSee the <> section for details. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_commands_command_get(server, command, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str command: The command name (required) :param list[str] arg: Command arguments :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'command', 'arg'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_commands_command_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_commands_command_get`") # verify the required parameter 'command' is set if ('command' not in params) or (params['command'] is None): raise ValueError("Missing the required parameter `command` when calling `server_commands_command_get`") resource_path = '/p4d/v16.1/{server}/commands/{command}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'command' in params: path_params['command'] = params['command'] query_params = {} if 'arg' in params: query_params['arg'] = params['arg'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_commands_command_post(self, server, command, **kwargs): """ Execute a Perforce command that accepts input, like a spec.\nThis only allows commands that have been whitelisted on your system.\nSee the <> section for details. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_commands_command_post(server, command, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str command: The command name (required) :param list[str] arg: Command arguments :param CommandRequest input: A hash used as input to the command :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'command', 'arg', 'input'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_commands_command_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_commands_command_post`") # verify the required parameter 'command' is set if ('command' not in params) or (params['command'] is None): raise ValueError("Missing the required parameter `command` when calling `server_commands_command_post`") resource_path = '/p4d/v16.1/{server}/commands/{command}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'command' in params: path_params['command'] = params['command'] query_params = {} if 'arg' in params: query_params['arg'] = params['arg'] header_params = {} form_params = {} files = {} body_params = None if 'input' in params: body_params = params['input'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_counters_get(self, server, **kwargs): """ Lists available counters in the system.\nThe resources of this list are summaries of counters in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_counters_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[Counter] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_counters_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_counters_get`") resource_path = '/p4d/v16.1/{server}/counters'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[Counter]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_counters_counter_get(self, server, counter, **kwargs): """ Returns the counter spec details of the particular counter. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_counters_counter_get(server, counter, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str counter: The counter ID (required) :return: Counter If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'counter'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_counters_counter_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_counters_counter_get`") # verify the required parameter 'counter' is set if ('counter' not in params) or (params['counter'] is None): raise ValueError("Missing the required parameter `counter` when calling `server_counters_counter_get`") resource_path = '/p4d/v16.1/{server}/counters/{counter}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'counter' in params: path_params['counter'] = params['counter'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='Counter', auth_settings=auth_settings, callback=params.get('callback')) return response def server_counters_counter_put(self, server, counter, body, **kwargs): """ Update counter specifications, similar to the `p4 counter` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_counters_counter_put(server, counter, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str counter: The counter ID (required) :param Counter body: Fields of the counter to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'counter', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_counters_counter_put" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_counters_counter_put`") # verify the required parameter 'counter' is set if ('counter' not in params) or (params['counter'] is None): raise ValueError("Missing the required parameter `counter` when calling `server_counters_counter_put`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_counters_counter_put`") resource_path = '/p4d/v16.1/{server}/counters/{counter}'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'counter' in params: path_params['counter'] = params['counter'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_counters_counter_delete(self, server, counter, **kwargs): """ Removes the counter specification, similar to the `p4 counter -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_counters_counter_delete(server, counter, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str counter: The counter ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'counter'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_counters_counter_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_counters_counter_delete`") # verify the required parameter 'counter' is set if ('counter' not in params) or (params['counter'] is None): raise ValueError("Missing the required parameter `counter` when calling `server_counters_counter_delete`") resource_path = '/p4d/v16.1/{server}/counters/{counter}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'counter' in params: path_params['counter'] = params['counter'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_counters_counter_increment_post(self, server, counter, **kwargs): """ Increments a numerical counter, similar to the `p4 counter -i` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_counters_counter_increment_post(server, counter, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str counter: The counter ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'counter'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_counters_counter_increment_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_counters_counter_increment_post`") # verify the required parameter 'counter' is set if ('counter' not in params) or (params['counter'] is None): raise ValueError("Missing the required parameter `counter` when calling `server_counters_counter_increment_post`") resource_path = '/p4d/v16.1/{server}/counters/{counter}/increment'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'counter' in params: path_params['counter'] = params['counter'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_depots_get(self, server, **kwargs): """ Lists available depots in the system.\nThe resources of this list are summaries of depots in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_depots_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[DepotsCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_depots_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_depots_get`") resource_path = '/p4d/v16.1/{server}/depots'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[DepotsCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_depots_post(self, server, depot, **kwargs): """ Creates a new depot specification, like the `p4 depot` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_depots_post(server, depot, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param DepotCommand depot: The depot spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'depot'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_depots_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_depots_post`") # verify the required parameter 'depot' is set if ('depot' not in params) or (params['depot'] is None): raise ValueError("Missing the required parameter `depot` when calling `server_depots_post`") resource_path = '/p4d/v16.1/{server}/depots'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'depot' in params: body_params = params['depot'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_depots_depot_get(self, server, depot, **kwargs): """ Returns the depot spec details of the particular depot. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_depots_depot_get(server, depot, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str depot: The depot ID (required) :return: DepotCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'depot'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_depots_depot_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_depots_depot_get`") # verify the required parameter 'depot' is set if ('depot' not in params) or (params['depot'] is None): raise ValueError("Missing the required parameter `depot` when calling `server_depots_depot_get`") resource_path = '/p4d/v16.1/{server}/depots/{depot}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'depot' in params: path_params['depot'] = params['depot'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='DepotCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_depots_depot_delete(self, server, depot, **kwargs): """ Removes the depot specification, similar to the `p4 depot -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_depots_depot_delete(server, depot, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str depot: The depot ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'depot'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_depots_depot_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_depots_depot_delete`") # verify the required parameter 'depot' is set if ('depot' not in params) or (params['depot'] is None): raise ValueError("Missing the required parameter `depot` when calling `server_depots_depot_delete`") resource_path = '/p4d/v16.1/{server}/depots/{depot}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'depot' in params: path_params['depot'] = params['depot'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_depots_depot_patch(self, server, depot, body, **kwargs): """ Update depot specifications, similar to the `p4 depot` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_depots_depot_patch(server, depot, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str depot: The depot ID (required) :param DepotCommand body: Fields of the depot to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'depot', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_depots_depot_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_depots_depot_patch`") # verify the required parameter 'depot' is set if ('depot' not in params) or (params['depot'] is None): raise ValueError("Missing the required parameter `depot` when calling `server_depots_depot_patch`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_depots_depot_patch`") resource_path = '/p4d/v16.1/{server}/depots/{depot}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'depot' in params: path_params['depot'] = params['depot'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_groups_get(self, server, **kwargs): """ Lists available groups in the system.\nThe resources of this list are summaries of groups in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_groups_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[GroupsCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_groups_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_groups_get`") resource_path = '/p4d/v16.1/{server}/groups'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[GroupsCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_groups_post(self, server, body, **kwargs): """ Creates a new group specification, like the `p4 group` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_groups_post(server, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param GroupCommand body: The group spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_groups_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_groups_post`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_groups_post`") resource_path = '/p4d/v16.1/{server}/groups'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_groups_group_get(self, server, group, **kwargs): """ Returns the group spec details of the particular group. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_groups_group_get(server, group, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str group: The group ID (required) :return: GroupCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'group'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_groups_group_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_groups_group_get`") # verify the required parameter 'group' is set if ('group' not in params) or (params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `server_groups_group_get`") resource_path = '/p4d/v16.1/{server}/groups/{group}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'group' in params: path_params['group'] = params['group'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='GroupCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_groups_group_delete(self, server, group, **kwargs): """ Removes the group specification, similar to the `p4 group -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_groups_group_delete(server, group, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str group: The group ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'group'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_groups_group_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_groups_group_delete`") # verify the required parameter 'group' is set if ('group' not in params) or (params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `server_groups_group_delete`") resource_path = '/p4d/v16.1/{server}/groups/{group}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'group' in params: path_params['group'] = params['group'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_groups_group_patch(self, server, group, body, **kwargs): """ Update group specifications, similar to the `p4 group` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_groups_group_patch(server, group, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str group: The group ID (required) :param GroupCommand body: Fields of the group to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'group', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_groups_group_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_groups_group_patch`") # verify the required parameter 'group' is set if ('group' not in params) or (params['group'] is None): raise ValueError("Missing the required parameter `group` when calling `server_groups_group_patch`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_groups_group_patch`") resource_path = '/p4d/v16.1/{server}/groups/{group}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'group' in params: path_params['group'] = params['group'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_get(self, server, **kwargs): """ Lists available jobs in the system.\nThe resources of this list are summaries of jobs in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[JobsCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_get`") resource_path = '/p4d/v16.1/{server}/jobs'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[JobsCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_post(self, server, job, **kwargs): """ Creates a new job specification, like the `p4 job` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_post(server, job, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param JobCommand job: The job spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'job'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_post`") # verify the required parameter 'job' is set if ('job' not in params) or (params['job'] is None): raise ValueError("Missing the required parameter `job` when calling `server_jobs_post`") resource_path = '/p4d/v16.1/{server}/jobs'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'job' in params: body_params = params['job'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_job_get(self, server, job, **kwargs): """ Returns the job spec details of the particular job. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_job_get(server, job, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str job: The job ID (required) :return: JobCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'job'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_job_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_job_get`") # verify the required parameter 'job' is set if ('job' not in params) or (params['job'] is None): raise ValueError("Missing the required parameter `job` when calling `server_jobs_job_get`") resource_path = '/p4d/v16.1/{server}/jobs/{job}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'job' in params: path_params['job'] = params['job'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='JobCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_job_delete(self, server, job, **kwargs): """ Removes the job specification, similar to the `p4 job -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_job_delete(server, job, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str job: The job ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'job'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_job_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_job_delete`") # verify the required parameter 'job' is set if ('job' not in params) or (params['job'] is None): raise ValueError("Missing the required parameter `job` when calling `server_jobs_job_delete`") resource_path = '/p4d/v16.1/{server}/jobs/{job}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'job' in params: path_params['job'] = params['job'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_job_patch(self, server, job, job_command, **kwargs): """ Update job specifications, similar to the `p4 job` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_job_patch(server, job, job_command, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str job: The job ID (required) :param JobCommand job_command: Fields of the job to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'job', 'job_command'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_job_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_job_patch`") # verify the required parameter 'job' is set if ('job' not in params) or (params['job'] is None): raise ValueError("Missing the required parameter `job` when calling `server_jobs_job_patch`") # verify the required parameter 'job_command' is set if ('job_command' not in params) or (params['job_command'] is None): raise ValueError("Missing the required parameter `job_command` when calling `server_jobs_job_patch`") resource_path = '/p4d/v16.1/{server}/jobs/{job}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'job' in params: path_params['job'] = params['job'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'job_command' in params: body_params = params['job_command'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_job_fixes_change_post(self, server, job, change, **kwargs): """ Adds a fix record to the job for a particular changelist. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_job_fixes_change_post(server, job, change, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str job: The job ID (required) :param str change: The change ID (required) :param str 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 If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'job', 'change', 'status'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_job_fixes_change_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_job_fixes_change_post`") # verify the required parameter 'job' is set if ('job' not in params) or (params['job'] is None): raise ValueError("Missing the required parameter `job` when calling `server_jobs_job_fixes_change_post`") # verify the required parameter 'change' is set if ('change' not in params) or (params['change'] is None): raise ValueError("Missing the required parameter `change` when calling `server_jobs_job_fixes_change_post`") resource_path = '/p4d/v16.1/{server}/jobs/{job}/fixes/{change}'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'job' in params: path_params['job'] = params['job'] if 'change' in params: path_params['change'] = params['change'] query_params = {} if 'status' in params: query_params['status'] = params['status'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_jobs_job_fixes_change_delete(self, server, job, change, **kwargs): """ Removes the fix record association for the job for a particular changelist. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_jobs_job_fixes_change_delete(server, job, change, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str job: The job ID (required) :param str change: The change ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'job', 'change'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_jobs_job_fixes_change_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_jobs_job_fixes_change_delete`") # verify the required parameter 'job' is set if ('job' not in params) or (params['job'] is None): raise ValueError("Missing the required parameter `job` when calling `server_jobs_job_fixes_change_delete`") # verify the required parameter 'change' is set if ('change' not in params) or (params['change'] is None): raise ValueError("Missing the required parameter `change` when calling `server_jobs_job_fixes_change_delete`") resource_path = '/p4d/v16.1/{server}/jobs/{job}/fixes/{change}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'job' in params: path_params['job'] = params['job'] if 'change' in params: path_params['change'] = params['change'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_labels_get(self, server, **kwargs): """ Lists available labels in the system.\nThe resources of this list are summaries of labels in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_labels_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[LabelsCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_labels_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_labels_get`") resource_path = '/p4d/v16.1/{server}/labels'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[LabelsCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_labels_post(self, server, label, **kwargs): """ Creates a new label specification, like the `p4 label` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_labels_post(server, label, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param LabelCommand label: The label spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'label'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_labels_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_labels_post`") # verify the required parameter 'label' is set if ('label' not in params) or (params['label'] is None): raise ValueError("Missing the required parameter `label` when calling `server_labels_post`") resource_path = '/p4d/v16.1/{server}/labels'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'label' in params: body_params = params['label'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_labels_label_get(self, server, label, **kwargs): """ Returns the label spec details of the particular label. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_labels_label_get(server, label, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str label: The label ID (required) :return: LabelCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'label'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_labels_label_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_labels_label_get`") # verify the required parameter 'label' is set if ('label' not in params) or (params['label'] is None): raise ValueError("Missing the required parameter `label` when calling `server_labels_label_get`") resource_path = '/p4d/v16.1/{server}/labels/{label}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'label' in params: path_params['label'] = params['label'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='LabelCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_labels_label_delete(self, server, label, **kwargs): """ Removes the label specification, similar to the `p4 label -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_labels_label_delete(server, label, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str label: The label ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'label'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_labels_label_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_labels_label_delete`") # verify the required parameter 'label' is set if ('label' not in params) or (params['label'] is None): raise ValueError("Missing the required parameter `label` when calling `server_labels_label_delete`") resource_path = '/p4d/v16.1/{server}/labels/{label}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'label' in params: path_params['label'] = params['label'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_labels_label_patch(self, server, label, label_command, **kwargs): """ Update label specifications, similar to the `p4 label` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_labels_label_patch(server, label, label_command, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str label: The label ID (required) :param LabelCommand label_command: Fields of the label to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'label', 'label_command'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_labels_label_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_labels_label_patch`") # verify the required parameter 'label' is set if ('label' not in params) or (params['label'] is None): raise ValueError("Missing the required parameter `label` when calling `server_labels_label_patch`") # verify the required parameter 'label_command' is set if ('label_command' not in params) or (params['label_command'] is None): raise ValueError("Missing the required parameter `label_command` when calling `server_labels_label_patch`") resource_path = '/p4d/v16.1/{server}/labels/{label}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'label' in params: path_params['label'] = params['label'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'label_command' in params: body_params = params['label_command'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_login_post(self, server, body, **kwargs): """ Logs into a Helix Versioning Engine (p4d) server. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_login_post(server, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param LoginRequest body: The user login and password. (required) :return: LoginResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_login_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_login_post`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_login_post`") resource_path = '/p4d/v16.1/{server}/login'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = [] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='LoginResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_paths_get(self, server, **kwargs): """ 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. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_paths_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str path: The path \"under a depot\" to query under, e.g., `//depot/main`.\nThis will list the directories and files underneath that path. :return: list[Location] If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'path'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_paths_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_paths_get`") resource_path = '/p4d/v16.1/{server}/paths'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} if 'path' in params: query_params['path'] = params['path'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[Location]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_protections_get(self, server, **kwargs): """ 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. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_protections_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: Protections If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_protections_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_protections_get`") resource_path = '/p4d/v16.1/{server}/protections'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='Protections', auth_settings=auth_settings, callback=params.get('callback')) return response def server_protections_put(self, server, protections, **kwargs): """ Updates the protections table.\n\nThis method requires superuser access. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_protections_put(server, protections, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param Protections protections: The new protections table (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'protections'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_protections_put" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_protections_put`") # verify the required parameter 'protections' is set if ('protections' not in params) or (params['protections'] is None): raise ValueError("Missing the required parameter `protections` when calling `server_protections_put`") resource_path = '/p4d/v16.1/{server}/protections'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'protections' in params: body_params = params['protections'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_servers_get(self, server, **kwargs): """ Lists available servers in the system.\nThe resources of this list are summaries of servers in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_servers_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[ServersCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_servers_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_servers_get`") resource_path = '/p4d/v16.1/{server}/servers'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[ServersCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_servers_post(self, server, server_command, **kwargs): """ Creates a new server specification, like the `p4 server` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_servers_post(server, server_command, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param ServerCommand server_command: The server spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'server_command'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_servers_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_servers_post`") # verify the required parameter 'server_command' is set if ('server_command' not in params) or (params['server_command'] is None): raise ValueError("Missing the required parameter `server_command` when calling `server_servers_post`") resource_path = '/p4d/v16.1/{server}/servers'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'server_command' in params: body_params = params['server_command'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_servers_server_id_get(self, server, server_id, **kwargs): """ Returns the server spec details of the particular server. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_servers_server_id_get(server, server_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str server_id: The server ID of the server spec (required) :return: ServerCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'server_id'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_servers_server_id_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_servers_server_id_get`") # verify the required parameter 'server_id' is set if ('server_id' not in params) or (params['server_id'] is None): raise ValueError("Missing the required parameter `server_id` when calling `server_servers_server_id_get`") resource_path = '/p4d/v16.1/{server}/servers/{serverId}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'server_id' in params: path_params['serverId'] = params['server_id'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='ServerCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_servers_server_id_delete(self, server, server_id, **kwargs): """ Removes the server specification, similar to the `p4 server -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_servers_server_id_delete(server, server_id, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str server_id: The server ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'server_id'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_servers_server_id_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_servers_server_id_delete`") # verify the required parameter 'server_id' is set if ('server_id' not in params) or (params['server_id'] is None): raise ValueError("Missing the required parameter `server_id` when calling `server_servers_server_id_delete`") resource_path = '/p4d/v16.1/{server}/servers/{serverId}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'server_id' in params: path_params['serverId'] = params['server_id'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_servers_server_id_patch(self, server, server_id, server_command, **kwargs): """ Update server specifications, similar to the `p4 server` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_servers_server_id_patch(server, server_id, server_command, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str server_id: The server ID (required) :param ServerCommand server_command: Fields of the server to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'server_id', 'server_command'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_servers_server_id_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_servers_server_id_patch`") # verify the required parameter 'server_id' is set if ('server_id' not in params) or (params['server_id'] is None): raise ValueError("Missing the required parameter `server_id` when calling `server_servers_server_id_patch`") # verify the required parameter 'server_command' is set if ('server_command' not in params) or (params['server_command'] is None): raise ValueError("Missing the required parameter `server_command` when calling `server_servers_server_id_patch`") resource_path = '/p4d/v16.1/{server}/servers/{serverId}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'server_id' in params: path_params['serverId'] = params['server_id'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'server_command' in params: body_params = params['server_command'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_streams_get(self, server, **kwargs): """ Lists available streams in the system.\nThe resources of this list are summaries of streams in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_streams_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: list[StreamsCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_streams_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_streams_get`") resource_path = '/p4d/v16.1/{server}/streams'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[StreamsCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_streams_post(self, server, body, **kwargs): """ Creates a new stream specification, like the `p4 stream` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_streams_post(server, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param StreamCommand body: The stream spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_streams_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_streams_post`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_streams_post`") resource_path = '/p4d/v16.1/{server}/streams'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_streams_stream_get(self, server, stream, **kwargs): """ Returns the stream spec details of the particular stream. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_streams_stream_get(server, stream, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str stream: The stream ID (required) :return: StreamCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'stream'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_streams_stream_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_streams_stream_get`") # verify the required parameter 'stream' is set if ('stream' not in params) or (params['stream'] is None): raise ValueError("Missing the required parameter `stream` when calling `server_streams_stream_get`") resource_path = '/p4d/v16.1/{server}/streams/stream'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} if 'stream' in params: query_params['stream'] = params['stream'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='StreamCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_streams_stream_delete(self, server, stream, **kwargs): """ Removes the stream specification, similar to the `p4 stream -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_streams_stream_delete(server, stream, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str stream: The stream ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'stream'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_streams_stream_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_streams_stream_delete`") # verify the required parameter 'stream' is set if ('stream' not in params) or (params['stream'] is None): raise ValueError("Missing the required parameter `stream` when calling `server_streams_stream_delete`") resource_path = '/p4d/v16.1/{server}/streams/stream'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} if 'stream' in params: query_params['stream'] = params['stream'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_streams_stream_patch(self, server, stream, body, **kwargs): """ Update stream specifications, similar to the `p4 stream` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_streams_stream_patch(server, stream, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str stream: The stream ID (required) :param StreamCommand body: Fields of the stream to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'stream', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_streams_stream_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_streams_stream_patch`") # verify the required parameter 'stream' is set if ('stream' not in params) or (params['stream'] is None): raise ValueError("Missing the required parameter `stream` when calling `server_streams_stream_patch`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_streams_stream_patch`") resource_path = '/p4d/v16.1/{server}/streams/stream'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} if 'stream' in params: query_params['stream'] = params['stream'] header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_triggers_get(self, server, **kwargs): """ 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. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_triggers_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :return: Triggers If the method is called asynchronously, returns the request thread. """ all_params = ['server'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_triggers_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_triggers_get`") resource_path = '/p4d/v16.1/{server}/triggers'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='Triggers', auth_settings=auth_settings, callback=params.get('callback')) return response def server_triggers_put(self, server, triggers, **kwargs): """ Updates the triggers table.\n\nThis method requires superuser access. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_triggers_put(server, triggers, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param Triggers triggers: The new triggers table (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'triggers'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_triggers_put" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_triggers_put`") # verify the required parameter 'triggers' is set if ('triggers' not in params) or (params['triggers'] is None): raise ValueError("Missing the required parameter `triggers` when calling `server_triggers_put`") resource_path = '/p4d/v16.1/{server}/triggers'.replace('{format}', 'json') method = 'PUT' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'triggers' in params: body_params = params['triggers'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_users_get(self, server, **kwargs): """ Lists available users in the system.\nThe resources of this list are summaries of users in the system. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_users_get(server, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param bool include_service: If true, shows service users in the list. :param int max: Cap the number of users reported to this amount. :return: list[UsersCommand] If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'include_service', 'max'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_users_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_users_get`") resource_path = '/p4d/v16.1/{server}/users'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} if 'include_service' in params: query_params['includeService'] = params['include_service'] if 'max' in params: query_params['max'] = params['max'] header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='list[UsersCommand]', auth_settings=auth_settings, callback=params.get('callback')) return response def server_users_post(self, server, body, **kwargs): """ Creates a new user specification, like the `p4 user` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_users_post(server, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param UserCommand body: The user spec (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_users_post" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_users_post`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_users_post`") resource_path = '/p4d/v16.1/{server}/users'.replace('{format}', 'json') method = 'POST' path_params = {} if 'server' in params: path_params['server'] = params['server'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_users_user_get(self, server, user, **kwargs): """ Returns the user spec details of the particular user. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_users_user_get(server, user, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str user: The user ID (required) :return: UserCommand If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'user'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_users_user_get" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_users_user_get`") # verify the required parameter 'user' is set if ('user' not in params) or (params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `server_users_user_get`") resource_path = '/p4d/v16.1/{server}/users/{user}'.replace('{format}', 'json') method = 'GET' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'user' in params: path_params['user'] = params['user'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='UserCommand', auth_settings=auth_settings, callback=params.get('callback')) return response def server_users_user_delete(self, server, user, **kwargs): """ Removes the user specification, similar to the `p4 user -d` command. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_users_user_delete(server, user, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str user: The user ID (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'user'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_users_user_delete" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_users_user_delete`") # verify the required parameter 'user' is set if ('user' not in params) or (params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `server_users_user_delete`") resource_path = '/p4d/v16.1/{server}/users/{user}'.replace('{format}', 'json') method = 'DELETE' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'user' in params: path_params['user'] = params['user'] query_params = {} header_params = {} form_params = {} files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response def server_users_user_patch(self, server, user, body, **kwargs): """ Update user specifications, similar to the `p4 user` command.\nOnly the specified parameters in the body will be changed. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response. >>> def callback_function(response): >>> pprint(response) >>> >>> thread = api.server_users_user_patch(server, user, body, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str server: The server ID that we execute this particular method against. (required) :param str user: The user ID (required) :param UserCommand body: Fields of the user to update (required) :return: CommandResponse If the method is called asynchronously, returns the request thread. """ all_params = ['server', 'user', 'body'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method server_users_user_patch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'server' is set if ('server' not in params) or (params['server'] is None): raise ValueError("Missing the required parameter `server` when calling `server_users_user_patch`") # verify the required parameter 'user' is set if ('user' not in params) or (params['user'] is None): raise ValueError("Missing the required parameter `user` when calling `server_users_user_patch`") # verify the required parameter 'body' is set if ('body' not in params) or (params['body'] is None): raise ValueError("Missing the required parameter `body` when calling `server_users_user_patch`") resource_path = '/p4d/v16.1/{server}/users/{user}'.replace('{format}', 'json') method = 'PATCH' path_params = {} if 'server' in params: path_params['server'] = params['server'] if 'user' in params: path_params['user'] = params['user'] query_params = {} header_params = {} form_params = {} files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ select_header_content_type(['application/json']) # Authentication setting auth_settings = ['ticket_auth'] response = self.api_client.call_api(resource_path, method, path_params, query_params, header_params, body=body_params, post_params=form_params, files=files, response_type='CommandResponse', auth_settings=auth_settings, callback=params.get('callback')) return response