tencentcloud-sdk-nodejs-intl-en
Version:
1,847 lines (1,571 loc) ⢠463 kB
JavaScript
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* DescribeCdnDomainLogs response structure.
* @class
*/
class DescribeCdnDomainLogsResponse extends AbstractModel {
constructor(){
super();
/**
* Download link of the log package.
You can open the link to download a .gz log package that contains all log files without extension.
* @type {Array.<DomainLog> || null}
*/
this.DomainLogs = null;
/**
* Total number of entries obtained
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.DomainLogs) {
this.DomainLogs = new Array();
for (let z in params.DomainLogs) {
let obj = new DomainLog();
obj.deserialize(params.DomainLogs[z]);
this.DomainLogs.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Timestamp hotlink protection advanced configuration (allowlist feature)
* @class
*/
class AdvancedAuthentication extends AbstractModel {
constructor(){
super();
/**
* Whether to enable hot linking protection. Values:
`on`: Enable
`off`: Disable
Only one advanced configuration can be enabled. Set the rests to `null`.
* @type {string || null}
*/
this.Switch = null;
/**
* Timestamp hotlink protection advanced configuration mode A
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {AdvancedAuthenticationTypeA || null}
*/
this.TypeA = null;
/**
* Timestamp hotlink protection advanced configuration mode B
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {AdvancedAuthenticationTypeB || null}
*/
this.TypeB = null;
/**
* Timestamp hotlink protection advanced configuration mode C
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {AdvancedAuthenticationTypeC || null}
*/
this.TypeC = null;
/**
* Timestamp hotlink protection advanced configuration mode D
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {AdvancedAuthenticationTypeD || null}
*/
this.TypeD = null;
/**
* Timestamp hotlink protection advanced configuration mode E
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {AdvancedAuthenticationTypeE || null}
*/
this.TypeE = null;
/**
* Timestamp hotlink protection advanced configuration mode F
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {AdvancedAuthenticationTypeF || null}
*/
this.TypeF = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.TypeA) {
let obj = new AdvancedAuthenticationTypeA();
obj.deserialize(params.TypeA)
this.TypeA = obj;
}
if (params.TypeB) {
let obj = new AdvancedAuthenticationTypeB();
obj.deserialize(params.TypeB)
this.TypeB = obj;
}
if (params.TypeC) {
let obj = new AdvancedAuthenticationTypeC();
obj.deserialize(params.TypeC)
this.TypeC = obj;
}
if (params.TypeD) {
let obj = new AdvancedAuthenticationTypeD();
obj.deserialize(params.TypeD)
this.TypeD = obj;
}
if (params.TypeE) {
let obj = new AdvancedAuthenticationTypeE();
obj.deserialize(params.TypeE)
this.TypeE = obj;
}
if (params.TypeF) {
let obj = new AdvancedAuthenticationTypeF();
obj.deserialize(params.TypeF)
this.TypeF = obj;
}
}
}
/**
* Custom HTTPS configuration for origin-pull
* @class
*/
class AdvanceHttps extends AbstractModel {
constructor(){
super();
/**
* Custom TLS data switch
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CustomTlsStatus = null;
/**
* TLS version settings. Valid values: `TLSv1`, `TLSV1.1`, `TLSV1.2`, and `TLSv1.3`. Only consecutive versions can be enabled at the same time.
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.TlsVersion = null;
/**
* Custom encryption suite
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Cipher = null;
/**
* Origin-pull verification status
`off`: Disables origin-pull verification
`oneWay`: Only verify the origin
`twoWay`: Enables two-way origin-pull verification
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.VerifyOriginType = null;
/**
* Configuration information of the origin-pull certificate
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {ServerCert || null}
*/
this.CertInfo = null;
/**
* Configuration information of the origin server certificate
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {ClientCert || null}
*/
this.OriginCertInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CustomTlsStatus = 'CustomTlsStatus' in params ? params.CustomTlsStatus : null;
this.TlsVersion = 'TlsVersion' in params ? params.TlsVersion : null;
this.Cipher = 'Cipher' in params ? params.Cipher : null;
this.VerifyOriginType = 'VerifyOriginType' in params ? params.VerifyOriginType : null;
if (params.CertInfo) {
let obj = new ServerCert();
obj.deserialize(params.CertInfo)
this.CertInfo = obj;
}
if (params.OriginCertInfo) {
let obj = new ClientCert();
obj.deserialize(params.OriginCertInfo)
this.OriginCertInfo = obj;
}
}
}
/**
* Whether to forward to the origin server for verification
* @class
*/
class Revalidate extends AbstractModel {
constructor(){
super();
/**
* Whether to enable origin-pull authentication. Values:
`on`: Enable
`off`: Disable
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Switch = null;
/**
* Forwards to the origin server for verification only for specific request path
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.Path = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.Path = 'Path' in params ? params.Path : null;
}
}
/**
* This API is used to query an object and its access details.
* @class
*/
class ResourceData extends AbstractModel {
constructor(){
super();
/**
* Resource name.
A single domain name: Queries domain name details by a domain name. The details of the domain name will be displayed when the passed parameter `detail` is `true`.
Multiple domain names: Queries domain name details by multiple domain names. The aggregated details of the domain names will be displayed.
Project ID: Queries domain name details by a project ID. The aggregated details of the domain names of the project will be displayed.
`all`: Account-level data, which is aggregated details of all domain names of an account.
* @type {string || null}
*/
this.Resource = null;
/**
* Data details of a resource
* @type {Array.<CdnData> || null}
*/
this.CdnData = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Resource = 'Resource' in params ? params.Resource : null;
if (params.CdnData) {
this.CdnData = new Array();
for (let z in params.CdnData) {
let obj = new CdnData();
obj.deserialize(params.CdnData[z]);
this.CdnData.push(obj);
}
}
}
}
/**
* Details of the blocked URLs
* @class
*/
class UrlRecord extends AbstractModel {
constructor(){
super();
/**
* Status. `disable`: Blocked; `enable`: Unblocked.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.Status = null;
/**
* Corresponding URL
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.RealUrl = null;
/**
* Creation time
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.CreateTime = null;
/**
* Update time.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.UpdateTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Status = 'Status' in params ? params.Status : null;
this.RealUrl = 'RealUrl' in params ? params.RealUrl : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.UpdateTime = 'UpdateTime' in params ? params.UpdateTime : null;
}
}
/**
* Origin-pull authentication for other origins
* @class
*/
class OthersPrivateAccess extends AbstractModel {
constructor(){
super();
/**
* Whether to enable origin-pull authentication for other object storage origins. Values:
`on`: Enable
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
/**
* Access ID.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.AccessKey = null;
/**
* Key.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.SecretKey = null;
/**
* Region.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Region = null;
/**
* Bucket name
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Bucket = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.AccessKey = 'AccessKey' in params ? params.AccessKey : null;
this.SecretKey = 'SecretKey' in params ? params.SecretKey : null;
this.Region = 'Region' in params ? params.Region : null;
this.Bucket = 'Bucket' in params ? params.Bucket : null;
}
}
/**
* DescribePushQuota response structure.
* @class
*/
class DescribePushQuotaResponse extends AbstractModel {
constructor(){
super();
/**
* URL prefetch usage and quota.
* @type {Array.<Quota> || null}
*/
this.UrlPush = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.UrlPush) {
this.UrlPush = new Array();
for (let z in params.UrlPush) {
let obj = new Quota();
obj.deserialize(params.UrlPush[z]);
this.UrlPush.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribePurgeQuota response structure.
* @class
*/
class DescribePurgeQuotaResponse extends AbstractModel {
constructor(){
super();
/**
* URL purge usage and quota.
* @type {Array.<Quota> || null}
*/
this.UrlPurge = null;
/**
* Directory purge usage and quota.
* @type {Array.<Quota> || null}
*/
this.PathPurge = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.UrlPurge) {
this.UrlPurge = new Array();
for (let z in params.UrlPurge) {
let obj = new Quota();
obj.deserialize(params.UrlPurge[z]);
this.UrlPurge.push(obj);
}
}
if (params.PathPurge) {
this.PathPurge = new Array();
for (let z in params.PathPurge) {
let obj = new Quota();
obj.deserialize(params.PathPurge[z]);
this.PathPurge.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* SCDN layer-7 rule configuration for CC frequency limiting
* @class
*/
class ScdnSevenLayerRules extends AbstractModel {
constructor(){
super();
/**
* Whether values are case sensitive
* @type {boolean || null}
*/
this.CaseSensitive = null;
/**
* Rule types:
`protocol`: protocol. Valid values: `HTTP` and `HTTPS`.
`method`: request method. Valid values: `HEAD`, `GET`, `POST`, `PUT`, `OPTIONS`, `TRACE`, `DELETE`, `PATCH` and `CONNECT`.
`all`: domain name. The matching content is `*` and cannot be edited.
`ip`: IP in CIDR format.
`directory`: path starting with a slash (/). You can specify a directory or specific path using up to 128 characters.
`index`: default homepage, which is specified by `/;/index.html` and cannot be edited.
`path`: full path of the file, such as `/acb/test.png`. Wildcard is supported, such as `/abc/*.jpg`.
`file`: file extension, such as `jpg`, `png` and `css`.
`param`: request parameter. The value can contain up to 512 characters.
`referer`: Referer. The value can contain up to 512 characters.
`cookie`: Cookie. The value can contain up to 512 characters.
`user-agent`: User-Agent. The value can contain up to 512 characters.
`head`: custom header. The value can contain up to 512 characters. If the matching content is blank or does not exist, enter the matching parameter directly.
* @type {string || null}
*/
this.RuleType = null;
/**
* Logical operator, which connects the relation between RuleType and RuleValue. Valid values:
`exclude`: the rule value is not contained.
`include`: the rule value is contained.
`notequal`: the rule value is not equal to the specified rule type.
`equal`: the rule value is equal to the specified rule type.
`matching`: the rule value matches with the prefix of the specified rule type.
`null`: the rule value is empty or does not exist.
* @type {string || null}
*/
this.LogicOperator = null;
/**
* Rule value
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.RuleValue = null;
/**
* Matched parameter. Only request parameters, Cookie, and custom request headers have a value.
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.RuleParam = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.CaseSensitive = 'CaseSensitive' in params ? params.CaseSensitive : null;
this.RuleType = 'RuleType' in params ? params.RuleType : null;
this.LogicOperator = 'LogicOperator' in params ? params.LogicOperator : null;
this.RuleValue = 'RuleValue' in params ? params.RuleValue : null;
this.RuleParam = 'RuleParam' in params ? params.RuleParam : null;
}
}
/**
* Timestamp hotlink protection configuration
* @class
*/
class Authentication extends AbstractModel {
constructor(){
super();
/**
* Whether to enable hot linking protection. Values:
`on`: Enable
`off`: Disable
Only one advanced configuration can be enabled. Set the rests to `null`.
* @type {string || null}
*/
this.Switch = null;
/**
* Authentication algorithm. Values:
`md5`: Calculate the hash using MD5.
`sha256`: Calculate the hash using SHA-256.
Default value: `md5`.
Note: This field may returnĀ·`null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.AuthAlgorithm = null;
/**
* Timestamp hotlink protection mode A configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {AuthenticationTypeA || null}
*/
this.TypeA = null;
/**
* Timestamp hotlink protection mode B configuration (mode B is being upgraded and is currently not supported)
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {AuthenticationTypeB || null}
*/
this.TypeB = null;
/**
* Timestamp hotlink protection mode C configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {AuthenticationTypeC || null}
*/
this.TypeC = null;
/**
* Timestamp hotlink protection mode D configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {AuthenticationTypeD || null}
*/
this.TypeD = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.AuthAlgorithm = 'AuthAlgorithm' in params ? params.AuthAlgorithm : null;
if (params.TypeA) {
let obj = new AuthenticationTypeA();
obj.deserialize(params.TypeA)
this.TypeA = obj;
}
if (params.TypeB) {
let obj = new AuthenticationTypeB();
obj.deserialize(params.TypeB)
this.TypeB = obj;
}
if (params.TypeC) {
let obj = new AuthenticationTypeC();
obj.deserialize(params.TypeC)
this.TypeC = obj;
}
if (params.TypeD) {
let obj = new AuthenticationTypeD();
obj.deserialize(params.TypeD)
this.TypeD = obj;
}
}
}
/**
* Image optimization configuration
* @class
*/
class ImageOptimization extends AbstractModel {
constructor(){
super();
/**
* `WebpAdapter` configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {WebpAdapter || null}
*/
this.WebpAdapter = null;
/**
* `TpgAdapter` configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {TpgAdapter || null}
*/
this.TpgAdapter = null;
/**
* `GuetzliAdapter` configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {GuetzliAdapter || null}
*/
this.GuetzliAdapter = null;
/**
* AVIF adapter configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {AvifAdapter || null}
*/
this.AvifAdapter = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.WebpAdapter) {
let obj = new WebpAdapter();
obj.deserialize(params.WebpAdapter)
this.WebpAdapter = obj;
}
if (params.TpgAdapter) {
let obj = new TpgAdapter();
obj.deserialize(params.TpgAdapter)
this.TpgAdapter = obj;
}
if (params.GuetzliAdapter) {
let obj = new GuetzliAdapter();
obj.deserialize(params.GuetzliAdapter)
this.GuetzliAdapter = obj;
}
if (params.AvifAdapter) {
let obj = new AvifAdapter();
obj.deserialize(params.AvifAdapter)
this.AvifAdapter = obj;
}
}
}
/**
* Domain name HTTPS acceleration configuration. This is disabled by default.
* @class
*/
class Https extends AbstractModel {
constructor(){
super();
/**
* Whether to enable HTTPS. Values:
`on`: Enable
`off`: Disable
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Switch = null;
/**
* Whether to enable HTTP2
`on`: Enable
`off`: Disable
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Http2 = null;
/**
* OCSP configuration switch
`on`: Enable
`off`: Disable
It is disabled by default.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.OcspStapling = null;
/**
* Client certificate authentication feature
`on`: Enable
`off`: Disable
This is disabled by default. The client certificate information is needed when enabled. This is still in beta and not generally available yet.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.VerifyClient = null;
/**
* Server certificate configuration information
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {ServerCert || null}
*/
this.CertInfo = null;
/**
* Client certificate configuration information
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {ClientCert || null}
*/
this.ClientCertInfo = null;
/**
* Spdy configuration switch
`on`: Enable
`off`: Disable
It is disabled by default.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.Spdy = null;
/**
* HTTPS certificate deployment status
closed: already closed
deploying: in deployment
deployed: successfully deployed
failed: deployment failed
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.SslStatus = null;
/**
* HSTS configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {Hsts || null}
*/
this.Hsts = null;
/**
* TLS version settings, which only support certain advanced domain names. Valid values: `TLSv1`, `TLSV1.1`, `TLSV1.2`, and `TLSv1.3`. Only consecutive versions can be enabled at the same time.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {Array.<string> || null}
*/
this.TlsVersion = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.Http2 = 'Http2' in params ? params.Http2 : null;
this.OcspStapling = 'OcspStapling' in params ? params.OcspStapling : null;
this.VerifyClient = 'VerifyClient' in params ? params.VerifyClient : null;
if (params.CertInfo) {
let obj = new ServerCert();
obj.deserialize(params.CertInfo)
this.CertInfo = obj;
}
if (params.ClientCertInfo) {
let obj = new ClientCert();
obj.deserialize(params.ClientCertInfo)
this.ClientCertInfo = obj;
}
this.Spdy = 'Spdy' in params ? params.Spdy : null;
this.SslStatus = 'SslStatus' in params ? params.SslStatus : null;
if (params.Hsts) {
let obj = new Hsts();
obj.deserialize(params.Hsts)
this.Hsts = obj;
}
this.TlsVersion = 'TlsVersion' in params ? params.TlsVersion : null;
}
}
/**
* Path-based cache rule configuration
The cache expiration time for all files is 30 days by default.
Static acceleration type domain names .php, .jsp, .asp, and .aspx are not cached by default.
* @class
*/
class RuleCache extends AbstractModel {
constructor(){
super();
/**
* Content for each `CacheType`:
For `all`, enter a wildcard `*`.
For `file`, enter the suffix, e.g., `jpg` or `txt`.
For `directory`, enter the path, e.g., `/xxx/test/`.
For `path`, enter the absolute path, e.g., `/xxx/test.html`.
For `index`, enter a forward slash `/`.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.RulePaths = null;
/**
* Rule types:
`all`: effective for all files.
`file`: effective for specified file suffixes.
`directory`: effective for specified paths.
`path`: effective for specified absolute paths.
`index`: homepage.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.RuleType = null;
/**
* Cache configuration
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {RuleCacheConfig || null}
*/
this.CacheConfig = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.RulePaths = 'RulePaths' in params ? params.RulePaths : null;
this.RuleType = 'RuleType' in params ? params.RuleType : null;
if (params.CacheConfig) {
let obj = new RuleCacheConfig();
obj.deserialize(params.CacheConfig)
this.CacheConfig = obj;
}
}
}
/**
* DescribeCdnDomainLogs request structure.
* @class
*/
class DescribeCdnDomainLogsRequest extends AbstractModel {
constructor(){
super();
/**
* Specifies a domain name for the query
* @type {string || null}
*/
this.Domain = null;
/**
* Starting time, such as `2019-09-04 00:00:00`
* @type {string || null}
*/
this.StartTime = null;
/**
* End time, such as `2019-09-04 12:00:00`
* @type {string || null}
*/
this.EndTime = null;
/**
* Offset for paginated queries. Default value: 0
* @type {number || null}
*/
this.Offset = null;
/**
* Limit on paginated queries. Default value: 100. Maximum value: 1,000
* @type {number || null}
*/
this.Limit = null;
/**
* Specifies a region for the query.
`mainland`: specifies to return the download link of logs on acceleration within Mainland China;
`overseas`: specifies to return the download link of logs on acceleration outside Mainland China;
`global`: specifies to return a download link of logs on acceleration within Mainland China and a link of logs on acceleration outside Mainland China.
Default value: `mainland`.
* @type {string || null}
*/
this.Area = null;
/**
* Specifies the type of logs to download (only access logs supported).
`access`: Access logs.
* @type {string || null}
*/
this.LogType = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Domain = 'Domain' in params ? params.Domain : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
this.EndTime = 'EndTime' in params ? params.EndTime : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.Area = 'Area' in params ? params.Area : null;
this.LogType = 'LogType' in params ? params.LogType : null;
}
}
/**
* AVIF adapter, used for image optimization
* @class
*/
class AvifAdapter extends AbstractModel {
constructor(){
super();
/**
* Whether to enable `AvifAdapter` for image optimization. Values:
`on`: Enable
`off`: Disable
Note: This field may returnĀ·`null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Switch = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
}
}
/**
* CreateClsLogTopic response structure.
* @class
*/
class CreateClsLogTopicResponse extends AbstractModel {
constructor(){
super();
/**
* Topic ID
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.TopicId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TopicId = 'TopicId' in params ? params.TopicId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* MaxAge status code
* @class
*/
class MaxAgeCodeRule extends AbstractModel {
constructor(){
super();
/**
* Action to execute.
`clear`: Clear the cache-control header.
* @type {string || null}
*/
this.Action = null;
/**
* Specifies the HTTP status code in the range 400-599.
* @type {Array.<string> || null}
*/
this.StatusCodes = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Action = 'Action' in params ? params.Action : null;
this.StatusCodes = 'StatusCodes' in params ? params.StatusCodes : null;
}
}
/**
* Smart compression configuration. By default, Gzip compression is performed for files with js, html, css, xml, json, shtml, and htm suffixes, and with sizes between 256 and 2097152 bytes.
* @class
*/
class Compression extends AbstractModel {
constructor(){
super();
/**
* Whether to enable smart compression. Values:
`on`: Enable
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
/**
* Compression rules array
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {Array.<CompressionRule> || null}
*/
this.CompressionRules = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.CompressionRules) {
this.CompressionRules = new Array();
for (let z in params.CompressionRules) {
let obj = new CompressionRule();
obj.deserialize(params.CompressionRules[z]);
this.CompressionRules.push(obj);
}
}
}
}
/**
* PurgePathCache response structure.
* @class
*/
class PurgePathCacheResponse extends AbstractModel {
constructor(){
super();
/**
* Purge task ID. Directories submitted in one request share a task ID.
* @type {string || null}
*/
this.TaskId = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TaskId = 'TaskId' in params ? params.TaskId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Filter conditions for domain name query.
* @class
*/
class DomainFilter extends AbstractModel {
constructor(){
super();
/**
* Filter filter. Values:
- `origin`: Primary origin server.
- `domain`: Domain name.
- `resourceId`: Domain name ID.
- `status`: Domain name status. Values: `online`, `offline`, and `processing`.
- `serviceType`: Service type. Values: `web`, `download`, `media`, `hybrid` and `dynamic`.
- `projectId`: Project ID.
- `domainType`: Primary origin type. Values: `cname` (customer origin), `COS` (COS origin), `third_party` (third-party object storage origin), and `igtm` (IGTM origin).
- `fullUrlCache`: Whether to enable path cache. Values: `on`, `off`.
- `https`: Whether to configure HTTPS. Values: `on`, `off` and `processing`.
- `originPullProtocol`: Origin-pull protocol type. Value: `http`, `follow`, and `https`.
- `tagKey`: Tag key.
* @type {string || null}
*/
this.Name = null;
/**
* Filter field value.
* @type {Array.<string> || null}
*/
this.Value = null;
/**
* Whether to enable fuzzy query. Only `origin` or `domain` is supported for the filter field name.
When fuzzy query is enabled, the maximum Value length is 1. When fuzzy query is disabled, the maximum Value length is 5.
* @type {boolean || null}
*/
this.Fuzzy = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Name = 'Name' in params ? params.Name : null;
this.Value = 'Value' in params ? params.Value : null;
this.Fuzzy = 'Fuzzy' in params ? params.Fuzzy : null;
}
}
/**
* DescribeCdnOriginIp response structure.
* @class
*/
class DescribeCdnOriginIpResponse extends AbstractModel {
constructor(){
super();
/**
* Intermediate node IP details
* @type {Array.<OriginIp> || null}
*/
this.Ips = null;
/**
* Number of intermediate node IPs
* @type {number || null}
*/
this.TotalCount = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Ips) {
this.Ips = new Array();
for (let z in params.Ips) {
let obj = new OriginIp();
obj.deserialize(params.Ips[z]);
this.Ips.push(obj);
}
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Specific configuration for domain names inside and outside mainland China by regions.
* @class
*/
class SpecificConfig extends AbstractModel {
constructor(){
super();
/**
* Specific configuration for domain name inside mainland China.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {MainlandConfig || null}
*/
this.Mainland = null;
/**
* Specific configuration for domain name outside mainland China.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {OverseaConfig || null}
*/
this.Overseas = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Mainland) {
let obj = new MainlandConfig();
obj.deserialize(params.Mainland)
this.Mainland = obj;
}
if (params.Overseas) {
let obj = new OverseaConfig();
obj.deserialize(params.Overseas)
this.Overseas = obj;
}
}
}
/**
* 301/302 automatic origin-pull follow-redirect configuration. It is disabled by default.
* @class
*/
class FollowRedirect extends AbstractModel {
constructor(){
super();
/**
* Whether to enable origin-pull to follow the origin configuration. Values:
`on`: Enable
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
/**
* Specifies a host header for 302 redirects. This feature is only available to beta users. To join the beta, please submit a ticket.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {RedirectConfig || null}
*/
this.RedirectConfig = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.RedirectConfig) {
let obj = new RedirectConfig();
obj.deserialize(params.RedirectConfig)
this.RedirectConfig = obj;
}
}
}
/**
* Custom request header configuration. This is disabled by default.
* @class
*/
class RequestHeader extends AbstractModel {
constructor(){
super();
/**
* Whether to enable custom request headers. Values:
`on`: Enable
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
/**
* Custom request header configuration rules
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {Array.<HttpHeaderPathRule> || null}
*/
this.HeaderRules = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.HeaderRules) {
this.HeaderRules = new Array();
for (let z in params.HeaderRules) {
let obj = new HttpHeaderPathRule();
obj.deserialize(params.HeaderRules[z]);
this.HeaderRules.push(obj);
}
}
}
}
/**
* DescribePurgeQuota request structure.
* @class
*/
class DescribePurgeQuotaRequest extends AbstractModel {
constructor(){
super();
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
}
}
/**
* Referer blacklist/whitelist configuration. This is disabled by default.
* @class
*/
class Referer extends AbstractModel {
constructor(){
super();
/**
* Whether to enable referer blocklist/allowlist. Values:
`on`: Enable
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
/**
* Referer blacklist/whitelist configuration rule
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {Array.<RefererRule> || null}
*/
this.RefererRules = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.RefererRules) {
this.RefererRules = new Array();
for (let z in params.RefererRules) {
let obj = new RefererRule();
obj.deserialize(params.RefererRules[z]);
this.RefererRules.push(obj);
}
}
}
}
/**
* Maximum size of the file uploaded for streaming via a POST request
* @class
*/
class PostSize extends AbstractModel {
constructor(){
super();
/**
* Maximum size of the file uploaded for streaming via a POST request. Values:
`on`: Enable. When enabled, it is set to 32 MB by default.
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
/**
* Maximum size. Value range: 1 MB to 200 MB.
* @type {number || null}
*/
this.MaxSize = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.MaxSize = 'MaxSize' in params ? params.MaxSize : null;
}
}
/**
* DescribeCdnData response structure.
* @class
*/
class DescribeCdnDataResponse extends AbstractModel {
constructor(){
super();
/**
* Time granularity of the returned data.
`min`: 1 minute
`5min`: 5 minutes
`hour`: 1 hour
`day`: 1 day
* @type {string || null}
*/
this.Interval = null;
/**
* Returned data details of the specified conditional query
* @type {Array.<ResourceData> || null}
*/
this.Data = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Interval = 'Interval' in params ? params.Interval : null;
if (params.Data) {
this.Data = new Array();
for (let z in params.Data) {
let obj = new ResourceData();
obj.deserialize(params.Data[z]);
this.Data.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* EnableClsLogTopic request structure.
* @class
*/
class EnableClsLogTopicRequest extends AbstractModel {
constructor(){
super();
/**
* Logset ID
* @type {string || null}
*/
this.LogsetId = null;
/**
* Log topic ID
* @type {string || null}
*/
this.TopicId = null;
/**
* Specifies whether to access CDN or ECDN. Valid values: `cdn` (default) and `ecdn`.
* @type {string || null}
*/
this.Channel = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.LogsetId = 'LogsetId' in params ? params.LogsetId : null;
this.TopicId = 'TopicId' in params ? params.TopicId : null;
this.Channel = 'Channel' in params ? params.Channel : null;
}
}
/**
* Path cache/no cache configuration.
* @class
*/
class CacheConfigNoCache extends AbstractModel {
constructor(){
super();
/**
* Whether to enable no-caching at the path. Values:
`on`: Enable
`off`: Disable
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Switch = null;
/**
* Always forwards to the origin server for verification
`on`: Enable
`off`: Disable
It is disabled by default.
Note: This field may return `null`, indicating that no valid value can be obtained.
* @type {string || null}
*/
this.Revalidate = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.Revalidate = 'Revalidate' in params ? params.Revalidate : null;
}
}
/**
* Merging pull requests configuration item
* @class
*/
class OriginCombine extends AbstractModel {
constructor(){
super();
/**
* Whether to enable origin-pull merge. Values:
`on`: Enable
`off`: Disable
* @type {string || null}
*/
this.Switch = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
}
}
/**
* DeleteCdnDomain request structure.
* @class
*/
class DeleteCdnDomainRequest extends AbstractModel {
constructor(){
super();
/**
* Domain name
The domain name status should be `Disabled`
* @type {string || null}
*/
this.Domain = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Domain = 'Domain' in params ? params.Domain : null;
}
}
/**
* DescribePayType response structure.
* @class
*/
class DescribePayTypeResponse extends AbstractModel {
constructor(){
super();
/**
* Billing type
`flux`: Bill by traffic
`bandwidth`: Bill by bandwidth
`request`: Bill by the number of requests
`flux_sep`: Bill by dynamic and static traffic separately
`bandwidth_sep`: Bill by dynamic and static bandwidth separately
If you incur any usage when switching the billing mode, the new mode will take effect the next day. If no usage is incurred, the new mode takes effect immediately.
* @type {string || null}
*/
this.PayType = null;
/**
* Billing cycle
`day`: Daily
`month`: Monthly
`hour`: Hourly
* @type {string || null}
*/
this.BillingCycle = null;
/**
* Statistic data
`monthMax`: Billed monthly based on the monthly average daily peak traffic
`day95`: Billed monthly based on the daily 95th percentile bandwidth
`month95`: Billed monthly based on the monthly 95th percentile bandwidth
`sum`: Billed daily/monthly based on the total traffic or requests
`max`: Billed daily based on the peak bandwidth
* @type {string || null}
*/
this.StatType = null;
/**
* Regionl billing
`all`: Unified billing for all regions
`multiple`: Region-specific