Class: TencentCloud::Cdn::V20180606::MaxAge

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

Overview

浏览器缓存规则配置,用于设置 MaxAge 默认值,默认为关闭状态

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, maxagerules = nil, maxagecoderule = nil) ⇒ MaxAge

Returns a new instance of MaxAge.



6853
6854
6855
6856
6857
# File 'lib/v20180606/models.rb', line 6853

def initialize(switch=nil, maxagerules=nil, maxagecoderule=nil)
  @Switch = switch
  @MaxAgeRules = maxagerules
  @MaxAgeCodeRule = maxagecoderule
end

Instance Attribute Details

#MaxAgeCodeRuleObject

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

Parameters:

  • Switch:

    浏览器缓存配置开关,取值有:

  • MaxAgeRules:

    MaxAge 规则

  • MaxAgeCodeRule:

    MaxAge 状态码相关规则



6851
6852
6853
# File 'lib/v20180606/models.rb', line 6851

def MaxAgeCodeRule
  @MaxAgeCodeRule
end

#MaxAgeRulesObject

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

Parameters:

  • Switch:

    浏览器缓存配置开关,取值有:

  • MaxAgeRules:

    MaxAge 规则

  • MaxAgeCodeRule:

    MaxAge 状态码相关规则



6851
6852
6853
# File 'lib/v20180606/models.rb', line 6851

def MaxAgeRules
  @MaxAgeRules
end

#SwitchObject

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

Parameters:

  • Switch:

    浏览器缓存配置开关,取值有:

  • MaxAgeRules:

    MaxAge 规则

  • MaxAgeCodeRule:

    MaxAge 状态码相关规则



6851
6852
6853
# File 'lib/v20180606/models.rb', line 6851

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
# File 'lib/v20180606/models.rb', line 6859

def deserialize(params)
  @Switch = params['Switch']
  unless params['MaxAgeRules'].nil?
    @MaxAgeRules = []
    params['MaxAgeRules'].each do |i|
      maxagerule_tmp = MaxAgeRule.new
      maxagerule_tmp.deserialize(i)
      @MaxAgeRules << maxagerule_tmp
    end
  end
  unless params['MaxAgeCodeRule'].nil?
    @MaxAgeCodeRule = MaxAgeCodeRule.new
    @MaxAgeCodeRule.deserialize(params['MaxAgeCodeRule'])
  end
end