diff --git a/README.md b/README.md index 635e5a554..04189d483 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ PHP 5.5 and later To install the bindings via Composer: ``` -composer require alibabacloud/alibabacloud-yjopenapi-php-client 1.0.20230321 +composer require alibabacloud/alibabacloud-yjopenapi-php-client 1.0.20230410 ``` Then run `composer install` @@ -63,6 +63,7 @@ try { | Api | Method | Params | Result | Description | | ------------ | ------------- | ------------- | ------------- | ------------- | + | *ConsoleAdminApi* | **activateDeployment** | *activateDeploymentForms* | *\Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResult* | 激活已部署成功的游戏版本的部署 | | *ConsoleAdminApi* | **adaptGameVersion** | *adaptGameVersionForms* | *\Yjopenapi\Client\Model\ConsoleAdminAdaptGameVersionResult* | 发起游戏版本适配 | | *ConsoleAdminApi* | **addGameToProject** | *addGameToProjectForms* | *\Yjopenapi\Client\Model\ConsoleAdminAddGameToProjectResult* | 将游戏添加到项目 | | *ConsoleAdminApi* | **createGame** | *createGameForms* | *\Yjopenapi\Client\Model\ConsoleAdminCreateGameResult* | 创建游戏 | @@ -72,6 +73,9 @@ try { | *ConsoleAdminApi* | **deleteProject** | *deleteProjectForms* | *\Yjopenapi\Client\Model\ConsoleAdminDeleteProjectResult* | 删除指定的项目 | | *ConsoleAdminApi* | **getGameVersion** | *getGameVersionForms* | *\Yjopenapi\Client\Model\ConsoleAdminGetGameVersionResult* | 获取单个游戏版本信息 | | *ConsoleAdminApi* | **getGameVersionProgress** | *getGameVersionProgressForms* | *\Yjopenapi\Client\Model\ConsoleAdminGetGameVersionProgressResult* | 查询版本处理进度(包含上传、适配、部署) | + | *ConsoleAdminApi* | **listActivateableInstances** | *listActivateableInstancesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResult* | 指定项目和游戏版本,获取可激活且可调度的实例及调度配置 | + | *ConsoleAdminApi* | **listActivatedInstances** | *listActivatedInstancesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult* | 指定项目和游戏,获取已激活版本的可调度实例及调度配置 | + | *ConsoleAdminApi* | **listControllersOfGame** | *listControllersOfGameForms* | *\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult* | 获取单个游戏关联的控制器列表 | | *ConsoleAdminApi* | **listDeployableInstances** | *listDeployableInstancesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListDeployableInstancesResult* | 指定项目和游戏版本,获取可以部署的实例 | | *ConsoleAdminApi* | **listGameVersions** | *listGameVersionsForms* | *\Yjopenapi\Client\Model\ConsoleAdminListGameVersionsResult* | 分页获取游戏版本列表 | | *ConsoleAdminApi* | **listGames** | *listGamesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListGamesResult* | 分页获取游戏列表 | diff --git a/lib/Api/ConsoleAdminApi.php b/lib/Api/ConsoleAdminApi.php index 0cf60ada6..ed3f848e3 100644 --- a/lib/Api/ConsoleAdminApi.php +++ b/lib/Api/ConsoleAdminApi.php @@ -74,6 +74,237 @@ public function getConfig() return $this->config; } + /** + * Operation activateDeployment + * + * @param \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResult + */ + public function activateDeployment($varForms) + { + list($response) = $this->activateDeploymentWithHttpInfo($varForms); + return $response; + } + + /** + * Operation activateDeploymentWithHttpInfo + * + * @param \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResult, HTTP status code, HTTP response headers (array of strings) + */ + public function activateDeploymentWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResult'; + $request = $this->activateDeploymentRequest($varForms); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation activateDeploymentAsync + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function activateDeploymentAsync($varForms) + { + return $this->activateDeploymentAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation activateDeploymentAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function activateDeploymentAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResult'; + $request = $this->activateDeploymentRequest($varForms); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'activateDeployment' + * + * @param \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function activateDeploymentRequest($varForms) + { + // verify the required parameter 'game_id' is set + if ($varForms['game_id'] === null || (is_array($varForms['game_id']) && count($varForms['game_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'game_id\'] when calling activateDeployment' + ); + } + // verify the required parameter 'project_id' is set + if ($varForms['project_id'] === null || (is_array($varForms['project_id']) && count($varForms['project_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'project_id\'] when calling activateDeployment' + ); + } + // verify the required parameter 'version_id' is set + if ($varForms['version_id'] === null || (is_array($varForms['version_id']) && count($varForms['version_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'version_id\'] when calling activateDeployment' + ); + } + + $resourcePath = '/consoleAdmin/activateDeployment'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + $formParams['gameId'] = ObjectSerializer::toFormValue($varForms['game_id']); + $formParams['projectId'] = ObjectSerializer::toFormValue($varForms['project_id']); + $formParams['versionId'] = ObjectSerializer::toFormValue($varForms['version_id']); + if ($varForms['max_concurrency'] !== null) { + $formParams['maxConcurrency'] = ObjectSerializer::toFormValue($varForms['max_concurrency']); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/x-www-form-urlencoded'] + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + $signHeaders = $this->headerSelector->prepareSignHeader($formParams, $queryParams, 'POST', $this->config); + + $headers = array_merge( + ['User-Agent' => 'cgw-client/1.0.0/php'], + $signHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getScheme() . '://' . $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation adaptGameVersion * @@ -2014,6 +2245,668 @@ protected function getGameVersionProgressRequest($varForms) ); } + /** + * Operation listActivateableInstances + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResult + */ + public function listActivateableInstances($varForms) + { + list($response) = $this->listActivateableInstancesWithHttpInfo($varForms); + return $response; + } + + /** + * Operation listActivateableInstancesWithHttpInfo + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResult, HTTP status code, HTTP response headers (array of strings) + */ + public function listActivateableInstancesWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResult'; + $request = $this->listActivateableInstancesRequest($varForms); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listActivateableInstancesAsync + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listActivateableInstancesAsync($varForms) + { + return $this->listActivateableInstancesAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listActivateableInstancesAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listActivateableInstancesAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResult'; + $request = $this->listActivateableInstancesRequest($varForms); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listActivateableInstances' + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listActivateableInstancesRequest($varForms) + { + // verify the required parameter 'project_id' is set + if ($varForms['project_id'] === null || (is_array($varForms['project_id']) && count($varForms['project_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'project_id\'] when calling listActivateableInstances' + ); + } + // verify the required parameter 'version_id' is set + if ($varForms['version_id'] === null || (is_array($varForms['version_id']) && count($varForms['version_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'version_id\'] when calling listActivateableInstances' + ); + } + + $resourcePath = '/consoleAdmin/listActivateableInstances'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + $formParams['projectId'] = ObjectSerializer::toFormValue($varForms['project_id']); + $formParams['versionId'] = ObjectSerializer::toFormValue($varForms['version_id']); + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/x-www-form-urlencoded'] + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + $signHeaders = $this->headerSelector->prepareSignHeader($formParams, $queryParams, 'POST', $this->config); + + $headers = array_merge( + ['User-Agent' => 'cgw-client/1.0.0/php'], + $signHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getScheme() . '://' . $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listActivatedInstances + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult + */ + public function listActivatedInstances($varForms) + { + list($response) = $this->listActivatedInstancesWithHttpInfo($varForms); + return $response; + } + + /** + * Operation listActivatedInstancesWithHttpInfo + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult, HTTP status code, HTTP response headers (array of strings) + */ + public function listActivatedInstancesWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult'; + $request = $this->listActivatedInstancesRequest($varForms); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listActivatedInstancesAsync + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listActivatedInstancesAsync($varForms) + { + return $this->listActivatedInstancesAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listActivatedInstancesAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listActivatedInstancesAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult'; + $request = $this->listActivatedInstancesRequest($varForms); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listActivatedInstances' + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listActivatedInstancesRequest($varForms) + { + // verify the required parameter 'game_id' is set + if ($varForms['game_id'] === null || (is_array($varForms['game_id']) && count($varForms['game_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'game_id\'] when calling listActivatedInstances' + ); + } + // verify the required parameter 'project_id' is set + if ($varForms['project_id'] === null || (is_array($varForms['project_id']) && count($varForms['project_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'project_id\'] when calling listActivatedInstances' + ); + } + + $resourcePath = '/consoleAdmin/listActivatedInstances'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + $formParams['gameId'] = ObjectSerializer::toFormValue($varForms['game_id']); + $formParams['projectId'] = ObjectSerializer::toFormValue($varForms['project_id']); + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/x-www-form-urlencoded'] + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + $signHeaders = $this->headerSelector->prepareSignHeader($formParams, $queryParams, 'POST', $this->config); + + $headers = array_merge( + ['User-Agent' => 'cgw-client/1.0.0/php'], + $signHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getScheme() . '://' . $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listControllersOfGame + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult + */ + public function listControllersOfGame($varForms) + { + list($response) = $this->listControllersOfGameWithHttpInfo($varForms); + return $response; + } + + /** + * Operation listControllersOfGameWithHttpInfo + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult, HTTP status code, HTTP response headers (array of strings) + */ + public function listControllersOfGameWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult'; + $request = $this->listControllersOfGameRequest($varForms); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if (!in_array($returnType, ['string','integer','bool'])) { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listControllersOfGameAsync + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listControllersOfGameAsync($varForms) + { + return $this->listControllersOfGameAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listControllersOfGameAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listControllersOfGameAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult'; + $request = $this->listControllersOfGameRequest($varForms); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + + $content = $responseBody->getContents(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listControllersOfGame' + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listControllersOfGameRequest($varForms) + { + // verify the required parameter 'game_id' is set + if ($varForms['game_id'] === null || (is_array($varForms['game_id']) && count($varForms['game_id']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'game_id\'] when calling listControllersOfGame' + ); + } + + $resourcePath = '/consoleAdmin/listControllersOfGame'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + $formParams['gameId'] = ObjectSerializer::toFormValue($varForms['game_id']); + if ($varForms['next_token'] !== null) { + $formParams['nextToken'] = ObjectSerializer::toFormValue($varForms['next_token']); + } + if ($varForms['max_results'] !== null) { + $formParams['maxResults'] = ObjectSerializer::toFormValue($varForms['max_results']); + } + + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/x-www-form-urlencoded'] + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + } + } + + $signHeaders = $this->headerSelector->prepareSignHeader($formParams, $queryParams, 'POST', $this->config); + + $headers = array_merge( + ['User-Agent' => 'cgw-client/1.0.0/php'], + $signHeaders, + $headerParams, + $headers + ); + + $query = \GuzzleHttp\Psr7\build_query($queryParams); + return new Request( + 'POST', + $this->config->getScheme() . '://' . $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation listDeployableInstances * diff --git a/lib/Model/ConsoleAdminActivateDeploymentForms.php b/lib/Model/ConsoleAdminActivateDeploymentForms.php new file mode 100644 index 000000000..8069bae99 --- /dev/null +++ b/lib/Model/ConsoleAdminActivateDeploymentForms.php @@ -0,0 +1,347 @@ + 'string', +'project_id' => 'string', +'version_id' => 'string', +'max_concurrency' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'game_id' => null, +'project_id' => null, +'version_id' => null, +'max_concurrency' => 'int32' ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'game_id' => 'gameId', +'project_id' => 'projectId', +'version_id' => 'versionId', +'max_concurrency' => 'maxConcurrency' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'game_id' => 'setGameId', +'project_id' => 'setProjectId', +'version_id' => 'setVersionId', +'max_concurrency' => 'setMaxConcurrency' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'game_id' => 'getGameId', +'project_id' => 'getProjectId', +'version_id' => 'getVersionId', +'max_concurrency' => 'getMaxConcurrency' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; + $this->container['project_id'] = isset($data['project_id']) ? $data['project_id'] : null; + $this->container['version_id'] = isset($data['version_id']) ? $data['version_id'] : null; + $this->container['max_concurrency'] = isset($data['max_concurrency']) ? $data['max_concurrency'] : null; + } + + + /** + * Gets game_id + * + * @return string + */ + public function getGameId() + { + return $this->container['game_id']; + } + + /** + * Sets game_id + * + * @param string $game_id 游戏id + * + * @return $this + */ + public function setGameId($game_id) + { + $this->container['game_id'] = $game_id; + + return $this; + } + + /** + * Gets project_id + * + * @return string + */ + public function getProjectId() + { + return $this->container['project_id']; + } + + /** + * Sets project_id + * + * @param string $project_id 项目id + * + * @return $this + */ + public function setProjectId($project_id) + { + $this->container['project_id'] = $project_id; + + return $this; + } + + /** + * Gets version_id + * + * @return string + */ + public function getVersionId() + { + return $this->container['version_id']; + } + + /** + * Sets version_id + * + * @param string $version_id 版本id + * + * @return $this + */ + public function setVersionId($version_id) + { + $this->container['version_id'] = $version_id; + + return $this; + } + + /** + * Gets max_concurrency + * + * @return int + */ + public function getMaxConcurrency() + { + return $this->container['max_concurrency']; + } + + /** + * Sets max_concurrency + * + * @param int $max_concurrency 期望的激活后可调度的总最大并发数不小于该参数 + * + * @return $this + */ + public function setMaxConcurrency($max_concurrency) + { + $this->container['max_concurrency'] = $max_concurrency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminActivateDeploymentResult.php b/lib/Model/ConsoleAdminActivateDeploymentResult.php new file mode 100644 index 000000000..40155574b --- /dev/null +++ b/lib/Model/ConsoleAdminActivateDeploymentResult.php @@ -0,0 +1,347 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool', +'model' => '\Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResultModel' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'msg_code' => null, +'msg_info' => null, +'success' => null, +'model' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'msg_code' => 'msgCode', +'msg_info' => 'msgInfo', +'success' => 'success', +'model' => 'model' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'msg_code' => 'setMsgCode', +'msg_info' => 'setMsgInfo', +'success' => 'setSuccess', +'model' => 'setModel' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'msg_code' => 'getMsgCode', +'msg_info' => 'getMsgInfo', +'success' => 'getSuccess', +'model' => 'getModel' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['msg_code'] = isset($data['msg_code']) ? $data['msg_code'] : null; + $this->container['msg_info'] = isset($data['msg_info']) ? $data['msg_info'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['model'] = isset($data['model']) ? $data['model'] : null; + } + + + /** + * Gets msg_code + * + * @return string + */ + public function getMsgCode() + { + return $this->container['msg_code']; + } + + /** + * Sets msg_code + * + * @param string $msg_code 服务端状态码 + * + * @return $this + */ + public function setMsgCode($msg_code) + { + $this->container['msg_code'] = $msg_code; + + return $this; + } + + /** + * Gets msg_info + * + * @return string + */ + public function getMsgInfo() + { + return $this->container['msg_info']; + } + + /** + * Sets msg_info + * + * @param string $msg_info 服务端描述信息 + * + * @return $this + */ + public function setMsgInfo($msg_info) + { + $this->container['msg_info'] = $msg_info; + + return $this; + } + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success 是否成功 + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets model + * + * @return \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResultModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\ConsoleAdminActivateDeploymentResultModel $model model + * + * @return $this + */ + public function setModel($model) + { + $this->container['model'] = $model; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminActivateDeploymentResultModel.php b/lib/Model/ConsoleAdminActivateDeploymentResultModel.php new file mode 100644 index 000000000..9efcf5bd3 --- /dev/null +++ b/lib/Model/ConsoleAdminActivateDeploymentResultModel.php @@ -0,0 +1,257 @@ + 'bool' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'activated' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'activated' => 'activated' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'activated' => 'setActivated' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'activated' => 'getActivated' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['activated'] = isset($data['activated']) ? $data['activated'] : null; + } + + + /** + * Gets activated + * + * @return bool + */ + public function getActivated() + { + return $this->container['activated']; + } + + /** + * Sets activated + * + * @param bool $activated 激活结果 + * + * @return $this + */ + public function setActivated($activated) + { + $this->container['activated'] = $activated; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivateableInstancesForms.php b/lib/Model/ConsoleAdminListActivateableInstancesForms.php new file mode 100644 index 000000000..5b2a7807f --- /dev/null +++ b/lib/Model/ConsoleAdminListActivateableInstancesForms.php @@ -0,0 +1,287 @@ + 'string', +'version_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'project_id' => null, +'version_id' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'project_id' => 'projectId', +'version_id' => 'versionId' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'project_id' => 'setProjectId', +'version_id' => 'setVersionId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'project_id' => 'getProjectId', +'version_id' => 'getVersionId' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['project_id'] = isset($data['project_id']) ? $data['project_id'] : null; + $this->container['version_id'] = isset($data['version_id']) ? $data['version_id'] : null; + } + + + /** + * Gets project_id + * + * @return string + */ + public function getProjectId() + { + return $this->container['project_id']; + } + + /** + * Sets project_id + * + * @param string $project_id 项目id + * + * @return $this + */ + public function setProjectId($project_id) + { + $this->container['project_id'] = $project_id; + + return $this; + } + + /** + * Gets version_id + * + * @return string + */ + public function getVersionId() + { + return $this->container['version_id']; + } + + /** + * Sets version_id + * + * @param string $version_id 版本id + * + * @return $this + */ + public function setVersionId($version_id) + { + $this->container['version_id'] = $version_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivateableInstancesResult.php b/lib/Model/ConsoleAdminListActivateableInstancesResult.php new file mode 100644 index 000000000..ec5d62bc6 --- /dev/null +++ b/lib/Model/ConsoleAdminListActivateableInstancesResult.php @@ -0,0 +1,347 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool', +'model' => '\Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResultModel' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'msg_code' => null, +'msg_info' => null, +'success' => null, +'model' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'msg_code' => 'msgCode', +'msg_info' => 'msgInfo', +'success' => 'success', +'model' => 'model' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'msg_code' => 'setMsgCode', +'msg_info' => 'setMsgInfo', +'success' => 'setSuccess', +'model' => 'setModel' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'msg_code' => 'getMsgCode', +'msg_info' => 'getMsgInfo', +'success' => 'getSuccess', +'model' => 'getModel' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['msg_code'] = isset($data['msg_code']) ? $data['msg_code'] : null; + $this->container['msg_info'] = isset($data['msg_info']) ? $data['msg_info'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['model'] = isset($data['model']) ? $data['model'] : null; + } + + + /** + * Gets msg_code + * + * @return string + */ + public function getMsgCode() + { + return $this->container['msg_code']; + } + + /** + * Sets msg_code + * + * @param string $msg_code 服务端状态码 + * + * @return $this + */ + public function setMsgCode($msg_code) + { + $this->container['msg_code'] = $msg_code; + + return $this; + } + + /** + * Gets msg_info + * + * @return string + */ + public function getMsgInfo() + { + return $this->container['msg_info']; + } + + /** + * Sets msg_info + * + * @param string $msg_info 服务端描述信息 + * + * @return $this + */ + public function setMsgInfo($msg_info) + { + $this->container['msg_info'] = $msg_info; + + return $this; + } + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success 是否成功 + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets model + * + * @return \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResultModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResultModel $model model + * + * @return $this + */ + public function setModel($model) + { + $this->container['model'] = $model; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivateableInstancesResultModel.php b/lib/Model/ConsoleAdminListActivateableInstancesResultModel.php new file mode 100644 index 000000000..f19f2f1ff --- /dev/null +++ b/lib/Model/ConsoleAdminListActivateableInstancesResultModel.php @@ -0,0 +1,287 @@ + 'int', +'data_list' => '\Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResultModelDataList[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'count' => 'int64', +'data_list' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', +'data_list' => 'dataList' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', +'data_list' => 'setDataList' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', +'data_list' => 'getDataList' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['data_list'] = isset($data['data_list']) ? $data['data_list'] : null; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count 总记录数 + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets data_list + * + * @return \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResultModelDataList[] + */ + public function getDataList() + { + return $this->container['data_list']; + } + + /** + * Sets data_list + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivateableInstancesResultModelDataList[] $data_list 数据列表 + * + * @return $this + */ + public function setDataList($data_list) + { + $this->container['data_list'] = $data_list; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivateableInstancesResultModelDataList.php b/lib/Model/ConsoleAdminListActivateableInstancesResultModelDataList.php new file mode 100644 index 000000000..c6b9d18be --- /dev/null +++ b/lib/Model/ConsoleAdminListActivateableInstancesResultModelDataList.php @@ -0,0 +1,347 @@ + 'string', +'cloud_game_instance_name' => 'string', +'container_count' => 'int', +'max_concurrency' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'cloud_game_instance_id' => null, +'cloud_game_instance_name' => null, +'container_count' => null, +'max_concurrency' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'cloud_game_instance_id' => 'cloudGameInstanceId', +'cloud_game_instance_name' => 'cloudGameInstanceName', +'container_count' => 'containerCount', +'max_concurrency' => 'maxConcurrency' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cloud_game_instance_id' => 'setCloudGameInstanceId', +'cloud_game_instance_name' => 'setCloudGameInstanceName', +'container_count' => 'setContainerCount', +'max_concurrency' => 'setMaxConcurrency' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cloud_game_instance_id' => 'getCloudGameInstanceId', +'cloud_game_instance_name' => 'getCloudGameInstanceName', +'container_count' => 'getContainerCount', +'max_concurrency' => 'getMaxConcurrency' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cloud_game_instance_id'] = isset($data['cloud_game_instance_id']) ? $data['cloud_game_instance_id'] : null; + $this->container['cloud_game_instance_name'] = isset($data['cloud_game_instance_name']) ? $data['cloud_game_instance_name'] : null; + $this->container['container_count'] = isset($data['container_count']) ? $data['container_count'] : null; + $this->container['max_concurrency'] = isset($data['max_concurrency']) ? $data['max_concurrency'] : null; + } + + + /** + * Gets cloud_game_instance_id + * + * @return string + */ + public function getCloudGameInstanceId() + { + return $this->container['cloud_game_instance_id']; + } + + /** + * Sets cloud_game_instance_id + * + * @param string $cloud_game_instance_id 实例ID + * + * @return $this + */ + public function setCloudGameInstanceId($cloud_game_instance_id) + { + $this->container['cloud_game_instance_id'] = $cloud_game_instance_id; + + return $this; + } + + /** + * Gets cloud_game_instance_name + * + * @return string + */ + public function getCloudGameInstanceName() + { + return $this->container['cloud_game_instance_name']; + } + + /** + * Sets cloud_game_instance_name + * + * @param string $cloud_game_instance_name 实例名成 + * + * @return $this + */ + public function setCloudGameInstanceName($cloud_game_instance_name) + { + $this->container['cloud_game_instance_name'] = $cloud_game_instance_name; + + return $this; + } + + /** + * Gets container_count + * + * @return int + */ + public function getContainerCount() + { + return $this->container['container_count']; + } + + /** + * Sets container_count + * + * @param int $container_count 实例路数 + * + * @return $this + */ + public function setContainerCount($container_count) + { + $this->container['container_count'] = $container_count; + + return $this; + } + + /** + * Gets max_concurrency + * + * @return int + */ + public function getMaxConcurrency() + { + return $this->container['max_concurrency']; + } + + /** + * Sets max_concurrency + * + * @param int $max_concurrency 最大并发数 + * + * @return $this + */ + public function setMaxConcurrency($max_concurrency) + { + $this->container['max_concurrency'] = $max_concurrency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivatedInstancesForms.php b/lib/Model/ConsoleAdminListActivatedInstancesForms.php new file mode 100644 index 000000000..207c073da --- /dev/null +++ b/lib/Model/ConsoleAdminListActivatedInstancesForms.php @@ -0,0 +1,287 @@ + 'string', +'project_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'game_id' => null, +'project_id' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'game_id' => 'gameId', +'project_id' => 'projectId' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'game_id' => 'setGameId', +'project_id' => 'setProjectId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'game_id' => 'getGameId', +'project_id' => 'getProjectId' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; + $this->container['project_id'] = isset($data['project_id']) ? $data['project_id'] : null; + } + + + /** + * Gets game_id + * + * @return string + */ + public function getGameId() + { + return $this->container['game_id']; + } + + /** + * Sets game_id + * + * @param string $game_id 游戏id + * + * @return $this + */ + public function setGameId($game_id) + { + $this->container['game_id'] = $game_id; + + return $this; + } + + /** + * Gets project_id + * + * @return string + */ + public function getProjectId() + { + return $this->container['project_id']; + } + + /** + * Sets project_id + * + * @param string $project_id 项目id + * + * @return $this + */ + public function setProjectId($project_id) + { + $this->container['project_id'] = $project_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivatedInstancesResult.php b/lib/Model/ConsoleAdminListActivatedInstancesResult.php new file mode 100644 index 000000000..2e39a6a63 --- /dev/null +++ b/lib/Model/ConsoleAdminListActivatedInstancesResult.php @@ -0,0 +1,347 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool', +'model' => '\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResultModel' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'msg_code' => null, +'msg_info' => null, +'success' => null, +'model' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'msg_code' => 'msgCode', +'msg_info' => 'msgInfo', +'success' => 'success', +'model' => 'model' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'msg_code' => 'setMsgCode', +'msg_info' => 'setMsgInfo', +'success' => 'setSuccess', +'model' => 'setModel' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'msg_code' => 'getMsgCode', +'msg_info' => 'getMsgInfo', +'success' => 'getSuccess', +'model' => 'getModel' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['msg_code'] = isset($data['msg_code']) ? $data['msg_code'] : null; + $this->container['msg_info'] = isset($data['msg_info']) ? $data['msg_info'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['model'] = isset($data['model']) ? $data['model'] : null; + } + + + /** + * Gets msg_code + * + * @return string + */ + public function getMsgCode() + { + return $this->container['msg_code']; + } + + /** + * Sets msg_code + * + * @param string $msg_code 服务端状态码 + * + * @return $this + */ + public function setMsgCode($msg_code) + { + $this->container['msg_code'] = $msg_code; + + return $this; + } + + /** + * Gets msg_info + * + * @return string + */ + public function getMsgInfo() + { + return $this->container['msg_info']; + } + + /** + * Sets msg_info + * + * @param string $msg_info 服务端描述信息 + * + * @return $this + */ + public function setMsgInfo($msg_info) + { + $this->container['msg_info'] = $msg_info; + + return $this; + } + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success 是否成功 + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets model + * + * @return \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResultModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResultModel $model model + * + * @return $this + */ + public function setModel($model) + { + $this->container['model'] = $model; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivatedInstancesResultModel.php b/lib/Model/ConsoleAdminListActivatedInstancesResultModel.php new file mode 100644 index 000000000..72613de62 --- /dev/null +++ b/lib/Model/ConsoleAdminListActivatedInstancesResultModel.php @@ -0,0 +1,287 @@ + 'int', +'data_list' => '\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResultModelDataList[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'count' => 'int64', +'data_list' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', +'data_list' => 'dataList' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', +'data_list' => 'setDataList' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', +'data_list' => 'getDataList' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['data_list'] = isset($data['data_list']) ? $data['data_list'] : null; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count 总记录数 + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets data_list + * + * @return \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResultModelDataList[] + */ + public function getDataList() + { + return $this->container['data_list']; + } + + /** + * Sets data_list + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResultModelDataList[] $data_list 数据列表 + * + * @return $this + */ + public function setDataList($data_list) + { + $this->container['data_list'] = $data_list; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListActivatedInstancesResultModelDataList.php b/lib/Model/ConsoleAdminListActivatedInstancesResultModelDataList.php new file mode 100644 index 000000000..8720b26df --- /dev/null +++ b/lib/Model/ConsoleAdminListActivatedInstancesResultModelDataList.php @@ -0,0 +1,347 @@ + 'string', +'cloud_game_instance_name' => 'string', +'container_count' => 'int', +'max_concurrency' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'cloud_game_instance_id' => null, +'cloud_game_instance_name' => null, +'container_count' => null, +'max_concurrency' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'cloud_game_instance_id' => 'cloudGameInstanceId', +'cloud_game_instance_name' => 'cloudGameInstanceName', +'container_count' => 'containerCount', +'max_concurrency' => 'maxConcurrency' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'cloud_game_instance_id' => 'setCloudGameInstanceId', +'cloud_game_instance_name' => 'setCloudGameInstanceName', +'container_count' => 'setContainerCount', +'max_concurrency' => 'setMaxConcurrency' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'cloud_game_instance_id' => 'getCloudGameInstanceId', +'cloud_game_instance_name' => 'getCloudGameInstanceName', +'container_count' => 'getContainerCount', +'max_concurrency' => 'getMaxConcurrency' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['cloud_game_instance_id'] = isset($data['cloud_game_instance_id']) ? $data['cloud_game_instance_id'] : null; + $this->container['cloud_game_instance_name'] = isset($data['cloud_game_instance_name']) ? $data['cloud_game_instance_name'] : null; + $this->container['container_count'] = isset($data['container_count']) ? $data['container_count'] : null; + $this->container['max_concurrency'] = isset($data['max_concurrency']) ? $data['max_concurrency'] : null; + } + + + /** + * Gets cloud_game_instance_id + * + * @return string + */ + public function getCloudGameInstanceId() + { + return $this->container['cloud_game_instance_id']; + } + + /** + * Sets cloud_game_instance_id + * + * @param string $cloud_game_instance_id 实例ID + * + * @return $this + */ + public function setCloudGameInstanceId($cloud_game_instance_id) + { + $this->container['cloud_game_instance_id'] = $cloud_game_instance_id; + + return $this; + } + + /** + * Gets cloud_game_instance_name + * + * @return string + */ + public function getCloudGameInstanceName() + { + return $this->container['cloud_game_instance_name']; + } + + /** + * Sets cloud_game_instance_name + * + * @param string $cloud_game_instance_name 实例名成 + * + * @return $this + */ + public function setCloudGameInstanceName($cloud_game_instance_name) + { + $this->container['cloud_game_instance_name'] = $cloud_game_instance_name; + + return $this; + } + + /** + * Gets container_count + * + * @return int + */ + public function getContainerCount() + { + return $this->container['container_count']; + } + + /** + * Sets container_count + * + * @param int $container_count 实例路数 + * + * @return $this + */ + public function setContainerCount($container_count) + { + $this->container['container_count'] = $container_count; + + return $this; + } + + /** + * Gets max_concurrency + * + * @return int + */ + public function getMaxConcurrency() + { + return $this->container['max_concurrency']; + } + + /** + * Sets max_concurrency + * + * @param int $max_concurrency 最大并发数 + * + * @return $this + */ + public function setMaxConcurrency($max_concurrency) + { + $this->container['max_concurrency'] = $max_concurrency; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListControllersOfGameForms.php b/lib/Model/ConsoleAdminListControllersOfGameForms.php new file mode 100644 index 000000000..91fa5cef0 --- /dev/null +++ b/lib/Model/ConsoleAdminListControllersOfGameForms.php @@ -0,0 +1,317 @@ + 'string', +'next_token' => 'string', +'max_results' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'game_id' => null, +'next_token' => null, +'max_results' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'game_id' => 'gameId', +'next_token' => 'nextToken', +'max_results' => 'maxResults' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'game_id' => 'setGameId', +'next_token' => 'setNextToken', +'max_results' => 'setMaxResults' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'game_id' => 'getGameId', +'next_token' => 'getNextToken', +'max_results' => 'getMaxResults' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; + $this->container['next_token'] = isset($data['next_token']) ? $data['next_token'] : null; + $this->container['max_results'] = isset($data['max_results']) ? $data['max_results'] : null; + } + + + /** + * Gets game_id + * + * @return string + */ + public function getGameId() + { + return $this->container['game_id']; + } + + /** + * Sets game_id + * + * @param string $game_id 游戏id + * + * @return $this + */ + public function setGameId($game_id) + { + $this->container['game_id'] = $game_id; + + return $this; + } + + /** + * Gets next_token + * + * @return string + */ + public function getNextToken() + { + return $this->container['next_token']; + } + + /** + * Sets next_token + * + * @param string $next_token 标记当前开始读取的位置 + * + * @return $this + */ + public function setNextToken($next_token) + { + $this->container['next_token'] = $next_token; + + return $this; + } + + /** + * Gets max_results + * + * @return string + */ + public function getMaxResults() + { + return $this->container['max_results']; + } + + /** + * Sets max_results + * + * @param string $max_results 本次读取的最大数据记录数量 + * + * @return $this + */ + public function setMaxResults($max_results) + { + $this->container['max_results'] = $max_results; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListControllersOfGameResult.php b/lib/Model/ConsoleAdminListControllersOfGameResult.php new file mode 100644 index 000000000..1b6006c8d --- /dev/null +++ b/lib/Model/ConsoleAdminListControllersOfGameResult.php @@ -0,0 +1,347 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool', +'model' => '\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResultModel' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'msg_code' => null, +'msg_info' => null, +'success' => null, +'model' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'msg_code' => 'msgCode', +'msg_info' => 'msgInfo', +'success' => 'success', +'model' => 'model' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'msg_code' => 'setMsgCode', +'msg_info' => 'setMsgInfo', +'success' => 'setSuccess', +'model' => 'setModel' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'msg_code' => 'getMsgCode', +'msg_info' => 'getMsgInfo', +'success' => 'getSuccess', +'model' => 'getModel' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['msg_code'] = isset($data['msg_code']) ? $data['msg_code'] : null; + $this->container['msg_info'] = isset($data['msg_info']) ? $data['msg_info'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['model'] = isset($data['model']) ? $data['model'] : null; + } + + + /** + * Gets msg_code + * + * @return string + */ + public function getMsgCode() + { + return $this->container['msg_code']; + } + + /** + * Sets msg_code + * + * @param string $msg_code 服务端状态码 + * + * @return $this + */ + public function setMsgCode($msg_code) + { + $this->container['msg_code'] = $msg_code; + + return $this; + } + + /** + * Gets msg_info + * + * @return string + */ + public function getMsgInfo() + { + return $this->container['msg_info']; + } + + /** + * Sets msg_info + * + * @param string $msg_info 服务端描述信息 + * + * @return $this + */ + public function setMsgInfo($msg_info) + { + $this->container['msg_info'] = $msg_info; + + return $this; + } + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success 是否成功 + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets model + * + * @return \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResultModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResultModel $model model + * + * @return $this + */ + public function setModel($model) + { + $this->container['model'] = $model; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListControllersOfGameResultModel.php b/lib/Model/ConsoleAdminListControllersOfGameResultModel.php new file mode 100644 index 000000000..d7cebe5de --- /dev/null +++ b/lib/Model/ConsoleAdminListControllersOfGameResultModel.php @@ -0,0 +1,347 @@ + 'int', +'next_token' => 'string', +'max_results' => 'int', +'data_list' => '\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResultModelDataList[]' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'count' => 'int64', +'next_token' => null, +'max_results' => null, +'data_list' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'count' => 'count', +'next_token' => 'nextToken', +'max_results' => 'maxResults', +'data_list' => 'dataList' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'count' => 'setCount', +'next_token' => 'setNextToken', +'max_results' => 'setMaxResults', +'data_list' => 'setDataList' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'count' => 'getCount', +'next_token' => 'getNextToken', +'max_results' => 'getMaxResults', +'data_list' => 'getDataList' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['count'] = isset($data['count']) ? $data['count'] : null; + $this->container['next_token'] = isset($data['next_token']) ? $data['next_token'] : null; + $this->container['max_results'] = isset($data['max_results']) ? $data['max_results'] : null; + $this->container['data_list'] = isset($data['data_list']) ? $data['data_list'] : null; + } + + + /** + * Gets count + * + * @return int + */ + public function getCount() + { + return $this->container['count']; + } + + /** + * Sets count + * + * @param int $count 总记录数 + * + * @return $this + */ + public function setCount($count) + { + $this->container['count'] = $count; + + return $this; + } + + /** + * Gets next_token + * + * @return string + */ + public function getNextToken() + { + return $this->container['next_token']; + } + + /** + * Sets next_token + * + * @param string $next_token 表示当前调用返回读取到的位置,空代表数据已经读取完毕 + * + * @return $this + */ + public function setNextToken($next_token) + { + $this->container['next_token'] = $next_token; + + return $this; + } + + /** + * Gets max_results + * + * @return int + */ + public function getMaxResults() + { + return $this->container['max_results']; + } + + /** + * Sets max_results + * + * @param int $max_results 本次请求所返回的最大记录条数 + * + * @return $this + */ + public function setMaxResults($max_results) + { + $this->container['max_results'] = $max_results; + + return $this; + } + + /** + * Gets data_list + * + * @return \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResultModelDataList[] + */ + public function getDataList() + { + return $this->container['data_list']; + } + + /** + * Sets data_list + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResultModelDataList[] $data_list 数据列表 + * + * @return $this + */ + public function setDataList($data_list) + { + $this->container['data_list'] = $data_list; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} diff --git a/lib/Model/ConsoleAdminListControllersOfGameResultModelDataList.php b/lib/Model/ConsoleAdminListControllersOfGameResultModelDataList.php new file mode 100644 index 000000000..029dbbc66 --- /dev/null +++ b/lib/Model/ConsoleAdminListControllersOfGameResultModelDataList.php @@ -0,0 +1,437 @@ + 'string', +'name' => 'string', +'bg_pic' => 'string', +'config' => 'string', +'type' => 'int', +'ctltype' => 'string', +'priority' => 'int' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'id' => null, +'name' => null, +'bg_pic' => null, +'config' => null, +'type' => null, +'ctltype' => null, +'priority' => null ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function serialTypes() + { + return self::$serialTypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function serialFormats() + { + return self::$serialFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', +'name' => 'name', +'bg_pic' => 'bgPic', +'config' => 'config', +'type' => 'type', +'ctltype' => 'ctltype', +'priority' => 'priority' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', +'name' => 'setName', +'bg_pic' => 'setBgPic', +'config' => 'setConfig', +'type' => 'setType', +'ctltype' => 'setCtltype', +'priority' => 'setPriority' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', +'name' => 'getName', +'bg_pic' => 'getBgPic', +'config' => 'getConfig', +'type' => 'getType', +'ctltype' => 'getCtltype', +'priority' => 'getPriority' ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$serialModelName; + } + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['bg_pic'] = isset($data['bg_pic']) ? $data['bg_pic'] : null; + $this->container['config'] = isset($data['config']) ? $data['config'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['ctltype'] = isset($data['ctltype']) ? $data['ctltype'] : null; + $this->container['priority'] = isset($data['priority']) ? $data['priority'] : null; + } + + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id 控制器ID + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name 名称 + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets bg_pic + * + * @return string + */ + public function getBgPic() + { + return $this->container['bg_pic']; + } + + /** + * Sets bg_pic + * + * @param string $bg_pic 背景图 + * + * @return $this + */ + public function setBgPic($bg_pic) + { + $this->container['bg_pic'] = $bg_pic; + + return $this; + } + + /** + * Gets config + * + * @return string + */ + public function getConfig() + { + return $this->container['config']; + } + + /** + * Sets config + * + * @param string $config 配置 + * + * @return $this + */ + public function setConfig($config) + { + $this->container['config'] = $config; + + return $this; + } + + /** + * Gets type + * + * @return int + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param int $type 方案类型 + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets ctltype + * + * @return string + */ + public function getCtltype() + { + return $this->container['ctltype']; + } + + /** + * Sets ctltype + * + * @param string $ctltype 控制器类型 + * + * @return $this + */ + public function setCtltype($ctltype) + { + $this->container['ctltype'] = $ctltype; + + return $this; + } + + /** + * Gets priority + * + * @return int + */ + public function getPriority() + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param int $priority 优先级 + * + * @return $this + */ + public function setPriority($priority) + { + $this->container['priority'] = $priority; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return isset($this->container[$offset]) ? $this->container[$offset] : null; + } + + /** + * Sets value based on offset. + * + * @param integer $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset) + { + unset($this->container[$offset]); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + //if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print + // return json_encode( + // ObjectSerializer::sanitizeForSerialization($this), + // JSON_PRETTY_PRINT + // ); + //} + + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +}