Class: TencentCloud::Ecdn::V20191012::ResponseHeader

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20191012/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.



1274
1275
1276
1277
# File 'lib/v20191012/models.rb', line 1274

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

Instance Attribute Details

#HeaderRulesObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Switch:

    自定义响应头开关,on或off。

  • HeaderRules:

    自定义响应头规则数组。



1272
1273
1274
# File 'lib/v20191012/models.rb', line 1272

def HeaderRules
  @HeaderRules
end

#SwitchObject

注意:此字段可能返回 null,表示取不到有效值。

Parameters:

  • Switch:

    自定义响应头开关,on或off。

  • HeaderRules:

    自定义响应头规则数组。



1272
1273
1274
# File 'lib/v20191012/models.rb', line 1272

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'lib/v20191012/models.rb', line 1279

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