<?php
/**
 * DefaultApi
 * PHP version 5
 *
 * @category Class
 * @package  HelixWebServices
 * @author   http://github.com/swagger-api/swagger-codegen
 * @license  http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
 * @link     https://github.com/swagger-api/swagger-codegen
 */
/**
 *  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.
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace HelixWebServices\Api;

use \HelixWebServices\Configuration;
use \HelixWebServices\ApiClient;
use \HelixWebServices\ApiException;
use \HelixWebServices\ObjectSerializer;

/**
 * DefaultApi Class Doc Comment
 *
 * @category Class
 * @package  HelixWebServices
 * @author   http://github.com/swagger-api/swagger-codegen
 * @license  http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class DefaultApi
{

    /**
     * API Client
     * @var \HelixWebServices\ApiClient instance of the ApiClient
     */
    protected $apiClient;

    /**
     * Constructor
     * @param \HelixWebServices\ApiClient|null $apiClient The api client to use
     */
    function __construct($apiClient = null)
    {
        if ($apiClient == null) {
            $apiClient = new ApiClient();
            $apiClient->getConfig()->setHost('http://localhost/api');
        }

        $this->apiClient = $apiClient;
    }

    /**
     * Get API client
     * @return \HelixWebServices\ApiClient get the API client
     */
    public function getApiClient()
    {
        return $this->apiClient;
    }

    /**
     * Set the API client
     * @param \HelixWebServices\ApiClient $apiClient set the API client
     * @return DefaultApi
     */
    public function setApiClient(ApiClient $apiClient)
    {
        $this->apiClient = $apiClient;
        return $this;
    }

    
    /**
     * configP4dsGet
     *
     * 
     *
     * @return \HelixWebServices\Model\P4dConfigId[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function configP4dsGet()
    {
        list($response, $statusCode, $httpHeader) = $this->configP4dsGetWithHttpInfo ();
        return $response;
    }


    /**
     * configP4dsGetWithHttpInfo
     *
     * 
     *
     * @return Array of \HelixWebServices\Model\P4dConfigId[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function configP4dsGetWithHttpInfo()
    {
        

        // parse inputs
        $resourcePath = "/hws/v16.1/config/p4ds";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\P4dConfigId[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\P4dConfigId[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\P4dConfigId[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * loginPost
     *
     * 
     *
     * @param \HelixWebServices\Model\LoginRequest $login_request The user login and password. (required)
     * @return \HelixWebServices\Model\LoginResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function loginPost($login_request)
    {
        list($response, $statusCode, $httpHeader) = $this->loginPostWithHttpInfo ($login_request);
        return $response;
    }


    /**
     * loginPostWithHttpInfo
     *
     * 
     *
     * @param \HelixWebServices\Model\LoginRequest $login_request The user login and password. (required)
     * @return Array of \HelixWebServices\Model\LoginResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function loginPostWithHttpInfo($login_request)
    {
        
        // verify the required parameter 'login_request' is set
        if ($login_request === null) {
            throw new \InvalidArgumentException('Missing the required parameter $login_request when calling loginPost');
        }

        // parse inputs
        $resourcePath = "/hws/v16.1/login";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        
        
        // body params
        $_tempBody = null;
        if (isset($login_request)) {
            $_tempBody = $login_request;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\LoginResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\LoginResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\LoginResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * statusGet
     *
     * 
     *
     * @return \HelixWebServices\Model\HWSStatus
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function statusGet()
    {
        list($response, $statusCode, $httpHeader) = $this->statusGetWithHttpInfo ();
        return $response;
    }


    /**
     * statusGetWithHttpInfo
     *
     * 
     *
     * @return Array of \HelixWebServices\Model\HWSStatus, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function statusGetWithHttpInfo()
    {
        

        // parse inputs
        $resourcePath = "/hws/v16.1/status";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\HWSStatus'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\HWSStatus', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\HWSStatus', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverBranchesGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\BranchesCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverBranchesGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverBranchesGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\BranchesCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverBranchesGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/branches";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\BranchesCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\BranchesCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\BranchesCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverBranchesPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\BranchCommand $body The branch specification. (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesPost($server, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverBranchesPostWithHttpInfo ($server, $body);
        return $response;
    }


    /**
     * serverBranchesPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\BranchCommand $body The branch specification. (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesPostWithHttpInfo($server, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverBranchesPost');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverBranchesPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/branches";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverBranchesBranchGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $branch The branch ID (required)
     * @return \HelixWebServices\Model\BranchCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesBranchGet($server, $branch)
    {
        list($response, $statusCode, $httpHeader) = $this->serverBranchesBranchGetWithHttpInfo ($server, $branch);
        return $response;
    }


    /**
     * serverBranchesBranchGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $branch The branch ID (required)
     * @return Array of \HelixWebServices\Model\BranchCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesBranchGetWithHttpInfo($server, $branch)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverBranchesBranchGet');
        }
        // verify the required parameter 'branch' is set
        if ($branch === null) {
            throw new \InvalidArgumentException('Missing the required parameter $branch when calling serverBranchesBranchGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/branches/{branch}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($branch !== null) {
            $resourcePath = str_replace(
                "{" . "branch" . "}",
                $this->apiClient->getSerializer()->toPathValue($branch),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\BranchCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\BranchCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\BranchCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverBranchesBranchDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $branch The branch ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesBranchDelete($server, $branch)
    {
        list($response, $statusCode, $httpHeader) = $this->serverBranchesBranchDeleteWithHttpInfo ($server, $branch);
        return $response;
    }


    /**
     * serverBranchesBranchDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $branch The branch ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesBranchDeleteWithHttpInfo($server, $branch)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverBranchesBranchDelete');
        }
        // verify the required parameter 'branch' is set
        if ($branch === null) {
            throw new \InvalidArgumentException('Missing the required parameter $branch when calling serverBranchesBranchDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/branches/{branch}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($branch !== null) {
            $resourcePath = str_replace(
                "{" . "branch" . "}",
                $this->apiClient->getSerializer()->toPathValue($branch),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverBranchesBranchPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $branch The branch ID (required)
     * @param \HelixWebServices\Model\BranchCommand $body Fields of the branch to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesBranchPatch($server, $branch, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverBranchesBranchPatchWithHttpInfo ($server, $branch, $body);
        return $response;
    }


    /**
     * serverBranchesBranchPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $branch The branch ID (required)
     * @param \HelixWebServices\Model\BranchCommand $body Fields of the branch to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverBranchesBranchPatchWithHttpInfo($server, $branch, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverBranchesBranchPatch');
        }
        // verify the required parameter 'branch' is set
        if ($branch === null) {
            throw new \InvalidArgumentException('Missing the required parameter $branch when calling serverBranchesBranchPatch');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverBranchesBranchPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/branches/{branch}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($branch !== null) {
            $resourcePath = str_replace(
                "{" . "branch" . "}",
                $this->apiClient->getSerializer()->toPathValue($branch),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverChangesGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param int $max Limit the number of change results (optional)
     * @param string $status The status of the changes, e.g., `submitted` (optional)
     * @param string $user The user&#39;s login who submitted the change (optional)
     * @param string $files Limit changes to the depot path expressions. See the link:http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_changes.html[changes] command description. (optional)
     * @return \HelixWebServices\Model\ChangesCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverChangesGet($server, $max = null, $status = null, $user = null, $files = null)
    {
        list($response, $statusCode, $httpHeader) = $this->serverChangesGetWithHttpInfo ($server, $max, $status, $user, $files);
        return $response;
    }


    /**
     * serverChangesGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param int $max Limit the number of change results (optional)
     * @param string $status The status of the changes, e.g., `submitted` (optional)
     * @param string $user The user&#39;s login who submitted the change (optional)
     * @param string $files Limit changes to the depot path expressions. See the link:http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_changes.html[changes] command description. (optional)
     * @return Array of \HelixWebServices\Model\ChangesCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverChangesGetWithHttpInfo($server, $max = null, $status = null, $user = null, $files = null)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverChangesGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/changes";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($max !== null) {
            $queryParams['max'] = $this->apiClient->getSerializer()->toQueryValue($max);
        }// query params
        
        
        if ($status !== null) {
            $queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
        }// query params
        
        
        if ($user !== null) {
            $queryParams['user'] = $this->apiClient->getSerializer()->toQueryValue($user);
        }// query params
        
        
        if ($files !== null) {
            $queryParams['files'] = $this->apiClient->getSerializer()->toQueryValue($files);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\ChangesCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\ChangesCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\ChangesCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverChangesChangeGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $change The change ID (required)
     * @return \HelixWebServices\Model\ChangeCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverChangesChangeGet($server, $change)
    {
        list($response, $statusCode, $httpHeader) = $this->serverChangesChangeGetWithHttpInfo ($server, $change);
        return $response;
    }


    /**
     * serverChangesChangeGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $change The change ID (required)
     * @return Array of \HelixWebServices\Model\ChangeCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverChangesChangeGetWithHttpInfo($server, $change)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverChangesChangeGet');
        }
        // verify the required parameter 'change' is set
        if ($change === null) {
            throw new \InvalidArgumentException('Missing the required parameter $change when calling serverChangesChangeGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/changes/{change}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($change !== null) {
            $resourcePath = str_replace(
                "{" . "change" . "}",
                $this->apiClient->getSerializer()->toPathValue($change),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\ChangeCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\ChangeCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\ChangeCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverClientsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\ClientsCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverClientsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverClientsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\ClientsCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverClientsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/clients";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\ClientsCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\ClientsCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\ClientsCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverClientsPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\ClientCommand $client The client spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsPost($server, $client)
    {
        list($response, $statusCode, $httpHeader) = $this->serverClientsPostWithHttpInfo ($server, $client);
        return $response;
    }


    /**
     * serverClientsPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\ClientCommand $client The client spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsPostWithHttpInfo($server, $client)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverClientsPost');
        }
        // verify the required parameter 'client' is set
        if ($client === null) {
            throw new \InvalidArgumentException('Missing the required parameter $client when calling serverClientsPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/clients";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($client)) {
            $_tempBody = $client;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverClientsClientGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $client The client ID (required)
     * @return \HelixWebServices\Model\ClientCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsClientGet($server, $client)
    {
        list($response, $statusCode, $httpHeader) = $this->serverClientsClientGetWithHttpInfo ($server, $client);
        return $response;
    }


    /**
     * serverClientsClientGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $client The client ID (required)
     * @return Array of \HelixWebServices\Model\ClientCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsClientGetWithHttpInfo($server, $client)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverClientsClientGet');
        }
        // verify the required parameter 'client' is set
        if ($client === null) {
            throw new \InvalidArgumentException('Missing the required parameter $client when calling serverClientsClientGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/clients/{client}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($client !== null) {
            $resourcePath = str_replace(
                "{" . "client" . "}",
                $this->apiClient->getSerializer()->toPathValue($client),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\ClientCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\ClientCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\ClientCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverClientsClientDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $client The client ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsClientDelete($server, $client)
    {
        list($response, $statusCode, $httpHeader) = $this->serverClientsClientDeleteWithHttpInfo ($server, $client);
        return $response;
    }


    /**
     * serverClientsClientDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $client The client ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsClientDeleteWithHttpInfo($server, $client)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverClientsClientDelete');
        }
        // verify the required parameter 'client' is set
        if ($client === null) {
            throw new \InvalidArgumentException('Missing the required parameter $client when calling serverClientsClientDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/clients/{client}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($client !== null) {
            $resourcePath = str_replace(
                "{" . "client" . "}",
                $this->apiClient->getSerializer()->toPathValue($client),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverClientsClientPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $client The client ID (required)
     * @param \HelixWebServices\Model\ClientCommand $body Fields of the client to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsClientPatch($server, $client, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverClientsClientPatchWithHttpInfo ($server, $client, $body);
        return $response;
    }


    /**
     * serverClientsClientPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $client The client ID (required)
     * @param \HelixWebServices\Model\ClientCommand $body Fields of the client to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverClientsClientPatchWithHttpInfo($server, $client, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverClientsClientPatch');
        }
        // verify the required parameter 'client' is set
        if ($client === null) {
            throw new \InvalidArgumentException('Missing the required parameter $client when calling serverClientsClientPatch');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverClientsClientPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/clients/{client}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($client !== null) {
            $resourcePath = str_replace(
                "{" . "client" . "}",
                $this->apiClient->getSerializer()->toPathValue($client),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCommandsCommandGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $command The command name (required)
     * @param string[] $arg Command arguments (optional)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCommandsCommandGet($server, $command, $arg = null)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCommandsCommandGetWithHttpInfo ($server, $command, $arg);
        return $response;
    }


    /**
     * serverCommandsCommandGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $command The command name (required)
     * @param string[] $arg Command arguments (optional)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCommandsCommandGetWithHttpInfo($server, $command, $arg = null)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCommandsCommandGet');
        }
        // verify the required parameter 'command' is set
        if ($command === null) {
            throw new \InvalidArgumentException('Missing the required parameter $command when calling serverCommandsCommandGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/commands/{command}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        if (is_array($arg)) {
            for ($idx = 0; $idx < count($arg); ++$idx) {
                $queryParams["arg$idx"] = $this->apiClient->getSerializer()->toQueryValue($arg[$idx]);
            }
        }
        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($command !== null) {
            $resourcePath = str_replace(
                "{" . "command" . "}",
                $this->apiClient->getSerializer()->toPathValue($command),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCommandsCommandPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $command The command name (required)
     * @param string[] $arg Command arguments (optional)
     * @param \HelixWebServices\Model\CommandRequest $input A hash used as input to the command (optional)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCommandsCommandPost($server, $command, $arg = null, $input = null)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCommandsCommandPostWithHttpInfo ($server, $command, $arg, $input);
        return $response;
    }


    /**
     * serverCommandsCommandPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $command The command name (required)
     * @param string[] $arg Command arguments (optional)
     * @param \HelixWebServices\Model\CommandRequest $input A hash used as input to the command (optional)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCommandsCommandPostWithHttpInfo($server, $command, $arg = null, $input = null)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCommandsCommandPost');
        }
        // verify the required parameter 'command' is set
        if ($command === null) {
            throw new \InvalidArgumentException('Missing the required parameter $command when calling serverCommandsCommandPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/commands/{command}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        if (is_array($arg)) {
            for ($idx = 0; $idx < count($arg); ++$idx) {
                $queryParams["arg$idx"] = $this->apiClient->getSerializer()->toQueryValue($arg[$idx]);
            }
        }
        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($command !== null) {
            $resourcePath = str_replace(
                "{" . "command" . "}",
                $this->apiClient->getSerializer()->toPathValue($command),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($input)) {
            $_tempBody = $input;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCountersGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\Counter[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCountersGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverCountersGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\Counter[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCountersGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/counters";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\Counter[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\Counter[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\Counter[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCountersCounterGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @return \HelixWebServices\Model\Counter
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterGet($server, $counter)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCountersCounterGetWithHttpInfo ($server, $counter);
        return $response;
    }


    /**
     * serverCountersCounterGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @return Array of \HelixWebServices\Model\Counter, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterGetWithHttpInfo($server, $counter)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCountersCounterGet');
        }
        // verify the required parameter 'counter' is set
        if ($counter === null) {
            throw new \InvalidArgumentException('Missing the required parameter $counter when calling serverCountersCounterGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/counters/{counter}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($counter !== null) {
            $resourcePath = str_replace(
                "{" . "counter" . "}",
                $this->apiClient->getSerializer()->toPathValue($counter),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\Counter'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\Counter', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\Counter', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCountersCounterPut
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @param \HelixWebServices\Model\Counter $body Fields of the counter to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterPut($server, $counter, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCountersCounterPutWithHttpInfo ($server, $counter, $body);
        return $response;
    }


    /**
     * serverCountersCounterPutWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @param \HelixWebServices\Model\Counter $body Fields of the counter to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterPutWithHttpInfo($server, $counter, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCountersCounterPut');
        }
        // verify the required parameter 'counter' is set
        if ($counter === null) {
            throw new \InvalidArgumentException('Missing the required parameter $counter when calling serverCountersCounterPut');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverCountersCounterPut');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/counters/{counter}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PUT";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($counter !== null) {
            $resourcePath = str_replace(
                "{" . "counter" . "}",
                $this->apiClient->getSerializer()->toPathValue($counter),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCountersCounterDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterDelete($server, $counter)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCountersCounterDeleteWithHttpInfo ($server, $counter);
        return $response;
    }


    /**
     * serverCountersCounterDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterDeleteWithHttpInfo($server, $counter)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCountersCounterDelete');
        }
        // verify the required parameter 'counter' is set
        if ($counter === null) {
            throw new \InvalidArgumentException('Missing the required parameter $counter when calling serverCountersCounterDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/counters/{counter}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($counter !== null) {
            $resourcePath = str_replace(
                "{" . "counter" . "}",
                $this->apiClient->getSerializer()->toPathValue($counter),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverCountersCounterIncrementPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterIncrementPost($server, $counter)
    {
        list($response, $statusCode, $httpHeader) = $this->serverCountersCounterIncrementPostWithHttpInfo ($server, $counter);
        return $response;
    }


    /**
     * serverCountersCounterIncrementPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $counter The counter ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverCountersCounterIncrementPostWithHttpInfo($server, $counter)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverCountersCounterIncrementPost');
        }
        // verify the required parameter 'counter' is set
        if ($counter === null) {
            throw new \InvalidArgumentException('Missing the required parameter $counter when calling serverCountersCounterIncrementPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/counters/{counter}/increment";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($counter !== null) {
            $resourcePath = str_replace(
                "{" . "counter" . "}",
                $this->apiClient->getSerializer()->toPathValue($counter),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverDepotsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\DepotsCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverDepotsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverDepotsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\DepotsCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverDepotsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/depots";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\DepotsCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\DepotsCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\DepotsCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverDepotsPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\DepotCommand $depot The depot spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsPost($server, $depot)
    {
        list($response, $statusCode, $httpHeader) = $this->serverDepotsPostWithHttpInfo ($server, $depot);
        return $response;
    }


    /**
     * serverDepotsPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\DepotCommand $depot The depot spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsPostWithHttpInfo($server, $depot)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverDepotsPost');
        }
        // verify the required parameter 'depot' is set
        if ($depot === null) {
            throw new \InvalidArgumentException('Missing the required parameter $depot when calling serverDepotsPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/depots";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($depot)) {
            $_tempBody = $depot;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverDepotsDepotGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $depot The depot ID (required)
     * @return \HelixWebServices\Model\DepotCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsDepotGet($server, $depot)
    {
        list($response, $statusCode, $httpHeader) = $this->serverDepotsDepotGetWithHttpInfo ($server, $depot);
        return $response;
    }


    /**
     * serverDepotsDepotGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $depot The depot ID (required)
     * @return Array of \HelixWebServices\Model\DepotCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsDepotGetWithHttpInfo($server, $depot)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverDepotsDepotGet');
        }
        // verify the required parameter 'depot' is set
        if ($depot === null) {
            throw new \InvalidArgumentException('Missing the required parameter $depot when calling serverDepotsDepotGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/depots/{depot}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($depot !== null) {
            $resourcePath = str_replace(
                "{" . "depot" . "}",
                $this->apiClient->getSerializer()->toPathValue($depot),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\DepotCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\DepotCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\DepotCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverDepotsDepotDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $depot The depot ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsDepotDelete($server, $depot)
    {
        list($response, $statusCode, $httpHeader) = $this->serverDepotsDepotDeleteWithHttpInfo ($server, $depot);
        return $response;
    }


    /**
     * serverDepotsDepotDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $depot The depot ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsDepotDeleteWithHttpInfo($server, $depot)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverDepotsDepotDelete');
        }
        // verify the required parameter 'depot' is set
        if ($depot === null) {
            throw new \InvalidArgumentException('Missing the required parameter $depot when calling serverDepotsDepotDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/depots/{depot}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($depot !== null) {
            $resourcePath = str_replace(
                "{" . "depot" . "}",
                $this->apiClient->getSerializer()->toPathValue($depot),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverDepotsDepotPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $depot The depot ID (required)
     * @param \HelixWebServices\Model\DepotCommand $body Fields of the depot to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsDepotPatch($server, $depot, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverDepotsDepotPatchWithHttpInfo ($server, $depot, $body);
        return $response;
    }


    /**
     * serverDepotsDepotPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $depot The depot ID (required)
     * @param \HelixWebServices\Model\DepotCommand $body Fields of the depot to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverDepotsDepotPatchWithHttpInfo($server, $depot, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverDepotsDepotPatch');
        }
        // verify the required parameter 'depot' is set
        if ($depot === null) {
            throw new \InvalidArgumentException('Missing the required parameter $depot when calling serverDepotsDepotPatch');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverDepotsDepotPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/depots/{depot}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($depot !== null) {
            $resourcePath = str_replace(
                "{" . "depot" . "}",
                $this->apiClient->getSerializer()->toPathValue($depot),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverGroupsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\GroupsCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverGroupsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverGroupsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\GroupsCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverGroupsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/groups";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\GroupsCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\GroupsCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\GroupsCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverGroupsPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\GroupCommand $body The group spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsPost($server, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverGroupsPostWithHttpInfo ($server, $body);
        return $response;
    }


    /**
     * serverGroupsPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\GroupCommand $body The group spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsPostWithHttpInfo($server, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverGroupsPost');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverGroupsPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/groups";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverGroupsGroupGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $group The group ID (required)
     * @return \HelixWebServices\Model\GroupCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGroupGet($server, $group)
    {
        list($response, $statusCode, $httpHeader) = $this->serverGroupsGroupGetWithHttpInfo ($server, $group);
        return $response;
    }


    /**
     * serverGroupsGroupGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $group The group ID (required)
     * @return Array of \HelixWebServices\Model\GroupCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGroupGetWithHttpInfo($server, $group)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverGroupsGroupGet');
        }
        // verify the required parameter 'group' is set
        if ($group === null) {
            throw new \InvalidArgumentException('Missing the required parameter $group when calling serverGroupsGroupGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/groups/{group}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($group !== null) {
            $resourcePath = str_replace(
                "{" . "group" . "}",
                $this->apiClient->getSerializer()->toPathValue($group),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\GroupCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\GroupCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\GroupCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverGroupsGroupDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $group The group ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGroupDelete($server, $group)
    {
        list($response, $statusCode, $httpHeader) = $this->serverGroupsGroupDeleteWithHttpInfo ($server, $group);
        return $response;
    }


    /**
     * serverGroupsGroupDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $group The group ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGroupDeleteWithHttpInfo($server, $group)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverGroupsGroupDelete');
        }
        // verify the required parameter 'group' is set
        if ($group === null) {
            throw new \InvalidArgumentException('Missing the required parameter $group when calling serverGroupsGroupDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/groups/{group}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($group !== null) {
            $resourcePath = str_replace(
                "{" . "group" . "}",
                $this->apiClient->getSerializer()->toPathValue($group),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverGroupsGroupPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $group The group ID (required)
     * @param \HelixWebServices\Model\GroupCommand $body Fields of the group to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGroupPatch($server, $group, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverGroupsGroupPatchWithHttpInfo ($server, $group, $body);
        return $response;
    }


    /**
     * serverGroupsGroupPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $group The group ID (required)
     * @param \HelixWebServices\Model\GroupCommand $body Fields of the group to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverGroupsGroupPatchWithHttpInfo($server, $group, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverGroupsGroupPatch');
        }
        // verify the required parameter 'group' is set
        if ($group === null) {
            throw new \InvalidArgumentException('Missing the required parameter $group when calling serverGroupsGroupPatch');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverGroupsGroupPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/groups/{group}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($group !== null) {
            $resourcePath = str_replace(
                "{" . "group" . "}",
                $this->apiClient->getSerializer()->toPathValue($group),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\JobsCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverJobsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\JobsCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\JobsCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\JobsCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\JobsCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\JobCommand $job The job spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsPost($server, $job)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsPostWithHttpInfo ($server, $job);
        return $response;
    }


    /**
     * serverJobsPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\JobCommand $job The job spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsPostWithHttpInfo($server, $job)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsPost');
        }
        // verify the required parameter 'job' is set
        if ($job === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job when calling serverJobsPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($job)) {
            $_tempBody = $job;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsJobGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @return \HelixWebServices\Model\JobCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobGet($server, $job)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsJobGetWithHttpInfo ($server, $job);
        return $response;
    }


    /**
     * serverJobsJobGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @return Array of \HelixWebServices\Model\JobCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobGetWithHttpInfo($server, $job)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsJobGet');
        }
        // verify the required parameter 'job' is set
        if ($job === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job when calling serverJobsJobGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs/{job}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($job !== null) {
            $resourcePath = str_replace(
                "{" . "job" . "}",
                $this->apiClient->getSerializer()->toPathValue($job),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\JobCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\JobCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\JobCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsJobDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobDelete($server, $job)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsJobDeleteWithHttpInfo ($server, $job);
        return $response;
    }


    /**
     * serverJobsJobDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobDeleteWithHttpInfo($server, $job)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsJobDelete');
        }
        // verify the required parameter 'job' is set
        if ($job === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job when calling serverJobsJobDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs/{job}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($job !== null) {
            $resourcePath = str_replace(
                "{" . "job" . "}",
                $this->apiClient->getSerializer()->toPathValue($job),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsJobPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @param \HelixWebServices\Model\JobCommand $job_command Fields of the job to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobPatch($server, $job, $job_command)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsJobPatchWithHttpInfo ($server, $job, $job_command);
        return $response;
    }


    /**
     * serverJobsJobPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @param \HelixWebServices\Model\JobCommand $job_command Fields of the job to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobPatchWithHttpInfo($server, $job, $job_command)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsJobPatch');
        }
        // verify the required parameter 'job' is set
        if ($job === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job when calling serverJobsJobPatch');
        }
        // verify the required parameter 'job_command' is set
        if ($job_command === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job_command when calling serverJobsJobPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs/{job}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($job !== null) {
            $resourcePath = str_replace(
                "{" . "job" . "}",
                $this->apiClient->getSerializer()->toPathValue($job),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($job_command)) {
            $_tempBody = $job_command;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsJobFixesChangePost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @param string $change The change ID (required)
     * @param string $status Specify the job status instead of using the default.\nThe default is typically `closed` or some other value defined in the `Presets` field specified in the `p4 jobspec` form.\n\nIf the changelist to which you&#39;re linking the job been submitted, the status value is immediately reflected in the job&#39;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&#39;s Jobs: field.\nTo leave a job unchanged, use the special status of same. (optional)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobFixesChangePost($server, $job, $change, $status = null)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsJobFixesChangePostWithHttpInfo ($server, $job, $change, $status);
        return $response;
    }


    /**
     * serverJobsJobFixesChangePostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @param string $change The change ID (required)
     * @param string $status Specify the job status instead of using the default.\nThe default is typically `closed` or some other value defined in the `Presets` field specified in the `p4 jobspec` form.\n\nIf the changelist to which you&#39;re linking the job been submitted, the status value is immediately reflected in the job&#39;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&#39;s Jobs: field.\nTo leave a job unchanged, use the special status of same. (optional)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobFixesChangePostWithHttpInfo($server, $job, $change, $status = null)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsJobFixesChangePost');
        }
        // verify the required parameter 'job' is set
        if ($job === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job when calling serverJobsJobFixesChangePost');
        }
        // verify the required parameter 'change' is set
        if ($change === null) {
            throw new \InvalidArgumentException('Missing the required parameter $change when calling serverJobsJobFixesChangePost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs/{job}/fixes/{change}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($status !== null) {
            $queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($job !== null) {
            $resourcePath = str_replace(
                "{" . "job" . "}",
                $this->apiClient->getSerializer()->toPathValue($job),
                $resourcePath
            );
        }// path params
        
        if ($change !== null) {
            $resourcePath = str_replace(
                "{" . "change" . "}",
                $this->apiClient->getSerializer()->toPathValue($change),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverJobsJobFixesChangeDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @param string $change The change ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobFixesChangeDelete($server, $job, $change)
    {
        list($response, $statusCode, $httpHeader) = $this->serverJobsJobFixesChangeDeleteWithHttpInfo ($server, $job, $change);
        return $response;
    }


    /**
     * serverJobsJobFixesChangeDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $job The job ID (required)
     * @param string $change The change ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverJobsJobFixesChangeDeleteWithHttpInfo($server, $job, $change)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverJobsJobFixesChangeDelete');
        }
        // verify the required parameter 'job' is set
        if ($job === null) {
            throw new \InvalidArgumentException('Missing the required parameter $job when calling serverJobsJobFixesChangeDelete');
        }
        // verify the required parameter 'change' is set
        if ($change === null) {
            throw new \InvalidArgumentException('Missing the required parameter $change when calling serverJobsJobFixesChangeDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/jobs/{job}/fixes/{change}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($job !== null) {
            $resourcePath = str_replace(
                "{" . "job" . "}",
                $this->apiClient->getSerializer()->toPathValue($job),
                $resourcePath
            );
        }// path params
        
        if ($change !== null) {
            $resourcePath = str_replace(
                "{" . "change" . "}",
                $this->apiClient->getSerializer()->toPathValue($change),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverLabelsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\LabelsCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverLabelsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverLabelsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\LabelsCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverLabelsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/labels";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\LabelsCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\LabelsCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\LabelsCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverLabelsPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\LabelCommand $label The label spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsPost($server, $label)
    {
        list($response, $statusCode, $httpHeader) = $this->serverLabelsPostWithHttpInfo ($server, $label);
        return $response;
    }


    /**
     * serverLabelsPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\LabelCommand $label The label spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsPostWithHttpInfo($server, $label)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverLabelsPost');
        }
        // verify the required parameter 'label' is set
        if ($label === null) {
            throw new \InvalidArgumentException('Missing the required parameter $label when calling serverLabelsPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/labels";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($label)) {
            $_tempBody = $label;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverLabelsLabelGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $label The label ID (required)
     * @return \HelixWebServices\Model\LabelCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsLabelGet($server, $label)
    {
        list($response, $statusCode, $httpHeader) = $this->serverLabelsLabelGetWithHttpInfo ($server, $label);
        return $response;
    }


    /**
     * serverLabelsLabelGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $label The label ID (required)
     * @return Array of \HelixWebServices\Model\LabelCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsLabelGetWithHttpInfo($server, $label)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverLabelsLabelGet');
        }
        // verify the required parameter 'label' is set
        if ($label === null) {
            throw new \InvalidArgumentException('Missing the required parameter $label when calling serverLabelsLabelGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/labels/{label}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($label !== null) {
            $resourcePath = str_replace(
                "{" . "label" . "}",
                $this->apiClient->getSerializer()->toPathValue($label),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\LabelCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\LabelCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\LabelCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverLabelsLabelDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $label The label ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsLabelDelete($server, $label)
    {
        list($response, $statusCode, $httpHeader) = $this->serverLabelsLabelDeleteWithHttpInfo ($server, $label);
        return $response;
    }


    /**
     * serverLabelsLabelDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $label The label ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsLabelDeleteWithHttpInfo($server, $label)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverLabelsLabelDelete');
        }
        // verify the required parameter 'label' is set
        if ($label === null) {
            throw new \InvalidArgumentException('Missing the required parameter $label when calling serverLabelsLabelDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/labels/{label}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($label !== null) {
            $resourcePath = str_replace(
                "{" . "label" . "}",
                $this->apiClient->getSerializer()->toPathValue($label),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverLabelsLabelPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $label The label ID (required)
     * @param \HelixWebServices\Model\LabelCommand $label_command Fields of the label to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsLabelPatch($server, $label, $label_command)
    {
        list($response, $statusCode, $httpHeader) = $this->serverLabelsLabelPatchWithHttpInfo ($server, $label, $label_command);
        return $response;
    }


    /**
     * serverLabelsLabelPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $label The label ID (required)
     * @param \HelixWebServices\Model\LabelCommand $label_command Fields of the label to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLabelsLabelPatchWithHttpInfo($server, $label, $label_command)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverLabelsLabelPatch');
        }
        // verify the required parameter 'label' is set
        if ($label === null) {
            throw new \InvalidArgumentException('Missing the required parameter $label when calling serverLabelsLabelPatch');
        }
        // verify the required parameter 'label_command' is set
        if ($label_command === null) {
            throw new \InvalidArgumentException('Missing the required parameter $label_command when calling serverLabelsLabelPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/labels/{label}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($label !== null) {
            $resourcePath = str_replace(
                "{" . "label" . "}",
                $this->apiClient->getSerializer()->toPathValue($label),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($label_command)) {
            $_tempBody = $label_command;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverLoginPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\LoginRequest $body The user login and password. (required)
     * @return \HelixWebServices\Model\LoginResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLoginPost($server, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverLoginPostWithHttpInfo ($server, $body);
        return $response;
    }


    /**
     * serverLoginPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\LoginRequest $body The user login and password. (required)
     * @return Array of \HelixWebServices\Model\LoginResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverLoginPostWithHttpInfo($server, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverLoginPost');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverLoginPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/login";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\LoginResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\LoginResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\LoginResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverPathsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $path The path \&quot;under a depot\&quot; to query under, e.g., `//depot/main`.\nThis will list the directories and files underneath that path. (optional)
     * @return \HelixWebServices\Model\Location[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverPathsGet($server, $path = null)
    {
        list($response, $statusCode, $httpHeader) = $this->serverPathsGetWithHttpInfo ($server, $path);
        return $response;
    }


    /**
     * serverPathsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $path The path \&quot;under a depot\&quot; to query under, e.g., `//depot/main`.\nThis will list the directories and files underneath that path. (optional)
     * @return Array of \HelixWebServices\Model\Location[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverPathsGetWithHttpInfo($server, $path = null)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverPathsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/paths";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($path !== null) {
            $queryParams['path'] = $this->apiClient->getSerializer()->toQueryValue($path);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\Location[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\Location[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\Location[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverProtectionsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\Protections
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverProtectionsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverProtectionsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverProtectionsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\Protections, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverProtectionsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverProtectionsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/protections";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\Protections'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\Protections', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\Protections', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverProtectionsPut
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\Protections $protections The new protections table (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverProtectionsPut($server, $protections)
    {
        list($response, $statusCode, $httpHeader) = $this->serverProtectionsPutWithHttpInfo ($server, $protections);
        return $response;
    }


    /**
     * serverProtectionsPutWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\Protections $protections The new protections table (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverProtectionsPutWithHttpInfo($server, $protections)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverProtectionsPut');
        }
        // verify the required parameter 'protections' is set
        if ($protections === null) {
            throw new \InvalidArgumentException('Missing the required parameter $protections when calling serverProtectionsPut');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/protections";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PUT";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($protections)) {
            $_tempBody = $protections;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverServersGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\ServersCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverServersGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverServersGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\ServersCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverServersGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/servers";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\ServersCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\ServersCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\ServersCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverServersPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\ServerCommand $server_command The server spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersPost($server, $server_command)
    {
        list($response, $statusCode, $httpHeader) = $this->serverServersPostWithHttpInfo ($server, $server_command);
        return $response;
    }


    /**
     * serverServersPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\ServerCommand $server_command The server spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersPostWithHttpInfo($server, $server_command)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverServersPost');
        }
        // verify the required parameter 'server_command' is set
        if ($server_command === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server_command when calling serverServersPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/servers";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($server_command)) {
            $_tempBody = $server_command;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverServersServerIdGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $server_id The server ID of the server spec (required)
     * @return \HelixWebServices\Model\ServerCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersServerIdGet($server, $server_id)
    {
        list($response, $statusCode, $httpHeader) = $this->serverServersServerIdGetWithHttpInfo ($server, $server_id);
        return $response;
    }


    /**
     * serverServersServerIdGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $server_id The server ID of the server spec (required)
     * @return Array of \HelixWebServices\Model\ServerCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersServerIdGetWithHttpInfo($server, $server_id)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverServersServerIdGet');
        }
        // verify the required parameter 'server_id' is set
        if ($server_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server_id when calling serverServersServerIdGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/servers/{serverId}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($server_id !== null) {
            $resourcePath = str_replace(
                "{" . "serverId" . "}",
                $this->apiClient->getSerializer()->toPathValue($server_id),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\ServerCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\ServerCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\ServerCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverServersServerIdDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $server_id The server ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersServerIdDelete($server, $server_id)
    {
        list($response, $statusCode, $httpHeader) = $this->serverServersServerIdDeleteWithHttpInfo ($server, $server_id);
        return $response;
    }


    /**
     * serverServersServerIdDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $server_id The server ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersServerIdDeleteWithHttpInfo($server, $server_id)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverServersServerIdDelete');
        }
        // verify the required parameter 'server_id' is set
        if ($server_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server_id when calling serverServersServerIdDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/servers/{serverId}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($server_id !== null) {
            $resourcePath = str_replace(
                "{" . "serverId" . "}",
                $this->apiClient->getSerializer()->toPathValue($server_id),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverServersServerIdPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $server_id The server ID (required)
     * @param \HelixWebServices\Model\ServerCommand $server_command Fields of the server to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersServerIdPatch($server, $server_id, $server_command)
    {
        list($response, $statusCode, $httpHeader) = $this->serverServersServerIdPatchWithHttpInfo ($server, $server_id, $server_command);
        return $response;
    }


    /**
     * serverServersServerIdPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $server_id The server ID (required)
     * @param \HelixWebServices\Model\ServerCommand $server_command Fields of the server to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverServersServerIdPatchWithHttpInfo($server, $server_id, $server_command)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverServersServerIdPatch');
        }
        // verify the required parameter 'server_id' is set
        if ($server_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server_id when calling serverServersServerIdPatch');
        }
        // verify the required parameter 'server_command' is set
        if ($server_command === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server_command when calling serverServersServerIdPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/servers/{serverId}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($server_id !== null) {
            $resourcePath = str_replace(
                "{" . "serverId" . "}",
                $this->apiClient->getSerializer()->toPathValue($server_id),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($server_command)) {
            $_tempBody = $server_command;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverStreamsGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\StreamsCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverStreamsGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverStreamsGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\StreamsCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverStreamsGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/streams";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\StreamsCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\StreamsCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\StreamsCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverStreamsPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\StreamCommand $body The stream spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsPost($server, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverStreamsPostWithHttpInfo ($server, $body);
        return $response;
    }


    /**
     * serverStreamsPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\StreamCommand $body The stream spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsPostWithHttpInfo($server, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverStreamsPost');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverStreamsPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/streams";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverStreamsStreamGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $stream The stream ID (required)
     * @return \HelixWebServices\Model\StreamCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsStreamGet($server, $stream)
    {
        list($response, $statusCode, $httpHeader) = $this->serverStreamsStreamGetWithHttpInfo ($server, $stream);
        return $response;
    }


    /**
     * serverStreamsStreamGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $stream The stream ID (required)
     * @return Array of \HelixWebServices\Model\StreamCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsStreamGetWithHttpInfo($server, $stream)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverStreamsStreamGet');
        }
        // verify the required parameter 'stream' is set
        if ($stream === null) {
            throw new \InvalidArgumentException('Missing the required parameter $stream when calling serverStreamsStreamGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/streams/stream";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($stream !== null) {
            $queryParams['stream'] = $this->apiClient->getSerializer()->toQueryValue($stream);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\StreamCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\StreamCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\StreamCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverStreamsStreamDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $stream The stream ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsStreamDelete($server, $stream)
    {
        list($response, $statusCode, $httpHeader) = $this->serverStreamsStreamDeleteWithHttpInfo ($server, $stream);
        return $response;
    }


    /**
     * serverStreamsStreamDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $stream The stream ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsStreamDeleteWithHttpInfo($server, $stream)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverStreamsStreamDelete');
        }
        // verify the required parameter 'stream' is set
        if ($stream === null) {
            throw new \InvalidArgumentException('Missing the required parameter $stream when calling serverStreamsStreamDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/streams/stream";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($stream !== null) {
            $queryParams['stream'] = $this->apiClient->getSerializer()->toQueryValue($stream);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverStreamsStreamPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $stream The stream ID (required)
     * @param \HelixWebServices\Model\StreamCommand $body Fields of the stream to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsStreamPatch($server, $stream, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverStreamsStreamPatchWithHttpInfo ($server, $stream, $body);
        return $response;
    }


    /**
     * serverStreamsStreamPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $stream The stream ID (required)
     * @param \HelixWebServices\Model\StreamCommand $body Fields of the stream to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverStreamsStreamPatchWithHttpInfo($server, $stream, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverStreamsStreamPatch');
        }
        // verify the required parameter 'stream' is set
        if ($stream === null) {
            throw new \InvalidArgumentException('Missing the required parameter $stream when calling serverStreamsStreamPatch');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverStreamsStreamPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/streams/stream";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($stream !== null) {
            $queryParams['stream'] = $this->apiClient->getSerializer()->toQueryValue($stream);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverTriggersGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return \HelixWebServices\Model\Triggers
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverTriggersGet($server)
    {
        list($response, $statusCode, $httpHeader) = $this->serverTriggersGetWithHttpInfo ($server);
        return $response;
    }


    /**
     * serverTriggersGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @return Array of \HelixWebServices\Model\Triggers, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverTriggersGetWithHttpInfo($server)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverTriggersGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/triggers";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\Triggers'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\Triggers', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\Triggers', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverTriggersPut
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\Triggers $triggers The new triggers table (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverTriggersPut($server, $triggers)
    {
        list($response, $statusCode, $httpHeader) = $this->serverTriggersPutWithHttpInfo ($server, $triggers);
        return $response;
    }


    /**
     * serverTriggersPutWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\Triggers $triggers The new triggers table (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverTriggersPutWithHttpInfo($server, $triggers)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverTriggersPut');
        }
        // verify the required parameter 'triggers' is set
        if ($triggers === null) {
            throw new \InvalidArgumentException('Missing the required parameter $triggers when calling serverTriggersPut');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/triggers";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PUT";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($triggers)) {
            $_tempBody = $triggers;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverUsersGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param bool $include_service If true, shows service users in the list. (optional)
     * @param int $max Cap the number of users reported to this amount. (optional)
     * @return \HelixWebServices\Model\UsersCommand[]
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersGet($server, $include_service = null, $max = null)
    {
        list($response, $statusCode, $httpHeader) = $this->serverUsersGetWithHttpInfo ($server, $include_service, $max);
        return $response;
    }


    /**
     * serverUsersGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param bool $include_service If true, shows service users in the list. (optional)
     * @param int $max Cap the number of users reported to this amount. (optional)
     * @return Array of \HelixWebServices\Model\UsersCommand[], HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersGetWithHttpInfo($server, $include_service = null, $max = null)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverUsersGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/users";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        // query params
        
        
        if ($include_service !== null) {
            $queryParams['includeService'] = $this->apiClient->getSerializer()->toQueryValue($include_service);
        }// query params
        
        
        if ($max !== null) {
            $queryParams['max'] = $this->apiClient->getSerializer()->toQueryValue($max);
        }
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\UsersCommand[]'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\UsersCommand[]', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\UsersCommand[]', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverUsersPost
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\UserCommand $body The user spec (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersPost($server, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverUsersPostWithHttpInfo ($server, $body);
        return $response;
    }


    /**
     * serverUsersPostWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param \HelixWebServices\Model\UserCommand $body The user spec (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersPostWithHttpInfo($server, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverUsersPost');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverUsersPost');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/users";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "POST";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverUsersUserGet
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $user The user ID (required)
     * @return \HelixWebServices\Model\UserCommand
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersUserGet($server, $user)
    {
        list($response, $statusCode, $httpHeader) = $this->serverUsersUserGetWithHttpInfo ($server, $user);
        return $response;
    }


    /**
     * serverUsersUserGetWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $user The user ID (required)
     * @return Array of \HelixWebServices\Model\UserCommand, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersUserGetWithHttpInfo($server, $user)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverUsersUserGet');
        }
        // verify the required parameter 'user' is set
        if ($user === null) {
            throw new \InvalidArgumentException('Missing the required parameter $user when calling serverUsersUserGet');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/users/{user}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "GET";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($user !== null) {
            $resourcePath = str_replace(
                "{" . "user" . "}",
                $this->apiClient->getSerializer()->toPathValue($user),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\UserCommand'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\UserCommand', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\UserCommand', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverUsersUserDelete
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $user The user ID (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersUserDelete($server, $user)
    {
        list($response, $statusCode, $httpHeader) = $this->serverUsersUserDeleteWithHttpInfo ($server, $user);
        return $response;
    }


    /**
     * serverUsersUserDeleteWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $user The user ID (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersUserDeleteWithHttpInfo($server, $user)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverUsersUserDelete');
        }
        // verify the required parameter 'user' is set
        if ($user === null) {
            throw new \InvalidArgumentException('Missing the required parameter $user when calling serverUsersUserDelete');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/users/{user}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "DELETE";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($user !== null) {
            $resourcePath = str_replace(
                "{" . "user" . "}",
                $this->apiClient->getSerializer()->toPathValue($user),
                $resourcePath
            );
        }
        
        

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
    /**
     * serverUsersUserPatch
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $user The user ID (required)
     * @param \HelixWebServices\Model\UserCommand $body Fields of the user to update (required)
     * @return \HelixWebServices\Model\CommandResponse
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersUserPatch($server, $user, $body)
    {
        list($response, $statusCode, $httpHeader) = $this->serverUsersUserPatchWithHttpInfo ($server, $user, $body);
        return $response;
    }


    /**
     * serverUsersUserPatchWithHttpInfo
     *
     * 
     *
     * @param string $server The server ID that we execute this particular method against. (required)
     * @param string $user The user ID (required)
     * @param \HelixWebServices\Model\UserCommand $body Fields of the user to update (required)
     * @return Array of \HelixWebServices\Model\CommandResponse, HTTP status code, HTTP response headers (array of strings)
     * @throws \HelixWebServices\ApiException on non-2xx response
     */
    public function serverUsersUserPatchWithHttpInfo($server, $user, $body)
    {
        
        // verify the required parameter 'server' is set
        if ($server === null) {
            throw new \InvalidArgumentException('Missing the required parameter $server when calling serverUsersUserPatch');
        }
        // verify the required parameter 'user' is set
        if ($user === null) {
            throw new \InvalidArgumentException('Missing the required parameter $user when calling serverUsersUserPatch');
        }
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling serverUsersUserPatch');
        }

        // parse inputs
        $resourcePath = "/p4d/v16.1/{server}/users/{user}";
        $resourcePath = str_replace("{format}", "json", $resourcePath);
        $method = "PATCH";
        $httpBody = '';
        $queryParams = array();
        $headerParams = array();
        $formParams = array();
        $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json'));

        
        
        // path params
        
        if ($server !== null) {
            $resourcePath = str_replace(
                "{" . "server" . "}",
                $this->apiClient->getSerializer()->toPathValue($server),
                $resourcePath
            );
        }// path params
        
        if ($user !== null) {
            $resourcePath = str_replace(
                "{" . "user" . "}",
                $this->apiClient->getSerializer()->toPathValue($user),
                $resourcePath
            );
        }
        
        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        
        // this endpoint requires API key authentication
        $apiKey = $this->apiClient->getApiKeyWithPrefix('Authorization');
        if (strlen($apiKey) !== 0) {
            $headerParams['Authorization'] = $apiKey;
        }
        
        
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath, $method,
                $queryParams, $httpBody,
                $headerParams, '\HelixWebServices\Model\CommandResponse'
            );
            
            if (!$response) {
                return array(null, $statusCode, $httpHeader);
            }

            return array($this->apiClient->getSerializer()->deserialize($response, '\HelixWebServices\Model\CommandResponse', $httpHeader), $statusCode, $httpHeader);
            
        } catch (ApiException $e) {
            switch ($e->getCode()) { 
            case 200:
                $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\HelixWebServices\Model\CommandResponse', $e->getResponseHeaders());
                $e->setResponseObject($data);
                break;
            }

            throw $e;
        }
    }
    
}