# frozen_string_literal: true # Copyright (c) 2017-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. module TencentCloud module Teo module V20220106 # CreatePrefetchTask请求参数结构体 class CreatePrefetchTaskRequest < TencentCloud::Common::AbstractModel # @param ZoneId: Zone ID # @type ZoneId: String # @param Targets: 要预热的资源列表,每个元素格式类似如下: # http://www.example.com/example.txt # @type Targets: Array # @param EncodeUrl: 是否对url进行encode # 若内容含有非 ASCII 字符集的字符,请开启此开关,编码转换(编码规则遵循 RFC3986) # @type EncodeUrl: Boolean # @param Headers: 附带的http头部信息 # @type Headers: Array attr_accessor :ZoneId, :Targets, :EncodeUrl, :Headers def initialize(zoneid=nil, targets=nil, encodeurl=nil, headers=nil) @ZoneId = zoneid @Targets = targets @EncodeUrl = encodeurl @Headers = headers end def deserialize(params) @ZoneId = params['ZoneId'] @Targets = params['Targets'] @EncodeUrl = params['EncodeUrl'] unless params['Headers'].nil? @Headers = [] params['Headers'].each do |i| header_tmp = Header.new header_tmp.deserialize(i) @Headers << header_tmp end end end end # CreatePrefetchTask返回参数结构体 class CreatePrefetchTaskResponse < TencentCloud::Common::AbstractModel # @param JobId: 任务ID # @type JobId: String # @param FailedList: 失败的任务列表 # 注意:此字段可能返回 null,表示取不到有效值。 # @type FailedList: Array # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 # @type RequestId: String attr_accessor :JobId, :FailedList, :RequestId def initialize(jobid=nil, failedlist=nil, requestid=nil) @JobId = jobid @FailedList = failedlist @RequestId = requestid end def deserialize(params) @JobId = params['JobId'] unless params['FailedList'].nil? @FailedList = [] params['FailedList'].each do |i| failreason_tmp = FailReason.new failreason_tmp.deserialize(i) @FailedList << failreason_tmp end end @RequestId = params['RequestId'] end end # CreatePurgeTask请求参数结构体 class CreatePurgeTaskRequest < TencentCloud::Common::AbstractModel # @param ZoneId: Zone ID # @type ZoneId: String # @param Type: 类型,当前支持的类型: # - purge_url:URL # - purge_prefix:前缀 # - purge_host:Hostname # - purge_all:全部缓存 # @type Type: String # @param Targets: 要刷新的资源列表,每个元素格式依据Type而定 # 1) Type = purge_host 时 # 形如:www.example.com 或 foo.bar.example.com # 2) Type = purge_prefix 时 # 形如:http://www.example.com/example # 3) Type = purge_url 时 # 形如:https://www.example.com/example.jpg # 4)Type = purge_all 时 # Targets可为空,不需要填写 # @type Targets: Array # @param EncodeUrl: 若有编码转换,仅清除编码转换后匹配的资源 # 若内容含有非 ASCII 字符集的字符,请开启此开关,编码转换(编码规则遵循 RFC3986) # @type EncodeUrl: Boolean attr_accessor :ZoneId, :Type, :Targets, :EncodeUrl def initialize(zoneid=nil, type=nil, targets=nil, encodeurl=nil) @ZoneId = zoneid @Type = type @Targets = targets @EncodeUrl = encodeurl end def deserialize(params) @ZoneId = params['ZoneId'] @Type = params['Type'] @Targets = params['Targets'] @EncodeUrl = params['EncodeUrl'] end end # CreatePurgeTask返回参数结构体 class CreatePurgeTaskResponse < TencentCloud::Common::AbstractModel # @param JobId: 任务ID # @type JobId: String # @param FailedList: 失败的任务列表及原因 # 注意:此字段可能返回 null,表示取不到有效值。 # @type FailedList: Array # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 # @type RequestId: String attr_accessor :JobId, :FailedList, :RequestId def initialize(jobid=nil, failedlist=nil, requestid=nil) @JobId = jobid @FailedList = failedlist @RequestId = requestid end def deserialize(params) @JobId = params['JobId'] unless params['FailedList'].nil? @FailedList = [] params['FailedList'].each do |i| failreason_tmp = FailReason.new failreason_tmp.deserialize(i) @FailedList << failreason_tmp end end @RequestId = params['RequestId'] end end # DescribePrefetchTasks请求参数结构体 class DescribePrefetchTasksRequest < TencentCloud::Common::AbstractModel # @param JobId: 任务ID # @type JobId: String # @param StartTime: 查询起始时间 # @type StartTime: String # @param EndTime: 查询结束时间 # @type EndTime: String # @param Offset: 查询起始偏移量 # @type Offset: Integer # @param Limit: 查询最大返回的结果条数 # @type Limit: Integer # @param Statuses: 查询的状态 # 允许的值为:processing、success、failed、timeout、invalid # @type Statuses: Array # @param ZoneId: zone id # @type ZoneId: String # @param Domains: 查询的域名列表 # @type Domains: Array # @param Target: 查询的资源 # @type Target: String attr_accessor :JobId, :StartTime, :EndTime, :Offset, :Limit, :Statuses, :ZoneId, :Domains, :Target def initialize(jobid=nil, starttime=nil, endtime=nil, offset=nil, limit=nil, statuses=nil, zoneid=nil, domains=nil, target=nil) @JobId = jobid @StartTime = starttime @EndTime = endtime @Offset = offset @Limit = limit @Statuses = statuses @ZoneId = zoneid @Domains = domains @Target = target end def deserialize(params) @JobId = params['JobId'] @StartTime = params['StartTime'] @EndTime = params['EndTime'] @Offset = params['Offset'] @Limit = params['Limit'] @Statuses = params['Statuses'] @ZoneId = params['ZoneId'] @Domains = params['Domains'] @Target = params['Target'] end end # DescribePrefetchTasks返回参数结构体 class DescribePrefetchTasksResponse < TencentCloud::Common::AbstractModel # @param TotalCount: 该查询条件总共条目数 # @type TotalCount: Integer # @param Tasks: 任务结果列表 # @type Tasks: Array # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 # @type RequestId: String attr_accessor :TotalCount, :Tasks, :RequestId def initialize(totalcount=nil, tasks=nil, requestid=nil) @TotalCount = totalcount @Tasks = tasks @RequestId = requestid end def deserialize(params) @TotalCount = params['TotalCount'] unless params['Tasks'].nil? @Tasks = [] params['Tasks'].each do |i| task_tmp = Task.new task_tmp.deserialize(i) @Tasks << task_tmp end end @RequestId = params['RequestId'] end end # DescribePurgeTasks请求参数结构体 class DescribePurgeTasksRequest < TencentCloud::Common::AbstractModel # @param JobId: 任务ID # @type JobId: String # @param Type: 类型 # @type Type: String # @param StartTime: 查询起始时间 # @type StartTime: String # @param EndTime: 查询结束时间 # @type EndTime: String # @param Offset: 查询起始偏移量 # @type Offset: Integer # @param Limit: 查询最大返回的结果条数 # @type Limit: Integer # @param Statuses: 查询的状态 # 允许的值为:processing、success、failed、timeout、invalid # @type Statuses: Array # @param ZoneId: zone id # @type ZoneId: String # @param Domains: 查询的域名列表 # @type Domains: Array # @param Target: 查询内容 # @type Target: String attr_accessor :JobId, :Type, :StartTime, :EndTime, :Offset, :Limit, :Statuses, :ZoneId, :Domains, :Target def initialize(jobid=nil, type=nil, starttime=nil, endtime=nil, offset=nil, limit=nil, statuses=nil, zoneid=nil, domains=nil, target=nil) @JobId = jobid @Type = type @StartTime = starttime @EndTime = endtime @Offset = offset @Limit = limit @Statuses = statuses @ZoneId = zoneid @Domains = domains @Target = target end def deserialize(params) @JobId = params['JobId'] @Type = params['Type'] @StartTime = params['StartTime'] @EndTime = params['EndTime'] @Offset = params['Offset'] @Limit = params['Limit'] @Statuses = params['Statuses'] @ZoneId = params['ZoneId'] @Domains = params['Domains'] @Target = params['Target'] end end # DescribePurgeTasks返回参数结构体 class DescribePurgeTasksResponse < TencentCloud::Common::AbstractModel # @param TotalCount: 该查询条件总共条目数 # @type TotalCount: Integer # @param Tasks: 任务结果列表 # @type Tasks: Array # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 # @type RequestId: String attr_accessor :TotalCount, :Tasks, :RequestId def initialize(totalcount=nil, tasks=nil, requestid=nil) @TotalCount = totalcount @Tasks = tasks @RequestId = requestid end def deserialize(params) @TotalCount = params['TotalCount'] unless params['Tasks'].nil? @Tasks = [] params['Tasks'].each do |i| task_tmp = Task.new task_tmp.deserialize(i) @Tasks << task_tmp end end @RequestId = params['RequestId'] end end # DescribeZones请求参数结构体 class DescribeZonesRequest < TencentCloud::Common::AbstractModel # @param Offset: 分页查询偏移量。默认值:0,最小值:0。 # @type Offset: Integer # @param Limit: 分页查询限制数目。默认值:1000,最大值:1000。 # @type Limit: Integer # @param Filters: 查询条件过滤器,复杂类型。 # @type Filters: Array attr_accessor :Offset, :Limit, :Filters def initialize(offset=nil, limit=nil, filters=nil) @Offset = offset @Limit = limit @Filters = filters end def deserialize(params) @Offset = params['Offset'] @Limit = params['Limit'] unless params['Filters'].nil? @Filters = [] params['Filters'].each do |i| zonefilter_tmp = ZoneFilter.new zonefilter_tmp.deserialize(i) @Filters << zonefilter_tmp end end end end # DescribeZones返回参数结构体 class DescribeZonesResponse < TencentCloud::Common::AbstractModel # @param TotalCount: 符合条件的站点个数。 # @type TotalCount: Integer # @param Zones: 站点详细信息列表。 # @type Zones: Array # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 # @type RequestId: String attr_accessor :TotalCount, :Zones, :RequestId def initialize(totalcount=nil, zones=nil, requestid=nil) @TotalCount = totalcount @Zones = zones @RequestId = requestid end def deserialize(params) @TotalCount = params['TotalCount'] unless params['Zones'].nil? @Zones = [] params['Zones'].each do |i| zone_tmp = Zone.new zone_tmp.deserialize(i) @Zones << zone_tmp end end @RequestId = params['RequestId'] end end # 失败原因 class FailReason < TencentCloud::Common::AbstractModel # @param Reason: 失败原因 # @type Reason: String # @param Targets: 处理失败的资源列表。 # 该列表元素来源于输入参数中的Targets,因此格式和入参中的Targets保持一致 # @type Targets: Array attr_accessor :Reason, :Targets def initialize(reason=nil, targets=nil) @Reason = reason @Targets = targets end def deserialize(params) @Reason = params['Reason'] @Targets = params['Targets'] end end # 刷新预热附带的头部信息 class Header < TencentCloud::Common::AbstractModel # @param Name: HTTP头部 # @type Name: String # @param Value: HTTP头部值 # @type Value: String attr_accessor :Name, :Value def initialize(name=nil, value=nil) @Name = name @Value = value end def deserialize(params) @Name = params['Name'] @Value = params['Value'] end end # 计费资源 class Resource < TencentCloud::Common::AbstractModel # @param Id: 资源 ID。 # @type Id: String # @param PayMode: 付费模式,取值有: #