diff --git a/README.md b/README.md index bf6ddd162..a8ed27905 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.20230629 +composer require alibabacloud/alibabacloud-yjopenapi-php-client 1.0.20230718 ``` Then run `composer install` @@ -77,15 +77,18 @@ try { | *ConsoleAdminApi* | **listActivatedInstances** | *listActivatedInstancesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListActivatedInstancesResult* | 指定项目和游戏,获取已激活版本的可调度实例及调度配置 | | *ConsoleAdminApi* | **listControllersOfGame** | *listControllersOfGameForms* | *\Yjopenapi\Client\Model\ConsoleAdminListControllersOfGameResult* | 获取单个游戏关联的控制器列表 | | *ConsoleAdminApi* | **listDeployableInstances** | *listDeployableInstancesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListDeployableInstancesResult* | 指定项目和游戏版本,获取可以部署的实例 | + | *ConsoleAdminApi* | **listGameDeployDetailsOfProject** | *listGameDeployDetailsOfProjectForms* | *\Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectResult* | 获取项目下游戏部署版本信息 | | *ConsoleAdminApi* | **listGameVersions** | *listGameVersionsForms* | *\Yjopenapi\Client\Model\ConsoleAdminListGameVersionsResult* | 分页获取游戏版本列表 | | *ConsoleAdminApi* | **listGames** | *listGamesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListGamesResult* | 分页获取游戏列表 | | *ConsoleAdminApi* | **listInstancesOfProject** | *listInstancesOfProjectForms* | *\Yjopenapi\Client\Model\ConsoleAdminListInstancesOfProjectResult* | 分页获取项目中的实例 | | *ConsoleAdminApi* | **listProjects** | *listProjectsForms* | *\Yjopenapi\Client\Model\ConsoleAdminListProjectsResult* | 分页获取项目列表 | + | *ConsoleAdminApi* | **listVersionDeployInstances** | *listVersionDeployInstancesForms* | *\Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesResult* | 获取项目下游戏版本的部署实例信息 | | *ConsoleAdminApi* | **removeGameFromProject** | *removeGameFromProjectForms* | *\Yjopenapi\Client\Model\ConsoleAdminRemoveGameFromProjectResult* | 将游戏移出项目 | | *ConsoleAdminApi* | **submitDeployment** | *submitDeploymentForms* | *\Yjopenapi\Client\Model\ConsoleAdminSubmitDeploymentResult* | 提交游戏版本的部署请求 | | *ConsoleAdminApi* | **uploadGameVersionByDownload** | *uploadGameVersionByDownloadForms* | *\Yjopenapi\Client\Model\ConsoleAdminUploadGameVersionByDownloadResult* | 一键上传:文件上传接口,用远程下载的方式生成新版本 | | *DispatchApi* | **batchStopGame** | *batchStopGameForms* | *\Yjopenapi\Client\Model\BatchStopGameResult* | 游戏下全量踢下线,异步接口 | | *DispatchApi* | **cancelGameHang** | *cancelGameHangForms* | *\Yjopenapi\Client\Model\CancelGameHangResult* | 取消游戏挂机 | + | *DispatchApi* | **gameNotify** | *gameNotifyForms* | *\Yjopenapi\Client\Model\GameNotifyResult* | 游戏通知 | | *DispatchApi* | **getGameConcurrency** | *getGameConcurrencyForms* | *\Yjopenapi\Client\Model\GetGameConcurrencyResult* | 调用GetGameConcurrency获取游戏当前并发数 | | *DispatchApi* | **getStock** | *getStockForms* | *\Yjopenapi\Client\Model\GetStockResult* | 调用GetStock获取游戏当前库存 | | *DispatchApi* | **getStopGameToken** | *getStopGameTokenForms* | *\Yjopenapi\Client\Model\GetStopGameTokenResult* | 全量踢下线获取token | @@ -95,6 +98,7 @@ try { | *DispatchApi* | **setGameAlive** | *setGameAliveForms* | *\Yjopenapi\Client\Model\SetGameAliveResult* | 设置游戏可运行时长 | | *DispatchApi* | **setGameHang** | *setGameHangForms* | *\Yjopenapi\Client\Model\SetGameHangResult* | 设置游戏挂机 | | *DispatchApi* | **stopGame** | *stopGameForms* | *\Yjopenapi\Client\Model\StopGameResult* | 服务端发起,停止某个用户的某个游戏的某个会话 | + | *DispatchApi* | **stopPreopenContainer** | *stopPreopenContainerForms* | *\Yjopenapi\Client\Model\StopPreopenContainerResult* | 停止预开容器 | | *DispatchApi* | **tryToGetSlot** | *tryToGetSlotForms* | *\Yjopenapi\Client\Model\TryToGetSlotResult* | 为用户调度分配游戏容器,容器一旦分配成功会被锁住,一段时间内不再分配给其他用户,过期释放。 | | *InteractiveApi* | **getParty** | *getPartyForms* | *\Yjopenapi\Client\Model\InteractiveGetPartyResult* | 获取派对 | | *InteractiveApi* | **getPartyStatus** | *getPartyStatusForms* | *\Yjopenapi\Client\Model\InteractiveGetPartyStatusResult* | 查询派对游戏状态 | diff --git a/lib/Api/ConsoleAdminApi.php b/lib/Api/ConsoleAdminApi.php index 627dbacb5..3ee05fe1b 100644 --- a/lib/Api/ConsoleAdminApi.php +++ b/lib/Api/ConsoleAdminApi.php @@ -3134,6 +3134,219 @@ protected function listDeployableInstancesRequest($varForms) ); } + /** + * Operation listGameDeployDetailsOfProject + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectResult + */ + public function listGameDeployDetailsOfProject($varForms) + { + list($response) = $this->listGameDeployDetailsOfProjectWithHttpInfo($varForms); + return $response; + } + + /** + * Operation listGameDeployDetailsOfProjectWithHttpInfo + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectResult, HTTP status code, HTTP response headers (array of strings) + */ + public function listGameDeployDetailsOfProjectWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectResult'; + $request = $this->listGameDeployDetailsOfProjectRequest($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\ConsoleAdminListGameDeployDetailsOfProjectResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listGameDeployDetailsOfProjectAsync + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listGameDeployDetailsOfProjectAsync($varForms) + { + return $this->listGameDeployDetailsOfProjectAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listGameDeployDetailsOfProjectAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listGameDeployDetailsOfProjectAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectResult'; + $request = $this->listGameDeployDetailsOfProjectRequest($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 'listGameDeployDetailsOfProject' + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listGameDeployDetailsOfProjectRequest($varForms) + { + + $resourcePath = '/consoleAdmin/listGameDeployDetailsOfProject'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + if ($varForms['project_id'] !== null) { + $formParams['projectId'] = ObjectSerializer::toFormValue($varForms['project_id']); + } + if ($varForms['game_id'] !== null) { + $formParams['gameId'] = ObjectSerializer::toFormValue($varForms['game_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 listGameVersions * @@ -4000,6 +4213,225 @@ protected function listProjectsRequest($varForms) ); } + /** + * Operation listVersionDeployInstances + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesResult + */ + public function listVersionDeployInstances($varForms) + { + list($response) = $this->listVersionDeployInstancesWithHttpInfo($varForms); + return $response; + } + + /** + * Operation listVersionDeployInstancesWithHttpInfo + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesResult, HTTP status code, HTTP response headers (array of strings) + */ + public function listVersionDeployInstancesWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesResult'; + $request = $this->listVersionDeployInstancesRequest($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\ConsoleAdminListVersionDeployInstancesResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listVersionDeployInstancesAsync + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listVersionDeployInstancesAsync($varForms) + { + return $this->listVersionDeployInstancesAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listVersionDeployInstancesAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listVersionDeployInstancesAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesResult'; + $request = $this->listVersionDeployInstancesRequest($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 'listVersionDeployInstances' + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listVersionDeployInstancesRequest($varForms) + { + + $resourcePath = '/consoleAdmin/listVersionDeployInstances'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + if ($varForms['project_id'] !== null) { + $formParams['projectId'] = ObjectSerializer::toFormValue($varForms['project_id']); + } + if ($varForms['game_id'] !== null) { + $formParams['gameId'] = ObjectSerializer::toFormValue($varForms['game_id']); + } + if ($varForms['version_id'] !== null) { + $formParams['versionId'] = ObjectSerializer::toFormValue($varForms['version_id']); + } + if ($varForms['deploy_status'] !== null) { + $formParams['deployStatus'] = ObjectSerializer::toFormValue($varForms['deploy_status']); + } + + $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 removeGameFromProject * diff --git a/lib/Api/DispatchApi.php b/lib/Api/DispatchApi.php index d47a550c4..6c5ecf8df 100644 --- a/lib/Api/DispatchApi.php +++ b/lib/Api/DispatchApi.php @@ -532,6 +532,237 @@ protected function cancelGameHangRequest($varForms) ); } + /** + * Operation gameNotify + * + * @param \Yjopenapi\Client\Model\GameNotifyForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\GameNotifyResult + */ + public function gameNotify($varForms) + { + list($response) = $this->gameNotifyWithHttpInfo($varForms); + return $response; + } + + /** + * Operation gameNotifyWithHttpInfo + * + * @param \Yjopenapi\Client\Model\GameNotifyForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\GameNotifyResult, HTTP status code, HTTP response headers (array of strings) + */ + public function gameNotifyWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\GameNotifyResult'; + $request = $this->gameNotifyRequest($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\GameNotifyResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation gameNotifyAsync + * + * + * + * @param \Yjopenapi\Client\Model\GameNotifyForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function gameNotifyAsync($varForms) + { + return $this->gameNotifyAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation gameNotifyAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\GameNotifyForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function gameNotifyAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\GameNotifyResult'; + $request = $this->gameNotifyRequest($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 'gameNotify' + * + * @param \Yjopenapi\Client\Model\GameNotifyForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function gameNotifyRequest($varForms) + { + // verify the required parameter 'game_session' is set + if ($varForms['game_session'] === null || (is_array($varForms['game_session']) && count($varForms['game_session']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'game_session\'] when calling gameNotify' + ); + } + // verify the required parameter 'app_key' is set + if ($varForms['app_key'] === null || (is_array($varForms['app_key']) && count($varForms['app_key']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'app_key\'] when calling gameNotify' + ); + } + // verify the required parameter 'type' is set + if ($varForms['type'] === null || (is_array($varForms['type']) && count($varForms['type']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'type\'] when calling gameNotify' + ); + } + + $resourcePath = '/gameNotify'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + $formParams['gameSession'] = ObjectSerializer::toFormValue($varForms['game_session']); + $formParams['appKey'] = ObjectSerializer::toFormValue($varForms['app_key']); + $formParams['type'] = ObjectSerializer::toFormValue($varForms['type']); + if ($varForms['value'] !== null) { + $formParams['value'] = ObjectSerializer::toFormValue($varForms['value']); + } + + $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 getGameConcurrency * @@ -2556,6 +2787,227 @@ protected function stopGameRequest($varForms) ); } + /** + * Operation stopPreopenContainer + * + * @param \Yjopenapi\Client\Model\StopPreopenContainerForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \Yjopenapi\Client\Model\StopPreopenContainerResult + */ + public function stopPreopenContainer($varForms) + { + list($response) = $this->stopPreopenContainerWithHttpInfo($varForms); + return $response; + } + + /** + * Operation stopPreopenContainerWithHttpInfo + * + * @param \Yjopenapi\Client\Model\StopPreopenContainerForms $varForms + * + * @throws \Yjopenapi\Client\Api\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \Yjopenapi\Client\Model\StopPreopenContainerResult, HTTP status code, HTTP response headers (array of strings) + */ + public function stopPreopenContainerWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\StopPreopenContainerResult'; + $request = $this->stopPreopenContainerRequest($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\StopPreopenContainerResult', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation stopPreopenContainerAsync + * + * + * + * @param \Yjopenapi\Client\Model\StopPreopenContainerForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function stopPreopenContainerAsync($varForms) + { + return $this->stopPreopenContainerAsyncWithHttpInfo($varForms) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation stopPreopenContainerAsyncWithHttpInfo + * + * + * + * @param \Yjopenapi\Client\Model\StopPreopenContainerForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function stopPreopenContainerAsyncWithHttpInfo($varForms) + { + $returnType = '\Yjopenapi\Client\Model\StopPreopenContainerResult'; + $request = $this->stopPreopenContainerRequest($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 'stopPreopenContainer' + * + * @param \Yjopenapi\Client\Model\StopPreopenContainerForms $varForms + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function stopPreopenContainerRequest($varForms) + { + // verify the required parameter 'app_key' is set + if ($varForms['app_key'] === null || (is_array($varForms['app_key']) && count($varForms['app_key']) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $varForms[\'app_key\'] when calling stopPreopenContainer' + ); + } + // 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 stopPreopenContainer' + ); + } + + $resourcePath = '/stopPreopenContainer'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + + // form params + $formParams['appKey'] = ObjectSerializer::toFormValue($varForms['app_key']); + $formParams['gameId'] = ObjectSerializer::toFormValue($varForms['game_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 tryToGetSlot * diff --git a/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectForms.php b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectForms.php new file mode 100644 index 000000000..b8d7a8c0a --- /dev/null +++ b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectForms.php @@ -0,0 +1,287 @@ + 'string', +'game_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'project_id' => null, +'game_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', +'game_id' => 'gameId' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'project_id' => 'setProjectId', +'game_id' => 'setGameId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'project_id' => 'getProjectId', +'game_id' => 'getGameId' ]; + + /** + * 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['game_id'] = isset($data['game_id']) ? $data['game_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 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; + } + /** + * 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/ConsoleAdminListGameDeployDetailsOfProjectModel.php b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectModel.php new file mode 100644 index 000000000..fec4d4fca --- /dev/null +++ b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectModel.php @@ -0,0 +1,287 @@ + 'int', +'data_list' => '\Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectModelDataList[]' ]; + + /** + * 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\ConsoleAdminListGameDeployDetailsOfProjectModelDataList[] + */ + public function getDataList() + { + return $this->container['data_list']; + } + + /** + * Sets data_list + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectModelDataList[] $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/ConsoleAdminListGameDeployDetailsOfProjectModelDataList.php b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectModelDataList.php new file mode 100644 index 000000000..8eeac367a --- /dev/null +++ b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectModelDataList.php @@ -0,0 +1,347 @@ + 'string', +'version_name' => 'string', +'deploy_status' => 'string', +'auto_active_status' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'version_id' => null, +'version_name' => null, +'deploy_status' => null, +'auto_active_status' => 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 = [ + 'version_id' => 'versionId', +'version_name' => 'versionName', +'deploy_status' => 'deployStatus', +'auto_active_status' => 'autoActiveStatus' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'version_id' => 'setVersionId', +'version_name' => 'setVersionName', +'deploy_status' => 'setDeployStatus', +'auto_active_status' => 'setAutoActiveStatus' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'version_id' => 'getVersionId', +'version_name' => 'getVersionName', +'deploy_status' => 'getDeployStatus', +'auto_active_status' => 'getAutoActiveStatus' ]; + + /** + * 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['version_id'] = isset($data['version_id']) ? $data['version_id'] : null; + $this->container['version_name'] = isset($data['version_name']) ? $data['version_name'] : null; + $this->container['deploy_status'] = isset($data['deploy_status']) ? $data['deploy_status'] : null; + $this->container['auto_active_status'] = isset($data['auto_active_status']) ? $data['auto_active_status'] : null; + } + + + /** + * 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 version_name + * + * @return string + */ + public function getVersionName() + { + return $this->container['version_name']; + } + + /** + * Sets version_name + * + * @param string $version_name 版本名称 + * + * @return $this + */ + public function setVersionName($version_name) + { + $this->container['version_name'] = $version_name; + + return $this; + } + + /** + * Gets deploy_status + * + * @return string + */ + public function getDeployStatus() + { + return $this->container['deploy_status']; + } + + /** + * Sets deploy_status + * + * @param string $deploy_status 版本部署状态 + * + * @return $this + */ + public function setDeployStatus($deploy_status) + { + $this->container['deploy_status'] = $deploy_status; + + return $this; + } + + /** + * Gets auto_active_status + * + * @return string + */ + public function getAutoActiveStatus() + { + return $this->container['auto_active_status']; + } + + /** + * Sets auto_active_status + * + * @param string $auto_active_status 版本待自动激活状态 + * + * @return $this + */ + public function setAutoActiveStatus($auto_active_status) + { + $this->container['auto_active_status'] = $auto_active_status; + + 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/ConsoleAdminListGameDeployDetailsOfProjectResult.php b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectResult.php new file mode 100644 index 000000000..6921d890e --- /dev/null +++ b/lib/Model/ConsoleAdminListGameDeployDetailsOfProjectResult.php @@ -0,0 +1,347 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool', +'model' => '\Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectModel' ]; + + /** + * 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\ConsoleAdminListGameDeployDetailsOfProjectModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListGameDeployDetailsOfProjectModel $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/ConsoleAdminListGameVersionsResultModelDataList.php b/lib/Model/ConsoleAdminListGameVersionsResultModelDataList.php index d85c8975f..559269a47 100644 --- a/lib/Model/ConsoleAdminListGameVersionsResultModelDataList.php +++ b/lib/Model/ConsoleAdminListGameVersionsResultModelDataList.php @@ -46,7 +46,9 @@ class ConsoleAdminListGameVersionsResultModelDataList implements ModelInterface, */ protected static $serialTypes = [ 'version_id' => 'string', -'version_name' => 'string' ]; +'version_name' => 'string', +'adapt_state' => 'string', +'adapt_finish_time' => 'int' ]; /** * Array of property to format mappings. Used for (de)serialization @@ -55,7 +57,9 @@ class ConsoleAdminListGameVersionsResultModelDataList implements ModelInterface, */ protected static $serialFormats = [ 'version_id' => null, -'version_name' => null ]; +'version_name' => null, +'adapt_state' => null, +'adapt_finish_time' => 'int64' ]; /** * Array of property to type mappings. Used for (de)serialization @@ -85,7 +89,9 @@ public static function serialFormats() */ protected static $attributeMap = [ 'version_id' => 'versionId', -'version_name' => 'versionName' ]; +'version_name' => 'versionName', +'adapt_state' => 'adaptState', +'adapt_finish_time' => 'adaptFinishTime' ]; /** * Array of attributes to setter functions (for deserialization of responses) @@ -94,7 +100,9 @@ public static function serialFormats() */ protected static $setters = [ 'version_id' => 'setVersionId', -'version_name' => 'setVersionName' ]; +'version_name' => 'setVersionName', +'adapt_state' => 'setAdaptState', +'adapt_finish_time' => 'setAdaptFinishTime' ]; /** * Array of attributes to getter functions (for serialization of requests) @@ -103,7 +111,9 @@ public static function serialFormats() */ protected static $getters = [ 'version_id' => 'getVersionId', -'version_name' => 'getVersionName' ]; +'version_name' => 'getVersionName', +'adapt_state' => 'getAdaptState', +'adapt_finish_time' => 'getAdaptFinishTime' ]; /** * Array of attributes where the key is the local name, @@ -165,6 +175,8 @@ public function __construct(array $data = null) { $this->container['version_id'] = isset($data['version_id']) ? $data['version_id'] : null; $this->container['version_name'] = isset($data['version_name']) ? $data['version_name'] : null; + $this->container['adapt_state'] = isset($data['adapt_state']) ? $data['adapt_state'] : null; + $this->container['adapt_finish_time'] = isset($data['adapt_finish_time']) ? $data['adapt_finish_time'] : null; } @@ -215,6 +227,54 @@ public function setVersionName($version_name) return $this; } + + /** + * Gets adapt_state + * + * @return string + */ + public function getAdaptState() + { + return $this->container['adapt_state']; + } + + /** + * Sets adapt_state + * + * @param string $adapt_state 适配评测状态 + * + * @return $this + */ + public function setAdaptState($adapt_state) + { + $this->container['adapt_state'] = $adapt_state; + + return $this; + } + + /** + * Gets adapt_finish_time + * + * @return int + */ + public function getAdaptFinishTime() + { + return $this->container['adapt_finish_time']; + } + + /** + * Sets adapt_finish_time + * + * @param int $adapt_finish_time 适配评测完成时间戳 + * + * @return $this + */ + public function setAdaptFinishTime($adapt_finish_time) + { + $this->container['adapt_finish_time'] = $adapt_finish_time; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ConsoleAdminListVersionDeployInstancesForms.php b/lib/Model/ConsoleAdminListVersionDeployInstancesForms.php new file mode 100644 index 000000000..6d10e347c --- /dev/null +++ b/lib/Model/ConsoleAdminListVersionDeployInstancesForms.php @@ -0,0 +1,347 @@ + 'string', +'game_id' => 'string', +'version_id' => 'string', +'deploy_status' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'project_id' => null, +'game_id' => null, +'version_id' => null, +'deploy_status' => 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', +'game_id' => 'gameId', +'version_id' => 'versionId', +'deploy_status' => 'deployStatus' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'project_id' => 'setProjectId', +'game_id' => 'setGameId', +'version_id' => 'setVersionId', +'deploy_status' => 'setDeployStatus' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'project_id' => 'getProjectId', +'game_id' => 'getGameId', +'version_id' => 'getVersionId', +'deploy_status' => 'getDeployStatus' ]; + + /** + * 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['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; + $this->container['version_id'] = isset($data['version_id']) ? $data['version_id'] : null; + $this->container['deploy_status'] = isset($data['deploy_status']) ? $data['deploy_status'] : 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 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 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 deploy_status + * + * @return string + */ + public function getDeployStatus() + { + return $this->container['deploy_status']; + } + + /** + * Sets deploy_status + * + * @param string $deploy_status 查询的部署状态 + * + * @return $this + */ + public function setDeployStatus($deploy_status) + { + $this->container['deploy_status'] = $deploy_status; + + 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/ConsoleAdminListVersionDeployInstancesModel.php b/lib/Model/ConsoleAdminListVersionDeployInstancesModel.php new file mode 100644 index 000000000..eb1afc5eb --- /dev/null +++ b/lib/Model/ConsoleAdminListVersionDeployInstancesModel.php @@ -0,0 +1,287 @@ + 'int', +'data_list' => '\Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesModelDataList[]' ]; + + /** + * 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\ConsoleAdminListVersionDeployInstancesModelDataList[] + */ + public function getDataList() + { + return $this->container['data_list']; + } + + /** + * Sets data_list + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesModelDataList[] $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/ConsoleAdminListVersionDeployInstancesModelDataList.php b/lib/Model/ConsoleAdminListVersionDeployInstancesModelDataList.php new file mode 100644 index 000000000..10a0b71fd --- /dev/null +++ b/lib/Model/ConsoleAdminListVersionDeployInstancesModelDataList.php @@ -0,0 +1,287 @@ + 'string', +'cloud_game_instance_name' => 'string' ]; + + /** + * 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 ]; + + /** + * 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' ]; + + /** + * 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' ]; + + /** + * 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' ]; + + /** + * 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; + } + + + /** + * 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; + } + /** + * 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/ConsoleAdminListVersionDeployInstancesResult.php b/lib/Model/ConsoleAdminListVersionDeployInstancesResult.php new file mode 100644 index 000000000..b384bdc71 --- /dev/null +++ b/lib/Model/ConsoleAdminListVersionDeployInstancesResult.php @@ -0,0 +1,347 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool', +'model' => '\Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesModel' ]; + + /** + * 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\ConsoleAdminListVersionDeployInstancesModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\ConsoleAdminListVersionDeployInstancesModel $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/GameNotifyForms.php b/lib/Model/GameNotifyForms.php new file mode 100644 index 000000000..b9b3f6013 --- /dev/null +++ b/lib/Model/GameNotifyForms.php @@ -0,0 +1,347 @@ + 'string', +'app_key' => 'string', +'type' => 'string', +'value' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'game_session' => null, +'app_key' => null, +'type' => null, +'value' => 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_session' => 'gameSession', +'app_key' => 'appKey', +'type' => 'type', +'value' => 'value' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'game_session' => 'setGameSession', +'app_key' => 'setAppKey', +'type' => 'setType', +'value' => 'setValue' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'game_session' => 'getGameSession', +'app_key' => 'getAppKey', +'type' => 'getType', +'value' => 'getValue' ]; + + /** + * 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_session'] = isset($data['game_session']) ? $data['game_session'] : null; + $this->container['app_key'] = isset($data['app_key']) ? $data['app_key'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + + /** + * Gets game_session + * + * @return string + */ + public function getGameSession() + { + return $this->container['game_session']; + } + + /** + * Sets game_session + * + * @param string $game_session 会话ID + * + * @return $this + */ + public function setGameSession($game_session) + { + $this->container['game_session'] = $game_session; + + return $this; + } + + /** + * Gets app_key + * + * @return string + */ + public function getAppKey() + { + return $this->container['app_key']; + } + + /** + * Sets app_key + * + * @param string $app_key 项目应用AK + * + * @return $this + */ + public function setAppKey($app_key) + { + $this->container['app_key'] = $app_key; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type 通知类型 + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value 通知值 + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + 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/GameNotifyResult.php b/lib/Model/GameNotifyResult.php new file mode 100644 index 000000000..715c6ecdb --- /dev/null +++ b/lib/Model/GameNotifyResult.php @@ -0,0 +1,287 @@ + 'bool', +'model' => '\Yjopenapi\Client\Model\GameNotifyResultModel' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + '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 = [ + 'success' => 'success', +'model' => 'model' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'success' => 'setSuccess', +'model' => 'setModel' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '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['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['model'] = isset($data['model']) ? $data['model'] : null; + } + + + /** + * Gets success + * + * @return bool + */ + public function getSuccess() + { + return $this->container['success']; + } + + /** + * Sets success + * + * @param bool $success success + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + return $this; + } + + /** + * Gets model + * + * @return \Yjopenapi\Client\Model\GameNotifyResultModel + */ + public function getModel() + { + return $this->container['model']; + } + + /** + * Sets model + * + * @param \Yjopenapi\Client\Model\GameNotifyResultModel $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/GameNotifyResultModel.php b/lib/Model/GameNotifyResultModel.php new file mode 100644 index 000000000..fa9eb1f39 --- /dev/null +++ b/lib/Model/GameNotifyResultModel.php @@ -0,0 +1,347 @@ + 'string', +'success' => 'bool', +'code' => 'string', +'message' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'game_session' => null, +'success' => null, +'code' => null, +'message' => 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_session' => 'gameSession', +'success' => 'success', +'code' => 'code', +'message' => 'message' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'game_session' => 'setGameSession', +'success' => 'setSuccess', +'code' => 'setCode', +'message' => 'setMessage' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'game_session' => 'getGameSession', +'success' => 'getSuccess', +'code' => 'getCode', +'message' => 'getMessage' ]; + + /** + * 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_session'] = isset($data['game_session']) ? $data['game_session'] : null; + $this->container['success'] = isset($data['success']) ? $data['success'] : null; + $this->container['code'] = isset($data['code']) ? $data['code'] : null; + $this->container['message'] = isset($data['message']) ? $data['message'] : null; + } + + + /** + * Gets game_session + * + * @return string + */ + public function getGameSession() + { + return $this->container['game_session']; + } + + /** + * Sets game_session + * + * @param string $game_session 会话ID + * + * @return $this + */ + public function setGameSession($game_session) + { + $this->container['game_session'] = $game_session; + + 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 code + * + * @return string + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string $code 错误Code + * + * @return $this + */ + public function setCode($code) + { + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage() + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message 错误Message + * + * @return $this + */ + public function setMessage($message) + { + $this->container['message'] = $message; + + 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/StopPreopenContainerForms.php b/lib/Model/StopPreopenContainerForms.php new file mode 100644 index 000000000..37d8fe524 --- /dev/null +++ b/lib/Model/StopPreopenContainerForms.php @@ -0,0 +1,287 @@ + 'string', +'game_id' => 'string' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'app_key' => null, +'game_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 = [ + 'app_key' => 'appKey', +'game_id' => 'gameId' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'app_key' => 'setAppKey', +'game_id' => 'setGameId' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'app_key' => 'getAppKey', +'game_id' => 'getGameId' ]; + + /** + * 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['app_key'] = isset($data['app_key']) ? $data['app_key'] : null; + $this->container['game_id'] = isset($data['game_id']) ? $data['game_id'] : null; + } + + + /** + * Gets app_key + * + * @return string + */ + public function getAppKey() + { + return $this->container['app_key']; + } + + /** + * Sets app_key + * + * @param string $app_key 项目应用AK + * + * @return $this + */ + public function setAppKey($app_key) + { + $this->container['app_key'] = $app_key; + + return $this; + } + + /** + * 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; + } + /** + * 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/StopPreopenContainerResult.php b/lib/Model/StopPreopenContainerResult.php new file mode 100644 index 000000000..9a5ac1aa8 --- /dev/null +++ b/lib/Model/StopPreopenContainerResult.php @@ -0,0 +1,317 @@ + 'string', +'msg_info' => 'string', +'success' => 'bool' ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $serialFormats = [ + 'msg_code' => null, +'msg_info' => null, +'success' => 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' ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'msg_code' => 'setMsgCode', +'msg_info' => 'setMsgInfo', +'success' => 'setSuccess' ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'msg_code' => 'getMsgCode', +'msg_info' => 'getMsgInfo', +'success' => 'getSuccess' ]; + + /** + * 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; + } + + + /** + * 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 success + * + * @return $this + */ + public function setSuccess($success) + { + $this->container['success'] = $success; + + 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)); + } +}