Class: TencentCloud::Cdn::V20180606::StatusCodeCache

Inherits:
TencentCloud::Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180606/models.rb

Overview

状态码缓存过期配置,默认情况下会对 404 状态码缓存 10 秒

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, cacherules = nil) ⇒ StatusCodeCache

Returns a new instance of StatusCodeCache.



13091
13092
13093
13094
# File 'lib/v20180606/models.rb', line 13091

def initialize(switch=nil, cacherules=nil)
  @Switch = switch
  @CacheRules = cacherules
end

Instance Attribute Details

#CacheRulesObject

on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Switch:

    状态码缓存过期配置开关,取值有:

  • CacheRules:

    状态码缓存过期规则明细



13089
13090
13091
# File 'lib/v20180606/models.rb', line 13089

def CacheRules
  @CacheRules
end

#SwitchObject

on:开启 off:关闭 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Switch:

    状态码缓存过期配置开关,取值有:

  • CacheRules:

    状态码缓存过期规则明细



13089
13090
13091
# File 'lib/v20180606/models.rb', line 13089

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
# File 'lib/v20180606/models.rb', line 13096

def deserialize(params)
  @Switch = params['Switch']
  unless params['CacheRules'].nil?
    @CacheRules = []
    params['CacheRules'].each do |i|
      statuscodecacherule_tmp = StatusCodeCacheRule.new
      statuscodecacherule_tmp.deserialize(i)
      @CacheRules << statuscodecacherule_tmp
    end
  end
end