From 9fb8309150f163ea7ef185d44a6c1bc9092eed8e Mon Sep 17 00:00:00 2001 From: sdk-team Date: Tue, 22 Oct 2024 17:17:51 +0000 Subject: [PATCH] Update API AuthorizeInstanceGroup: add param UserMeta. --- ChangeLog.md | 17 +++ src/Appstreamcenter.php | 39 ++++++- src/Models/AuthorizeInstanceGroupRequest.php | 13 +++ .../userMeta.php | 59 ++++++++++ .../AuthorizeInstanceGroupShrinkRequest.php | 107 ++++++++++++++++++ src/Models/CreateAppInstanceGroupRequest.php | 2 - .../CreateAppInstanceGroupRequest/network.php | 26 +++++ .../CreateAppInstanceGroupShrinkRequest.php | 2 - .../appInstanceGroupModels.php | 12 ++ src/Models/ListAppInstanceGroupRequest.php | 12 ++ .../appInstanceGroupModels.php | 12 ++ src/Models/ListNodeInstanceTypeRequest.php | 98 ++++++++++++++-- 12 files changed, 385 insertions(+), 14 deletions(-) create mode 100644 src/Models/AuthorizeInstanceGroupRequest/userMeta.php create mode 100644 src/Models/AuthorizeInstanceGroupShrinkRequest.php diff --git a/ChangeLog.md b/ChangeLog.md index 742c3a9..5623c81 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,20 @@ +2024-10-22 Version: 2.0.4 +- Update API AuthorizeInstanceGroup: add param UserMeta. +- Update API CreateAppInstanceGroup: update param AppInstanceGroupName. +- Update API CreateAppInstanceGroup: update param Network. +- Update API GetAppInstanceGroup: update response param. +- Update API ListAppInstanceGroup: add param OfficeSiteId. +- Update API ListAppInstanceGroup: update response param. +- Update API ListNodeInstanceType: add param Cpu. +- Update API ListNodeInstanceType: add param Gpu. +- Update API ListNodeInstanceType: add param GpuMemory. +- Update API ListNodeInstanceType: add param Memory. +- Update API ListNodeInstanceType: add param NodeInstanceTypeFamily. +- Update API ListNodeInstanceType: add param OrderBy. +- Update API ListNodeInstanceType: add param SortType. +- Update API ListNodeInstanceType: update response param. + + 2024-09-12 Version: 2.0.3 - Update API CreateAppInstanceGroup: update param NodePool. - Update API GetAppInstanceGroup: update response param. diff --git a/src/Appstreamcenter.php b/src/Appstreamcenter.php index 6c46c24..2b6df52 100644 --- a/src/Appstreamcenter.php +++ b/src/Appstreamcenter.php @@ -18,6 +18,7 @@ use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\AskSessionPackageRenewPriceResponse; use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\AuthorizeInstanceGroupRequest; use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\AuthorizeInstanceGroupResponse; +use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\AuthorizeInstanceGroupShrinkRequest; use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\BuySessionPackageRequest; use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\BuySessionPackageResponse; use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\CancelOtaTaskRequest; @@ -433,14 +434,19 @@ public function askSessionPackageRenewPrice($request) /** * @summary 授权用户 * * - * @param AuthorizeInstanceGroupRequest $request AuthorizeInstanceGroupRequest + * @param AuthorizeInstanceGroupRequest $tmpReq AuthorizeInstanceGroupRequest * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions * * @return AuthorizeInstanceGroupResponse AuthorizeInstanceGroupResponse */ - public function authorizeInstanceGroupWithOptions($request, $runtime) + public function authorizeInstanceGroupWithOptions($tmpReq, $runtime) { - Utils::validateModel($request); + Utils::validateModel($tmpReq); + $request = new AuthorizeInstanceGroupShrinkRequest([]); + OpenApiUtilClient::convert($tmpReq, $request); + if (!Utils::isUnset($tmpReq->userMeta)) { + $request->userMetaShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->userMeta, 'UserMeta', 'json'); + } $body = []; if (!Utils::isUnset($request->appInstanceGroupId)) { $body['AppInstanceGroupId'] = $request->appInstanceGroupId; @@ -455,6 +461,9 @@ public function authorizeInstanceGroupWithOptions($request, $runtime) if (!Utils::isUnset($request->unAuthorizeUserIds)) { $bodyFlat['UnAuthorizeUserIds'] = $request->unAuthorizeUserIds; } + if (!Utils::isUnset($request->userMetaShrink)) { + $body['UserMeta'] = $request->userMetaShrink; + } $body = Tea::merge($body, OpenApiUtilClient::query($bodyFlat)); $req = new OpenApiRequest([ 'body' => OpenApiUtilClient::parseToMap($body), @@ -1682,6 +1691,9 @@ public function listAppInstanceGroupWithOptions($request, $runtime) if (!Utils::isUnset($request->nodeInstanceType)) { $query['NodeInstanceType'] = $request->nodeInstanceType; } + if (!Utils::isUnset($request->officeSiteId)) { + $query['OfficeSiteId'] = $request->officeSiteId; + } if (!Utils::isUnset($request->pageNumber)) { $query['PageNumber'] = $request->pageNumber; } @@ -1813,12 +1825,30 @@ public function listNodeInstanceTypeWithOptions($request, $runtime) if (!Utils::isUnset($request->bizRegionId)) { $query['BizRegionId'] = $request->bizRegionId; } + if (!Utils::isUnset($request->cpu)) { + $query['Cpu'] = $request->cpu; + } + if (!Utils::isUnset($request->gpu)) { + $query['Gpu'] = $request->gpu; + } + if (!Utils::isUnset($request->gpuMemory)) { + $query['GpuMemory'] = $request->gpuMemory; + } if (!Utils::isUnset($request->language)) { $query['Language'] = $request->language; } + if (!Utils::isUnset($request->memory)) { + $query['Memory'] = $request->memory; + } if (!Utils::isUnset($request->nodeInstanceType)) { $query['NodeInstanceType'] = $request->nodeInstanceType; } + if (!Utils::isUnset($request->nodeInstanceTypeFamily)) { + $query['NodeInstanceTypeFamily'] = $request->nodeInstanceTypeFamily; + } + if (!Utils::isUnset($request->orderBy)) { + $query['OrderBy'] = $request->orderBy; + } if (!Utils::isUnset($request->osType)) { $query['OsType'] = $request->osType; } @@ -1831,6 +1861,9 @@ public function listNodeInstanceTypeWithOptions($request, $runtime) if (!Utils::isUnset($request->productType)) { $query['ProductType'] = $request->productType; } + if (!Utils::isUnset($request->sortType)) { + $query['SortType'] = $request->sortType; + } $req = new OpenApiRequest([ 'query' => OpenApiUtilClient::query($query), ]); diff --git a/src/Models/AuthorizeInstanceGroupRequest.php b/src/Models/AuthorizeInstanceGroupRequest.php index 5c0e9f0..b2278dd 100644 --- a/src/Models/AuthorizeInstanceGroupRequest.php +++ b/src/Models/AuthorizeInstanceGroupRequest.php @@ -4,6 +4,7 @@ namespace AlibabaCloud\SDK\Appstreamcenter\V20210901\Models; +use AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\AuthorizeInstanceGroupRequest\userMeta; use AlibabaCloud\Tea\Model; class AuthorizeInstanceGroupRequest extends Model @@ -35,11 +36,17 @@ class AuthorizeInstanceGroupRequest extends Model * @var string[] */ public $unAuthorizeUserIds; + + /** + * @var userMeta + */ + public $userMeta; protected $_name = [ 'appInstanceGroupId' => 'AppInstanceGroupId', 'authorizeUserIds' => 'AuthorizeUserIds', 'productType' => 'ProductType', 'unAuthorizeUserIds' => 'UnAuthorizeUserIds', + 'userMeta' => 'UserMeta', ]; public function validate() @@ -61,6 +68,9 @@ public function toMap() if (null !== $this->unAuthorizeUserIds) { $res['UnAuthorizeUserIds'] = $this->unAuthorizeUserIds; } + if (null !== $this->userMeta) { + $res['UserMeta'] = null !== $this->userMeta ? $this->userMeta->toMap() : null; + } return $res; } @@ -89,6 +99,9 @@ public static function fromMap($map = []) $model->unAuthorizeUserIds = $map['UnAuthorizeUserIds']; } } + if (isset($map['UserMeta'])) { + $model->userMeta = userMeta::fromMap($map['UserMeta']); + } return $model; } diff --git a/src/Models/AuthorizeInstanceGroupRequest/userMeta.php b/src/Models/AuthorizeInstanceGroupRequest/userMeta.php new file mode 100644 index 0000000..2b6ae3b --- /dev/null +++ b/src/Models/AuthorizeInstanceGroupRequest/userMeta.php @@ -0,0 +1,59 @@ + 'AdDomain', + 'type' => 'Type', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->adDomain) { + $res['AdDomain'] = $this->adDomain; + } + if (null !== $this->type) { + $res['Type'] = $this->type; + } + + return $res; + } + + /** + * @param array $map + * + * @return userMeta + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AdDomain'])) { + $model->adDomain = $map['AdDomain']; + } + if (isset($map['Type'])) { + $model->type = $map['Type']; + } + + return $model; + } +} diff --git a/src/Models/AuthorizeInstanceGroupShrinkRequest.php b/src/Models/AuthorizeInstanceGroupShrinkRequest.php new file mode 100644 index 0000000..6dcc38a --- /dev/null +++ b/src/Models/AuthorizeInstanceGroupShrinkRequest.php @@ -0,0 +1,107 @@ + 'AppInstanceGroupId', + 'authorizeUserIds' => 'AuthorizeUserIds', + 'productType' => 'ProductType', + 'unAuthorizeUserIds' => 'UnAuthorizeUserIds', + 'userMetaShrink' => 'UserMeta', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->appInstanceGroupId) { + $res['AppInstanceGroupId'] = $this->appInstanceGroupId; + } + if (null !== $this->authorizeUserIds) { + $res['AuthorizeUserIds'] = $this->authorizeUserIds; + } + if (null !== $this->productType) { + $res['ProductType'] = $this->productType; + } + if (null !== $this->unAuthorizeUserIds) { + $res['UnAuthorizeUserIds'] = $this->unAuthorizeUserIds; + } + if (null !== $this->userMetaShrink) { + $res['UserMeta'] = $this->userMetaShrink; + } + + return $res; + } + + /** + * @param array $map + * + * @return AuthorizeInstanceGroupShrinkRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AppInstanceGroupId'])) { + $model->appInstanceGroupId = $map['AppInstanceGroupId']; + } + if (isset($map['AuthorizeUserIds'])) { + if (!empty($map['AuthorizeUserIds'])) { + $model->authorizeUserIds = $map['AuthorizeUserIds']; + } + } + if (isset($map['ProductType'])) { + $model->productType = $map['ProductType']; + } + if (isset($map['UnAuthorizeUserIds'])) { + if (!empty($map['UnAuthorizeUserIds'])) { + $model->unAuthorizeUserIds = $map['UnAuthorizeUserIds']; + } + } + if (isset($map['UserMeta'])) { + $model->userMetaShrink = $map['UserMeta']; + } + + return $model; + } +} diff --git a/src/Models/CreateAppInstanceGroupRequest.php b/src/Models/CreateAppInstanceGroupRequest.php index 3583868..3a6a12b 100644 --- a/src/Models/CreateAppInstanceGroupRequest.php +++ b/src/Models/CreateAppInstanceGroupRequest.php @@ -26,8 +26,6 @@ class CreateAppInstanceGroupRequest extends Model public $appCenterImageId; /** - * @description This parameter is required. - * * @var string */ public $appInstanceGroupName; diff --git a/src/Models/CreateAppInstanceGroupRequest/network.php b/src/Models/CreateAppInstanceGroupRequest/network.php index 849bf94..3dd2d14 100644 --- a/src/Models/CreateAppInstanceGroupRequest/network.php +++ b/src/Models/CreateAppInstanceGroupRequest/network.php @@ -22,6 +22,11 @@ class network extends Model */ public $ipExpireMinutes; + /** + * @var string + */ + public $officeSiteId; + /** * @var routes[] */ @@ -33,11 +38,18 @@ class network extends Model * @var string */ public $strategyType; + + /** + * @var string[] + */ + public $vSwitchIds; protected $_name = [ 'domainRules' => 'DomainRules', 'ipExpireMinutes' => 'IpExpireMinutes', + 'officeSiteId' => 'OfficeSiteId', 'routes' => 'Routes', 'strategyType' => 'StrategyType', + 'vSwitchIds' => 'VSwitchIds', ]; public function validate() @@ -59,6 +71,9 @@ public function toMap() if (null !== $this->ipExpireMinutes) { $res['IpExpireMinutes'] = $this->ipExpireMinutes; } + if (null !== $this->officeSiteId) { + $res['OfficeSiteId'] = $this->officeSiteId; + } if (null !== $this->routes) { $res['Routes'] = []; if (null !== $this->routes && \is_array($this->routes)) { @@ -71,6 +86,9 @@ public function toMap() if (null !== $this->strategyType) { $res['StrategyType'] = $this->strategyType; } + if (null !== $this->vSwitchIds) { + $res['VSwitchIds'] = $this->vSwitchIds; + } return $res; } @@ -95,6 +113,9 @@ public static function fromMap($map = []) if (isset($map['IpExpireMinutes'])) { $model->ipExpireMinutes = $map['IpExpireMinutes']; } + if (isset($map['OfficeSiteId'])) { + $model->officeSiteId = $map['OfficeSiteId']; + } if (isset($map['Routes'])) { if (!empty($map['Routes'])) { $model->routes = []; @@ -107,6 +128,11 @@ public static function fromMap($map = []) if (isset($map['StrategyType'])) { $model->strategyType = $map['StrategyType']; } + if (isset($map['VSwitchIds'])) { + if (!empty($map['VSwitchIds'])) { + $model->vSwitchIds = $map['VSwitchIds']; + } + } return $model; } diff --git a/src/Models/CreateAppInstanceGroupShrinkRequest.php b/src/Models/CreateAppInstanceGroupShrinkRequest.php index b0c787e..f35b5e8 100644 --- a/src/Models/CreateAppInstanceGroupShrinkRequest.php +++ b/src/Models/CreateAppInstanceGroupShrinkRequest.php @@ -18,8 +18,6 @@ class CreateAppInstanceGroupShrinkRequest extends Model public $appCenterImageId; /** - * @description This parameter is required. - * * @var string */ public $appInstanceGroupName; diff --git a/src/Models/GetAppInstanceGroupResponseBody/appInstanceGroupModels.php b/src/Models/GetAppInstanceGroupResponseBody/appInstanceGroupModels.php index 3ec1b4b..4c62eaf 100644 --- a/src/Models/GetAppInstanceGroupResponseBody/appInstanceGroupModels.php +++ b/src/Models/GetAppInstanceGroupResponseBody/appInstanceGroupModels.php @@ -115,6 +115,11 @@ class appInstanceGroupModels extends Model */ public $nodePool; + /** + * @var string + */ + public $officeSiteId; + /** * @example Windows * @@ -234,6 +239,7 @@ class appInstanceGroupModels extends Model 'maxAmount' => 'MaxAmount', 'minAmount' => 'MinAmount', 'nodePool' => 'NodePool', + 'officeSiteId' => 'OfficeSiteId', 'osType' => 'OsType', 'otaInfo' => 'OtaInfo', 'productType' => 'ProductType', @@ -318,6 +324,9 @@ public function toMap() } } } + if (null !== $this->officeSiteId) { + $res['OfficeSiteId'] = $this->officeSiteId; + } if (null !== $this->osType) { $res['OsType'] = $this->osType; } @@ -435,6 +444,9 @@ public static function fromMap($map = []) } } } + if (isset($map['OfficeSiteId'])) { + $model->officeSiteId = $map['OfficeSiteId']; + } if (isset($map['OsType'])) { $model->osType = $map['OsType']; } diff --git a/src/Models/ListAppInstanceGroupRequest.php b/src/Models/ListAppInstanceGroupRequest.php index 4c1ed7e..4a7a896 100644 --- a/src/Models/ListAppInstanceGroupRequest.php +++ b/src/Models/ListAppInstanceGroupRequest.php @@ -39,6 +39,11 @@ class ListAppInstanceGroupRequest extends Model */ public $nodeInstanceType; + /** + * @var string + */ + public $officeSiteId; + /** * @example 1 * @@ -81,6 +86,7 @@ class ListAppInstanceGroupRequest extends Model 'appInstanceGroupName' => 'AppInstanceGroupName', 'bizRegionId' => 'BizRegionId', 'nodeInstanceType' => 'NodeInstanceType', + 'officeSiteId' => 'OfficeSiteId', 'pageNumber' => 'PageNumber', 'pageSize' => 'PageSize', 'productType' => 'ProductType', @@ -110,6 +116,9 @@ public function toMap() if (null !== $this->nodeInstanceType) { $res['NodeInstanceType'] = $this->nodeInstanceType; } + if (null !== $this->officeSiteId) { + $res['OfficeSiteId'] = $this->officeSiteId; + } if (null !== $this->pageNumber) { $res['PageNumber'] = $this->pageNumber; } @@ -152,6 +161,9 @@ public static function fromMap($map = []) if (isset($map['NodeInstanceType'])) { $model->nodeInstanceType = $map['NodeInstanceType']; } + if (isset($map['OfficeSiteId'])) { + $model->officeSiteId = $map['OfficeSiteId']; + } if (isset($map['PageNumber'])) { $model->pageNumber = $map['PageNumber']; } diff --git a/src/Models/ListAppInstanceGroupResponseBody/appInstanceGroupModels.php b/src/Models/ListAppInstanceGroupResponseBody/appInstanceGroupModels.php index 1c87356..6a492e9 100644 --- a/src/Models/ListAppInstanceGroupResponseBody/appInstanceGroupModels.php +++ b/src/Models/ListAppInstanceGroupResponseBody/appInstanceGroupModels.php @@ -107,6 +107,11 @@ class appInstanceGroupModels extends Model */ public $nodePool; + /** + * @var string + */ + public $officeSiteId; + /** * @example Windows * @@ -224,6 +229,7 @@ class appInstanceGroupModels extends Model 'maxAmount' => 'MaxAmount', 'minAmount' => 'MinAmount', 'nodePool' => 'NodePool', + 'officeSiteId' => 'OfficeSiteId', 'osType' => 'OsType', 'otaInfo' => 'OtaInfo', 'productType' => 'ProductType', @@ -302,6 +308,9 @@ public function toMap() } } } + if (null !== $this->officeSiteId) { + $res['OfficeSiteId'] = $this->officeSiteId; + } if (null !== $this->osType) { $res['OsType'] = $this->osType; } @@ -413,6 +422,9 @@ public static function fromMap($map = []) } } } + if (isset($map['OfficeSiteId'])) { + $model->officeSiteId = $map['OfficeSiteId']; + } if (isset($map['OsType'])) { $model->osType = $map['OsType']; } diff --git a/src/Models/ListNodeInstanceTypeRequest.php b/src/Models/ListNodeInstanceTypeRequest.php index e9e3a22..d6f15ed 100644 --- a/src/Models/ListNodeInstanceTypeRequest.php +++ b/src/Models/ListNodeInstanceTypeRequest.php @@ -17,6 +17,21 @@ class ListNodeInstanceTypeRequest extends Model */ public $bizRegionId; + /** + * @var float + */ + public $cpu; + + /** + * @var float + */ + public $gpu; + + /** + * @var int + */ + public $gpuMemory; + /** * @description 语言类型。 * @@ -26,6 +41,11 @@ class ListNodeInstanceTypeRequest extends Model */ public $language; + /** + * @var int + */ + public $memory; + /** * @example appstreaming.vgpu.4c8g.2g * @@ -33,6 +53,16 @@ class ListNodeInstanceTypeRequest extends Model */ public $nodeInstanceType; + /** + * @var string + */ + public $nodeInstanceTypeFamily; + + /** + * @var string + */ + public $orderBy; + /** * @description 支持的操作系统类型。 * @@ -68,14 +98,26 @@ class ListNodeInstanceTypeRequest extends Model * @var string */ public $productType; + + /** + * @var string + */ + public $sortType; protected $_name = [ - 'bizRegionId' => 'BizRegionId', - 'language' => 'Language', - 'nodeInstanceType' => 'NodeInstanceType', - 'osType' => 'OsType', - 'pageNumber' => 'PageNumber', - 'pageSize' => 'PageSize', - 'productType' => 'ProductType', + 'bizRegionId' => 'BizRegionId', + 'cpu' => 'Cpu', + 'gpu' => 'Gpu', + 'gpuMemory' => 'GpuMemory', + 'language' => 'Language', + 'memory' => 'Memory', + 'nodeInstanceType' => 'NodeInstanceType', + 'nodeInstanceTypeFamily' => 'NodeInstanceTypeFamily', + 'orderBy' => 'OrderBy', + 'osType' => 'OsType', + 'pageNumber' => 'PageNumber', + 'pageSize' => 'PageSize', + 'productType' => 'ProductType', + 'sortType' => 'SortType', ]; public function validate() @@ -88,12 +130,30 @@ public function toMap() if (null !== $this->bizRegionId) { $res['BizRegionId'] = $this->bizRegionId; } + if (null !== $this->cpu) { + $res['Cpu'] = $this->cpu; + } + if (null !== $this->gpu) { + $res['Gpu'] = $this->gpu; + } + if (null !== $this->gpuMemory) { + $res['GpuMemory'] = $this->gpuMemory; + } if (null !== $this->language) { $res['Language'] = $this->language; } + if (null !== $this->memory) { + $res['Memory'] = $this->memory; + } if (null !== $this->nodeInstanceType) { $res['NodeInstanceType'] = $this->nodeInstanceType; } + if (null !== $this->nodeInstanceTypeFamily) { + $res['NodeInstanceTypeFamily'] = $this->nodeInstanceTypeFamily; + } + if (null !== $this->orderBy) { + $res['OrderBy'] = $this->orderBy; + } if (null !== $this->osType) { $res['OsType'] = $this->osType; } @@ -106,6 +166,9 @@ public function toMap() if (null !== $this->productType) { $res['ProductType'] = $this->productType; } + if (null !== $this->sortType) { + $res['SortType'] = $this->sortType; + } return $res; } @@ -121,12 +184,30 @@ public static function fromMap($map = []) if (isset($map['BizRegionId'])) { $model->bizRegionId = $map['BizRegionId']; } + if (isset($map['Cpu'])) { + $model->cpu = $map['Cpu']; + } + if (isset($map['Gpu'])) { + $model->gpu = $map['Gpu']; + } + if (isset($map['GpuMemory'])) { + $model->gpuMemory = $map['GpuMemory']; + } if (isset($map['Language'])) { $model->language = $map['Language']; } + if (isset($map['Memory'])) { + $model->memory = $map['Memory']; + } if (isset($map['NodeInstanceType'])) { $model->nodeInstanceType = $map['NodeInstanceType']; } + if (isset($map['NodeInstanceTypeFamily'])) { + $model->nodeInstanceTypeFamily = $map['NodeInstanceTypeFamily']; + } + if (isset($map['OrderBy'])) { + $model->orderBy = $map['OrderBy']; + } if (isset($map['OsType'])) { $model->osType = $map['OsType']; } @@ -139,6 +220,9 @@ public static function fromMap($map = []) if (isset($map['ProductType'])) { $model->productType = $map['ProductType']; } + if (isset($map['SortType'])) { + $model->sortType = $map['SortType']; + } return $model; }