Skip to content

Commit

Permalink
Update API AuthorizeInstanceGroup: add param UserMeta.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Oct 22, 2024
1 parent 0b4de89 commit 9fb8309
Show file tree
Hide file tree
Showing 12 changed files with 385 additions and 14 deletions.
17 changes: 17 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
39 changes: 36 additions & 3 deletions src/Appstreamcenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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),
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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),
]);
Expand Down
13 changes: 13 additions & 0 deletions src/Models/AuthorizeInstanceGroupRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
59 changes: 59 additions & 0 deletions src/Models/AuthorizeInstanceGroupRequest/userMeta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

// This file is auto-generated, don't edit it. Thanks.

namespace AlibabaCloud\SDK\Appstreamcenter\V20210901\Models\AuthorizeInstanceGroupRequest;

use AlibabaCloud\Tea\Model;

class userMeta extends Model
{
/**
* @var string
*/
public $adDomain;

/**
* @var string
*/
public $type;
protected $_name = [
'adDomain' => '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;
}
}
107 changes: 107 additions & 0 deletions src/Models/AuthorizeInstanceGroupShrinkRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?php

// This file is auto-generated, don't edit it. Thanks.

namespace AlibabaCloud\SDK\Appstreamcenter\V20210901\Models;

use AlibabaCloud\Tea\Model;

class AuthorizeInstanceGroupShrinkRequest extends Model
{
/**
* @description This parameter is required.
*
* @example aig-9ciijz60n4xsv****
*
* @var string
*/
public $appInstanceGroupId;

/**
* @var string[]
*/
public $authorizeUserIds;

/**
* @description This parameter is required.
*
* @example CloudApp
*
* @var string
*/
public $productType;

/**
* @var string[]
*/
public $unAuthorizeUserIds;

/**
* @var string
*/
public $userMetaShrink;
protected $_name = [
'appInstanceGroupId' => '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;
}
}
2 changes: 0 additions & 2 deletions src/Models/CreateAppInstanceGroupRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class CreateAppInstanceGroupRequest extends Model
public $appCenterImageId;

/**
* @description This parameter is required.
*
* @var string
*/
public $appInstanceGroupName;
Expand Down
Loading

0 comments on commit 9fb8309

Please sign in to comment.