tencentcloud-sdk-nodejs-intl-en
Version:
1,824 lines (1,551 loc) ⢠425 kB
JavaScript
/*
* Copyright (c) 2018 Tencent. 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();
/**
* Specifies the download url of the log package.
Download content is a compression package with the gz suffix. after decompression, it becomes a text file without an extension. link validity period is 1 day.
* @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);
}
}
}
}
/**
* `UserAgent` blacklist/whitelist configuration
* @class
*/
class UserAgentFilter extends AbstractModel {
constructor(){
super();
/**
* Whether to enable User-Agent blocklist/allowlist. 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;
/**
* Effective rule list for UA blacklist and whitelist. must not exceed 10 rules.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<UserAgentFilterRule> || null}
*/
this.FilterRules = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.FilterRules) {
this.FilterRules = new Array();
for (let z in params.FilterRules) {
let obj = new UserAgentFilterRule();
obj.deserialize(params.FilterRules[z]);
this.FilterRules.push(obj);
}
}
}
}
/**
* 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. specifies the field with masking back.
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;
}
}
/**
* 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;
/**
* Specifies the Tls version setting, which has partial support for Advance domain names and can be set to TLSv1, TLSv1.1, TLSv1.2, or TLSv1.3. consecutive versions must be enabled when modifying.
Note: This field may return null, indicating that no valid values 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;
/**
* Start time.
* @type {string || null}
*/
this.StartTime = null;
/**
* End time.
* @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 the region for log download, defaults to mainland. valid values:.
<li>mainland: specifies the download url for the domestic acceleration log package.</li>.
<Li>Overseas: specifies the url for obtaining overseas acceleration logs package download.</li>.
<li>global: simultaneously obtain domestic and overseas acceleration logs package download urls (separately packaged).</li>.
* @type {string || null}
*/
this.Area = null;
/**
* Specifies the type of logs to download. valid values:.
<Li>Access: specifies the access log.</li>.
* @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;
/**
* When the original image is avif and the client Accept header contains image/avif, return directly the original image.
When the original image is in avif format and the client Accept header does not include image/avif but includes image/webp, convert avif to webp format and return. if the Accept header does not include image/webp, convert to jpeg and return.
Valid values:.
- []
- ["webp"]
- ["jpeg"]
- ["webp", "jpeg"]
"Webp": whether avif to webp is enabled, "jpeg": whether avif to jpeg is enabled. if both webp and jpeg are enabled, webp must be before jpeg.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<string> || null}
*/
this.FallbackFormats = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
this.FallbackFormats = 'FallbackFormats' in params ? params.FallbackFormats : null;
}
}
/**
* CreateClsLogTopic response structure.
* @class
*/
class CreateClsLogTopicResponse extends AbstractModel {
constructor(){
super();
/**
* Topic ID
* @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 field name. supported list as follows:.
-`Origin`: specifies the primary origin server.
-Domain name. specifies the domain name.
-resourceId: domain id.
-Status: specifies the domain name status. valid values: online, offline, processing, deleted.
-serviceType: specifies the business type. valid values: web, download, media, hybrid, dynamic.
-projectId: specifies the project ID.
-domainType: specifies the primary origin server type. valid values: cname (self-owned origin), cos (cloud object storage integration), third_party (third-party object storage), igtm (igtm multi-active origin).
-fullUrlCache. specifies full path cache. valid values: on, off.
-Specifies whether to configure https. valid values: on, off, processing.
-originPullProtocol: specifies the origin-pull protocol. valid values: http, follow, https.
-tagKey: specifies the Tag key.
* @type {string || null}
*/
this.Name = null;
/**
* Specifies the filter field value. the default maximum is 5. when Name is origin/domain and Fuzzy is true, the maximum is 1.
* @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;
}
}
/**
* Parameter blocklist.
* @class
*/
class ParamFilter extends AbstractModel {
constructor(){
super();
/**
* Specifies the blocklist parameter switch.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Switch = null;
/**
* Specifies the blocklist rule parameter.
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<ParamFilterRule> || null}
*/
this.FilterRules = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Switch = 'Switch' in params ? params.Switch : null;
if (params.FilterRules) {
this.FilterRules = new Array();
for (let z in params.FilterRules) {
let obj = new ParamFilterRule();
obj.deserialize(params.FilterRules[z]);
this.FilterRules.push(obj);
}
}
}
}
/**
* 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);
}
}
}
}
/**
* 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;
}
}
/**
* 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;
}
}
/**
* 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 billing
* @type {string || null}
*/
this.RegionType = null;
/**
* Current billing mode
`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
* @type {string || null}
*/
this.CurrentPayType = 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.PayType = 'PayType' in params ? params.PayType : null;
this.BillingCycle = 'BillingCycle' in params ? params.BillingCycle : null;
this.StatType = 'StatType' in params ? params.StatType : null;
this.RegionType = 'RegionType' in params ? params.RegionType : null;
this.CurrentPayType = 'CurrentPayType' in params ? params.CurrentPayType : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Path-based origin-pull configuration rules
* @class
*/
class PathRule extends AbstractModel {
constructor(){
super();
/**
* Whether to enable wildcard match (`*`).
`false`: disabled
`true`: enabled
Note: this field may return `null`, indicating that no valid value can be obtained.
* @type {boolean || null}
*/
this.Regex = null;
/**
* Matched URL. Only URLs are supported, while parameters are not. The exact match is used by default. If wildcard match is enabled, up to 5 wildcards are supported. The URL can contain up to 1,024 characters.
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.Path = null;
/**
* Origin server when the path matches. COS origin with private read/write is not supported. The default origin server will be used by default when this field is left empty.
Note: this field may return `null`, indicating that no valid values can be obt