tencentcloud-sdk-nodejs-intl-en
Version:
1,782 lines (1,500 loc) • 113 kB
JavaScript
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* Game attribute details
* @class
*/
class GameProperty extends AbstractModel {
constructor(){
super();
/**
* Attribute name. Up to 32 ASCII characters are allowed.
* @type {string || null}
*/
this.Key = null;
/**
* Attribute value. Up to 96 ASCII characters are allowed.
* @type {string || null}
*/
this.Value = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Key = 'Key' in params ? params.Key : null;
this.Value = 'Value' in params ? params.Value : null;
}
}
/**
* DeleteTimerScalingPolicy response structure.
* @class
*/
class DeleteTimerScalingPolicyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeTimerScalingPolicies request structure.
* @class
*/
class DescribeTimerScalingPoliciesRequest extends AbstractModel {
constructor(){
super();
/**
* ID of the fleet to be bound with the policy
* @type {string || null}
*/
this.FleetId = null;
/**
* Scheduled scaling policy name
* @type {string || null}
*/
this.TimerName = null;
/**
* Start time of the scheduled scaling policy
* @type {string || null}
*/
this.BeginTime = null;
/**
* End time of the scheduled scaling policy
* @type {string || null}
*/
this.EndTime = null;
/**
* Pagination offset
* @type {number || null}
*/
this.Offset = null;
/**
* Number of entries per page
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FleetId = 'FleetId' in params ? params.FleetId : null;
this.TimerName = 'TimerName' in params ? params.TimerName : null;
this.BeginTime = 'BeginTime' in params ? params.BeginTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* Information of the associated CCN instance
* @class
*/
class RelatedCcnInfo extends AbstractModel {
constructor(){
super();
/**
* Account of the CCN instance owner
* @type {string || null}
*/
this.AccountId = null;
/**
* CCN instance ID
* @type {string || null}
*/
this.CcnId = null;
/**
* Status of associated CCN instance
* @type {string || null}
*/
this.AttachType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AccountId = 'AccountId' in params ? params.AccountId : null;
this.CcnId = 'CcnId' in params ? params.CcnId : null;
this.AttachType = 'AttachType' in params ? params.AttachType : null;
}
}
/**
* Service deployment attributes
* @class
*/
class FleetAttributes extends AbstractModel {
constructor(){
super();
/**
* Asset package ID
* @type {string || null}
*/
this.AssetId = null;
/**
* Server fleet creation time
* @type {string || null}
*/
this.CreationTime = null;
/**
* Description
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.Description = null;
/**
* Description of server fleet resource
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.FleetArn = null;
/**
* Server fleet ID
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.FleetId = null;
/**
* Server fleet type, which only supports ON_DEMAND now.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.FleetType = null;
/**
* Server type, such as S5.LARGE8
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.InstanceType = null;
/**
* Server fleet name
* @type {string || null}
*/
this.Name = null;
/**
* Game session protection policy
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.NewGameServerSessionProtectionPolicy = null;
/**
* Operating system type
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.OperatingSystem = null;
/**
* Limit policy of resource creation
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {ResourceCreationLimitPolicy || null}
*/
this.ResourceCreationLimitPolicy = null;
/**
* Statuses: “Create”, “Downloading”, “Verifying”, “Generating”, “Activating”, “Active”, “Exception”, “Deleting”, and “End”.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.Status = null;
/**
* The status of server fleet when it stopped. If this field is left empty, it means automatic scaling.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {Array.<string> || null}
*/
this.StoppedActions = null;
/**
* Server fleet termination time
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.TerminationTime = null;
/**
* Timeout period of time-limited protection. Value range: 5-1440 minutes. Default value: 60 minutes.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {number || null}
*/
this.GameServerSessionProtectionTimeLimit = null;
/**
* Billing status: Unactivated, Activated, Exception, Isolated due to arrears, Terminated, and Unfrozen.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.BillingStatus = null;
/**
* Tag list. Up to 50 tags.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* Data disk. It can be SSD disks (CLOUD_SSD) with 100-32000 GB capacity or Premium Cloud Storage disks (CLOUD_PREMIUM) with 10-32000 GB capacity. The increment is 10.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {Array.<DiskInfo> || null}
*/
this.DataDiskInfo = null;
/**
* System disk. It can be a SSD (CLOUD_SSD) with 100-500 GB capacity or a Premium Cloud Storage disk (CLOUD_PREMIUM) with 50-500 GB capacity. The increment is 1.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {DiskInfo || null}
*/
this.SystemDiskInfo = null;
/**
* CCN instance information
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {Array.<RelatedCcnInfo> || null}
*/
this.RelatedCcnInfos = null;
/**
* Maximum outbound public network bandwidth of the server fleet. Value range: 1 - 200 Mbps. Default value: 100 Mbps.
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.InternetMaxBandwidthOut = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AssetId = 'AssetId' in params ? params.AssetId : null;
this.CreationTime = 'CreationTime' in params ? params.CreationTime : null;
this.Description = 'Description' in params ? params.Description : null;
this.FleetArn = 'FleetArn' in params ? params.FleetArn : null;
this.FleetId = 'FleetId' in params ? params.FleetId : null;
this.FleetType = 'FleetType' in params ? params.FleetType : null;
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.Name = 'Name' in params ? params.Name : null;
this.NewGameServerSessionProtectionPolicy = 'NewGameServerSessionProtectionPolicy' in params ? params.NewGameServerSessionProtectionPolicy : null;
this.OperatingSystem = 'OperatingSystem' in params ? params.OperatingSystem : null;
if (params.ResourceCreationLimitPolicy) {
let obj = new ResourceCreationLimitPolicy();
obj.deserialize(params.ResourceCreationLimitPolicy)
this.ResourceCreationLimitPolicy = obj;
}
this.Status = 'Status' in params ? params.Status : null;
this.StoppedActions = 'StoppedActions' in params ? params.StoppedActions : null;
this.TerminationTime = 'TerminationTime' in params ? params.TerminationTime : null;
this.GameServerSessionProtectionTimeLimit = 'GameServerSessionProtectionTimeLimit' in params ? params.GameServerSessionProtectionTimeLimit : null;
this.BillingStatus = 'BillingStatus' in params ? params.BillingStatus : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
if (params.DataDiskInfo) {
this.DataDiskInfo = new Array();
for (let z in params.DataDiskInfo) {
let obj = new DiskInfo();
obj.deserialize(params.DataDiskInfo[z]);
this.DataDiskInfo.push(obj);
}
}
if (params.SystemDiskInfo) {
let obj = new DiskInfo();
obj.deserialize(params.SystemDiskInfo)
this.SystemDiskInfo = obj;
}
if (params.RelatedCcnInfos) {
this.RelatedCcnInfos = new Array();
for (let z in params.RelatedCcnInfos) {
let obj = new RelatedCcnInfo();
obj.deserialize(params.RelatedCcnInfos[z]);
this.RelatedCcnInfos.push(obj);
}
}
this.InternetMaxBandwidthOut = 'InternetMaxBandwidthOut' in params ? params.InternetMaxBandwidthOut : null;
}
}
/**
* DescribeInstanceTypes response structure.
* @class
*/
class DescribeInstanceTypesResponse extends AbstractModel {
constructor(){
super();
/**
* List of server types
* @type {Array.<InstanceTypeInfo> || null}
*/
this.InstanceTypeList = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.InstanceTypeList) {
this.InstanceTypeList = new Array();
for (let z in params.InstanceTypeList) {
let obj = new InstanceTypeInfo();
obj.deserialize(params.InstanceTypeList[z]);
this.InstanceTypeList.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Configuration of target tracking scaling
* @class
*/
class TargetConfiguration extends AbstractModel {
constructor(){
super();
/**
* Ratio of reserved server session resource
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TargetValue = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TargetValue = 'TargetValue' in params ? params.TargetValue : null;
}
}
/**
* EndGameServerSessionAndProcess response structure.
* @class
*/
class EndGameServerSessionAndProcessResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeGameServerSessions response structure.
* @class
*/
class DescribeGameServerSessionsResponse extends AbstractModel {
constructor(){
super();
/**
* Game server session list
Note: this field may return null, indicating that no valid values can be obtained.
* @type {Array.<GameServerSession> || null}
*/
this.GameServerSessions = null;
/**
* Pagination offset, which is used for querying the next page. It should contain 1 to 1024 ASCII characters.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.NextToken = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.GameServerSessions) {
this.GameServerSessions = new Array();
for (let z in params.GameServerSessions) {
let obj = new GameServerSession();
obj.deserialize(params.GameServerSessions[z]);
this.GameServerSessions.push(obj);
}
}
this.NextToken = 'NextToken' in params ? params.NextToken : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpdateGameServerSession response structure.
* @class
*/
class UpdateGameServerSessionResponse extends AbstractModel {
constructor(){
super();
/**
* Updated game session
* @type {GameServerSession || null}
*/
this.GameServerSession = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.GameServerSession) {
let obj = new GameServerSession();
obj.deserialize(params.GameServerSession)
this.GameServerSession = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* GetInstanceAccess response structure.
* @class
*/
class GetInstanceAccessResponse extends AbstractModel {
constructor(){
super();
/**
* Credentials required for instance login
* @type {InstanceAccess || null}
*/
this.InstanceAccess = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.InstanceAccess) {
let obj = new InstanceAccess();
obj.deserialize(params.InstanceAccess)
this.InstanceAccess = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* EndGameServerSessionAndProcess request structure.
* @class
*/
class EndGameServerSessionAndProcessRequest extends AbstractModel {
constructor(){
super();
/**
* Game server session ID. If a game server session ID is passed in, its corresponding processes, game server sessions, and player sessions will be terminated.
* @type {string || null}
*/
this.GameServerSessionId = null;
/**
* The public IP of the CVM. You need to pass in `IpAddress` and `Port` at the same time to terminate the matched processes, game server sessions and player sessions (if any exists). It does not take effect in case only the `IpAddress` passed in.
* @type {string || null}
*/
this.IpAddress = null;
/**
* Port number. Value range: 1025 - 60000. You need to pass in `IpAddress` and `Port` at the same time to terminate the matched processes, game server sessions (if any exists) and player sessions (if any exists). It does not take effect in case only the `IpAddress` passed in.
* @type {number || null}
*/
this.Port = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.GameServerSessionId = 'GameServerSessionId' in params ? params.GameServerSessionId : null;
this.IpAddress = 'IpAddress' in params ? params.IpAddress : null;
this.Port = 'Port' in params ? params.Port : null;
}
}
/**
* DescribePlayerSessions response structure.
* @class
*/
class DescribePlayerSessionsResponse extends AbstractModel {
constructor(){
super();
/**
* Player session list
Note: this field may return null, indicating that no valid values can be obtained.
* @type {Array.<PlayerSession> || null}
*/
this.PlayerSessions = null;
/**
* Pagination offset, which is used for querying the next page. It should contain 1 to 1024 ASCII characters.
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {string || null}
*/
this.NextToken = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.PlayerSessions) {
this.PlayerSessions = new Array();
for (let z in params.PlayerSessions) {
let obj = new PlayerSession();
obj.deserialize(params.PlayerSessions[z]);
this.PlayerSessions.push(obj);
}
}
this.NextToken = 'NextToken' in params ? params.NextToken : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpdateBucketCORSOpt response structure.
* @class
*/
class UpdateBucketCORSOptResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeInstanceTypes request structure.
* @class
*/
class DescribeInstanceTypesRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* DescribeTimerScalingPolicies response structure.
* @class
*/
class DescribeTimerScalingPoliciesResponse extends AbstractModel {
constructor(){
super();
/**
* Configuration of the scheduled scaling policy
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {Array.<TimerScalingPolicy> || null}
*/
this.TimerScalingPolicies = null;
/**
* Total number of scheduled scaling policies
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.TimerScalingPolicies) {
this.TimerScalingPolicies = new Array();
for (let z in params.TimerScalingPolicies) {
let obj = new TimerScalingPolicy();
obj.deserialize(params.TimerScalingPolicies[z]);
this.TimerScalingPolicies.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SetServerReserved response structure.
* @class
*/
class SetServerReservedResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* JoinGameServerSessionBatch request structure.
* @class
*/
class JoinGameServerSessionBatchRequest extends AbstractModel {
constructor(){
super();
/**
* Game server session ID. It should contain 1 to 256 ASCII characters.
* @type {string || null}
*/
this.GameServerSessionId = null;
/**
* Player ID list. At least 1 ID and up to 25 IDs.
* @type {Array.<string> || null}
*/
this.PlayerIds = null;
/**
* Player custom data
* @type {PlayerDataMap || null}
*/
this.PlayerDataMap = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.GameServerSessionId = 'GameServerSessionId' in params ? params.GameServerSessionId : null;
this.PlayerIds = 'PlayerIds' in params ? params.PlayerIds : null;
if (params.PlayerDataMap) {
let obj = new PlayerDataMap();
obj.deserialize(params.PlayerDataMap)
this.PlayerDataMap = obj;
}
}
}
/**
* StopGameServerSessionPlacement request structure.
* @class
*/
class StopGameServerSessionPlacementRequest extends AbstractModel {
constructor(){
super();
/**
* Unique ID of game server session placement
* @type {string || null}
*/
this.PlacementId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.PlacementId = 'PlacementId' in params ? params.PlacementId : null;
}
}
/**
* Configurations of a scheduled scaling policy
* @class
*/
class TimerScalingPolicy extends AbstractModel {
constructor(){
super();
/**
* Unique ID of the policy. When it’s filled in, the policy will be updated.
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.TimerId = null;
/**
* Scheduled scaling policy name
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.TimerName = null;
/**
* Scheduled scaling policy status. `0`: Undefined, `1`: Not started, 2: Activated, `3`: Stopped, `4`: Expired
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.TimerStatus = null;
/**
* The capacity configurations of the scheduled scaling policy
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {TimerFleetCapacity || null}
*/
this.TimerFleetCapacity = null;
/**
* The recurrence pattern of auto-scaling
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {TimerConfiguration || null}
*/
this.TimerConfiguration = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TimerId = 'TimerId' in params ? params.TimerId : null;
this.TimerName = 'TimerName' in params ? params.TimerName : null;
this.TimerStatus = 'TimerStatus' in params ? params.TimerStatus : null;
if (params.TimerFleetCapacity) {
let obj = new TimerFleetCapacity();
obj.deserialize(params.TimerFleetCapacity)
this.TimerFleetCapacity = obj;
}
if (params.TimerConfiguration) {
let obj = new TimerConfiguration();
obj.deserialize(params.TimerConfiguration)
this.TimerConfiguration = obj;
}
}
}
/**
* The capacity configurations of the scheduled scaling policy
* @class
*/
class TimerFleetCapacity extends AbstractModel {
constructor(){
super();
/**
* ID of the fleet to be bound with the policy
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.FleetId = null;
/**
* Desired number of instances
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.DesiredInstances = null;
/**
* Minimum number of instances
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.MinSize = null;
/**
* Maximum number of instances
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.MaxSize = null;
/**
* Scaling cooldown period, in minutes
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ScalingInterval = null;
/**
* Scaling type. `1`: manual, `2`: automatic, `0`: undefined
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ScalingType = null;
/**
* Configuration of target tracking scaling
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {TargetConfiguration || null}
*/
this.TargetConfiguration = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FleetId = 'FleetId' in params ? params.FleetId : null;
this.DesiredInstances = 'DesiredInstances' in params ? params.DesiredInstances : null;
this.MinSize = 'MinSize' in params ? params.MinSize : null;
this.MaxSize = 'MaxSize' in params ? params.MaxSize : null;
this.ScalingInterval = 'ScalingInterval' in params ? params.ScalingInterval : null;
this.ScalingType = 'ScalingType' in params ? params.ScalingType : null;
if (params.TargetConfiguration) {
let obj = new TargetConfiguration();
obj.deserialize(params.TargetConfiguration)
this.TargetConfiguration = obj;
}
}
}
/**
* CopyFleet request structure.
* @class
*/
class CopyFleetRequest extends AbstractModel {
constructor(){
super();
/**
* Server fleet ID
* @type {string || null}
*/
this.FleetId = null;
/**
* Replica number. It should a value between 1 to the number of the remaining quota. It can be obtained through [Obtaining User Quota](https://intl.cloud.tencent.com/document/product/1165/48732?from_cn_redirect=1).
* @type {number || null}
*/
this.CopyNumber = null;
/**
* Asset package ID
* @type {string || null}
*/
this.AssetId = null;
/**
* Description. The length is 0-100 characters.
* @type {string || null}
*/
this.Description = null;
/**
* Network configuration
* @type {Array.<InboundPermission> || null}
*/
this.InboundPermissions = null;
/**
* Server type. It can be obtained through [Obtaining Server Instance Type List](https://intl.cloud.tencent.com/document/product/1165/48732?from_cn_redirect=1).
* @type {string || null}
*/
this.InstanceType = null;
/**
* Server fleet type, which only supports “ON_DEMAND” type now.
* @type {string || null}
*/
this.FleetType = null;
/**
* Server fleet name. The length is 1-50 characters.
* @type {string || null}
*/
this.Name = null;
/**
* Protection policy. Valid values: NoProtection·(no protection), FullProtection (full protection), TimeLimitProtection (time-limited protection)
* @type {string || null}
*/
this.NewGameServerSessionProtectionPolicy = null;
/**
* Limit policy of resource creation
* @type {ResourceCreationLimitPolicy || null}
*/
this.ResourceCreationLimitPolicy = null;
/**
* Progress configuration
* @type {RuntimeConfiguration || null}
*/
this.RuntimeConfiguration = null;
/**
* Timeout period of time-limited protection. Value range: 5-1440 minutes. Default value: 60 minutes. This parameter is valid only when NewGameSessionProtectionPolicy is set as TimeLimitProtection.
* @type {number || null}
*/
this.GameServerSessionProtectionTimeLimit = null;
/**
* Whether to select scaling. Valid values: SCALING_SELECTED, SCALING_UNSELECTED. Default value: SCALING_UNSELECTED.
* @type {string || null}
*/
this.SelectedScalingType = null;
/**
* Whether to associate the fleet with a CCN instance: CCN_SELECTED_BEFORE_CREATE (associate before creation), CCN_SELECTED_AFTER_CREATE (associated after creation), or CCN_UNSELECTED (do not associate); CCN_UNSELECTED by default
* @type {string || null}
*/
this.SelectedCcnType = null;
/**
* Tag list. Up to 50 tags.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
/**
* System disk. It can be a SSD (CLOUD_SSD) with 100-500 GB capacity or a Premium Cloud Storage disk (CLOUD_PREMIUM) with 50-500 GB capacity. The increment is 1.
* @type {DiskInfo || null}
*/
this.SystemDiskInfo = null;
/**
* Data disk. It can be SSD disks (CLOUD_SSD) with 100-32000 GB capacity or Premium Cloud Storage disks (CLOUD_PREMIUM) with 10-32000 GB capacity. The increment is 10.
* @type {Array.<DiskInfo> || null}
*/
this.DataDiskInfo = null;
/**
* Whether to select to replicate the timer policy: TIMER_SELECTED or TIMER_UNSELECTED. The default value is TIMER_UNSELECTED.
* @type {string || null}
*/
this.SelectedTimerType = null;
/**
* Information of the CCN instance, including the owner account and the instance ID.
* @type {Array.<CcnInfo> || null}
*/
this.CcnInfos = null;
/**
* Maximum outbound public network bandwidth of the server fleet. Value range: 1 - 200 Mbps. Default value: 100 Mbps.
* @type {number || null}
*/
this.InternetMaxBandwidthOut = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FleetId = 'FleetId' in params ? params.FleetId : null;
this.CopyNumber = 'CopyNumber' in params ? params.CopyNumber : null;
this.AssetId = 'AssetId' in params ? params.AssetId : null;
this.Description = 'Description' in params ? params.Description : null;
if (params.InboundPermissions) {
this.InboundPermissions = new Array();
for (let z in params.InboundPermissions) {
let obj = new InboundPermission();
obj.deserialize(params.InboundPermissions[z]);
this.InboundPermissions.push(obj);
}
}
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.FleetType = 'FleetType' in params ? params.FleetType : null;
this.Name = 'Name' in params ? params.Name : null;
this.NewGameServerSessionProtectionPolicy = 'NewGameServerSessionProtectionPolicy' in params ? params.NewGameServerSessionProtectionPolicy : null;
if (params.ResourceCreationLimitPolicy) {
let obj = new ResourceCreationLimitPolicy();
obj.deserialize(params.ResourceCreationLimitPolicy)
this.ResourceCreationLimitPolicy = obj;
}
if (params.RuntimeConfiguration) {
let obj = new RuntimeConfiguration();
obj.deserialize(params.RuntimeConfiguration)
this.RuntimeConfiguration = obj;
}
this.GameServerSessionProtectionTimeLimit = 'GameServerSessionProtectionTimeLimit' in params ? params.GameServerSessionProtectionTimeLimit : null;
this.SelectedScalingType = 'SelectedScalingType' in params ? params.SelectedScalingType : null;
this.SelectedCcnType = 'SelectedCcnType' in params ? params.SelectedCcnType : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
if (params.SystemDiskInfo) {
let obj = new DiskInfo();
obj.deserialize(params.SystemDiskInfo)
this.SystemDiskInfo = obj;
}
if (params.DataDiskInfo) {
this.DataDiskInfo = new Array();
for (let z in params.DataDiskInfo) {
let obj = new DiskInfo();
obj.deserialize(params.DataDiskInfo[z]);
this.DataDiskInfo.push(obj);
}
}
this.SelectedTimerType = 'SelectedTimerType' in params ? params.SelectedTimerType : null;
if (params.CcnInfos) {
this.CcnInfos = new Array();
for (let z in params.CcnInfos) {
let obj = new CcnInfo();
obj.deserialize(params.CcnInfos[z]);
this.CcnInfos.push(obj);
}
}
this.InternetMaxBandwidthOut = 'InternetMaxBandwidthOut' in params ? params.InternetMaxBandwidthOut : null;
}
}
/**
* Details of the recurrence pattern of the scheduled scaling policy
* @class
*/
class TimerValue extends AbstractModel {
constructor(){
super();
/**
* Execute once every X day(s)
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.Day = null;
/**
* Specify the first day to execute the scaling action in a month (execute once per day)
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.FromDay = null;
/**
* Specify the last day to execute the scaling action in a month
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.ToDay = null;
/**
* Specify the week days to repeat the scaling action. Multiple values are supported. Valid values: `1` (Monday), `2` (Tuesday), `3` (Wednesday), `4` (Thursday), `5` (Friday), `6` (Saturday), `7` (Sunday).
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<number> || null}
*/
this.WeekDays = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Day = 'Day' in params ? params.Day : null;
this.FromDay = 'FromDay' in params ? params.FromDay : null;
this.ToDay = 'ToDay' in params ? params.ToDay : null;
this.WeekDays = 'WeekDays' in params ? params.WeekDays : null;
}
}
/**
* CopyFleet response structure.
* @class
*/
class CopyFleetResponse extends AbstractModel {
constructor(){
super();
/**
* Server fleet attributes
Note: this field may return `null`, indicating that no valid value is obtained.
* @type {Array.<FleetAttributes> || null}
*/
this.FleetAttributes = null;
/**
* The number of server fleets
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.FleetAttributes) {
this.FleetAttributes = new Array();
for (let z in params.FleetAttributes) {
let obj = new FleetAttributes();
obj.deserialize(params.FleetAttributes[z]);
this.FleetAttributes.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* GetInstanceAccess request structure.
* @class
*/
class GetInstanceAccessRequest extends AbstractModel {
constructor(){
super();
/**
* Server fleet ID
* @type {string || null}
*/
this.FleetId = null;
/**
* Instance ID
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FleetId = 'FleetId' in params ? params.FleetId : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* DescribeGameServerSessions request structure.
* @class
*/
class DescribeGameServerSessionsRequest extends AbstractModel {
constructor(){
super();
/**
* Alias ID
* @type {string || null}
*/
this.AliasId = null;
/**
* Fleet ID
* @type {string || null}
*/
this.FleetId = null;
/**
* Game server session ID. It should contain 1 to 48 ASCII characters.
* @type {string || null}
*/
this.GameServerSessionId = null;
/**
* Maximum number of entries in a single query
* @type {number || null}
*/
this.Limit = null;
/**
* Pagination offset, which is used for querying the next page. It should contain 1 to 1024 ASCII characters.
* @type {string || null}
*/
this.NextToken = null;
/**
* Game server session status. Valid values: ACTIVE, ACTIVATING, TERMINATED, TERMINATING, ERROR
* @type {string || null}
*/
this.StatusFilter = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AliasId = 'AliasId' in params ? params.AliasId : null;
this.FleetId = 'FleetId' in params ? params.FleetId : null;
this.GameServerSessionId = 'GameServerSessionId' in params ? params.GameServerSessionId : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.NextToken = 'NextToken' in params ? params.NextToken : null;
this.StatusFilter = 'StatusFilter' in params ? params.StatusFilter : null;
}
}
/**
* UpdateGameServerSession request structure.
* @class
*/
class UpdateGameServerSessionRequest extends AbstractModel {
constructor(){
super();
/**
* Game server session ID. It should contain 1 to 256 ASCII characters.
* @type {string || null}
*/
this.GameServerSessionId = null;
/**
* The maximum number of players, which cannot be less than 0.
* @type {number || null}
*/
this.MaximumPlayerSessionCount = null;
/**
* Name of the game server session. It should contain 1 to 1024 ASCII characters.
* @type {string || null}
*/
this.Name = null;
/**
* Player session creation policy, which includes `ACCEPT_ALL` (allow all players) and `DENY_ALL` (reject all players).
* @type {string || null}
*/
this.PlayerSessionCreationPolicy = null;
/**
* Protection policy, which includes `NoProtection`·(no protection), `TimeLimitProtection` (time-limited protection) and `FullProtection` (full protection)
* @type {string || null}
*/
this.ProtectionPolicy = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.GameServerSessionId = 'GameServerSessionId' in params ? params.GameServerSessionId : null;
this.MaximumPlayerSessionCount = 'MaximumPlayerSessionCount' in params ? params.MaximumPlayerSessionCount : null;
this.Name = 'Name' in params ? params.Name : null;
this.PlayerSessionCreationPolicy = 'PlayerSessionCreationPolicy' in params ? params.PlayerSessionCreationPolicy : null;
this.ProtectionPolicy = 'ProtectionPolicy' in params ? params.ProtectionPolicy : null;
}
}
/**
* PutTimerScalingPolicy response structure.
* @class
*/
class PutTimerScalingPolicyResponse extends AbstractModel {
constructor(){
super();
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Player latency information
* @class
*/
class PlayerLatency extends AbstractModel {
constructor(){
super();
/**
* Player ID
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.PlayerId = null;
/**
* Name of region corresponding to latency
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.RegionIdentifier = null;
/**
* Latency in milliseconds
* @type {number || null}
*/
this.LatencyInMilliseconds = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.PlayerId = 'PlayerId' in params ? params.PlayerId : null;
this.RegionIdentifier = 'RegionIdentifier' in params ? params.RegionIdentifier : null;
this.LatencyInMilliseconds = 'LatencyInMilliseconds' in params ? params.LatencyInMilliseconds : null;
}
}
/**
* Disk storage information
* @class
*/
class DiskInfo extends AbstractModel {
constructor(){
super();
/**
* Disk type: Premium Cloud Storage (CLOUD_PREMIUM) or SSD (CLOUD_SSD)
* @type {string || null}
*/
this.DiskType = null;
/**
* System disk: the available disk capacity is 50-500 GB. Data disk: the available disk capacity is 100-32000 GB, and the value is a multiple of 10. When the disk type is SSD (CLOUD_SSD), the minimum capacity is 100 GB.
* @type {number || null}
*/
this.DiskSize = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.DiskType = 'DiskType' in params ? params.DiskType : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
}
}
/**
* StartGameServerSessionPlacement response structure.
* @class
*/
class StartGameServerSessionPlacementResponse extends AbstractModel {
constructor(){
super();
/**
* Game server session placement
* @type {GameServerSessionPlacement || null}
*/
this.GameServerSessionPlacement = null;
/**
* The unique request ID, which is returned for each request. RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.GameServerSessionPlacement) {
let obj = new GameServerSessionPlacement();
obj.deserialize(params.GameServerSessionPlacement)
this.GameServerSessionPlacement = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Credentials required for instance access
* @class
*/
class Credentials extends AbstractModel {
constructor(){
super();
/**
* SSH private key
* @type {string || null}
*/
this.Secret = null;
/**
* Username
* @type {string || null}
*/
this.UserName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Secret = 'Secret' in params ? params.Secret : null;
this.UserName = 'UserName' in params ? params.UserName : null;
}
}
/**
* Resource creation policy
* @class
*/
class ResourceCreationLimitPolicy extends AbstractModel {
constructor(){
super();
/**
* Creation quantity. Minimum value: 1. Default value: 2.
* @type {number || null}
*/
this.NewGameServerSessionsPerCreator = null;
/**
* Unit time. Minimum value: 1. Default value: 3. Unit: minute.
* @type {number || null}
*/
this.PolicyPeriodInMinutes = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.NewGameServerSessionsPerCreator = 'NewGameServerSessionsPerCreator' in params ? params.NewGameServerSessionsPerCreator : null;
this.PolicyPeriodInMinutes = 'PolicyPeriodInMinutes' in params ? params.PolicyPeriodInMinutes : null;
}
}
/**
* GetGameServerSessionLogUrl request structure.
* @class
*/
class GetGameServerSessionLogUrlRequest extends AbstractModel {
constructor(){
super();
/**