Class: TencentCloud::Cdn::V20180606::RequestHeader

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) ⇒ RequestHeader

Returns a new instance of RequestHeader.



11461
11462
11463
11464
# File 'lib/v20180606/models.rb', line 11461

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

Instance Attribute Details

#HeaderRulesObject

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

Parameters:

  • Switch:

    自定义请求头配置开关,取值有:

  • HeaderRules:

    自定义请求头配置规则



11459
11460
11461
# File 'lib/v20180606/models.rb', line 11459

def HeaderRules
  @HeaderRules
end

#SwitchObject

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

Parameters:

  • Switch:

    自定义请求头配置开关,取值有:

  • HeaderRules:

    自定义请求头配置规则



11459
11460
11461
# File 'lib/v20180606/models.rb', line 11459

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
# File 'lib/v20180606/models.rb', line 11466

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