Class: TencentCloud::Cdn::V20180606::ResponseHeader

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

Overview

自定义响应头配置,默认为关闭状态

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, headerrules = nil) ⇒ ResponseHeader

Returns a new instance of ResponseHeader.



11584
11585
11586
11587
# File 'lib/v20180606/models.rb', line 11584

def initialize(switch=nil, headerrules=nil)
  @Switch = switch
  @HeaderRules = headerrules
end

Instance Attribute Details

#HeaderRulesObject

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

Parameters:

  • Switch:

    自定义响应头配置开关,取值有:

  • HeaderRules:

    自定义响应头规则



11582
11583
11584
# File 'lib/v20180606/models.rb', line 11582

def HeaderRules
  @HeaderRules
end

#SwitchObject

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

Parameters:

  • Switch:

    自定义响应头配置开关,取值有:

  • HeaderRules:

    自定义响应头规则



11582
11583
11584
# File 'lib/v20180606/models.rb', line 11582

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
# File 'lib/v20180606/models.rb', line 11589

def deserialize(params)
  @Switch = params['Switch']
  unless params['HeaderRules'].nil?
    @HeaderRules = []
    params['HeaderRules'].each do |i|
      httpheaderpathrule_tmp = HttpHeaderPathRule.new
      httpheaderpathrule_tmp.deserialize(i)
      @HeaderRules << httpheaderpathrule_tmp
    end
  end
end