sgw-20180511/main.tea (7,790 lines of code) (raw):

/** * */ import Util; import OpenApi; import OpenApiUtil; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = 'regional'; @endpointMap = { cn-qingdao = 'sgw.cn-shanghai.aliyuncs.com', cn-beijing = 'sgw.cn-shanghai.aliyuncs.com', cn-chengdu = 'sgw.cn-shanghai.aliyuncs.com', cn-zhangjiakou = 'sgw.cn-shanghai.aliyuncs.com', cn-huhehaote = 'sgw.cn-shanghai.aliyuncs.com', cn-hangzhou = 'sgw.cn-shanghai.aliyuncs.com', cn-shenzhen = 'sgw.cn-shanghai.aliyuncs.com', cn-hongkong = 'sgw.cn-shanghai.aliyuncs.com', us-east-1 = 'sgw.us-west-1.aliyuncs.com', }; checkConfig(config); @endpoint = getEndpoint('sgw', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model ActivateAllInOneGatewayRequest { clientUUID?: string(name='ClientUUID'), deviceNumber?: string(name='DeviceNumber'), gatewayId?: string(name='GatewayId'), model?: string(name='Model'), securityToken?: string(name='SecurityToken'), serialNumber?: string(name='SerialNumber'), } model ActivateAllInOneGatewayResponseBody = { code?: string(name='Code'), gatewayId?: string(name='GatewayId'), licenseContent?: string(name='LicenseContent'), message?: string(name='Message'), regionId?: string(name='RegionId'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model ActivateAllInOneGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ActivateAllInOneGatewayResponseBody(name='body'), } async function activateAllInOneGatewayWithOptions(request: ActivateAllInOneGatewayRequest, runtime: Util.RuntimeOptions): ActivateAllInOneGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.deviceNumber)) { query['DeviceNumber'] = request.deviceNumber; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.model)) { query['Model'] = request.model; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.serialNumber)) { query['SerialNumber'] = request.serialNumber; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ActivateAllInOneGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function activateAllInOneGateway(request: ActivateAllInOneGatewayRequest): ActivateAllInOneGatewayResponse { var runtime = new Util.RuntimeOptions{}; return activateAllInOneGatewayWithOptions(request, runtime); } model ActivateGatewayRequest { category?: string(name='Category'), clientUUID?: string(name='ClientUUID', example='28c07861-a93b-4aa2-ae3a-3f7b7e7f6184'), model?: string(name='Model'), securityToken?: string(name='SecurityToken'), serialNumber?: string(name='SerialNumber'), token?: string(name='Token', example='xxxxxxxxxxxxxxxx'), type?: string(name='Type'), } model ActivateGatewayResponseBody = { code?: string(name='Code', example='200'), gatewayId?: string(name='GatewayId', example='gw-1234567890abcd'), message?: string(name='Message', example='successful'), regionId?: string(name='RegionId', example='cn-shanghai'), requestId?: string(name='RequestId', example='76109369-5729-467D-D4A3-1131A8DA1973'), success?: boolean(name='Success', example='true'), } model ActivateGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ActivateGatewayResponseBody(name='body'), } async function activateGatewayWithOptions(request: ActivateGatewayRequest, runtime: Util.RuntimeOptions): ActivateGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.category)) { query['Category'] = request.category; } if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.model)) { query['Model'] = request.model; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.serialNumber)) { query['SerialNumber'] = request.serialNumber; } if (!Util.isUnset(request.token)) { query['Token'] = request.token; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ActivateGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function activateGateway(request: ActivateGatewayRequest): ActivateGatewayResponse { var runtime = new Util.RuntimeOptions{}; return activateGatewayWithOptions(request, runtime); } model AddSharesToExpressSyncRequest { expressSyncId?: string(name='ExpressSyncId', example='sync-0001xv7je357xn8tr***'), gatewayShares?: string(name='GatewayShares', example='{"gw-000gwgp0j3jp8cb3t***":"share1,share2","gw-0001b2otnkdzte62j***":"weekly"}'), securityToken?: string(name='SecurityToken'), } model AddSharesToExpressSyncResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), mnsFullSyncDelay?: long(name='MnsFullSyncDelay'), mnsInnerEndpoint?: string(name='MnsInnerEndpoint'), mnsPublicEndpoint?: string(name='MnsPublicEndpoint'), mnsQueues?: string(name='MnsQueues'), mnsTopic?: string(name='MnsTopic'), requestId?: string(name='RequestId', example='1EDBC004-6B1C-4511-ACF5-0B4875BA3887'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je357xr6ql***'), } model AddSharesToExpressSyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AddSharesToExpressSyncResponseBody(name='body'), } async function addSharesToExpressSyncWithOptions(request: AddSharesToExpressSyncRequest, runtime: Util.RuntimeOptions): AddSharesToExpressSyncResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.expressSyncId)) { query['ExpressSyncId'] = request.expressSyncId; } if (!Util.isUnset(request.gatewayShares)) { query['GatewayShares'] = request.gatewayShares; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AddSharesToExpressSync', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function addSharesToExpressSync(request: AddSharesToExpressSyncRequest): AddSharesToExpressSyncResponse { var runtime = new Util.RuntimeOptions{}; return addSharesToExpressSyncWithOptions(request, runtime); } model AddTagsToGatewayRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), tags?: string(name='Tags'), } model AddTagsToGatewayResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model AddTagsToGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: AddTagsToGatewayResponseBody(name='body'), } async function addTagsToGatewayWithOptions(request: AddTagsToGatewayRequest, runtime: Util.RuntimeOptions): AddTagsToGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.tags)) { query['Tags'] = request.tags; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'AddTagsToGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function addTagsToGateway(request: AddTagsToGatewayRequest): AddTagsToGatewayResponse { var runtime = new Util.RuntimeOptions{}; return addTagsToGatewayWithOptions(request, runtime); } model CheckActivationKeyRequest { cryptKey?: string(name='CryptKey'), cryptText?: string(name='CryptText'), gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), token?: string(name='Token'), } model CheckActivationKeyResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model CheckActivationKeyResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckActivationKeyResponseBody(name='body'), } async function checkActivationKeyWithOptions(request: CheckActivationKeyRequest, runtime: Util.RuntimeOptions): CheckActivationKeyResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cryptKey)) { query['CryptKey'] = request.cryptKey; } if (!Util.isUnset(request.cryptText)) { query['CryptText'] = request.cryptText; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.token)) { query['Token'] = request.token; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckActivationKey', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkActivationKey(request: CheckActivationKeyRequest): CheckActivationKeyResponse { var runtime = new Util.RuntimeOptions{}; return checkActivationKeyWithOptions(request, runtime); } model CheckBlockVolumeNameRequest { bucketEndpoint?: string(name='BucketEndpoint', description='Bucket Endpoint。', example='oss-cn-hangzhou-internal.aliyuncs.com'), bucketName?: string(name='BucketName', example='random***'), securityToken?: string(name='SecurityToken'), volumeName?: string(name='VolumeName', example='alex***'), } model CheckBlockVolumeNameResponseBody = { code?: string(name='Code', example='200'), isAlreadyExist?: boolean(name='IsAlreadyExist'), isRequireRecovery?: string(name='IsRequireRecovery', example='false'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='735B642E-6564-4A87-99A0-3609F67C787E'), success?: boolean(name='Success', example='true'), } model CheckBlockVolumeNameResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckBlockVolumeNameResponseBody(name='body'), } async function checkBlockVolumeNameWithOptions(request: CheckBlockVolumeNameRequest, runtime: Util.RuntimeOptions): CheckBlockVolumeNameResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketEndpoint)) { query['BucketEndpoint'] = request.bucketEndpoint; } if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.volumeName)) { query['VolumeName'] = request.volumeName; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckBlockVolumeName', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkBlockVolumeName(request: CheckBlockVolumeNameRequest): CheckBlockVolumeNameResponse { var runtime = new Util.RuntimeOptions{}; return checkBlockVolumeNameWithOptions(request, runtime); } model CheckGatewayEssdSupportRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model CheckGatewayEssdSupportResponseBody = { code?: string(name='Code'), isServiceAffect?: boolean(name='IsServiceAffect'), isSupportEssd?: boolean(name='IsSupportEssd'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model CheckGatewayEssdSupportResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckGatewayEssdSupportResponseBody(name='body'), } async function checkGatewayEssdSupportWithOptions(request: CheckGatewayEssdSupportRequest, runtime: Util.RuntimeOptions): CheckGatewayEssdSupportResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckGatewayEssdSupport', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkGatewayEssdSupport(request: CheckGatewayEssdSupportRequest): CheckGatewayEssdSupportResponse { var runtime = new Util.RuntimeOptions{}; return checkGatewayEssdSupportWithOptions(request, runtime); } model CheckMnsServiceRequest { securityToken?: string(name='SecurityToken'), } model CheckMnsServiceResponseBody = { checkMessage?: string(name='CheckMessage'), code?: string(name='Code'), isEnabled?: boolean(name='IsEnabled'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model CheckMnsServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckMnsServiceResponseBody(name='body'), } async function checkMnsServiceWithOptions(request: CheckMnsServiceRequest, runtime: Util.RuntimeOptions): CheckMnsServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckMnsService', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkMnsService(request: CheckMnsServiceRequest): CheckMnsServiceResponse { var runtime = new Util.RuntimeOptions{}; return checkMnsServiceWithOptions(request, runtime); } model CheckRoleRequest { roleType?: string(name='RoleType'), securityToken?: string(name='SecurityToken'), } model CheckRoleResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model CheckRoleResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckRoleResponseBody(name='body'), } async function checkRoleWithOptions(request: CheckRoleRequest, runtime: Util.RuntimeOptions): CheckRoleResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.roleType)) { query['RoleType'] = request.roleType; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckRole', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkRole(request: CheckRoleRequest): CheckRoleResponse { var runtime = new Util.RuntimeOptions{}; return checkRoleWithOptions(request, runtime); } model CheckSlrRoleRequest { createIfNotExist?: boolean(name='CreateIfNotExist'), roleName?: string(name='RoleName'), securityToken?: string(name='SecurityToken'), } model CheckSlrRoleResponseBody = { code?: string(name='Code'), exist?: boolean(name='Exist'), message?: string(name='Message'), requestId?: string(name='RequestId'), requireOldWayCheck?: boolean(name='RequireOldWayCheck'), success?: boolean(name='Success'), } model CheckSlrRoleResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckSlrRoleResponseBody(name='body'), } async function checkSlrRoleWithOptions(request: CheckSlrRoleRequest, runtime: Util.RuntimeOptions): CheckSlrRoleResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.createIfNotExist)) { query['CreateIfNotExist'] = request.createIfNotExist; } if (!Util.isUnset(request.roleName)) { query['RoleName'] = request.roleName; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckSlrRole', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkSlrRole(request: CheckSlrRoleRequest): CheckSlrRoleResponse { var runtime = new Util.RuntimeOptions{}; return checkSlrRoleWithOptions(request, runtime); } model CheckUpgradeVersionRequest { clientUUID?: string(name='ClientUUID'), gatewayId?: string(name='GatewayId'), gatewayVersion?: string(name='GatewayVersion'), securityToken?: string(name='SecurityToken'), } model CheckUpgradeVersionResponseBody = { code?: string(name='Code'), latestVersion?: string(name='LatestVersion'), message?: string(name='Message'), option?: string(name='Option'), patches?: { patch?: [ { internalUrl?: string(name='InternalUrl'), MD5?: string(name='MD5'), name?: string(name='Name'), url?: string(name='Url'), } ](name='Patch') }(name='Patches'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model CheckUpgradeVersionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CheckUpgradeVersionResponseBody(name='body'), } async function checkUpgradeVersionWithOptions(request: CheckUpgradeVersionRequest, runtime: Util.RuntimeOptions): CheckUpgradeVersionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.gatewayVersion)) { query['GatewayVersion'] = request.gatewayVersion; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CheckUpgradeVersion', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function checkUpgradeVersion(request: CheckUpgradeVersionRequest): CheckUpgradeVersionResponse { var runtime = new Util.RuntimeOptions{}; return checkUpgradeVersionWithOptions(request, runtime); } model CreateCacheRequest { category?: string(name='Category'), gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), sizeInGB?: long(name='SizeInGB'), } model CreateCacheResponseBody = { buyURL?: string(name='BuyURL'), cacheId?: string(name='CacheId'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model CreateCacheResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateCacheResponseBody(name='body'), } async function createCacheWithOptions(request: CreateCacheRequest, runtime: Util.RuntimeOptions): CreateCacheResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.category)) { query['Category'] = request.category; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.sizeInGB)) { query['SizeInGB'] = request.sizeInGB; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateCache', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createCache(request: CreateCacheRequest): CreateCacheResponse { var runtime = new Util.RuntimeOptions{}; return createCacheWithOptions(request, runtime); } model CreateElasticGatewayPrivateZoneRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model CreateElasticGatewayPrivateZoneResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model CreateElasticGatewayPrivateZoneResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateElasticGatewayPrivateZoneResponseBody(name='body'), } async function createElasticGatewayPrivateZoneWithOptions(request: CreateElasticGatewayPrivateZoneRequest, runtime: Util.RuntimeOptions): CreateElasticGatewayPrivateZoneResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateElasticGatewayPrivateZone', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createElasticGatewayPrivateZone(request: CreateElasticGatewayPrivateZoneRequest): CreateElasticGatewayPrivateZoneResponse { var runtime = new Util.RuntimeOptions{}; return createElasticGatewayPrivateZoneWithOptions(request, runtime); } model CreateExpressSyncRequest { bucketName?: string(name='BucketName', example='sgw-test***'), bucketPrefix?: string(name='BucketPrefix', example='test***'), bucketRegion?: string(name='BucketRegion', example='cn-hangzhou'), description?: string(name='Description'), name?: string(name='Name', example='alex-tb***'), securityToken?: string(name='SecurityToken'), } model CreateExpressSyncResponseBody = { code?: string(name='Code', example='200'), expressSyncId?: string(name='ExpressSyncId', example='sync-0001xv7je357xn8tr***'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='EEFC9927-B097-446D-8FDA-F848C8B2C9E0'), success?: boolean(name='Success', example='true'), } model CreateExpressSyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateExpressSyncResponseBody(name='body'), } async function createExpressSyncWithOptions(request: CreateExpressSyncRequest, runtime: Util.RuntimeOptions): CreateExpressSyncResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.bucketPrefix)) { query['BucketPrefix'] = request.bucketPrefix; } if (!Util.isUnset(request.bucketRegion)) { query['BucketRegion'] = request.bucketRegion; } if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateExpressSync', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createExpressSync(request: CreateExpressSyncRequest): CreateExpressSyncResponse { var runtime = new Util.RuntimeOptions{}; return createExpressSyncWithOptions(request, runtime); } model CreateGatewayRequest { description?: string(name='Description'), gatewayClass?: string(name='GatewayClass', example='Basic'), location?: string(name='Location', example='Cloud'), name?: string(name='Name', example='alex***'), postPaid?: boolean(name='PostPaid', example='true'), publicNetworkBandwidth?: int32(name='PublicNetworkBandwidth', example='50'), releaseAfterExpiration?: boolean(name='ReleaseAfterExpiration', example='true'), resourceRegionId?: string(name='ResourceRegionId', example='cn-hangzhou'), secondaryVSwitchId?: string(name='SecondaryVSwitchId'), securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId', example='sb-0001b2otnkdxrigeq***'), type?: string(name='Type', example='File'), untrustedEnvId?: string(name='UntrustedEnvId'), untrustedEnvInstanceType?: string(name='UntrustedEnvInstanceType'), vSwitchId?: string(name='VSwitchId', example='vsw-bp1krhkglx3nahkb9s***'), } model CreateGatewayResponseBody = { buyURL?: string(name='BuyURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***","directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy'), code?: string(name='Code', example='200'), gatewayId?: string(name='GatewayId', example='gw-0001xv7je357zm9u6***'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='8E69E1A1-9076-4C8C-8ADF-ACD253886E22'), success?: boolean(name='Success', example='true'), } model CreateGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateGatewayResponseBody(name='body'), } async function createGatewayWithOptions(request: CreateGatewayRequest, runtime: Util.RuntimeOptions): CreateGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.gatewayClass)) { query['GatewayClass'] = request.gatewayClass; } if (!Util.isUnset(request.location)) { query['Location'] = request.location; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.postPaid)) { query['PostPaid'] = request.postPaid; } if (!Util.isUnset(request.publicNetworkBandwidth)) { query['PublicNetworkBandwidth'] = request.publicNetworkBandwidth; } if (!Util.isUnset(request.releaseAfterExpiration)) { query['ReleaseAfterExpiration'] = request.releaseAfterExpiration; } if (!Util.isUnset(request.resourceRegionId)) { query['ResourceRegionId'] = request.resourceRegionId; } if (!Util.isUnset(request.secondaryVSwitchId)) { query['SecondaryVSwitchId'] = request.secondaryVSwitchId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } if (!Util.isUnset(request.untrustedEnvId)) { query['UntrustedEnvId'] = request.untrustedEnvId; } if (!Util.isUnset(request.untrustedEnvInstanceType)) { query['UntrustedEnvInstanceType'] = request.untrustedEnvInstanceType; } if (!Util.isUnset(request.vSwitchId)) { query['VSwitchId'] = request.vSwitchId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createGateway(request: CreateGatewayRequest): CreateGatewayResponse { var runtime = new Util.RuntimeOptions{}; return createGatewayWithOptions(request, runtime); } model CreateGatewayBlockVolumeRequest { cacheMode?: string(name='CacheMode', example='Cache'), chapEnabled?: boolean(name='ChapEnabled', example='false'), chapInPassword?: string(name='ChapInPassword', example='chapInPassword'), chapInUser?: string(name='ChapInUser', example='chapInUser'), chunkSize?: int32(name='ChunkSize', example='32768'), gatewayId?: string(name='GatewayId', example='gw-000dt67z4ijngqvh1***'), localFilePath?: string(name='LocalFilePath', example='/dev/vdb'), name?: string(name='Name', example='name'), ossBucketName?: string(name='OssBucketName', example='bucketName'), ossBucketSsl?: boolean(name='OssBucketSsl', example='true'), ossEndpoint?: string(name='OssEndpoint', example='oss-cn-shanghai-internal.aliyuncs.com'), recovery?: boolean(name='Recovery', example='false'), securityToken?: string(name='SecurityToken'), size?: long(name='Size', example='100'), volumeProtocol?: string(name='VolumeProtocol', example='iSCSI'), } model CreateGatewayBlockVolumeResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='9083F167-95B1-4B40-B2CD-70DE068EC3**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000c6hshwukkbtxrb***'), } model CreateGatewayBlockVolumeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateGatewayBlockVolumeResponseBody(name='body'), } async function createGatewayBlockVolumeWithOptions(request: CreateGatewayBlockVolumeRequest, runtime: Util.RuntimeOptions): CreateGatewayBlockVolumeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheMode)) { query['CacheMode'] = request.cacheMode; } if (!Util.isUnset(request.chapEnabled)) { query['ChapEnabled'] = request.chapEnabled; } if (!Util.isUnset(request.chapInPassword)) { query['ChapInPassword'] = request.chapInPassword; } if (!Util.isUnset(request.chapInUser)) { query['ChapInUser'] = request.chapInUser; } if (!Util.isUnset(request.chunkSize)) { query['ChunkSize'] = request.chunkSize; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.localFilePath)) { query['LocalFilePath'] = request.localFilePath; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.ossBucketName)) { query['OssBucketName'] = request.ossBucketName; } if (!Util.isUnset(request.ossBucketSsl)) { query['OssBucketSsl'] = request.ossBucketSsl; } if (!Util.isUnset(request.ossEndpoint)) { query['OssEndpoint'] = request.ossEndpoint; } if (!Util.isUnset(request.recovery)) { query['Recovery'] = request.recovery; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.size)) { query['Size'] = request.size; } if (!Util.isUnset(request.volumeProtocol)) { query['VolumeProtocol'] = request.volumeProtocol; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateGatewayBlockVolume', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createGatewayBlockVolume(request: CreateGatewayBlockVolumeRequest): CreateGatewayBlockVolumeResponse { var runtime = new Util.RuntimeOptions{}; return createGatewayBlockVolumeWithOptions(request, runtime); } model CreateGatewayCacheDiskRequest { cacheDiskCategory?: string(name='CacheDiskCategory', example='cloud_efficiency'), cacheDiskSizeInGB?: long(name='CacheDiskSizeInGB', example='60'), gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), performanceLevel?: string(name='PerformanceLevel'), securityToken?: string(name='SecurityToken'), } model CreateGatewayCacheDiskResponseBody = { buyURL?: string(name='BuyURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***","directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='8E69E1A1-9076-4C8C-8ADF-ACD253886E22'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je357xv4st***'), } model CreateGatewayCacheDiskResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateGatewayCacheDiskResponseBody(name='body'), } async function createGatewayCacheDiskWithOptions(request: CreateGatewayCacheDiskRequest, runtime: Util.RuntimeOptions): CreateGatewayCacheDiskResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheDiskCategory)) { query['CacheDiskCategory'] = request.cacheDiskCategory; } if (!Util.isUnset(request.cacheDiskSizeInGB)) { query['CacheDiskSizeInGB'] = request.cacheDiskSizeInGB; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.performanceLevel)) { query['PerformanceLevel'] = request.performanceLevel; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateGatewayCacheDisk', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createGatewayCacheDisk(request: CreateGatewayCacheDiskRequest): CreateGatewayCacheDiskResponse { var runtime = new Util.RuntimeOptions{}; return createGatewayCacheDiskWithOptions(request, runtime); } model CreateGatewayFileShareRequest { accessBasedEnumeration?: boolean(name='AccessBasedEnumeration', example='false'), backendLimit?: int32(name='BackendLimit', example='1234'), browsable?: boolean(name='Browsable', example='true'), bypassCacheRead?: boolean(name='BypassCacheRead', example='false'), cacheMode?: string(name='CacheMode', example='Cache'), clientSideCmk?: string(name='ClientSideCmk', example='xxxxx'), clientSideEncryption?: boolean(name='ClientSideEncryption', example='false'), directIO?: boolean(name='DirectIO', example='false'), downloadLimit?: int32(name='DownloadLimit', example='0'), fastReclaim?: boolean(name='FastReclaim', example='false'), frontendLimit?: int32(name='FrontendLimit', example='1234'), gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), ignoreDelete?: boolean(name='IgnoreDelete', example='false'), inPlace?: boolean(name='InPlace', example='false'), kmsRotatePeriod?: long(name='KmsRotatePeriod', example='0'), lagPeriod?: long(name='LagPeriod', example='5'), localFilePath?: string(name='LocalFilePath', example='/dev/vdb'), name?: string(name='Name', example='alex***'), nfsV4Optimization?: boolean(name='NfsV4Optimization', example='false'), ossBucketName?: string(name='OssBucketName', example='testbucket'), ossBucketSsl?: boolean(name='OssBucketSsl', example='true'), ossEndpoint?: string(name='OssEndpoint', example='oss-cn-hangzhou-internal.aliyuncs.com'), partialSyncPaths?: string(name='PartialSyncPaths', example='test1'), pathPrefix?: string(name='PathPrefix', example='test1'), pollingInterval?: int32(name='PollingInterval', example='4500'), readOnlyClientList?: string(name='ReadOnlyClientList', example='12.12.12.12'), readOnlyUserList?: string(name='ReadOnlyUserList', example='userA,userB'), readWriteClientList?: string(name='ReadWriteClientList', example='12.12.12.12'), readWriteUserList?: string(name='ReadWriteUserList', example='user1,user2'), remoteSync?: boolean(name='RemoteSync', example='false'), remoteSyncDownload?: boolean(name='RemoteSyncDownload', example='false'), securityToken?: string(name='SecurityToken'), serverSideAlgorithm?: string(name='ServerSideAlgorithm', example='AES256'), serverSideCmk?: string(name='ServerSideCmk', example='xxxxx'), serverSideEncryption?: boolean(name='ServerSideEncryption', example='false'), shareProtocol?: string(name='ShareProtocol', example='NFS'), squash?: string(name='Squash', example='none'), supportArchive?: boolean(name='SupportArchive', example='false'), transferAcceleration?: boolean(name='TransferAcceleration', example='false'), windowsAcl?: boolean(name='WindowsAcl', example='false'), } model CreateGatewayFileShareResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='F8B59F29-453D-49BF-8673-EEB8F9F2D5C6'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000eg44nmxbsh3qk***'), } model CreateGatewayFileShareResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateGatewayFileShareResponseBody(name='body'), } async function createGatewayFileShareWithOptions(request: CreateGatewayFileShareRequest, runtime: Util.RuntimeOptions): CreateGatewayFileShareResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.accessBasedEnumeration)) { query['AccessBasedEnumeration'] = request.accessBasedEnumeration; } if (!Util.isUnset(request.backendLimit)) { query['BackendLimit'] = request.backendLimit; } if (!Util.isUnset(request.browsable)) { query['Browsable'] = request.browsable; } if (!Util.isUnset(request.bypassCacheRead)) { query['BypassCacheRead'] = request.bypassCacheRead; } if (!Util.isUnset(request.cacheMode)) { query['CacheMode'] = request.cacheMode; } if (!Util.isUnset(request.clientSideCmk)) { query['ClientSideCmk'] = request.clientSideCmk; } if (!Util.isUnset(request.clientSideEncryption)) { query['ClientSideEncryption'] = request.clientSideEncryption; } if (!Util.isUnset(request.directIO)) { query['DirectIO'] = request.directIO; } if (!Util.isUnset(request.downloadLimit)) { query['DownloadLimit'] = request.downloadLimit; } if (!Util.isUnset(request.fastReclaim)) { query['FastReclaim'] = request.fastReclaim; } if (!Util.isUnset(request.frontendLimit)) { query['FrontendLimit'] = request.frontendLimit; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.ignoreDelete)) { query['IgnoreDelete'] = request.ignoreDelete; } if (!Util.isUnset(request.inPlace)) { query['InPlace'] = request.inPlace; } if (!Util.isUnset(request.kmsRotatePeriod)) { query['KmsRotatePeriod'] = request.kmsRotatePeriod; } if (!Util.isUnset(request.lagPeriod)) { query['LagPeriod'] = request.lagPeriod; } if (!Util.isUnset(request.localFilePath)) { query['LocalFilePath'] = request.localFilePath; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.nfsV4Optimization)) { query['NfsV4Optimization'] = request.nfsV4Optimization; } if (!Util.isUnset(request.ossBucketName)) { query['OssBucketName'] = request.ossBucketName; } if (!Util.isUnset(request.ossBucketSsl)) { query['OssBucketSsl'] = request.ossBucketSsl; } if (!Util.isUnset(request.ossEndpoint)) { query['OssEndpoint'] = request.ossEndpoint; } if (!Util.isUnset(request.partialSyncPaths)) { query['PartialSyncPaths'] = request.partialSyncPaths; } if (!Util.isUnset(request.pathPrefix)) { query['PathPrefix'] = request.pathPrefix; } if (!Util.isUnset(request.pollingInterval)) { query['PollingInterval'] = request.pollingInterval; } if (!Util.isUnset(request.readOnlyClientList)) { query['ReadOnlyClientList'] = request.readOnlyClientList; } if (!Util.isUnset(request.readOnlyUserList)) { query['ReadOnlyUserList'] = request.readOnlyUserList; } if (!Util.isUnset(request.readWriteClientList)) { query['ReadWriteClientList'] = request.readWriteClientList; } if (!Util.isUnset(request.readWriteUserList)) { query['ReadWriteUserList'] = request.readWriteUserList; } if (!Util.isUnset(request.remoteSync)) { query['RemoteSync'] = request.remoteSync; } if (!Util.isUnset(request.remoteSyncDownload)) { query['RemoteSyncDownload'] = request.remoteSyncDownload; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.serverSideAlgorithm)) { query['ServerSideAlgorithm'] = request.serverSideAlgorithm; } if (!Util.isUnset(request.serverSideCmk)) { query['ServerSideCmk'] = request.serverSideCmk; } if (!Util.isUnset(request.serverSideEncryption)) { query['ServerSideEncryption'] = request.serverSideEncryption; } if (!Util.isUnset(request.shareProtocol)) { query['ShareProtocol'] = request.shareProtocol; } if (!Util.isUnset(request.squash)) { query['Squash'] = request.squash; } if (!Util.isUnset(request.supportArchive)) { query['SupportArchive'] = request.supportArchive; } if (!Util.isUnset(request.transferAcceleration)) { query['TransferAcceleration'] = request.transferAcceleration; } if (!Util.isUnset(request.windowsAcl)) { query['WindowsAcl'] = request.windowsAcl; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateGatewayFileShare', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createGatewayFileShare(request: CreateGatewayFileShareRequest): CreateGatewayFileShareResponse { var runtime = new Util.RuntimeOptions{}; return createGatewayFileShareWithOptions(request, runtime); } model CreateGatewayLoggingRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), slsLogstore?: string(name='SlsLogstore', example='logs***'), slsProject?: string(name='SlsProject', example='alex***'), } model CreateGatewayLoggingResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='76109369-5729-467D-D4A3-1131A8DA19XX'), success?: boolean(name='Success', example='true'), } model CreateGatewayLoggingResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateGatewayLoggingResponseBody(name='body'), } async function createGatewayLoggingWithOptions(request: CreateGatewayLoggingRequest, runtime: Util.RuntimeOptions): CreateGatewayLoggingResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.slsLogstore)) { query['SlsLogstore'] = request.slsLogstore; } if (!Util.isUnset(request.slsProject)) { query['SlsProject'] = request.slsProject; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateGatewayLogging', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createGatewayLogging(request: CreateGatewayLoggingRequest): CreateGatewayLoggingResponse { var runtime = new Util.RuntimeOptions{}; return createGatewayLoggingWithOptions(request, runtime); } model CreateGatewaySMBUserRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq2**'), password?: string(name='Password', example='123***'), securityToken?: string(name='SecurityToken'), username?: string(name='Username', example='alex'), } model CreateGatewaySMBUserResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='9083F167-95B1-4B40-B2CD-70DE068EC3**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000c6hshwukkbtxrb***'), } model CreateGatewaySMBUserResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateGatewaySMBUserResponseBody(name='body'), } async function createGatewaySMBUserWithOptions(request: CreateGatewaySMBUserRequest, runtime: Util.RuntimeOptions): CreateGatewaySMBUserResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.password)) { query['Password'] = request.password; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.username)) { query['Username'] = request.username; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateGatewaySMBUser', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createGatewaySMBUser(request: CreateGatewaySMBUserRequest): CreateGatewaySMBUserResponse { var runtime = new Util.RuntimeOptions{}; return createGatewaySMBUserWithOptions(request, runtime); } model CreateStorageBundleRequest { backendBucketRegionId?: string(name='BackendBucketRegionId', example='cn-shanghai'), description?: string(name='Description'), name?: string(name='Name', example='alex-123***'), securityToken?: string(name='SecurityToken'), } model CreateStorageBundleResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='2AD80BDC-E05C-4A77-BBAD-5EDAEDE6D333'), storageBundleId?: string(name='StorageBundleId', example='sb-000ibk4xrlr03qrjr***'), success?: boolean(name='Success', example='true'), } model CreateStorageBundleResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: CreateStorageBundleResponseBody(name='body'), } async function createStorageBundleWithOptions(request: CreateStorageBundleRequest, runtime: Util.RuntimeOptions): CreateStorageBundleResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.backendBucketRegionId)) { query['BackendBucketRegionId'] = request.backendBucketRegionId; } if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'CreateStorageBundle', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function createStorageBundle(request: CreateStorageBundleRequest): CreateStorageBundleResponse { var runtime = new Util.RuntimeOptions{}; return createStorageBundleWithOptions(request, runtime); } model DeleteCSGClientsRequest { clientIds?: [ string ](name='ClientIds'), clientRegionId?: string(name='ClientRegionId'), securityToken?: string(name='SecurityToken'), } model DeleteCSGClientsShrinkRequest { clientIdsShrink?: string(name='ClientIds'), clientRegionId?: string(name='ClientRegionId'), securityToken?: string(name='SecurityToken'), } model DeleteCSGClientsResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model DeleteCSGClientsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteCSGClientsResponseBody(name='body'), } async function deleteCSGClientsWithOptions(tmpReq: DeleteCSGClientsRequest, runtime: Util.RuntimeOptions): DeleteCSGClientsResponse { Util.validateModel(tmpReq); var request = new DeleteCSGClientsShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.clientIds)) { request.clientIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.clientIds, 'ClientIds', 'json'); } var query = {}; if (!Util.isUnset(request.clientIdsShrink)) { query['ClientIds'] = request.clientIdsShrink; } if (!Util.isUnset(request.clientRegionId)) { query['ClientRegionId'] = request.clientRegionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteCSGClients', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteCSGClients(request: DeleteCSGClientsRequest): DeleteCSGClientsResponse { var runtime = new Util.RuntimeOptions{}; return deleteCSGClientsWithOptions(request, runtime); } model DeleteElasticGatewayPrivateZoneRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DeleteElasticGatewayPrivateZoneResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model DeleteElasticGatewayPrivateZoneResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteElasticGatewayPrivateZoneResponseBody(name='body'), } async function deleteElasticGatewayPrivateZoneWithOptions(request: DeleteElasticGatewayPrivateZoneRequest, runtime: Util.RuntimeOptions): DeleteElasticGatewayPrivateZoneResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteElasticGatewayPrivateZone', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteElasticGatewayPrivateZone(request: DeleteElasticGatewayPrivateZoneRequest): DeleteElasticGatewayPrivateZoneResponse { var runtime = new Util.RuntimeOptions{}; return deleteElasticGatewayPrivateZoneWithOptions(request, runtime); } model DeleteExpressSyncRequest { expressSyncId?: string(name='ExpressSyncId', example='sync-0001xv7je357xn8tr***'), securityToken?: string(name='SecurityToken'), } model DeleteExpressSyncResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='A870C702-C3AC-4FC9-91E4-053D3E599A24'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je357xv4st***'), } model DeleteExpressSyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteExpressSyncResponseBody(name='body'), } async function deleteExpressSyncWithOptions(request: DeleteExpressSyncRequest, runtime: Util.RuntimeOptions): DeleteExpressSyncResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.expressSyncId)) { query['ExpressSyncId'] = request.expressSyncId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteExpressSync', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteExpressSync(request: DeleteExpressSyncRequest): DeleteExpressSyncResponse { var runtime = new Util.RuntimeOptions{}; return deleteExpressSyncWithOptions(request, runtime); } model DeleteGatewayRequest { gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031y***'), reasonDetail?: string(name='ReasonDetail', example='""'), reasonType?: string(name='ReasonType', example='REASON2'), securityToken?: string(name='SecurityToken'), } model DeleteGatewayResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='151BB31D-571D-4BB9-9A02-D4210E5BF5DB'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0000iwdggbhaordhk***'), } model DeleteGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteGatewayResponseBody(name='body'), } async function deleteGatewayWithOptions(request: DeleteGatewayRequest, runtime: Util.RuntimeOptions): DeleteGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.reasonDetail)) { query['ReasonDetail'] = request.reasonDetail; } if (!Util.isUnset(request.reasonType)) { query['ReasonType'] = request.reasonType; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteGateway(request: DeleteGatewayRequest): DeleteGatewayResponse { var runtime = new Util.RuntimeOptions{}; return deleteGatewayWithOptions(request, runtime); } model DeleteGatewayBlockVolumesRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwb***'), indexId?: string(name='IndexId', example='NFSalex-gx***'), isSourceDeletion?: boolean(name='IsSourceDeletion', example='true'), securityToken?: string(name='SecurityToken'), } model DeleteGatewayBlockVolumesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successsful'), requestId?: string(name='RequestId', example='151BB31D-571D-4BB9-9A02-D4210E5BF5DB'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0000iwdggbhaordhk***'), } model DeleteGatewayBlockVolumesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteGatewayBlockVolumesResponseBody(name='body'), } async function deleteGatewayBlockVolumesWithOptions(request: DeleteGatewayBlockVolumesRequest, runtime: Util.RuntimeOptions): DeleteGatewayBlockVolumesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.isSourceDeletion)) { query['IsSourceDeletion'] = request.isSourceDeletion; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteGatewayBlockVolumes', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteGatewayBlockVolumes(request: DeleteGatewayBlockVolumesRequest): DeleteGatewayBlockVolumesResponse { var runtime = new Util.RuntimeOptions{}; return deleteGatewayBlockVolumesWithOptions(request, runtime); } model DeleteGatewayCacheDiskRequest { cacheId?: string(name='CacheId', example='d-bp1dcnq8zldree6ok***'), gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031y***'), localFilePath?: string(name='LocalFilePath', example='/dev/vdb'), securityToken?: string(name='SecurityToken'), } model DeleteGatewayCacheDiskResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='EEFC9927-B097-446D-8FDA-F848C8B2C9E3'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je357xv4s***'), } model DeleteGatewayCacheDiskResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteGatewayCacheDiskResponseBody(name='body'), } async function deleteGatewayCacheDiskWithOptions(request: DeleteGatewayCacheDiskRequest, runtime: Util.RuntimeOptions): DeleteGatewayCacheDiskResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheId)) { query['CacheId'] = request.cacheId; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.localFilePath)) { query['LocalFilePath'] = request.localFilePath; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteGatewayCacheDisk', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteGatewayCacheDisk(request: DeleteGatewayCacheDiskRequest): DeleteGatewayCacheDiskResponse { var runtime = new Util.RuntimeOptions{}; return deleteGatewayCacheDiskWithOptions(request, runtime); } model DeleteGatewayFileSharesRequest { force?: boolean(name='Force', example='false'), gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbv****'), indexId?: string(name='IndexId', example='NFSalex***'), securityToken?: string(name='SecurityToken'), } model DeleteGatewayFileSharesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='t-000czaedx5koz578vk**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000c6hshwukkcfn****'), } model DeleteGatewayFileSharesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteGatewayFileSharesResponseBody(name='body'), } async function deleteGatewayFileSharesWithOptions(request: DeleteGatewayFileSharesRequest, runtime: Util.RuntimeOptions): DeleteGatewayFileSharesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.force)) { query['Force'] = request.force; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteGatewayFileShares', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteGatewayFileShares(request: DeleteGatewayFileSharesRequest): DeleteGatewayFileSharesResponse { var runtime = new Util.RuntimeOptions{}; return deleteGatewayFileSharesWithOptions(request, runtime); } model DeleteGatewayLoggingRequest { gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031***'), securityToken?: string(name='SecurityToken'), } model DeleteGatewayLoggingResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='E66BF56E-068D-4308-A2D8-7FBBCE22E812'), success?: boolean(name='Success', example='true'), } model DeleteGatewayLoggingResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteGatewayLoggingResponseBody(name='body'), } async function deleteGatewayLoggingWithOptions(request: DeleteGatewayLoggingRequest, runtime: Util.RuntimeOptions): DeleteGatewayLoggingResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteGatewayLogging', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteGatewayLogging(request: DeleteGatewayLoggingRequest): DeleteGatewayLoggingResponse { var runtime = new Util.RuntimeOptions{}; return deleteGatewayLoggingWithOptions(request, runtime); } model DeleteGatewaySMBUserRequest { gatewayId?: string(name='GatewayId', example='gw-000c6hshwukkbrypj***'), securityToken?: string(name='SecurityToken'), username?: string(name='Username', example='username'), } model DeleteGatewaySMBUserResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000c6hshwukkcfn3k**'), } model DeleteGatewaySMBUserResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteGatewaySMBUserResponseBody(name='body'), } async function deleteGatewaySMBUserWithOptions(request: DeleteGatewaySMBUserRequest, runtime: Util.RuntimeOptions): DeleteGatewaySMBUserResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.username)) { query['Username'] = request.username; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteGatewaySMBUser', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteGatewaySMBUser(request: DeleteGatewaySMBUserRequest): DeleteGatewaySMBUserResponse { var runtime = new Util.RuntimeOptions{}; return deleteGatewaySMBUserWithOptions(request, runtime); } model DeleteStorageBundleRequest { securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId', example='sb-0001b2otnkdxrigeq***'), } model DeleteStorageBundleResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='28708A34-83AF-42B8-928B-40E7B3E1D719'), success?: boolean(name='Success', example='true'), } model DeleteStorageBundleResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeleteStorageBundleResponseBody(name='body'), } async function deleteStorageBundleWithOptions(request: DeleteStorageBundleRequest, runtime: Util.RuntimeOptions): DeleteStorageBundleResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeleteStorageBundle', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deleteStorageBundle(request: DeleteStorageBundleRequest): DeleteStorageBundleResponse { var runtime = new Util.RuntimeOptions{}; return deleteStorageBundleWithOptions(request, runtime); } model DeployCSGClientsRequest { clientRegionId?: string(name='ClientRegionId'), ecsInstanceIds?: [ string ](name='EcsInstanceIds'), securityToken?: string(name='SecurityToken'), vpcId?: string(name='VpcId'), } model DeployCSGClientsShrinkRequest { clientRegionId?: string(name='ClientRegionId'), ecsInstanceIdsShrink?: string(name='EcsInstanceIds'), securityToken?: string(name='SecurityToken'), vpcId?: string(name='VpcId'), } model DeployCSGClientsResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model DeployCSGClientsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeployCSGClientsResponseBody(name='body'), } async function deployCSGClientsWithOptions(tmpReq: DeployCSGClientsRequest, runtime: Util.RuntimeOptions): DeployCSGClientsResponse { Util.validateModel(tmpReq); var request = new DeployCSGClientsShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.ecsInstanceIds)) { request.ecsInstanceIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.ecsInstanceIds, 'EcsInstanceIds', 'json'); } var query = {}; if (!Util.isUnset(request.clientRegionId)) { query['ClientRegionId'] = request.clientRegionId; } if (!Util.isUnset(request.ecsInstanceIdsShrink)) { query['EcsInstanceIds'] = request.ecsInstanceIdsShrink; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.vpcId)) { query['VpcId'] = request.vpcId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeployCSGClients', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deployCSGClients(request: DeployCSGClientsRequest): DeployCSGClientsResponse { var runtime = new Util.RuntimeOptions{}; return deployCSGClientsWithOptions(request, runtime); } model DeployCacheDiskRequest { cacheConfig?: string(name='CacheConfig'), diskCategory?: string(name='DiskCategory'), gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), sizeInGB?: int32(name='SizeInGB'), } model DeployCacheDiskResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model DeployCacheDiskResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeployCacheDiskResponseBody(name='body'), } async function deployCacheDiskWithOptions(request: DeployCacheDiskRequest, runtime: Util.RuntimeOptions): DeployCacheDiskResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheConfig)) { query['CacheConfig'] = request.cacheConfig; } if (!Util.isUnset(request.diskCategory)) { query['DiskCategory'] = request.diskCategory; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.sizeInGB)) { query['SizeInGB'] = request.sizeInGB; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeployCacheDisk', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deployCacheDisk(request: DeployCacheDiskRequest): DeployCacheDiskResponse { var runtime = new Util.RuntimeOptions{}; return deployCacheDiskWithOptions(request, runtime); } model DeployGatewayRequest { gatewayClass?: string(name='GatewayClass', example='Basic'), gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031y***'), securityToken?: string(name='SecurityToken'), } model DeployGatewayResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='8FEAFE9D-66C2-46AB-833B-35269EC7524C'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je35800307***'), } model DeployGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DeployGatewayResponseBody(name='body'), } async function deployGatewayWithOptions(request: DeployGatewayRequest, runtime: Util.RuntimeOptions): DeployGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayClass)) { query['GatewayClass'] = request.gatewayClass; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DeployGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function deployGateway(request: DeployGatewayRequest): DeployGatewayResponse { var runtime = new Util.RuntimeOptions{}; return deployGatewayWithOptions(request, runtime); } model DescribeAccountConfigRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeAccountConfigResponseBody = { code?: string(name='Code'), isSupportClientSideEncryption?: boolean(name='IsSupportClientSideEncryption'), isSupportElasticGatewayBeta?: boolean(name='IsSupportElasticGatewayBeta'), isSupportGatewayLogging?: boolean(name='IsSupportGatewayLogging'), isSupportServerSideEncryption?: boolean(name='IsSupportServerSideEncryption'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeAccountConfigResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeAccountConfigResponseBody(name='body'), } async function describeAccountConfigWithOptions(request: DescribeAccountConfigRequest, runtime: Util.RuntimeOptions): DescribeAccountConfigResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeAccountConfig', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeAccountConfig(request: DescribeAccountConfigRequest): DescribeAccountConfigResponse { var runtime = new Util.RuntimeOptions{}; return describeAccountConfigWithOptions(request, runtime); } model DescribeBlockVolumeSnapshotsRequest { gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeBlockVolumeSnapshotsResponseBody = { code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), snapshots?: { snapshot?: [ { createTime?: long(name='CreateTime'), size?: long(name='Size'), snapshotName?: string(name='SnapshotName'), } ](name='Snapshot') }(name='Snapshots'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), } model DescribeBlockVolumeSnapshotsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeBlockVolumeSnapshotsResponseBody(name='body'), } async function describeBlockVolumeSnapshotsWithOptions(request: DescribeBlockVolumeSnapshotsRequest, runtime: Util.RuntimeOptions): DescribeBlockVolumeSnapshotsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeBlockVolumeSnapshots', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeBlockVolumeSnapshots(request: DescribeBlockVolumeSnapshotsRequest): DescribeBlockVolumeSnapshotsResponse { var runtime = new Util.RuntimeOptions{}; return describeBlockVolumeSnapshotsWithOptions(request, runtime); } model DescribeCSGClientTasksRequest { clientId?: string(name='ClientId'), clientRegionId?: string(name='ClientRegionId'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeCSGClientTasksResponseBody = { code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), tasks?: [ { createdTime?: long(name='CreatedTime'), messageKey?: string(name='MessageKey'), messageParams?: string(name='MessageParams'), name?: string(name='Name'), progress?: int32(name='Progress'), stateCode?: string(name='StateCode'), taskId?: string(name='TaskId'), updatedTime?: long(name='UpdatedTime'), } ](name='Tasks'), totalCount?: int32(name='TotalCount'), } model DescribeCSGClientTasksResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeCSGClientTasksResponseBody(name='body'), } async function describeCSGClientTasksWithOptions(request: DescribeCSGClientTasksRequest, runtime: Util.RuntimeOptions): DescribeCSGClientTasksResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientId)) { query['ClientId'] = request.clientId; } if (!Util.isUnset(request.clientRegionId)) { query['ClientRegionId'] = request.clientRegionId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeCSGClientTasks', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeCSGClientTasks(request: DescribeCSGClientTasksRequest): DescribeCSGClientTasksResponse { var runtime = new Util.RuntimeOptions{}; return describeCSGClientTasksWithOptions(request, runtime); } model DescribeCSGClientsRequest { clientRegionId?: string(name='ClientRegionId'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeCSGClientsResponseBody = { clients?: [ { clientDeletionCommand?: string(name='ClientDeletionCommand'), clientId?: string(name='ClientId'), clientInstallationCommand?: string(name='ClientInstallationCommand'), clientVersion?: string(name='ClientVersion'), ecsInstanceId?: string(name='EcsInstanceId'), hostInstanceId?: string(name='HostInstanceId'), lastHeartbeatTime?: long(name='LastHeartbeatTime'), status?: string(name='Status'), vpcId?: string(name='VpcId'), workDirectory?: string(name='WorkDirectory'), } ](name='Clients'), code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), } model DescribeCSGClientsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeCSGClientsResponseBody(name='body'), } async function describeCSGClientsWithOptions(request: DescribeCSGClientsRequest, runtime: Util.RuntimeOptions): DescribeCSGClientsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientRegionId)) { query['ClientRegionId'] = request.clientRegionId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeCSGClients', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeCSGClients(request: DescribeCSGClientsRequest): DescribeCSGClientsResponse { var runtime = new Util.RuntimeOptions{}; return describeCSGClientsWithOptions(request, runtime); } model DescribeDashboardRequest { backendBucketRegionId?: string(name='BackendBucketRegionId'), resourceGroupId?: string(name='ResourceGroupId'), securityToken?: string(name='SecurityToken'), } model DescribeDashboardResponseBody = { code?: string(name='Code'), message?: string(name='Message'), overview?: string(name='Overview'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeDashboardResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeDashboardResponseBody(name='body'), } async function describeDashboardWithOptions(request: DescribeDashboardRequest, runtime: Util.RuntimeOptions): DescribeDashboardResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.backendBucketRegionId)) { query['BackendBucketRegionId'] = request.backendBucketRegionId; } if (!Util.isUnset(request.resourceGroupId)) { query['ResourceGroupId'] = request.resourceGroupId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeDashboard', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeDashboard(request: DescribeDashboardRequest): DescribeDashboardResponse { var runtime = new Util.RuntimeOptions{}; return describeDashboardWithOptions(request, runtime); } model DescribeExpireCachesRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeExpireCachesResponseBody = { cacheFilePaths?: string(name='CacheFilePaths'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeExpireCachesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeExpireCachesResponseBody(name='body'), } async function describeExpireCachesWithOptions(request: DescribeExpireCachesRequest, runtime: Util.RuntimeOptions): DescribeExpireCachesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeExpireCaches', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeExpireCaches(request: DescribeExpireCachesRequest): DescribeExpireCachesResponse { var runtime = new Util.RuntimeOptions{}; return describeExpireCachesWithOptions(request, runtime); } model DescribeExpressSyncSharesRequest { expressSyncIds?: string(name='ExpressSyncIds', example='sync-0002xetjdlxne2sd***,sync-0004agfrbke1l39p***'), isExternal?: boolean(name='IsExternal', example='true'), securityToken?: string(name='SecurityToken'), } model DescribeExpressSyncSharesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='EA258616-36AD-4609-A0A6-2B17C28CBF88'), shares?: { share?: [ { expressSyncId?: string(name='ExpressSyncId', example='sb-0003c7qh5yuc1z6b8***'), expressSyncState?: string(name='ExpressSyncState', example='MNSHealthy'), gatewayId?: string(name='GatewayId', example='gw-000245alq48e7ytg***'), gatewayName?: string(name='GatewayName'), gatewayRegion?: string(name='GatewayRegion', example='cn-hangzhou'), mnsQueue?: string(name='MnsQueue', example='sgw-express-sync-queue-gw-000245alq48e7ytgxq03***'), shareName?: string(name='ShareName', example='ji***'), storageBundleId?: string(name='StorageBundleId', example='sb-0003c7qh5yuc1z6b8***'), syncProgress?: int32(name='SyncProgress', example='100'), } ](name='Share') }(name='Shares'), success?: boolean(name='Success', example='true'), } model DescribeExpressSyncSharesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeExpressSyncSharesResponseBody(name='body'), } async function describeExpressSyncSharesWithOptions(request: DescribeExpressSyncSharesRequest, runtime: Util.RuntimeOptions): DescribeExpressSyncSharesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.expressSyncIds)) { query['ExpressSyncIds'] = request.expressSyncIds; } if (!Util.isUnset(request.isExternal)) { query['IsExternal'] = request.isExternal; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeExpressSyncShares', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeExpressSyncShares(request: DescribeExpressSyncSharesRequest): DescribeExpressSyncSharesResponse { var runtime = new Util.RuntimeOptions{}; return describeExpressSyncSharesWithOptions(request, runtime); } model DescribeExpressSyncsRequest { bucketName?: string(name='BucketName', example='sgw***'), bucketPrefix?: string(name='BucketPrefix', example='test***'), securityToken?: string(name='SecurityToken'), } model DescribeExpressSyncsResponseBody = { code?: string(name='Code', example='200'), expressSyncs?: { expressSync?: [ { bucketName?: string(name='BucketName', example='sgw-mns***'), bucketPrefix?: string(name='BucketPrefix', example='test***'), bucketRegion?: string(name='BucketRegion', example='cn-hangzhou'), description?: string(name='Description'), expressSyncId?: string(name='ExpressSyncId', example='sync-0002xetjdlxne2sdm***'), mnsTopic?: string(name='MnsTopic', example='sgw-express-sync-0002xetjdlxne2sdm***'), name?: string(name='Name', example='wptest***'), } ](name='ExpressSync') }(name='ExpressSyncs'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='50DE1383-D4A1-433C-98A6-459C1830A888'), success?: boolean(name='Success', example='true'), } model DescribeExpressSyncsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeExpressSyncsResponseBody(name='body'), } async function describeExpressSyncsWithOptions(request: DescribeExpressSyncsRequest, runtime: Util.RuntimeOptions): DescribeExpressSyncsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.bucketPrefix)) { query['BucketPrefix'] = request.bucketPrefix; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeExpressSyncs', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeExpressSyncs(request: DescribeExpressSyncsRequest): DescribeExpressSyncsResponse { var runtime = new Util.RuntimeOptions{}; return describeExpressSyncsWithOptions(request, runtime); } model DescribeGatewayRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayResponseBody = { activatedTime?: long(name='ActivatedTime', example='1578986214'), buyURL?: string(name='BuyURL', example='https://expense.console.aliyun.com/?returnExpense=true#/order/list/'), capacity?: int32(name='Capacity', example='500'), category?: string(name='Category', example='Aliyun'), code?: string(name='Code', example='200'), commonBuyInstanceId?: string(name='CommonBuyInstanceId', example='i-uf6gjr3lnwhyrd6hu***'), createdTime?: long(name='CreatedTime', example='1532099461'), dataLoadInterval?: int32(name='DataLoadInterval', example='120'), dataLoadType?: string(name='DataLoadType', example='once'), description?: string(name='Description'), ecsInstanceId?: string(name='EcsInstanceId', example='i-uf62406gy5vyao4y8***'), elasticGateway?: boolean(name='ElasticGateway', example='false'), elasticNodes?: { elasticNode?: [ string ](name='ElasticNode') }(name='ElasticNodes'), expireStatus?: int32(name='ExpireStatus', example='0'), expiredTime?: long(name='ExpiredTime', example='1532530021'), gatewayClass?: string(name='GatewayClass', example='Basic'), gatewayId?: string(name='GatewayId', example='gw-0000ewknguw5o96vn***'), gatewayRegionId?: string(name='GatewayRegionId'), gatewayType?: string(name='GatewayType', example='File'), gatewayVersion?: string(name='GatewayVersion', example='1.0.39'), highAvailability?: boolean(name='HighAvailability'), innerIp?: string(name='InnerIp', example='172.19.55.65'), innerIpv6Ip?: string(name='InnerIpv6Ip', example='2408:4004:110:6000:4656:f88e:1c14:e578'), ip?: string(name='Ip', example='47.101.160.44'), isPostPaid?: boolean(name='IsPostPaid', example='true'), isReleaseAfterExpiration?: boolean(name='IsReleaseAfterExpiration', example='false'), lastErrorKey?: string(name='LastErrorKey', example='InternalError'), location?: string(name='Location', example='Cloud'), maxThroughput?: int32(name='MaxThroughput', example='30'), message?: string(name='Message', example='successful'), name?: string(name='Name', example='alex***'), publicNetworkBandwidth?: int32(name='PublicNetworkBandwidth', example='50'), renewURL?: string(name='RenewURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=RENEW&instanceId=ca-0007va9bnideidndn***#/renew'), requestId?: string(name='RequestId', example='736C7733-FCED-4AFB-8407-C325F210CE03'), status?: string(name='Status', example='Initialized'), storageBundleId?: string(name='StorageBundleId', example='sb-000dt67z4ijqfocpy***'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0000iwdggbharrw6r***'), type?: string(name='Type', example='File'), untrustedEnvInstanceType?: string(name='UntrustedEnvInstanceType'), untrustedEnvOssEndpoint?: string(name='UntrustedEnvOssEndpoint'), vSwitchId?: string(name='VSwitchId', example='vsw-bp1b3mvml55ziekq7e***'), vpcId?: string(name='VpcId', example='vpc-uf6j237kxmsw08auey***'), } model DescribeGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayResponseBody(name='body'), } async function describeGatewayWithOptions(request: DescribeGatewayRequest, runtime: Util.RuntimeOptions): DescribeGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGateway(request: DescribeGatewayRequest): DescribeGatewayResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayWithOptions(request, runtime); } model DescribeGatewayADInfoRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayADInfoResponseBody = { code?: string(name='Code', example='200'), domainName?: string(name='DomainName', example='test***'), isEnabled?: boolean(name='IsEnabled', example='true'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='1B0CA0B9-2B0F-478D-ADC5-474C45BF947F'), serverIp?: string(name='ServerIp', example='47.101.59.199'), success?: boolean(name='Success', example='true'), username?: string(name='Username', example='alex***'), } model DescribeGatewayADInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayADInfoResponseBody(name='body'), } async function describeGatewayADInfoWithOptions(request: DescribeGatewayADInfoRequest, runtime: Util.RuntimeOptions): DescribeGatewayADInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayADInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayADInfo(request: DescribeGatewayADInfoRequest): DescribeGatewayADInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayADInfoWithOptions(request, runtime); } model DescribeGatewayActionsRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayActionsResponseBody = { actions?: { action?: [ { adLdap?: string(name='AdLdap'), cache?: string(name='Cache'), disk?: string(name='Disk'), gatewayId?: string(name='GatewayId'), monitor?: string(name='Monitor'), self?: string(name='Self'), smbUser?: string(name='SmbUser'), target?: string(name='Target'), } ](name='Action') }(name='Actions'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayActionsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayActionsResponseBody(name='body'), } async function describeGatewayActionsWithOptions(request: DescribeGatewayActionsRequest, runtime: Util.RuntimeOptions): DescribeGatewayActionsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayActions', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayActions(request: DescribeGatewayActionsRequest): DescribeGatewayActionsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayActionsWithOptions(request, runtime); } model DescribeGatewayAuthInfoRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayAuthInfoResponseBody = { code?: string(name='Code'), message?: string(name='Message'), password?: string(name='Password'), publicIp?: string(name='PublicIp'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), username?: string(name='Username'), } model DescribeGatewayAuthInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayAuthInfoResponseBody(name='body'), } async function describeGatewayAuthInfoWithOptions(request: DescribeGatewayAuthInfoRequest, runtime: Util.RuntimeOptions): DescribeGatewayAuthInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayAuthInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayAuthInfo(request: DescribeGatewayAuthInfoRequest): DescribeGatewayAuthInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayAuthInfoWithOptions(request, runtime); } model DescribeGatewayAutoPlansRequest { gatewayId?: string(name='GatewayId'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayAutoPlansResponseBody = { autoPlans?: [ { detail?: string(name='Detail'), endTime?: long(name='EndTime'), event?: string(name='Event'), planId?: string(name='PlanId'), startTime?: long(name='StartTime'), status?: string(name='Status'), } ](name='AutoPlans'), code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), } model DescribeGatewayAutoPlansResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayAutoPlansResponseBody(name='body'), } async function describeGatewayAutoPlansWithOptions(request: DescribeGatewayAutoPlansRequest, runtime: Util.RuntimeOptions): DescribeGatewayAutoPlansResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayAutoPlans', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayAutoPlans(request: DescribeGatewayAutoPlansRequest): DescribeGatewayAutoPlansResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayAutoPlansWithOptions(request, runtime); } model DescribeGatewayAutoUpgradeConfigurationRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayAutoUpgradeConfigurationResponseBody = { autoUpgradeEndHour?: int32(name='AutoUpgradeEndHour'), autoUpgradeStartHour?: int32(name='AutoUpgradeStartHour'), code?: string(name='Code'), isAutoUpgrade?: boolean(name='IsAutoUpgrade'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayAutoUpgradeConfigurationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayAutoUpgradeConfigurationResponseBody(name='body'), } async function describeGatewayAutoUpgradeConfigurationWithOptions(request: DescribeGatewayAutoUpgradeConfigurationRequest, runtime: Util.RuntimeOptions): DescribeGatewayAutoUpgradeConfigurationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayAutoUpgradeConfiguration', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayAutoUpgradeConfiguration(request: DescribeGatewayAutoUpgradeConfigurationRequest): DescribeGatewayAutoUpgradeConfigurationResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayAutoUpgradeConfigurationWithOptions(request, runtime); } model DescribeGatewayBlockVolumesRequest { gatewayId?: string(name='GatewayId', example='gw-000dt67z4ijngqvh***'), indexId?: string(name='IndexId', example='alex-or2020010816***'), refresh?: boolean(name='Refresh', example='true'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayBlockVolumesResponseBody = { blockVolumes?: { blockVolume?: [ { address?: string(name='Address', example='172.16.0.22'), cacheMode?: string(name='CacheMode', example='Cache'), chapEnabled?: boolean(name='ChapEnabled', example='true'), chapInUser?: string(name='ChapInUser', example='alex***'), chunkSize?: int32(name='ChunkSize', example='32768'), diskId?: string(name='DiskId', example='d-bp1a8athxvwbja18***'), diskType?: string(name='DiskType', example='cloud_efficiency'), enabled?: boolean(name='Enabled', example='true'), indexId?: string(name='IndexId', example='alex-or2020010816***'), localPath?: string(name='LocalPath', example='/dev/vdb'), lunId?: int32(name='LunId', description='LUN ID。', example='0'), name?: string(name='Name', example='alex'), ossBucketName?: string(name='OssBucketName', example='random***'), ossBucketSsl?: boolean(name='OssBucketSsl', example='true'), ossEndpoint?: string(name='OssEndpoint', example='oss-cn-hangzhou-internal.aliyuncs.com'), port?: int32(name='Port', example='0'), protocol?: string(name='Protocol', example='iSCSI'), size?: long(name='Size', example='107374182400'), state?: string(name='State', example='clean'), status?: int32(name='Status', example='0'), target?: string(name='Target', example='iqn**************'), totalDownload?: long(name='TotalDownload', example='56342324'), totalUpload?: long(name='TotalUpload', example='123214564'), volumeState?: int32(name='VolumeState', example='1'), } ](name='BlockVolume') }(name='BlockVolumes'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='787D4AD4-5536-4C36-9FB0-D74C0554D344'), success?: boolean(name='Success', example='true'), } model DescribeGatewayBlockVolumesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayBlockVolumesResponseBody(name='body'), } /** * **** * * @param request DescribeGatewayBlockVolumesRequest * @param runtime runtime options for this request RuntimeOptions * @return DescribeGatewayBlockVolumesResponse */ async function describeGatewayBlockVolumesWithOptions(request: DescribeGatewayBlockVolumesRequest, runtime: Util.RuntimeOptions): DescribeGatewayBlockVolumesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.refresh)) { query['Refresh'] = request.refresh; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayBlockVolumes', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } /** * **** * * @param request DescribeGatewayBlockVolumesRequest * @return DescribeGatewayBlockVolumesResponse */ async function describeGatewayBlockVolumes(request: DescribeGatewayBlockVolumesRequest): DescribeGatewayBlockVolumesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayBlockVolumesWithOptions(request, runtime); } model DescribeGatewayBucketCachesRequest { bucketName?: string(name='BucketName'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayBucketCachesResponseBody = { bucketCaches?: { bucketCache?: [ { bucketName?: string(name='BucketName'), cacheMode?: string(name='CacheMode'), cacheStats?: string(name='CacheStats'), category?: string(name='Category'), gatewayId?: string(name='GatewayId'), gatewayName?: string(name='GatewayName'), location?: string(name='Location'), mountPoint?: string(name='MountPoint'), protocol?: string(name='Protocol'), regionId?: string(name='RegionId'), shareName?: string(name='ShareName'), type?: string(name='Type'), vpcCidr?: string(name='VpcCidr'), vpcId?: string(name='VpcId'), } ](name='BucketCache') }(name='BucketCaches'), code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), } model DescribeGatewayBucketCachesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayBucketCachesResponseBody(name='body'), } async function describeGatewayBucketCachesWithOptions(request: DescribeGatewayBucketCachesRequest, runtime: Util.RuntimeOptions): DescribeGatewayBucketCachesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayBucketCaches', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayBucketCaches(request: DescribeGatewayBucketCachesRequest): DescribeGatewayBucketCachesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayBucketCachesWithOptions(request, runtime); } model DescribeGatewayCachesRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayCachesResponseBody = { caches?: { cache?: [ { buyURL?: string(name='BuyURL'), cacheId?: string(name='CacheId', example='d-bp1dcnq8zldree6ok***'), cacheType?: string(name='CacheType', example='cloud_efficiency'), expireStatus?: int32(name='ExpireStatus', example='0'), expiredTime?: long(name='ExpiredTime', example='1532510649'), iops?: long(name='Iops', description='IOPS。', example='2605'), isDirectExpand?: string(name='IsDirectExpand'), isNoPartition?: boolean(name='IsNoPartition'), isUsed?: boolean(name='IsUsed', example='false'), localFilePath?: string(name='LocalFilePath', example='/dev/vdb'), performanceLevel?: string(name='PerformanceLevel'), renewURL?: string(name='RenewURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=RENEW&instanceId=ca-0007va9bnideidnd***#/renew'), sizeInGB?: long(name='SizeInGB', example='101'), subscriptionInstanceId?: string(name='SubscriptionInstanceId'), } ](name='Cache') }(name='Caches'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='40797B4D-09D9-482E-B163-CCB568BADE35'), success?: boolean(name='Success', example='true'), } model DescribeGatewayCachesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayCachesResponseBody(name='body'), } async function describeGatewayCachesWithOptions(request: DescribeGatewayCachesRequest, runtime: Util.RuntimeOptions): DescribeGatewayCachesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayCaches', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayCaches(request: DescribeGatewayCachesRequest): DescribeGatewayCachesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayCachesWithOptions(request, runtime); } model DescribeGatewayCapacityLimitRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), sizeInGB?: long(name='SizeInGB'), } model DescribeGatewayCapacityLimitResponseBody = { code?: string(name='Code'), fileNumber?: long(name='FileNumber'), fileSystemSizeInTB?: long(name='FileSystemSizeInTB'), isMetadataSeparate?: boolean(name='IsMetadataSeparate'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayCapacityLimitResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayCapacityLimitResponseBody(name='body'), } async function describeGatewayCapacityLimitWithOptions(request: DescribeGatewayCapacityLimitRequest, runtime: Util.RuntimeOptions): DescribeGatewayCapacityLimitResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.sizeInGB)) { query['SizeInGB'] = request.sizeInGB; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayCapacityLimit', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayCapacityLimit(request: DescribeGatewayCapacityLimitRequest): DescribeGatewayCapacityLimitResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayCapacityLimitWithOptions(request, runtime); } model DescribeGatewayCategoriesRequest { gatewayLocation?: string(name='GatewayLocation'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayCategoriesResponseBody = { categories?: string(name='Categories'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayCategoriesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayCategoriesResponseBody(name='body'), } async function describeGatewayCategoriesWithOptions(request: DescribeGatewayCategoriesRequest, runtime: Util.RuntimeOptions): DescribeGatewayCategoriesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayLocation)) { query['GatewayLocation'] = request.gatewayLocation; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayCategories', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayCategories(request: DescribeGatewayCategoriesRequest): DescribeGatewayCategoriesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayCategoriesWithOptions(request, runtime); } model DescribeGatewayClassesRequest { securityToken?: string(name='SecurityToken'), } model DescribeGatewayClassesResponseBody = { classes?: string(name='Classes', example='Basic,Standard,Enhanced,Advanced'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='EC3D33E5-0F6B-4D1B-9B35-59A71EB3FA50'), success?: boolean(name='Success', example='true'), } model DescribeGatewayClassesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayClassesResponseBody(name='body'), } async function describeGatewayClassesWithOptions(request: DescribeGatewayClassesRequest, runtime: Util.RuntimeOptions): DescribeGatewayClassesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayClasses', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayClasses(request: DescribeGatewayClassesRequest): DescribeGatewayClassesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayClassesWithOptions(request, runtime); } model DescribeGatewayCredentialRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayCredentialResponseBody = { code?: string(name='Code'), consolePassword?: string(name='ConsolePassword'), consoleUsername?: string(name='ConsoleUsername'), ecsIp?: string(name='EcsIp'), ecsPassword?: string(name='EcsPassword'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), vSwitchId?: string(name='VSwitchId'), vpcId?: string(name='VpcId'), } model DescribeGatewayCredentialResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayCredentialResponseBody(name='body'), } async function describeGatewayCredentialWithOptions(request: DescribeGatewayCredentialRequest, runtime: Util.RuntimeOptions): DescribeGatewayCredentialResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayCredential', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayCredential(request: DescribeGatewayCredentialRequest): DescribeGatewayCredentialResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayCredentialWithOptions(request, runtime); } model DescribeGatewayDNSRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayDNSResponseBody = { code?: string(name='Code', example='200'), dnsServer?: string(name='DnsServer', example='100.100.2.136,100.100.2.188'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='89398CFB-4EB6-4C7E-BB3C-EF213AC8FA50'), success?: boolean(name='Success', example='true'), } model DescribeGatewayDNSResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayDNSResponseBody(name='body'), } async function describeGatewayDNSWithOptions(request: DescribeGatewayDNSRequest, runtime: Util.RuntimeOptions): DescribeGatewayDNSResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayDNS', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayDNS(request: DescribeGatewayDNSRequest): DescribeGatewayDNSResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayDNSWithOptions(request, runtime); } model DescribeGatewayFileSharesRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), indexId?: string(name='IndexId', example='NFSd-million'), refresh?: boolean(name='Refresh', example='true'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayFileSharesResponseBody = { code?: string(name='Code', example='200'), fileShares?: { fileShare?: [ { accessBasedEnumeration?: boolean(name='AccessBasedEnumeration', example='false'), activeMessages?: long(name='ActiveMessages'), address?: string(name='Address', example='172.16.0.44'), beLimit?: int32(name='BeLimit', example='0'), browsable?: boolean(name='Browsable', example='true'), bucketInfos?: string(name='BucketInfos', example='xxxxx'), bucketsStub?: boolean(name='BucketsStub', example='false'), bypassCacheRead?: boolean(name='BypassCacheRead'), cacheMode?: string(name='CacheMode', example='Cache'), clientSideCmk?: string(name='ClientSideCmk', example='xxxxx'), clientSideEncryption?: boolean(name='ClientSideEncryption', example='false'), directIO?: boolean(name='DirectIO', example='false'), diskId?: string(name='DiskId', example='d-bp1cvy8o2569jij31***'), diskType?: string(name='DiskType', example='cloud_efficiency'), downloadLimit?: int32(name='DownloadLimit', example='0'), downloadQueue?: long(name='DownloadQueue'), downloadRate?: long(name='DownloadRate'), enabled?: boolean(name='Enabled', example='true'), expressSyncId?: string(name='ExpressSyncId', example='sync-0001xv7je357xn8tr***'), fastReclaim?: boolean(name='FastReclaim', example='false'), feLimit?: int32(name='FeLimit', example='0'), fileNumLimit?: long(name='FileNumLimit', example='10200202'), fsSizeLimit?: long(name='FsSizeLimit', example='70368744177664'), highWatermark?: int32(name='HighWatermark'), ignoreDelete?: boolean(name='IgnoreDelete', example='false'), inPlace?: boolean(name='InPlace', example='false'), inRate?: long(name='InRate', example='0'), indexId?: string(name='IndexId', example='NFSale***'), kmsRotatePeriod?: string(name='KmsRotatePeriod', example='0'), lagPeriod?: long(name='LagPeriod', example='5'), localPath?: string(name='LocalPath', example='/dev/vdb'), lowWatermark?: int32(name='LowWatermark'), mnsHealth?: string(name='MnsHealth', example='MNSNotEnabled'), name?: string(name='Name', example='alex***'), nfsV4Optimization?: boolean(name='NfsV4Optimization', example='false'), noPartition?: boolean(name='NoPartition'), obsoleteBuckets?: string(name='ObsoleteBuckets', example='bucket1'), ossBucketName?: string(name='OssBucketName', example='bucketA'), ossBucketSsl?: boolean(name='OssBucketSsl', example='false'), ossEndpoint?: string(name='OssEndpoint', example='oss-cn-hangzhou-internal.aliyuncs.com'), ossHealth?: string(name='OssHealth', example='BucketHealthy'), ossUsed?: long(name='OssUsed', example='0'), outRate?: long(name='OutRate', example='0'), partialSyncPaths?: string(name='PartialSyncPaths', example='xxxxx'), pathPrefix?: string(name='PathPrefix', description='OSS Prefix。', example='testprefix'), pollingInterval?: int32(name='PollingInterval', example='0'), protocol?: string(name='Protocol', example='SMB'), remainingMetaSpace?: long(name='RemainingMetaSpace', example='21308227584'), remoteSync?: boolean(name='RemoteSync', example='false'), remoteSyncDownload?: boolean(name='RemoteSyncDownload', example='false'), roClientList?: string(name='RoClientList', example='user1'), roUserList?: string(name='RoUserList', example='user2'), rwClientList?: string(name='RwClientList', example='user3'), rwUserList?: string(name='RwUserList', example='user4'), serverSideAlgorithm?: string(name='ServerSideAlgorithm'), serverSideCmk?: string(name='ServerSideCmk', example='xxxxx'), serverSideEncryption?: boolean(name='ServerSideEncryption', example='false'), size?: long(name='Size', example='85899345920'), squash?: string(name='Squash', example='root_squash'), state?: string(name='State', example='clean'), status?: string(name='Status'), supportArchive?: boolean(name='SupportArchive', example='false'), syncProgress?: int32(name='SyncProgress', example='-2'), throttling?: boolean(name='Throttling'), totalDownload?: long(name='TotalDownload', example='0'), totalUpload?: long(name='TotalUpload', example='0'), transferAcceleration?: boolean(name='TransferAcceleration', example='false'), uploadQueue?: long(name='UploadQueue'), used?: long(name='Used', example='0'), windowsAcl?: boolean(name='WindowsAcl', example='false'), } ](name='FileShare') }(name='FileShares'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='9A3C3C32-3F37-4658-9D38-945D0799CA0E'), success?: boolean(name='Success', example='true'), } model DescribeGatewayFileSharesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayFileSharesResponseBody(name='body'), } async function describeGatewayFileSharesWithOptions(request: DescribeGatewayFileSharesRequest, runtime: Util.RuntimeOptions): DescribeGatewayFileSharesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.refresh)) { query['Refresh'] = request.refresh; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayFileShares', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayFileShares(request: DescribeGatewayFileSharesRequest): DescribeGatewayFileSharesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayFileSharesWithOptions(request, runtime); } model DescribeGatewayFileStatusRequest { filePath?: string(name='FilePath'), gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayFileStatusResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), status?: string(name='Status'), success?: boolean(name='Success'), } model DescribeGatewayFileStatusResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayFileStatusResponseBody(name='body'), } async function describeGatewayFileStatusWithOptions(request: DescribeGatewayFileStatusRequest, runtime: Util.RuntimeOptions): DescribeGatewayFileStatusResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.filePath)) { query['FilePath'] = request.filePath; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayFileStatus', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayFileStatus(request: DescribeGatewayFileStatusRequest): DescribeGatewayFileStatusResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayFileStatusWithOptions(request, runtime); } model DescribeGatewayImagesRequest { securityToken?: string(name='SecurityToken'), type?: string(name='Type', example='File'), } model DescribeGatewayImagesResponseBody = { code?: string(name='Code', example='200'), images?: { image?: [ { description?: string(name='Description', example='sgw.file.kvm.description'), MD5?: string(name='MD5', example='48f43e6a906b28ed30ec40d8***'), modifiedDate?: string(name='ModifiedDate', example='2019-07-24'), name?: string(name='Name', example='aliyun/file/1.0.40/image/sgw-file-1.0.39.v***'), size?: long(name='Size', example='1063744588'), title?: string(name='Title', example='sgw.file.kvm.title'), type?: string(name='Type', example='application/octet-stream'), url?: string(name='Url', example='http://sgw-gateway.oss-cn-shanghai.aliyuncs.com/aliyun/file/1.0.40/image/sgw-file-1.0.40.qcow2?Expires=1564045229&OSSAccessKeyId=LTAINaSMVqr8***&Signature=%2BoTNVCGWgxis8GMpvpg5NIRkFvE%3D'), version?: string(name='Version', example='1.0.40'), } ](name='Image') }(name='Images'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='30DFF66156-3672-4204-B708-24389F01FC77'), success?: boolean(name='Success', example='true'), } model DescribeGatewayImagesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayImagesResponseBody(name='body'), } async function describeGatewayImagesWithOptions(request: DescribeGatewayImagesRequest, runtime: Util.RuntimeOptions): DescribeGatewayImagesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayImages', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayImages(request: DescribeGatewayImagesRequest): DescribeGatewayImagesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayImagesWithOptions(request, runtime); } model DescribeGatewayInfoRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayInfoResponseBody = { code?: string(name='Code'), gatewayInfos?: { gatewayInfo?: [ { info?: string(name='Info'), time?: long(name='Time'), } ](name='GatewayInfo') }(name='GatewayInfos'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayInfoResponseBody(name='body'), } async function describeGatewayInfoWithOptions(request: DescribeGatewayInfoRequest, runtime: Util.RuntimeOptions): DescribeGatewayInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayInfo(request: DescribeGatewayInfoRequest): DescribeGatewayInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayInfoWithOptions(request, runtime); } model DescribeGatewayLDAPInfoRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayLDAPInfoResponseBody = { baseDN?: string(name='BaseDN', example='dc=sgwte***,dc=local'), code?: string(name='Code', example='200'), isEnabled?: boolean(name='IsEnabled', example='true'), isTls?: boolean(name='IsTls', example='false'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='89398CFB-4EB6-4C7E-BB3C-EF213AC8FA**'), rootDN?: string(name='RootDN', example='cn=admin,dc=sgwte***,dc=local'), serverIp?: string(name='ServerIp', example='47.101.59.188'), success?: boolean(name='Success', example='true'), } model DescribeGatewayLDAPInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayLDAPInfoResponseBody(name='body'), } async function describeGatewayLDAPInfoWithOptions(request: DescribeGatewayLDAPInfoRequest, runtime: Util.RuntimeOptions): DescribeGatewayLDAPInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayLDAPInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayLDAPInfo(request: DescribeGatewayLDAPInfoRequest): DescribeGatewayLDAPInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayLDAPInfoWithOptions(request, runtime); } model DescribeGatewayLocationsRequest { securityToken?: string(name='SecurityToken'), } model DescribeGatewayLocationsResponseBody = { code?: string(name='Code'), locations?: string(name='Locations'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayLocationsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayLocationsResponseBody(name='body'), } async function describeGatewayLocationsWithOptions(request: DescribeGatewayLocationsRequest, runtime: Util.RuntimeOptions): DescribeGatewayLocationsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayLocations', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayLocations(request: DescribeGatewayLocationsRequest): DescribeGatewayLocationsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayLocationsWithOptions(request, runtime); } model DescribeGatewayLoggingRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwb***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayLoggingResponseBody = { code?: string(name='Code', example='200'), gatewayLoggingStatus?: string(name='GatewayLoggingStatus', example='Enabled'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='17D08346-BD08-4107-BFBC-01A6AAD5F5FB'), slsLogstore?: string(name='SlsLogstore', example='alex***'), slsProject?: string(name='SlsProject', example='123***'), success?: boolean(name='Success', example='true'), } model DescribeGatewayLoggingResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayLoggingResponseBody(name='body'), } async function describeGatewayLoggingWithOptions(request: DescribeGatewayLoggingRequest, runtime: Util.RuntimeOptions): DescribeGatewayLoggingResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayLogging', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayLogging(request: DescribeGatewayLoggingRequest): DescribeGatewayLoggingResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayLoggingWithOptions(request, runtime); } model DescribeGatewayLogsRequest { gatewayId?: string(name='GatewayId'), logFilePath?: string(name='LogFilePath'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayLogsResponseBody = { code?: string(name='Code'), logFilePaths?: string(name='LogFilePaths'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewayLogsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayLogsResponseBody(name='body'), } async function describeGatewayLogsWithOptions(request: DescribeGatewayLogsRequest, runtime: Util.RuntimeOptions): DescribeGatewayLogsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.logFilePath)) { query['LogFilePath'] = request.logFilePath; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayLogs', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayLogs(request: DescribeGatewayLogsRequest): DescribeGatewayLogsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayLogsWithOptions(request, runtime); } model DescribeGatewayModificationClassesRequest { gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031***'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayModificationClassesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='FA8951CC-A534-425D-8705-F9A5CF9FD555'), success?: boolean(name='Success', example='true'), targetGatewayClasses?: { targetGatewayClass?: [ { gatewayClass?: string(name='GatewayClass', example='Enhanced'), isAvailable?: boolean(name='IsAvailable', example='true'), } ](name='TargetGatewayClass') }(name='TargetGatewayClasses'), } model DescribeGatewayModificationClassesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayModificationClassesResponseBody(name='body'), } async function describeGatewayModificationClassesWithOptions(request: DescribeGatewayModificationClassesRequest, runtime: Util.RuntimeOptions): DescribeGatewayModificationClassesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayModificationClasses', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayModificationClasses(request: DescribeGatewayModificationClassesRequest): DescribeGatewayModificationClassesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayModificationClassesWithOptions(request, runtime); } model DescribeGatewayNFSClientsRequest { gatewayId?: string(name='GatewayId'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayNFSClientsResponseBody = { clientInfoList?: { clientInfo?: [ { clientIpAddr?: string(name='ClientIpAddr'), hasNFSv3?: boolean(name='HasNFSv3'), hasNFSv40?: boolean(name='HasNFSv40'), hasNFSv41?: boolean(name='HasNFSv41'), } ](name='ClientInfo') }(name='ClientInfoList'), code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), version3Enabled?: boolean(name='Version3Enabled'), version40Enabled?: boolean(name='Version40Enabled'), version41Enabled?: boolean(name='Version41Enabled'), } model DescribeGatewayNFSClientsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayNFSClientsResponseBody(name='body'), } async function describeGatewayNFSClientsWithOptions(request: DescribeGatewayNFSClientsRequest, runtime: Util.RuntimeOptions): DescribeGatewayNFSClientsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayNFSClients', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayNFSClients(request: DescribeGatewayNFSClientsRequest): DescribeGatewayNFSClientsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayNFSClientsWithOptions(request, runtime); } model DescribeGatewaySMBUsersRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbv***'), pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), securityToken?: string(name='SecurityToken'), } model DescribeGatewaySMBUsersResponseBody = { activeDirectory?: boolean(name='ActiveDirectory'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), requestId?: string(name='RequestId', example='4C02F482-FC2E-45BF-88C5-8D40134D11**'), success?: boolean(name='Success', example='true'), totalCount?: int32(name='TotalCount', example='1'), users?: { user?: [ { username?: string(name='Username', example='alex***'), } ](name='User') }(name='Users'), } model DescribeGatewaySMBUsersResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewaySMBUsersResponseBody(name='body'), } async function describeGatewaySMBUsersWithOptions(request: DescribeGatewaySMBUsersRequest, runtime: Util.RuntimeOptions): DescribeGatewaySMBUsersResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewaySMBUsers', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewaySMBUsers(request: DescribeGatewaySMBUsersRequest): DescribeGatewaySMBUsersResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewaySMBUsersWithOptions(request, runtime); } model DescribeGatewayStatisticsRequest { endTimestamp?: long(name='EndTimestamp'), gatewayCategory?: string(name='GatewayCategory'), gatewayLocation?: string(name='GatewayLocation'), securityToken?: string(name='SecurityToken'), startTimestamp?: long(name='StartTimestamp'), targetAccountId?: string(name='TargetAccountId'), } model DescribeGatewayStatisticsResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), result?: string(name='Result'), success?: boolean(name='Success'), } model DescribeGatewayStatisticsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayStatisticsResponseBody(name='body'), } async function describeGatewayStatisticsWithOptions(request: DescribeGatewayStatisticsRequest, runtime: Util.RuntimeOptions): DescribeGatewayStatisticsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.endTimestamp)) { query['EndTimestamp'] = request.endTimestamp; } if (!Util.isUnset(request.gatewayCategory)) { query['GatewayCategory'] = request.gatewayCategory; } if (!Util.isUnset(request.gatewayLocation)) { query['GatewayLocation'] = request.gatewayLocation; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.startTimestamp)) { query['StartTimestamp'] = request.startTimestamp; } if (!Util.isUnset(request.targetAccountId)) { query['TargetAccountId'] = request.targetAccountId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayStatistics', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayStatistics(request: DescribeGatewayStatisticsRequest): DescribeGatewayStatisticsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayStatisticsWithOptions(request, runtime); } model DescribeGatewayStockRequest { gatewayRegionId?: string(name='GatewayRegionId', example='cn-shanghai'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayStockResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='6342F2A5-6E24-415E-8B2B-91D88868C89F'), stocks?: { stock?: [ { stockInfo?: string(name='StockInfo', example='{"Basic":true,"Advanced":false,"Enhanced":false,"Standard":true}'), zoneId?: string(name='ZoneId', example='cn-shanghai-f'), } ](name='Stock') }(name='Stocks'), success?: boolean(name='Success', example='true'), } model DescribeGatewayStockResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayStockResponseBody(name='body'), } async function describeGatewayStockWithOptions(request: DescribeGatewayStockRequest, runtime: Util.RuntimeOptions): DescribeGatewayStockResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayRegionId)) { query['GatewayRegionId'] = request.gatewayRegionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayStock', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayStock(request: DescribeGatewayStockRequest): DescribeGatewayStockResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayStockWithOptions(request, runtime); } model DescribeGatewayTypesRequest { gatewayLocation?: string(name='GatewayLocation', example='Cloud'), securityToken?: string(name='SecurityToken'), } model DescribeGatewayTypesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='787ECFD0-5F30-44C0-BB8F-56A964F66D01'), success?: boolean(name='Success', example='true'), types?: string(name='Types', example='File,Iscsi'), } model DescribeGatewayTypesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewayTypesResponseBody(name='body'), } async function describeGatewayTypesWithOptions(request: DescribeGatewayTypesRequest, runtime: Util.RuntimeOptions): DescribeGatewayTypesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayLocation)) { query['GatewayLocation'] = request.gatewayLocation; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewayTypes', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewayTypes(request: DescribeGatewayTypesRequest): DescribeGatewayTypesResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewayTypesWithOptions(request, runtime); } model DescribeGatewaysRequest { pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId', example='sb-0001b2otnkdxrigeq***'), } model DescribeGatewaysResponseBody = { code?: string(name='Code', example='200'), gateways?: { gateway?: [ { activatedTime?: long(name='ActivatedTime', example='1577179769'), buyURL?: string(name='BuyURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***”,”directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy'), capacity?: int32(name='Capacity'), category?: string(name='Category', example='Aliyun'), commonBuyInstanceId?: string(name='CommonBuyInstanceId', example='gw-0001b2onkdzvl3b***'), createdTime?: long(name='CreatedTime', example='1577179604'), dataLoadInterval?: int32(name='DataLoadInterval'), dataLoadType?: string(name='DataLoadType'), description?: string(name='Description'), ecsInstanceId?: string(name='EcsInstanceId', example='gw-0001b2onkdzvl3b***'), elasticGateway?: boolean(name='ElasticGateway'), elasticNodes?: { elasticNode?: [ string ](name='ElasticNode') }(name='ElasticNodes'), expireStatus?: int32(name='ExpireStatus', example='0'), expiredTime?: long(name='ExpiredTime', example='1532426471'), gatewayClass?: string(name='GatewayClass', example='Advanced'), gatewayId?: string(name='GatewayId', example='gw-0001b2odzvl3b1mhi***'), gatewayRegionId?: string(name='GatewayRegionId'), gatewayType?: string(name='GatewayType', example='File'), gatewayVersion?: string(name='GatewayVersion', example='1.2.6'), highAvailability?: boolean(name='HighAvailability'), innerIp?: string(name='InnerIp', example='172.16.0.21'), innerIpv6Ip?: string(name='InnerIpv6Ip'), ip?: string(name='Ip', example='47.111.145.66'), isPostPaid?: boolean(name='IsPostPaid', example='true'), isReleaseAfterExpiration?: boolean(name='IsReleaseAfterExpiration', example='false'), lastErrorKey?: string(name='LastErrorKey'), location?: string(name='Location', example='Cloud'), maxThroughput?: int32(name='MaxThroughput'), name?: string(name='Name', example='fio-weekly***'), publicNetworkBandwidth?: int32(name='PublicNetworkBandwidth', example='55'), renewURL?: string(name='RenewURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=RENEW&instanceId=ca-0007va9bnideidndnu72#/renew'), status?: string(name='Status', example='Running'), storageBundleId?: string(name='StorageBundleId', example='sb-0001b2otrigeqkso***'), taskId?: string(name='TaskId', example='t-000978oflgrd8ah6p***'), type?: string(name='Type', example='File'), untrustedEnvInstanceType?: string(name='UntrustedEnvInstanceType'), vSwitchId?: string(name='VSwitchId', example='vsw-bp1krhkgnahkb9stp0***'), vpcId?: string(name='VpcId', example='vpc-bp1p0usrgr5z9e7lwr***'), } ](name='Gateway') }(name='Gateways'), message?: string(name='Message', example='successful'), pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), requestId?: string(name='RequestId', example='2C4A8287-66F4-45F9-84E3-866E4232C763'), success?: boolean(name='Success', example='true'), totalCount?: int32(name='TotalCount', example='2'), } model DescribeGatewaysResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewaysResponseBody(name='body'), } async function describeGatewaysWithOptions(request: DescribeGatewaysRequest, runtime: Util.RuntimeOptions): DescribeGatewaysResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGateways', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGateways(request: DescribeGatewaysRequest): DescribeGatewaysResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewaysWithOptions(request, runtime); } model DescribeGatewaysForCmsRequest { gatewayRegionId?: string(name='GatewayRegionId'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), securityToken?: string(name='SecurityToken'), } model DescribeGatewaysForCmsResponseBody = { code?: string(name='Code'), gateways?: { gateway?: [ { description?: string(name='Description'), gatewayId?: string(name='GatewayId'), name?: string(name='Name'), } ](name='Gateway') }(name='Gateways'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), } model DescribeGatewaysForCmsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewaysForCmsResponseBody(name='body'), } async function describeGatewaysForCmsWithOptions(request: DescribeGatewaysForCmsRequest, runtime: Util.RuntimeOptions): DescribeGatewaysForCmsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayRegionId)) { query['GatewayRegionId'] = request.gatewayRegionId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewaysForCms', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewaysForCms(request: DescribeGatewaysForCmsRequest): DescribeGatewaysForCmsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewaysForCmsWithOptions(request, runtime); } model DescribeGatewaysTagsRequest { gatewayIds?: string(name='GatewayIds'), securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId'), tagCategory?: string(name='TagCategory'), } model DescribeGatewaysTagsResponseBody = { code?: string(name='Code'), gatewayTags?: { gatewayTag?: [ { gatewayId?: string(name='GatewayId'), tags?: { tag?: [ { tagKey?: string(name='TagKey'), tagValue?: string(name='TagValue'), } ](name='Tag') }(name='Tags'), } ](name='GatewayTag') }(name='GatewayTags'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeGatewaysTagsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeGatewaysTagsResponseBody(name='body'), } async function describeGatewaysTagsWithOptions(request: DescribeGatewaysTagsRequest, runtime: Util.RuntimeOptions): DescribeGatewaysTagsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayIds)) { query['GatewayIds'] = request.gatewayIds; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } if (!Util.isUnset(request.tagCategory)) { query['TagCategory'] = request.tagCategory; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeGatewaysTags', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeGatewaysTags(request: DescribeGatewaysTagsRequest): DescribeGatewaysTagsResponse { var runtime = new Util.RuntimeOptions{}; return describeGatewaysTagsWithOptions(request, runtime); } model DescribeKmsKeyRequest { gatewayId?: string(name='GatewayId'), kmsKey?: string(name='KmsKey'), securityToken?: string(name='SecurityToken'), } model DescribeKmsKeyResponseBody = { code?: string(name='Code'), isValid?: boolean(name='IsValid'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeKmsKeyResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeKmsKeyResponseBody(name='body'), } async function describeKmsKeyWithOptions(request: DescribeKmsKeyRequest, runtime: Util.RuntimeOptions): DescribeKmsKeyResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.kmsKey)) { query['KmsKey'] = request.kmsKey; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeKmsKey', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeKmsKey(request: DescribeKmsKeyRequest): DescribeKmsKeyResponse { var runtime = new Util.RuntimeOptions{}; return describeKmsKeyWithOptions(request, runtime); } model DescribeMqttConfigRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model DescribeMqttConfigResponseBody = { authType?: string(name='AuthType'), brokerUrl?: string(name='BrokerUrl'), code?: string(name='Code'), groupId?: string(name='GroupId'), internalBrokerUrl?: string(name='InternalBrokerUrl'), isEnabled?: boolean(name='IsEnabled'), message?: string(name='Message'), mqttInstanceId?: string(name='MqttInstanceId'), password?: string(name='Password'), publishTopic?: string(name='PublishTopic'), requestId?: string(name='RequestId'), subscribeTopic?: string(name='SubscribeTopic'), success?: boolean(name='Success'), username?: string(name='Username'), } model DescribeMqttConfigResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeMqttConfigResponseBody(name='body'), } async function describeMqttConfigWithOptions(request: DescribeMqttConfigRequest, runtime: Util.RuntimeOptions): DescribeMqttConfigResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeMqttConfig', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeMqttConfig(request: DescribeMqttConfigRequest): DescribeMqttConfigResponse { var runtime = new Util.RuntimeOptions{}; return describeMqttConfigWithOptions(request, runtime); } model DescribeOssBucketInfoRequest { bucketEndpoint?: string(name='BucketEndpoint'), bucketName?: string(name='BucketName'), gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), type?: string(name='Type'), } model DescribeOssBucketInfoResponseBody = { code?: string(name='Code'), isArchive?: boolean(name='IsArchive'), isBackToResource?: boolean(name='IsBackToResource'), isColdArchive?: boolean(name='IsColdArchive'), isFresh?: boolean(name='IsFresh'), isSupportServerSideEncryption?: boolean(name='IsSupportServerSideEncryption'), isVersioning?: boolean(name='IsVersioning'), message?: string(name='Message'), pollingInterval?: int32(name='PollingInterval'), requestId?: string(name='RequestId'), storageSize?: long(name='StorageSize'), success?: boolean(name='Success'), } model DescribeOssBucketInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeOssBucketInfoResponseBody(name='body'), } async function describeOssBucketInfoWithOptions(request: DescribeOssBucketInfoRequest, runtime: Util.RuntimeOptions): DescribeOssBucketInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketEndpoint)) { query['BucketEndpoint'] = request.bucketEndpoint; } if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.type)) { query['Type'] = request.type; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeOssBucketInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeOssBucketInfo(request: DescribeOssBucketInfoRequest): DescribeOssBucketInfoResponse { var runtime = new Util.RuntimeOptions{}; return describeOssBucketInfoWithOptions(request, runtime); } model DescribeOssBucketsRequest { bucketEndpoint?: string(name='BucketEndpoint'), securityToken?: string(name='SecurityToken'), } model DescribeOssBucketsResponseBody = { buckets?: { bucket?: [ { name?: string(name='Name'), } ](name='Bucket') }(name='Buckets'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeOssBucketsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeOssBucketsResponseBody(name='body'), } async function describeOssBucketsWithOptions(request: DescribeOssBucketsRequest, runtime: Util.RuntimeOptions): DescribeOssBucketsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketEndpoint)) { query['BucketEndpoint'] = request.bucketEndpoint; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeOssBuckets', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeOssBuckets(request: DescribeOssBucketsRequest): DescribeOssBucketsResponse { var runtime = new Util.RuntimeOptions{}; return describeOssBucketsWithOptions(request, runtime); } model DescribePayAsYouGoPriceRequest { gatewayClass?: string(name='GatewayClass'), regionId?: string(name='RegionId'), securityToken?: string(name='SecurityToken'), } model DescribePayAsYouGoPriceResponseBody = { cacheCloudEfficiencySizePrice?: float(name='CacheCloudEfficiencySizePrice'), cacheCloudSSDSizePrice?: float(name='CacheCloudSSDSizePrice'), cacheESSDPl1SizePrice?: float(name='CacheESSDPl1SizePrice'), code?: string(name='Code'), currency?: string(name='Currency'), gatewayClassPrice?: float(name='GatewayClassPrice'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribePayAsYouGoPriceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribePayAsYouGoPriceResponseBody(name='body'), } async function describePayAsYouGoPriceWithOptions(request: DescribePayAsYouGoPriceRequest, runtime: Util.RuntimeOptions): DescribePayAsYouGoPriceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayClass)) { query['GatewayClass'] = request.gatewayClass; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribePayAsYouGoPrice', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describePayAsYouGoPrice(request: DescribePayAsYouGoPriceRequest): DescribePayAsYouGoPriceResponse { var runtime = new Util.RuntimeOptions{}; return describePayAsYouGoPriceWithOptions(request, runtime); } model DescribeRegionsRequest { securityToken?: string(name='SecurityToken'), } model DescribeRegionsResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), regions?: { region?: [ { regionId?: string(name='RegionId', example='cn-hangzhou'), } ](name='Region') }(name='Regions'), requestId?: string(name='RequestId', example='E09C421A-A175-4D21-8928-ADF5643D15F8'), success?: boolean(name='Success', example='true'), } model DescribeRegionsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeRegionsResponseBody(name='body'), } async function describeRegionsWithOptions(request: DescribeRegionsRequest, runtime: Util.RuntimeOptions): DescribeRegionsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeRegions', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeRegions(request: DescribeRegionsRequest): DescribeRegionsResponse { var runtime = new Util.RuntimeOptions{}; return describeRegionsWithOptions(request, runtime); } model DescribeSharesBucketInfoForExpressSyncRequest { bucketName?: string(name='BucketName', example='bucket***'), bucketRegion?: string(name='BucketRegion', example='cn-hangzhou'), securityToken?: string(name='SecurityToken'), } model DescribeSharesBucketInfoForExpressSyncResponseBody = { bucketInfos?: { bucketInfo?: [ { bucketName?: string(name='BucketName', example='zy-1m***'), bucketPrefix?: string(name='BucketPrefix', example='test1'), bucketRegion?: string(name='BucketRegion', example='cn-hangzhou'), } ](name='BucketInfo') }(name='BucketInfos'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='29BD52E7-CF30-418F-A240-E15A9351B666'), success?: boolean(name='Success', example='true'), } model DescribeSharesBucketInfoForExpressSyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeSharesBucketInfoForExpressSyncResponseBody(name='body'), } async function describeSharesBucketInfoForExpressSyncWithOptions(request: DescribeSharesBucketInfoForExpressSyncRequest, runtime: Util.RuntimeOptions): DescribeSharesBucketInfoForExpressSyncResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.bucketRegion)) { query['BucketRegion'] = request.bucketRegion; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeSharesBucketInfoForExpressSync', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeSharesBucketInfoForExpressSync(request: DescribeSharesBucketInfoForExpressSyncRequest): DescribeSharesBucketInfoForExpressSyncResponse { var runtime = new Util.RuntimeOptions{}; return describeSharesBucketInfoForExpressSyncWithOptions(request, runtime); } model DescribeStorageBundleRequest { securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId', example='sb-0007y2889yyxkuqov***'), } model DescribeStorageBundleResponseBody = { backendBucketRegionId?: string(name='BackendBucketRegionId', example='cn-shanghai'), code?: string(name='Code', example='200'), createdTime?: long(name='CreatedTime', example='1657706998'), description?: string(name='Description'), message?: string(name='Message', example='successful'), name?: string(name='Name', example='sdfa***'), requestId?: string(name='RequestId', example='736C7733-FCED-4AFB-8407-C325F210CE03'), storageBundleId?: string(name='StorageBundleId', example='sb-000dt67z4ijqfocpy***'), success?: boolean(name='Success', example='true'), } model DescribeStorageBundleResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeStorageBundleResponseBody(name='body'), } async function describeStorageBundleWithOptions(request: DescribeStorageBundleRequest, runtime: Util.RuntimeOptions): DescribeStorageBundleResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeStorageBundle', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeStorageBundle(request: DescribeStorageBundleRequest): DescribeStorageBundleResponse { var runtime = new Util.RuntimeOptions{}; return describeStorageBundleWithOptions(request, runtime); } model DescribeStorageBundlesRequest { backendBucketRegionId?: string(name='BackendBucketRegionId', example='cn-hangzhou'), pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), securityToken?: string(name='SecurityToken'), } model DescribeStorageBundlesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), requestId?: string(name='RequestId', example='1EB4639B-0812-4F2D-AB78-194E67645E357'), storageBundles?: { storageBundle?: [ { backendBucketRegionId?: string(name='BackendBucketRegionId', example='cn-hangzhou'), createdTime?: long(name='CreatedTime', example='1565750633'), description?: string(name='Description'), name?: string(name='Name', example='zy-test***'), storageBundleId?: string(name='StorageBundleId', example='sb-000ibk4xrlr03qrjr***'), } ](name='StorageBundle') }(name='StorageBundles'), success?: boolean(name='Success', example='true'), totalCount?: int32(name='TotalCount', example='20'), } model DescribeStorageBundlesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeStorageBundlesResponseBody(name='body'), } async function describeStorageBundlesWithOptions(request: DescribeStorageBundlesRequest, runtime: Util.RuntimeOptions): DescribeStorageBundlesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.backendBucketRegionId)) { query['BackendBucketRegionId'] = request.backendBucketRegionId; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeStorageBundles', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeStorageBundles(request: DescribeStorageBundlesRequest): DescribeStorageBundlesResponse { var runtime = new Util.RuntimeOptions{}; return describeStorageBundlesWithOptions(request, runtime); } model DescribeSubscriptionPriceRequest { cacheCloudEfficiencySize?: long(name='CacheCloudEfficiencySize'), cacheESSDPl1Size?: long(name='CacheESSDPl1Size'), cacheSSDSize?: long(name='CacheSSDSize'), gatewayClass?: string(name='GatewayClass'), periodQuantity?: int32(name='PeriodQuantity'), periodUnit?: string(name='PeriodUnit'), regionId?: string(name='RegionId'), securityToken?: string(name='SecurityToken'), } model DescribeSubscriptionPriceResponseBody = { code?: string(name='Code'), currency?: string(name='Currency'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), tradePrice?: float(name='TradePrice'), } model DescribeSubscriptionPriceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeSubscriptionPriceResponseBody(name='body'), } async function describeSubscriptionPriceWithOptions(request: DescribeSubscriptionPriceRequest, runtime: Util.RuntimeOptions): DescribeSubscriptionPriceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheCloudEfficiencySize)) { query['CacheCloudEfficiencySize'] = request.cacheCloudEfficiencySize; } if (!Util.isUnset(request.cacheESSDPl1Size)) { query['CacheESSDPl1Size'] = request.cacheESSDPl1Size; } if (!Util.isUnset(request.cacheSSDSize)) { query['CacheSSDSize'] = request.cacheSSDSize; } if (!Util.isUnset(request.gatewayClass)) { query['GatewayClass'] = request.gatewayClass; } if (!Util.isUnset(request.periodQuantity)) { query['PeriodQuantity'] = request.periodQuantity; } if (!Util.isUnset(request.periodUnit)) { query['PeriodUnit'] = request.periodUnit; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeSubscriptionPrice', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeSubscriptionPrice(request: DescribeSubscriptionPriceRequest): DescribeSubscriptionPriceResponse { var runtime = new Util.RuntimeOptions{}; return describeSubscriptionPriceWithOptions(request, runtime); } model DescribeTasksRequest { pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), securityToken?: string(name='SecurityToken'), targetId?: string(name='TargetId', example='sync-0001xv757xl9sn548***'), taskId?: string(name='TaskId', example='t-0001xv7je357xl9n***'), } model DescribeTasksResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), pageNumber?: int32(name='PageNumber', example='1'), pageSize?: int32(name='PageSize', example='10'), requestId?: string(name='RequestId', example='8E9C6D43-4603-4F05-BE76-677A05EDFB7A'), success?: boolean(name='Success', example='true'), tasks?: { simpleTask?: [ { createdTime?: long(name='CreatedTime', example='1578367229'), messageKey?: string(name='MessageKey', example='xxxxxxxxxx'), name?: string(name='Name', example='task.name.operate_fast_sync.delete'), progress?: int32(name='Progress', example='100'), relatedResourceId?: string(name='RelatedResourceId'), stateCode?: string(name='StateCode', example='task.state.completed'), taskId?: string(name='TaskId', example='t-0001xv7je357xl9n***'), updatedTime?: long(name='UpdatedTime', example='1578367230'), } ](name='SimpleTask') }(name='Tasks'), totalCount?: int32(name='TotalCount', example='1'), } model DescribeTasksResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeTasksResponseBody(name='body'), } async function describeTasksWithOptions(request: DescribeTasksRequest, runtime: Util.RuntimeOptions): DescribeTasksResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.targetId)) { query['TargetId'] = request.targetId; } if (!Util.isUnset(request.taskId)) { query['TaskId'] = request.taskId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeTasks', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeTasks(request: DescribeTasksRequest): DescribeTasksResponse { var runtime = new Util.RuntimeOptions{}; return describeTasksWithOptions(request, runtime); } model DescribeUserBusinessStatusRequest { securityToken?: string(name='SecurityToken'), } model DescribeUserBusinessStatusResponseBody = { code?: string(name='Code'), isEnabled?: boolean(name='IsEnabled'), isIndebted?: boolean(name='IsIndebted'), isIndebtedOverdue?: boolean(name='IsIndebtedOverdue'), isRiskControl?: boolean(name='IsRiskControl'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model DescribeUserBusinessStatusResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeUserBusinessStatusResponseBody(name='body'), } async function describeUserBusinessStatusWithOptions(request: DescribeUserBusinessStatusRequest, runtime: Util.RuntimeOptions): DescribeUserBusinessStatusResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeUserBusinessStatus', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeUserBusinessStatus(request: DescribeUserBusinessStatusRequest): DescribeUserBusinessStatusResponse { var runtime = new Util.RuntimeOptions{}; return describeUserBusinessStatusWithOptions(request, runtime); } model DescribeVSwitchesRequest { name?: string(name='Name'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), resourceRegionId?: string(name='ResourceRegionId'), securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId'), vSwitchId?: string(name='VSwitchId'), vpcId?: string(name='VpcId'), } model DescribeVSwitchesResponseBody = { code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), vSwitches?: { vSwitch?: [ { availableSelectionInfo?: string(name='AvailableSelectionInfo'), id?: string(name='Id'), isDefault?: boolean(name='IsDefault'), name?: string(name='Name'), zoneId?: string(name='ZoneId'), } ](name='VSwitch') }(name='VSwitches'), } model DescribeVSwitchesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeVSwitchesResponseBody(name='body'), } async function describeVSwitchesWithOptions(request: DescribeVSwitchesRequest, runtime: Util.RuntimeOptions): DescribeVSwitchesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.resourceRegionId)) { query['ResourceRegionId'] = request.resourceRegionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } if (!Util.isUnset(request.vSwitchId)) { query['VSwitchId'] = request.vSwitchId; } if (!Util.isUnset(request.vpcId)) { query['VpcId'] = request.vpcId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeVSwitches', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeVSwitches(request: DescribeVSwitchesRequest): DescribeVSwitchesResponse { var runtime = new Util.RuntimeOptions{}; return describeVSwitchesWithOptions(request, runtime); } model DescribeVpcsRequest { name?: string(name='Name'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), resourceRegionId?: string(name='ResourceRegionId'), securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId'), vpcId?: string(name='VpcId'), } model DescribeVpcsResponseBody = { code?: string(name='Code'), message?: string(name='Message'), pageNumber?: int32(name='PageNumber'), pageSize?: int32(name='PageSize'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), totalCount?: int32(name='TotalCount'), vpcs?: { vpc?: [ { cidrBlock?: string(name='CidrBlock'), id?: string(name='Id'), isDefault?: boolean(name='IsDefault'), name?: string(name='Name'), } ](name='Vpc') }(name='Vpcs'), } model DescribeVpcsResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeVpcsResponseBody(name='body'), } async function describeVpcsWithOptions(request: DescribeVpcsRequest, runtime: Util.RuntimeOptions): DescribeVpcsResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.pageNumber)) { query['PageNumber'] = request.pageNumber; } if (!Util.isUnset(request.pageSize)) { query['PageSize'] = request.pageSize; } if (!Util.isUnset(request.resourceRegionId)) { query['ResourceRegionId'] = request.resourceRegionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } if (!Util.isUnset(request.vpcId)) { query['VpcId'] = request.vpcId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeVpcs', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeVpcs(request: DescribeVpcsRequest): DescribeVpcsResponse { var runtime = new Util.RuntimeOptions{}; return describeVpcsWithOptions(request, runtime); } model DescribeZonesRequest { regionId?: string(name='RegionId'), securityToken?: string(name='SecurityToken'), } model DescribeZonesResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), zones?: { zone?: [ { zoneId?: string(name='ZoneId'), } ](name='Zone') }(name='Zones'), } model DescribeZonesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DescribeZonesResponseBody(name='body'), } async function describeZonesWithOptions(request: DescribeZonesRequest, runtime: Util.RuntimeOptions): DescribeZonesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DescribeZones', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function describeZones(request: DescribeZonesRequest): DescribeZonesResponse { var runtime = new Util.RuntimeOptions{}; return describeZonesWithOptions(request, runtime); } model DisableGatewayLoggingRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwb***'), securityToken?: string(name='SecurityToken'), } model DisableGatewayLoggingResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='25288205-A591-4AA9-ACF8-427E8727A9D3'), success?: boolean(name='Success', example='true'), } model DisableGatewayLoggingResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DisableGatewayLoggingResponseBody(name='body'), } async function disableGatewayLoggingWithOptions(request: DisableGatewayLoggingRequest, runtime: Util.RuntimeOptions): DisableGatewayLoggingResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DisableGatewayLogging', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function disableGatewayLogging(request: DisableGatewayLoggingRequest): DisableGatewayLoggingResponse { var runtime = new Util.RuntimeOptions{}; return disableGatewayLoggingWithOptions(request, runtime); } model DisableGatewayNFSVersionRequest { gatewayId?: string(name='GatewayId'), NFSVersion?: string(name='NFSVersion'), securityToken?: string(name='SecurityToken'), } model DisableGatewayNFSVersionResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model DisableGatewayNFSVersionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: DisableGatewayNFSVersionResponseBody(name='body'), } async function disableGatewayNFSVersionWithOptions(request: DisableGatewayNFSVersionRequest, runtime: Util.RuntimeOptions): DisableGatewayNFSVersionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.NFSVersion)) { query['NFSVersion'] = request.NFSVersion; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'DisableGatewayNFSVersion', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function disableGatewayNFSVersion(request: DisableGatewayNFSVersionRequest): DisableGatewayNFSVersionResponse { var runtime = new Util.RuntimeOptions{}; return disableGatewayNFSVersionWithOptions(request, runtime); } model EnableGatewayIpv6Request { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model EnableGatewayIpv6ResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model EnableGatewayIpv6Response = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: EnableGatewayIpv6ResponseBody(name='body'), } async function enableGatewayIpv6WithOptions(request: EnableGatewayIpv6Request, runtime: Util.RuntimeOptions): EnableGatewayIpv6Response { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'EnableGatewayIpv6', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function enableGatewayIpv6(request: EnableGatewayIpv6Request): EnableGatewayIpv6Response { var runtime = new Util.RuntimeOptions{}; return enableGatewayIpv6WithOptions(request, runtime); } model EnableGatewayLoggingRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbv***'), securityToken?: string(name='SecurityToken'), } model EnableGatewayLoggingResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='CAE39768-CE96-4E16-A9F7-1FF9AE8E3FBF'), success?: boolean(name='Success', example='true'), } model EnableGatewayLoggingResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: EnableGatewayLoggingResponseBody(name='body'), } async function enableGatewayLoggingWithOptions(request: EnableGatewayLoggingRequest, runtime: Util.RuntimeOptions): EnableGatewayLoggingResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'EnableGatewayLogging', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function enableGatewayLogging(request: EnableGatewayLoggingRequest): EnableGatewayLoggingResponse { var runtime = new Util.RuntimeOptions{}; return enableGatewayLoggingWithOptions(request, runtime); } model ExpandCacheDiskRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), localFilePath?: string(name='LocalFilePath', example='/dev/vdb'), newSizeInGB?: int32(name='NewSizeInGB', example='101'), securityToken?: string(name='SecurityToken'), } model ExpandCacheDiskResponseBody = { buyURL?: string(name='BuyURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***”,”directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='F8B59F29-453D-49BF-8673-EEB8F9F2D5C6'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000eg44nmxbsh3qk3***'), } model ExpandCacheDiskResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ExpandCacheDiskResponseBody(name='body'), } async function expandCacheDiskWithOptions(request: ExpandCacheDiskRequest, runtime: Util.RuntimeOptions): ExpandCacheDiskResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.localFilePath)) { query['LocalFilePath'] = request.localFilePath; } if (!Util.isUnset(request.newSizeInGB)) { query['NewSizeInGB'] = request.newSizeInGB; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ExpandCacheDisk', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function expandCacheDisk(request: ExpandCacheDiskRequest): ExpandCacheDiskResponse { var runtime = new Util.RuntimeOptions{}; return expandCacheDiskWithOptions(request, runtime); } model ExpandGatewayFileShareRequest { gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), } model ExpandGatewayFileShareResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model ExpandGatewayFileShareResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ExpandGatewayFileShareResponseBody(name='body'), } async function expandGatewayFileShareWithOptions(request: ExpandGatewayFileShareRequest, runtime: Util.RuntimeOptions): ExpandGatewayFileShareResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ExpandGatewayFileShare', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function expandGatewayFileShare(request: ExpandGatewayFileShareRequest): ExpandGatewayFileShareResponse { var runtime = new Util.RuntimeOptions{}; return expandGatewayFileShareWithOptions(request, runtime); } model ExpandGatewayNetworkBandwidthRequest { gatewayId?: string(name='GatewayId'), newNetworkBandwidth?: int32(name='NewNetworkBandwidth'), securityToken?: string(name='SecurityToken'), } model ExpandGatewayNetworkBandwidthResponseBody = { buyURL?: string(name='BuyURL'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model ExpandGatewayNetworkBandwidthResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ExpandGatewayNetworkBandwidthResponseBody(name='body'), } async function expandGatewayNetworkBandwidthWithOptions(request: ExpandGatewayNetworkBandwidthRequest, runtime: Util.RuntimeOptions): ExpandGatewayNetworkBandwidthResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.newNetworkBandwidth)) { query['NewNetworkBandwidth'] = request.newNetworkBandwidth; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ExpandGatewayNetworkBandwidth', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function expandGatewayNetworkBandwidth(request: ExpandGatewayNetworkBandwidthRequest): ExpandGatewayNetworkBandwidthResponse { var runtime = new Util.RuntimeOptions{}; return expandGatewayNetworkBandwidthWithOptions(request, runtime); } model GenerateGatewayTokenRequest { gatewayId?: string(name='GatewayId', example='gw-000do8l6anyk2iklv***'), securityToken?: string(name='SecurityToken'), } model GenerateGatewayTokenResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='8E9C6D43-4603-4F05-BE76-677A05EDFB7A'), success?: boolean(name='Success', example='true'), token?: string(name='Token', example='xxxxx'), } model GenerateGatewayTokenResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GenerateGatewayTokenResponseBody(name='body'), } async function generateGatewayTokenWithOptions(request: GenerateGatewayTokenRequest, runtime: Util.RuntimeOptions): GenerateGatewayTokenResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GenerateGatewayToken', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function generateGatewayToken(request: GenerateGatewayTokenRequest): GenerateGatewayTokenResponse { var runtime = new Util.RuntimeOptions{}; return generateGatewayTokenWithOptions(request, runtime); } model GenerateMqttTokenRequest { clientUUID?: string(name='ClientUUID'), gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), } model GenerateMqttTokenResponseBody = { code?: string(name='Code'), message?: string(name='Message'), mqttToken?: string(name='MqttToken'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model GenerateMqttTokenResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GenerateMqttTokenResponseBody(name='body'), } async function generateMqttTokenWithOptions(request: GenerateMqttTokenRequest, runtime: Util.RuntimeOptions): GenerateMqttTokenResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GenerateMqttToken', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function generateMqttToken(request: GenerateMqttTokenRequest): GenerateMqttTokenResponse { var runtime = new Util.RuntimeOptions{}; return generateMqttTokenWithOptions(request, runtime); } model GenerateStsTokenRequest { expireInSeconds?: long(name='ExpireInSeconds'), gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), tokenType?: string(name='TokenType'), } model GenerateStsTokenResponseBody = { accessKeyId?: string(name='AccessKeyId'), accessKeySecret?: string(name='AccessKeySecret'), code?: string(name='Code'), environment?: string(name='Environment'), expiration?: string(name='Expiration'), message?: string(name='Message'), requestId?: string(name='RequestId'), securityToken?: string(name='SecurityToken'), success?: boolean(name='Success'), supportBundleTarget?: string(name='SupportBundleTarget'), } model GenerateStsTokenResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: GenerateStsTokenResponseBody(name='body'), } async function generateStsTokenWithOptions(request: GenerateStsTokenRequest, runtime: Util.RuntimeOptions): GenerateStsTokenResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.expireInSeconds)) { query['ExpireInSeconds'] = request.expireInSeconds; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.tokenType)) { query['TokenType'] = request.tokenType; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'GenerateStsToken', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function generateStsToken(request: GenerateStsTokenRequest): GenerateStsTokenResponse { var runtime = new Util.RuntimeOptions{}; return generateStsTokenWithOptions(request, runtime); } model HandleGatewayAutoPlanRequest { cancel?: boolean(name='Cancel'), delayHours?: int32(name='DelayHours'), gatewayId?: string(name='GatewayId'), planId?: string(name='PlanId'), securityToken?: string(name='SecurityToken'), } model HandleGatewayAutoPlanResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model HandleGatewayAutoPlanResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: HandleGatewayAutoPlanResponseBody(name='body'), } async function handleGatewayAutoPlanWithOptions(request: HandleGatewayAutoPlanRequest, runtime: Util.RuntimeOptions): HandleGatewayAutoPlanResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cancel)) { query['Cancel'] = request.cancel; } if (!Util.isUnset(request.delayHours)) { query['DelayHours'] = request.delayHours; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.planId)) { query['PlanId'] = request.planId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'HandleGatewayAutoPlan', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function handleGatewayAutoPlan(request: HandleGatewayAutoPlanRequest): HandleGatewayAutoPlanResponse { var runtime = new Util.RuntimeOptions{}; return handleGatewayAutoPlanWithOptions(request, runtime); } model ListTagResourcesRequest { nextToken?: string(name='NextToken', example='212db86sca4384811e0b5e8707ec21345'), regionId?: string(name='RegionId', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', example='gw-uf6wjk5xxxxxxx'), resourceRegionId?: string(name='ResourceRegionId'), resourceType?: string(name='ResourceType', example='GATEWAY'), securityToken?: string(name='SecurityToken'), tag?: [ { key?: string(name='Key', example='testkey1'), value?: string(name='Value', example='testvalue1'), } ](name='Tag'), } model ListTagResourcesResponseBody = { nextToken?: string(name='NextToken', example='212db86sca4384811e0b5e8707ec21345'), requestId?: string(name='RequestId', example='47A514A1-4B77-4E30-B4C5-2A880650B3FD'), tagResources?: { tagResource?: [ { resourceId?: string(name='ResourceId', example='47A514A1-4B77-4E30-B4C5-2A880650B3FD'), resourceType?: string(name='ResourceType', example='ALIYUN::HCS_SGW::GATEWAY'), tagKey?: string(name='TagKey', example='testkey1'), tagValue?: string(name='TagValue', example='testvalue1'), } ](name='TagResource') }(name='TagResources'), } model ListTagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ListTagResourcesResponseBody(name='body'), } async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.nextToken)) { query['NextToken'] = request.nextToken; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceRegionId)) { query['ResourceRegionId'] = request.resourceRegionId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ListTagResources', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return listTagResourcesWithOptions(request, runtime); } model ModifyGatewayRequest { description?: string(name='Description'), gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031y***'), name?: string(name='Name', example='alex***'), securityToken?: string(name='SecurityToken'), } model ModifyGatewayResponseBody = { code?: string(name='Code', example='200'), gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031y***'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='220E7407-DF77-428D-8955-B02CF8F82D07'), success?: boolean(name='Success', example='true'), } model ModifyGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyGatewayResponseBody(name='body'), } async function modifyGatewayWithOptions(request: ModifyGatewayRequest, runtime: Util.RuntimeOptions): ModifyGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function modifyGateway(request: ModifyGatewayRequest): ModifyGatewayResponse { var runtime = new Util.RuntimeOptions{}; return modifyGatewayWithOptions(request, runtime); } model ModifyGatewayBlockVolumeRequest { cacheConfig?: string(name='CacheConfig'), gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), securityToken?: string(name='SecurityToken'), } model ModifyGatewayBlockVolumeResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model ModifyGatewayBlockVolumeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyGatewayBlockVolumeResponseBody(name='body'), } async function modifyGatewayBlockVolumeWithOptions(request: ModifyGatewayBlockVolumeRequest, runtime: Util.RuntimeOptions): ModifyGatewayBlockVolumeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheConfig)) { query['CacheConfig'] = request.cacheConfig; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyGatewayBlockVolume', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function modifyGatewayBlockVolume(request: ModifyGatewayBlockVolumeRequest): ModifyGatewayBlockVolumeResponse { var runtime = new Util.RuntimeOptions{}; return modifyGatewayBlockVolumeWithOptions(request, runtime); } model ModifyGatewayClassRequest { gatewayClass?: string(name='GatewayClass', example='Enhanced'), gatewayId?: string(name='GatewayId', example='gw-0001xv7580031yzun***'), securityToken?: string(name='SecurityToken'), } model ModifyGatewayClassResponseBody = { buyURL?: string(name='BuyURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&orderType=UPGRADE&instanceId=gw-000c6hshwukjwc7e1***#/upgrade'), code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='395B1136-982E-4F95-BDCE-7323FFEF499E'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je3580bx6v***'), } model ModifyGatewayClassResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyGatewayClassResponseBody(name='body'), } async function modifyGatewayClassWithOptions(request: ModifyGatewayClassRequest, runtime: Util.RuntimeOptions): ModifyGatewayClassResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayClass)) { query['GatewayClass'] = request.gatewayClass; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyGatewayClass', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function modifyGatewayClass(request: ModifyGatewayClassRequest): ModifyGatewayClassResponse { var runtime = new Util.RuntimeOptions{}; return modifyGatewayClassWithOptions(request, runtime); } model ModifyGatewayFileShareRequest { cacheConfig?: string(name='CacheConfig'), gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), securityToken?: string(name='SecurityToken'), } model ModifyGatewayFileShareResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model ModifyGatewayFileShareResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyGatewayFileShareResponseBody(name='body'), } async function modifyGatewayFileShareWithOptions(request: ModifyGatewayFileShareRequest, runtime: Util.RuntimeOptions): ModifyGatewayFileShareResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.cacheConfig)) { query['CacheConfig'] = request.cacheConfig; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyGatewayFileShare', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function modifyGatewayFileShare(request: ModifyGatewayFileShareRequest): ModifyGatewayFileShareResponse { var runtime = new Util.RuntimeOptions{}; return modifyGatewayFileShareWithOptions(request, runtime); } model ModifyGatewayFileShareWatermarkRequest { gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), securityToken?: string(name='SecurityToken'), watermark?: int32(name='Watermark'), } model ModifyGatewayFileShareWatermarkResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model ModifyGatewayFileShareWatermarkResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyGatewayFileShareWatermarkResponseBody(name='body'), } async function modifyGatewayFileShareWatermarkWithOptions(request: ModifyGatewayFileShareWatermarkRequest, runtime: Util.RuntimeOptions): ModifyGatewayFileShareWatermarkResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.watermark)) { query['Watermark'] = request.watermark; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyGatewayFileShareWatermark', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function modifyGatewayFileShareWatermark(request: ModifyGatewayFileShareWatermarkRequest): ModifyGatewayFileShareWatermarkResponse { var runtime = new Util.RuntimeOptions{}; return modifyGatewayFileShareWatermarkWithOptions(request, runtime); } model ModifyStorageBundleRequest { description?: string(name='Description'), name?: string(name='Name', example='alex-123***'), securityToken?: string(name='SecurityToken'), storageBundleId?: string(name='StorageBundleId', example='sb-000ibk4xrlr03qrjr***'), } model ModifyStorageBundleResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='70EACC9C-D07A-4A34-ADA4-77506C42777'), storageBundleId?: string(name='StorageBundleId', example='sb-000ibk4xrlr03qr***'), success?: boolean(name='Success', example='true'), } model ModifyStorageBundleResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ModifyStorageBundleResponseBody(name='body'), } async function modifyStorageBundleWithOptions(request: ModifyStorageBundleRequest, runtime: Util.RuntimeOptions): ModifyStorageBundleResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.description)) { query['Description'] = request.description; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ModifyStorageBundle', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function modifyStorageBundle(request: ModifyStorageBundleRequest): ModifyStorageBundleResponse { var runtime = new Util.RuntimeOptions{}; return modifyStorageBundleWithOptions(request, runtime); } model OpenSgwServiceResponseBody = { orderId?: string(name='OrderId'), requestId?: string(name='RequestId'), } model OpenSgwServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: OpenSgwServiceResponseBody(name='body'), } async function openSgwServiceWithOptions(runtime: Util.RuntimeOptions): OpenSgwServiceResponse { var req = new OpenApi.OpenApiRequest{}; var params = new OpenApi.Params{ action = 'OpenSgwService', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function openSgwService(): OpenSgwServiceResponse { var runtime = new Util.RuntimeOptions{}; return openSgwServiceWithOptions(runtime); } model OperateGatewayRequest { gatewayId?: string(name='GatewayId'), operateAction?: string(name='OperateAction'), params?: string(name='Params'), securityToken?: string(name='SecurityToken'), } model OperateGatewayResponseBody = { buyURL?: string(name='BuyURL'), code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model OperateGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: OperateGatewayResponseBody(name='body'), } async function operateGatewayWithOptions(request: OperateGatewayRequest, runtime: Util.RuntimeOptions): OperateGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.operateAction)) { query['OperateAction'] = request.operateAction; } if (!Util.isUnset(request.params)) { query['Params'] = request.params; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'OperateGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function operateGateway(request: OperateGatewayRequest): OperateGatewayResponse { var runtime = new Util.RuntimeOptions{}; return operateGatewayWithOptions(request, runtime); } model ReleaseServiceRequest { securityToken?: string(name='SecurityToken'), } model ReleaseServiceResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model ReleaseServiceResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ReleaseServiceResponseBody(name='body'), } async function releaseServiceWithOptions(request: ReleaseServiceRequest, runtime: Util.RuntimeOptions): ReleaseServiceResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ReleaseService', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function releaseService(request: ReleaseServiceRequest): ReleaseServiceResponse { var runtime = new Util.RuntimeOptions{}; return releaseServiceWithOptions(request, runtime); } model RemoveSharesFromExpressSyncRequest { expressSyncId?: string(name='ExpressSyncId', example='sync-0001xv7je357xn8tr***'), gatewayShares?: string(name='GatewayShares', example='{"gw-000gwgp0j3jp8cb3t***":"share1,share2","gw-0001b2otnkdzte62j***":"weekly"}'), securityToken?: string(name='SecurityToken'), } model RemoveSharesFromExpressSyncResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='1EDBC004-6B1C-4511-ACF5-0B4875BA3B22'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je357xr6ql***'), } model RemoveSharesFromExpressSyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RemoveSharesFromExpressSyncResponseBody(name='body'), } async function removeSharesFromExpressSyncWithOptions(request: RemoveSharesFromExpressSyncRequest, runtime: Util.RuntimeOptions): RemoveSharesFromExpressSyncResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.expressSyncId)) { query['ExpressSyncId'] = request.expressSyncId; } if (!Util.isUnset(request.gatewayShares)) { query['GatewayShares'] = request.gatewayShares; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RemoveSharesFromExpressSync', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function removeSharesFromExpressSync(request: RemoveSharesFromExpressSyncRequest): RemoveSharesFromExpressSyncResponse { var runtime = new Util.RuntimeOptions{}; return removeSharesFromExpressSyncWithOptions(request, runtime); } model RemoveTagsFromGatewayRequest { gatewayId?: string(name='GatewayId'), securityToken?: string(name='SecurityToken'), tags?: string(name='Tags'), } model RemoveTagsFromGatewayResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model RemoveTagsFromGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RemoveTagsFromGatewayResponseBody(name='body'), } async function removeTagsFromGatewayWithOptions(request: RemoveTagsFromGatewayRequest, runtime: Util.RuntimeOptions): RemoveTagsFromGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.tags)) { query['Tags'] = request.tags; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RemoveTagsFromGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function removeTagsFromGateway(request: RemoveTagsFromGatewayRequest): RemoveTagsFromGatewayResponse { var runtime = new Util.RuntimeOptions{}; return removeTagsFromGatewayWithOptions(request, runtime); } model ReportBlockVolumesRequest { clientUUID?: string(name='ClientUUID'), gatewayId?: string(name='GatewayId'), info?: string(name='Info'), securityToken?: string(name='SecurityToken'), } model ReportBlockVolumesResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model ReportBlockVolumesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ReportBlockVolumesResponseBody(name='body'), } async function reportBlockVolumesWithOptions(request: ReportBlockVolumesRequest, runtime: Util.RuntimeOptions): ReportBlockVolumesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.info)) { query['Info'] = request.info; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ReportBlockVolumes', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function reportBlockVolumes(request: ReportBlockVolumesRequest): ReportBlockVolumesResponse { var runtime = new Util.RuntimeOptions{}; return reportBlockVolumesWithOptions(request, runtime); } model ReportFileSharesRequest { clientUUID?: string(name='ClientUUID'), gatewayId?: string(name='GatewayId'), info?: string(name='Info'), securityToken?: string(name='SecurityToken'), } model ReportFileSharesResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model ReportFileSharesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ReportFileSharesResponseBody(name='body'), } async function reportFileSharesWithOptions(request: ReportFileSharesRequest, runtime: Util.RuntimeOptions): ReportFileSharesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.info)) { query['Info'] = request.info; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ReportFileShares', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function reportFileShares(request: ReportFileSharesRequest): ReportFileSharesResponse { var runtime = new Util.RuntimeOptions{}; return reportFileSharesWithOptions(request, runtime); } model ReportGatewayInfoRequest { clientUUID?: string(name='ClientUUID', example='28c07861-a93b-4aa2-ae3a-3f7b7e7f6184'), gatewayId?: string(name='GatewayId', example='gw-1234567890abcd'), gatewayStatus?: string(name='GatewayStatus', example='running'), info?: string(name='Info', example='{"ReadIOPS":16,"OSSStorageUsage":2331983505,"CPUSys":4,"CPUUser":24,"CPUIdle":72,"DiskWrite":16384,"NetRecv":3071,"NetSend":5525,"UsedCacheSize":181395456,"WriteIOPS":4,"MemUsed":4340056064,"DiskRead":348160,"MemFree":498073600}'), securityToken?: string(name='SecurityToken'), time?: long(name='Time', example='1528436020'), } model ReportGatewayInfoResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='5C109361-5F29-467D-D4A3-1131A8DA1A72'), success?: boolean(name='Success', example='true'), } model ReportGatewayInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ReportGatewayInfoResponseBody(name='body'), } async function reportGatewayInfoWithOptions(request: ReportGatewayInfoRequest, runtime: Util.RuntimeOptions): ReportGatewayInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.gatewayStatus)) { query['GatewayStatus'] = request.gatewayStatus; } if (!Util.isUnset(request.info)) { query['Info'] = request.info; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.time)) { query['Time'] = request.time; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ReportGatewayInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function reportGatewayInfo(request: ReportGatewayInfoRequest): ReportGatewayInfoResponse { var runtime = new Util.RuntimeOptions{}; return reportGatewayInfoWithOptions(request, runtime); } model ReportGatewayUsageRequest { clientUUID?: string(name='ClientUUID', example='28c07861-a93b-4aa2-ae3a-3f7b7e7f6184'), gatewayId?: string(name='GatewayId', example='gw-1234567890abcd'), securityToken?: string(name='SecurityToken'), usage?: string(name='Usage', example='{"VolumeCount":5,"NfsCount":2,"CacheCapacity":123456789000,"CifsCount":3}'), } model ReportGatewayUsageResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='5C109361-5F29-467D-D4A3-1131A8DA1A72'), success?: boolean(name='Success', example='true'), } model ReportGatewayUsageResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ReportGatewayUsageResponseBody(name='body'), } async function reportGatewayUsageWithOptions(request: ReportGatewayUsageRequest, runtime: Util.RuntimeOptions): ReportGatewayUsageResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientUUID)) { query['ClientUUID'] = request.clientUUID; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.usage)) { query['Usage'] = request.usage; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ReportGatewayUsage', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function reportGatewayUsage(request: ReportGatewayUsageRequest): ReportGatewayUsageResponse { var runtime = new Util.RuntimeOptions{}; return reportGatewayUsageWithOptions(request, runtime); } model ResetGatewayPasswordRequest { gatewayId?: string(name='GatewayId'), password?: string(name='Password'), securityToken?: string(name='SecurityToken'), username?: string(name='Username'), } model ResetGatewayPasswordResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model ResetGatewayPasswordResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ResetGatewayPasswordResponseBody(name='body'), } async function resetGatewayPasswordWithOptions(request: ResetGatewayPasswordRequest, runtime: Util.RuntimeOptions): ResetGatewayPasswordResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.password)) { query['Password'] = request.password; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.username)) { query['Username'] = request.username; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ResetGatewayPassword', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function resetGatewayPassword(request: ResetGatewayPasswordRequest): ResetGatewayPasswordResponse { var runtime = new Util.RuntimeOptions{}; return resetGatewayPasswordWithOptions(request, runtime); } model RestartFileSharesRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), shareProtocol?: string(name='ShareProtocol', example='NFS'), } model RestartFileSharesResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='89398CFB-4EB6-4C7E-BB3C-EF213AC8FA**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000czaedx5koz578v***'), } model RestartFileSharesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: RestartFileSharesResponseBody(name='body'), } async function restartFileSharesWithOptions(request: RestartFileSharesRequest, runtime: Util.RuntimeOptions): RestartFileSharesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.shareProtocol)) { query['ShareProtocol'] = request.shareProtocol; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'RestartFileShares', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function restartFileShares(request: RestartFileSharesRequest): RestartFileSharesResponse { var runtime = new Util.RuntimeOptions{}; return restartFileSharesWithOptions(request, runtime); } model SetGatewayADInfoRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbv****'), isEnabled?: boolean(name='IsEnabled', example='true'), password?: string(name='Password', example='12****'), securityToken?: string(name='SecurityToken'), serverIp?: string(name='ServerIp', example='12.12.x.x'), username?: string(name='Username', example='ale****'), } model SetGatewayADInfoResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='89398CFB-4EB6-4C7E-BB3C-EF213AC8FA**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000c6hshwukkcfn****'), } model SetGatewayADInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SetGatewayADInfoResponseBody(name='body'), } async function setGatewayADInfoWithOptions(request: SetGatewayADInfoRequest, runtime: Util.RuntimeOptions): SetGatewayADInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.isEnabled)) { query['IsEnabled'] = request.isEnabled; } if (!Util.isUnset(request.password)) { query['Password'] = request.password; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.serverIp)) { query['ServerIp'] = request.serverIp; } if (!Util.isUnset(request.username)) { query['Username'] = request.username; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SetGatewayADInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function setGatewayADInfo(request: SetGatewayADInfoRequest): SetGatewayADInfoResponse { var runtime = new Util.RuntimeOptions{}; return setGatewayADInfoWithOptions(request, runtime); } model SetGatewayAutoUpgradeConfigurationRequest { autoUpgradeEndHour?: int32(name='AutoUpgradeEndHour'), autoUpgradeStartHour?: int32(name='AutoUpgradeStartHour'), gatewayId?: string(name='GatewayId'), isAutoUpgrade?: boolean(name='IsAutoUpgrade'), securityToken?: string(name='SecurityToken'), } model SetGatewayAutoUpgradeConfigurationResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), } model SetGatewayAutoUpgradeConfigurationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SetGatewayAutoUpgradeConfigurationResponseBody(name='body'), } async function setGatewayAutoUpgradeConfigurationWithOptions(request: SetGatewayAutoUpgradeConfigurationRequest, runtime: Util.RuntimeOptions): SetGatewayAutoUpgradeConfigurationResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.autoUpgradeEndHour)) { query['AutoUpgradeEndHour'] = request.autoUpgradeEndHour; } if (!Util.isUnset(request.autoUpgradeStartHour)) { query['AutoUpgradeStartHour'] = request.autoUpgradeStartHour; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.isAutoUpgrade)) { query['IsAutoUpgrade'] = request.isAutoUpgrade; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SetGatewayAutoUpgradeConfiguration', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function setGatewayAutoUpgradeConfiguration(request: SetGatewayAutoUpgradeConfigurationRequest): SetGatewayAutoUpgradeConfigurationResponse { var runtime = new Util.RuntimeOptions{}; return setGatewayAutoUpgradeConfigurationWithOptions(request, runtime); } model SetGatewayDNSRequest { dnsServer?: string(name='DnsServer', example='100.100.XX.XX,100.100.XX.XX'), gatewayId?: string(name='GatewayId', example='gw-000c6hshwukkbryp****'), securityToken?: string(name='SecurityToken'), } model SetGatewayDNSResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='89398CFB-4EB6-4C7E-BB3C-EF213AC8FA**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000czaedx5koz578****'), } model SetGatewayDNSResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SetGatewayDNSResponseBody(name='body'), } async function setGatewayDNSWithOptions(request: SetGatewayDNSRequest, runtime: Util.RuntimeOptions): SetGatewayDNSResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.dnsServer)) { query['DnsServer'] = request.dnsServer; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SetGatewayDNS', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function setGatewayDNS(request: SetGatewayDNSRequest): SetGatewayDNSResponse { var runtime = new Util.RuntimeOptions{}; return setGatewayDNSWithOptions(request, runtime); } model SetGatewayLDAPInfoRequest { baseDN?: string(name='BaseDN', example='dc=sgwt***,dc=local'), gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbv****'), isEnabled?: boolean(name='IsEnabled', example='true'), isTls?: boolean(name='IsTls', example='true'), password?: string(name='Password', example='123***'), rootDN?: string(name='RootDN', example='cn=admin,dc=sgwt***,dc=local'), securityToken?: string(name='SecurityToken'), serverIp?: string(name='ServerIp', example='47.101.59.188'), } model SetGatewayLDAPInfoResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='2D1834A3-5EF2-46E2-97F7-C9F0C264C1**'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000eg44nmxbsyd9a****'), } model SetGatewayLDAPInfoResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SetGatewayLDAPInfoResponseBody(name='body'), } async function setGatewayLDAPInfoWithOptions(request: SetGatewayLDAPInfoRequest, runtime: Util.RuntimeOptions): SetGatewayLDAPInfoResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.baseDN)) { query['BaseDN'] = request.baseDN; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.isEnabled)) { query['IsEnabled'] = request.isEnabled; } if (!Util.isUnset(request.isTls)) { query['IsTls'] = request.isTls; } if (!Util.isUnset(request.password)) { query['Password'] = request.password; } if (!Util.isUnset(request.rootDN)) { query['RootDN'] = request.rootDN; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.serverIp)) { query['ServerIp'] = request.serverIp; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SetGatewayLDAPInfo', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function setGatewayLDAPInfo(request: SetGatewayLDAPInfoRequest): SetGatewayLDAPInfoResponse { var runtime = new Util.RuntimeOptions{}; return setGatewayLDAPInfoWithOptions(request, runtime); } model SwitchCSGClientsReverseSyncConfigurationRequest { clientIds?: [ string ](name='ClientIds'), clientRegionId?: string(name='ClientRegionId'), isReverseSync?: boolean(name='IsReverseSync'), reverseSyncInternalSecond?: int32(name='ReverseSyncInternalSecond'), securityToken?: string(name='SecurityToken'), } model SwitchCSGClientsReverseSyncConfigurationShrinkRequest { clientIdsShrink?: string(name='ClientIds'), clientRegionId?: string(name='ClientRegionId'), isReverseSync?: boolean(name='IsReverseSync'), reverseSyncInternalSecond?: int32(name='ReverseSyncInternalSecond'), securityToken?: string(name='SecurityToken'), } model SwitchCSGClientsReverseSyncConfigurationResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model SwitchCSGClientsReverseSyncConfigurationResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SwitchCSGClientsReverseSyncConfigurationResponseBody(name='body'), } async function switchCSGClientsReverseSyncConfigurationWithOptions(tmpReq: SwitchCSGClientsReverseSyncConfigurationRequest, runtime: Util.RuntimeOptions): SwitchCSGClientsReverseSyncConfigurationResponse { Util.validateModel(tmpReq); var request = new SwitchCSGClientsReverseSyncConfigurationShrinkRequest{}; OpenApiUtil.convert(tmpReq, request); if (!Util.isUnset(tmpReq.clientIds)) { request.clientIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.clientIds, 'ClientIds', 'simple'); } var query = {}; if (!Util.isUnset(request.clientIdsShrink)) { query['ClientIds'] = request.clientIdsShrink; } if (!Util.isUnset(request.clientRegionId)) { query['ClientRegionId'] = request.clientRegionId; } if (!Util.isUnset(request.isReverseSync)) { query['IsReverseSync'] = request.isReverseSync; } if (!Util.isUnset(request.reverseSyncInternalSecond)) { query['ReverseSyncInternalSecond'] = request.reverseSyncInternalSecond; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SwitchCSGClientsReverseSyncConfiguration', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function switchCSGClientsReverseSyncConfiguration(request: SwitchCSGClientsReverseSyncConfigurationRequest): SwitchCSGClientsReverseSyncConfigurationResponse { var runtime = new Util.RuntimeOptions{}; return switchCSGClientsReverseSyncConfigurationWithOptions(request, runtime); } model SwitchGatewayExpirationPolicyRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model SwitchGatewayExpirationPolicyResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='395B1136-982E-4F95-BDCE-7323FFEF499E'), success?: boolean(name='Success', example='true'), } model SwitchGatewayExpirationPolicyResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SwitchGatewayExpirationPolicyResponseBody(name='body'), } async function switchGatewayExpirationPolicyWithOptions(request: SwitchGatewayExpirationPolicyRequest, runtime: Util.RuntimeOptions): SwitchGatewayExpirationPolicyResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SwitchGatewayExpirationPolicy', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function switchGatewayExpirationPolicy(request: SwitchGatewayExpirationPolicyRequest): SwitchGatewayExpirationPolicyResponse { var runtime = new Util.RuntimeOptions{}; return switchGatewayExpirationPolicyWithOptions(request, runtime); } model SwitchToSubscriptionRequest { gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), securityToken?: string(name='SecurityToken'), } model SwitchToSubscriptionResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='395B1136-982E-4F95-BDCE-7323FFEF499E'), subscriptionURL?: string(name='SubscriptionURL', example='https://common-buy.aliyun.com/?commodityCode=hcs_sgw_csg_pre&request={"gateway_id":"gw-0007va9bnidei3s8a***”,”directBuy":"false","gateway_class":"standard","cache_cloud_efficiency_size":0}&regionId=cn-hangzhou#/buy'), success?: boolean(name='Success', example='true'), } model SwitchToSubscriptionResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: SwitchToSubscriptionResponseBody(name='body'), } async function switchToSubscriptionWithOptions(request: SwitchToSubscriptionRequest, runtime: Util.RuntimeOptions): SwitchToSubscriptionResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'SwitchToSubscription', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function switchToSubscription(request: SwitchToSubscriptionRequest): SwitchToSubscriptionResponse { var runtime = new Util.RuntimeOptions{}; return switchToSubscriptionWithOptions(request, runtime); } model TagResourcesRequest { regionId?: string(name='RegionId', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId'), resourceRegionId?: string(name='ResourceRegionId', example='cn-hangzhou'), resourceType?: string(name='ResourceType', example='GATEWAY'), securityToken?: string(name='SecurityToken'), tag?: [ { key?: string(name='Key', example='testkey1'), value?: string(name='Value', example='testvalue1'), } ](name='Tag'), } model TagResourcesResponseBody = { requestId?: string(name='RequestId', example='224DB9F7-3100-4899-AB9C-C938BCCB43E7'), } model TagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: TagResourcesResponseBody(name='body'), } async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceRegionId)) { query['ResourceRegionId'] = request.resourceRegionId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.tag)) { query['Tag'] = request.tag; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'TagResources', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function tagResources(request: TagResourcesRequest): TagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return tagResourcesWithOptions(request, runtime); } model TriggerGatewayRemoteSyncRequest { gatewayId?: string(name='GatewayId'), indexId?: string(name='IndexId'), path?: string(name='Path'), securityToken?: string(name='SecurityToken'), } model TriggerGatewayRemoteSyncResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model TriggerGatewayRemoteSyncResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: TriggerGatewayRemoteSyncResponseBody(name='body'), } async function triggerGatewayRemoteSyncWithOptions(request: TriggerGatewayRemoteSyncRequest, runtime: Util.RuntimeOptions): TriggerGatewayRemoteSyncResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.path)) { query['Path'] = request.path; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'TriggerGatewayRemoteSync', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function triggerGatewayRemoteSync(request: TriggerGatewayRemoteSyncRequest): TriggerGatewayRemoteSyncResponse { var runtime = new Util.RuntimeOptions{}; return triggerGatewayRemoteSyncWithOptions(request, runtime); } model UntagResourcesRequest { all?: boolean(name='All', example='false'), regionId?: string(name='RegionId', example='cn-hangzhou'), resourceId?: [ string ](name='ResourceId', example='gw-uf6wjk5xxxxxxx'), resourceRegionId?: string(name='ResourceRegionId'), resourceType?: string(name='ResourceType', example='GATEWAY'), securityToken?: string(name='SecurityToken'), tagKey?: [ string ](name='TagKey', example='testkey1'), } model UntagResourcesResponseBody = { requestId?: string(name='RequestId', example='601B6F25-21E7-4484-99D5-3EF2625C0088'), } model UntagResourcesResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UntagResourcesResponseBody(name='body'), } async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.all)) { query['All'] = request.all; } if (!Util.isUnset(request.regionId)) { query['RegionId'] = request.regionId; } if (!Util.isUnset(request.resourceId)) { query['ResourceId'] = request.resourceId; } if (!Util.isUnset(request.resourceRegionId)) { query['ResourceRegionId'] = request.resourceRegionId; } if (!Util.isUnset(request.resourceType)) { query['ResourceType'] = request.resourceType; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.tagKey)) { query['TagKey'] = request.tagKey; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UntagResources', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse { var runtime = new Util.RuntimeOptions{}; return untagResourcesWithOptions(request, runtime); } model UpdateGatewayBlockVolumeRequest { chapEnabled?: boolean(name='ChapEnabled', example='false'), chapInPassword?: string(name='ChapInPassword', example='ChapInPassword'), chapInUser?: string(name='ChapInUser', example='user'), gatewayId?: string(name='GatewayId', example='gw-000eg44nmxbsfwbvq***'), indexId?: string(name='IndexId', example='NFSalex***'), securityToken?: string(name='SecurityToken'), size?: long(name='Size', example='100'), } model UpdateGatewayBlockVolumeResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='EBAF769F-2E88-4D81-AF1E-A34FAACF9***'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000avsri6tlyddgfe***'), } model UpdateGatewayBlockVolumeResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateGatewayBlockVolumeResponseBody(name='body'), } async function updateGatewayBlockVolumeWithOptions(request: UpdateGatewayBlockVolumeRequest, runtime: Util.RuntimeOptions): UpdateGatewayBlockVolumeResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.chapEnabled)) { query['ChapEnabled'] = request.chapEnabled; } if (!Util.isUnset(request.chapInPassword)) { query['ChapInPassword'] = request.chapInPassword; } if (!Util.isUnset(request.chapInUser)) { query['ChapInUser'] = request.chapInUser; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.size)) { query['Size'] = request.size; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateGatewayBlockVolume', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function updateGatewayBlockVolume(request: UpdateGatewayBlockVolumeRequest): UpdateGatewayBlockVolumeResponse { var runtime = new Util.RuntimeOptions{}; return updateGatewayBlockVolumeWithOptions(request, runtime); } model UpdateGatewayFileShareRequest { accessBasedEnumeration?: boolean(name='AccessBasedEnumeration', example='false'), backendLimit?: int32(name='BackendLimit', example='0'), browsable?: boolean(name='Browsable', example='false'), bypassCacheRead?: boolean(name='BypassCacheRead', example='false'), cacheMode?: string(name='CacheMode', example='Cache'), clientSideCmk?: string(name='ClientSideCmk', example='b1e08822-1e9c-4f8e-9dd1-a740cb200***'), clientSideEncryption?: boolean(name='ClientSideEncryption', example='false'), directIO?: boolean(name='DirectIO', example='false'), downloadLimit?: int32(name='DownloadLimit', example='0'), fastReclaim?: boolean(name='FastReclaim', example='true'), frontendLimit?: int32(name='FrontendLimit', example='0'), gatewayId?: string(name='GatewayId', example='gw-000c6hshwukkbryp****'), ignoreDelete?: boolean(name='IgnoreDelete', example='true'), inPlace?: boolean(name='InPlace', example='false'), indexId?: string(name='IndexId', example='NFStest'), kmsRotatePeriod?: long(name='KmsRotatePeriod', example='0'), lagPeriod?: long(name='LagPeriod', example='5'), name?: string(name='Name', example='name'), nfsV4Optimization?: boolean(name='NfsV4Optimization', example='true'), pollingInterval?: int32(name='PollingInterval', example='36000'), readOnlyClientList?: string(name='ReadOnlyClientList', example='172.16.146.100'), readOnlyUserList?: string(name='ReadOnlyUserList', example='user1,user2'), readWriteClientList?: string(name='ReadWriteClientList', example='172.16.146.100'), readWriteUserList?: string(name='ReadWriteUserList', example='user1,user2'), remoteSync?: boolean(name='RemoteSync', example='true'), remoteSyncDownload?: boolean(name='RemoteSyncDownload', example='false'), securityToken?: string(name='SecurityToken'), serverSideCmk?: string(name='ServerSideCmk', example='b1e08822-1e9c-4f8e-9dd1-a740cb200***'), serverSideEncryption?: boolean(name='ServerSideEncryption', example='false'), squash?: string(name='Squash', example='none'), transferAcceleration?: boolean(name='TransferAcceleration', example='false'), windowsAcl?: boolean(name='WindowsAcl', example='false'), } model UpdateGatewayFileShareResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='EBAF769F-2E88-4D81-AF1E-A34FAACF9***'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-000avsri6tlyddgf****'), } model UpdateGatewayFileShareResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpdateGatewayFileShareResponseBody(name='body'), } async function updateGatewayFileShareWithOptions(request: UpdateGatewayFileShareRequest, runtime: Util.RuntimeOptions): UpdateGatewayFileShareResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.accessBasedEnumeration)) { query['AccessBasedEnumeration'] = request.accessBasedEnumeration; } if (!Util.isUnset(request.backendLimit)) { query['BackendLimit'] = request.backendLimit; } if (!Util.isUnset(request.browsable)) { query['Browsable'] = request.browsable; } if (!Util.isUnset(request.bypassCacheRead)) { query['BypassCacheRead'] = request.bypassCacheRead; } if (!Util.isUnset(request.cacheMode)) { query['CacheMode'] = request.cacheMode; } if (!Util.isUnset(request.clientSideCmk)) { query['ClientSideCmk'] = request.clientSideCmk; } if (!Util.isUnset(request.clientSideEncryption)) { query['ClientSideEncryption'] = request.clientSideEncryption; } if (!Util.isUnset(request.directIO)) { query['DirectIO'] = request.directIO; } if (!Util.isUnset(request.downloadLimit)) { query['DownloadLimit'] = request.downloadLimit; } if (!Util.isUnset(request.fastReclaim)) { query['FastReclaim'] = request.fastReclaim; } if (!Util.isUnset(request.frontendLimit)) { query['FrontendLimit'] = request.frontendLimit; } if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.ignoreDelete)) { query['IgnoreDelete'] = request.ignoreDelete; } if (!Util.isUnset(request.inPlace)) { query['InPlace'] = request.inPlace; } if (!Util.isUnset(request.indexId)) { query['IndexId'] = request.indexId; } if (!Util.isUnset(request.kmsRotatePeriod)) { query['KmsRotatePeriod'] = request.kmsRotatePeriod; } if (!Util.isUnset(request.lagPeriod)) { query['LagPeriod'] = request.lagPeriod; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.nfsV4Optimization)) { query['NfsV4Optimization'] = request.nfsV4Optimization; } if (!Util.isUnset(request.pollingInterval)) { query['PollingInterval'] = request.pollingInterval; } if (!Util.isUnset(request.readOnlyClientList)) { query['ReadOnlyClientList'] = request.readOnlyClientList; } if (!Util.isUnset(request.readOnlyUserList)) { query['ReadOnlyUserList'] = request.readOnlyUserList; } if (!Util.isUnset(request.readWriteClientList)) { query['ReadWriteClientList'] = request.readWriteClientList; } if (!Util.isUnset(request.readWriteUserList)) { query['ReadWriteUserList'] = request.readWriteUserList; } if (!Util.isUnset(request.remoteSync)) { query['RemoteSync'] = request.remoteSync; } if (!Util.isUnset(request.remoteSyncDownload)) { query['RemoteSyncDownload'] = request.remoteSyncDownload; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } if (!Util.isUnset(request.serverSideCmk)) { query['ServerSideCmk'] = request.serverSideCmk; } if (!Util.isUnset(request.serverSideEncryption)) { query['ServerSideEncryption'] = request.serverSideEncryption; } if (!Util.isUnset(request.squash)) { query['Squash'] = request.squash; } if (!Util.isUnset(request.transferAcceleration)) { query['TransferAcceleration'] = request.transferAcceleration; } if (!Util.isUnset(request.windowsAcl)) { query['WindowsAcl'] = request.windowsAcl; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpdateGatewayFileShare', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function updateGatewayFileShare(request: UpdateGatewayFileShareRequest): UpdateGatewayFileShareResponse { var runtime = new Util.RuntimeOptions{}; return updateGatewayFileShareWithOptions(request, runtime); } model UpgradeGatewayRequest { gatewayId?: string(name='GatewayId', example='gw-0001xv7je3580031y***'), securityToken?: string(name='SecurityToken'), } model UpgradeGatewayResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='CB300009-3850-4107-B291-59BDB4EDA183'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je3580412***'), } model UpgradeGatewayResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UpgradeGatewayResponseBody(name='body'), } async function upgradeGatewayWithOptions(request: UpgradeGatewayRequest, runtime: Util.RuntimeOptions): UpgradeGatewayResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UpgradeGateway', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function upgradeGateway(request: UpgradeGatewayRequest): UpgradeGatewayResponse { var runtime = new Util.RuntimeOptions{}; return upgradeGatewayWithOptions(request, runtime); } model UploadCSGClientLogRequest { clientId?: string(name='ClientId'), clientRegionId?: string(name='ClientRegionId'), securityToken?: string(name='SecurityToken'), } model UploadCSGClientLogResponseBody = { code?: string(name='Code'), message?: string(name='Message'), requestId?: string(name='RequestId'), success?: boolean(name='Success'), taskId?: string(name='TaskId'), } model UploadCSGClientLogResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UploadCSGClientLogResponseBody(name='body'), } async function uploadCSGClientLogWithOptions(request: UploadCSGClientLogRequest, runtime: Util.RuntimeOptions): UploadCSGClientLogResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.clientId)) { query['ClientId'] = request.clientId; } if (!Util.isUnset(request.clientRegionId)) { query['ClientRegionId'] = request.clientRegionId; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UploadCSGClientLog', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function uploadCSGClientLog(request: UploadCSGClientLogRequest): UploadCSGClientLogResponse { var runtime = new Util.RuntimeOptions{}; return uploadCSGClientLogWithOptions(request, runtime); } model UploadGatewayLogRequest { gatewayId?: string(name='GatewayId', example='gw-0001xv7je3031yzun***'), } model UploadGatewayLogResponseBody = { code?: string(name='Code', example='200'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='CB300009-3850-4107-B291-59BDB4EDA183'), success?: boolean(name='Success', example='true'), taskId?: string(name='TaskId', example='t-0001xv7je3580412f***'), } model UploadGatewayLogResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: UploadGatewayLogResponseBody(name='body'), } async function uploadGatewayLogWithOptions(request: UploadGatewayLogRequest, runtime: Util.RuntimeOptions): UploadGatewayLogResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.gatewayId)) { query['GatewayId'] = request.gatewayId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'UploadGatewayLog', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function uploadGatewayLog(request: UploadGatewayLogRequest): UploadGatewayLogResponse { var runtime = new Util.RuntimeOptions{}; return uploadGatewayLogWithOptions(request, runtime); } model ValidateExpressSyncConfigRequest { bucketName?: string(name='BucketName', example='alex***'), bucketPrefix?: string(name='BucketPrefix', example='test***'), bucketRegion?: string(name='BucketRegion', example='cn-hangzhou'), name?: string(name='Name', example='sync***'), securityToken?: string(name='SecurityToken'), } model ValidateExpressSyncConfigResponseBody = { code?: string(name='Code', example='200'), isValid?: boolean(name='IsValid', example='false'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='943856D2-814B-487A-B645-D5F9CCA15929'), success?: boolean(name='Success', example='true'), validateMessage?: string(name='ValidateMessage', example='ConflictExpressSyncConfig'), } model ValidateExpressSyncConfigResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ValidateExpressSyncConfigResponseBody(name='body'), } async function validateExpressSyncConfigWithOptions(request: ValidateExpressSyncConfigRequest, runtime: Util.RuntimeOptions): ValidateExpressSyncConfigResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.bucketName)) { query['BucketName'] = request.bucketName; } if (!Util.isUnset(request.bucketPrefix)) { query['BucketPrefix'] = request.bucketPrefix; } if (!Util.isUnset(request.bucketRegion)) { query['BucketRegion'] = request.bucketRegion; } if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.securityToken)) { query['SecurityToken'] = request.securityToken; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ValidateExpressSyncConfig', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function validateExpressSyncConfig(request: ValidateExpressSyncConfigRequest): ValidateExpressSyncConfigResponse { var runtime = new Util.RuntimeOptions{}; return validateExpressSyncConfigWithOptions(request, runtime); } model ValidateGatewayNameRequest { name?: string(name='Name', example='alex***'), storageBundleId?: string(name='StorageBundleId', example='sb-0001b2otnkdxrigeq***'), } model ValidateGatewayNameResponseBody = { code?: string(name='Code', example='200'), isValid?: boolean(name='IsValid', example='true'), message?: string(name='Message', example='successful'), requestId?: string(name='RequestId', example='CB300009-3850-4107-B291-59BDB4EDA183'), success?: boolean(name='Success', example='true'), } model ValidateGatewayNameResponse = { headers?: map[string]string(name='headers'), statusCode?: int32(name='statusCode'), body?: ValidateGatewayNameResponseBody(name='body'), } async function validateGatewayNameWithOptions(request: ValidateGatewayNameRequest, runtime: Util.RuntimeOptions): ValidateGatewayNameResponse { Util.validateModel(request); var query = {}; if (!Util.isUnset(request.name)) { query['Name'] = request.name; } if (!Util.isUnset(request.storageBundleId)) { query['StorageBundleId'] = request.storageBundleId; } var req = new OpenApi.OpenApiRequest{ query = OpenApiUtil.query(query), }; var params = new OpenApi.Params{ action = 'ValidateGatewayName', version = '2018-05-11', protocol = 'HTTPS', pathname = '/', method = 'POST', authType = 'AK', style = 'RPC', reqBodyType = 'formData', bodyType = 'json', }; return callApi(params, req, runtime); } async function validateGatewayName(request: ValidateGatewayNameRequest): ValidateGatewayNameResponse { var runtime = new Util.RuntimeOptions{}; return validateGatewayNameWithOptions(request, runtime); }