Class: TencentCloud::Cdn::V20180606::Referer

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

Overview

Referer 黑白名单配置,默认为关闭状态

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, refererrules = nil) ⇒ Referer

Returns a new instance of Referer.



11238
11239
11240
11241
# File 'lib/v20180606/models.rb', line 11238

def initialize(switch=nil, refererrules=nil)
  @Switch = switch
  @RefererRules = refererrules
end

Instance Attribute Details

#RefererRulesObject

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

Parameters:

  • Switch:

    referer 黑白名单配置开关,取值有:

  • RefererRules:

    referer 黑白名单配置规则



11236
11237
11238
# File 'lib/v20180606/models.rb', line 11236

def RefererRules
  @RefererRules
end

#SwitchObject

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

Parameters:

  • Switch:

    referer 黑白名单配置开关,取值有:

  • RefererRules:

    referer 黑白名单配置规则



11236
11237
11238
# File 'lib/v20180606/models.rb', line 11236

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
# File 'lib/v20180606/models.rb', line 11243

def deserialize(params)
  @Switch = params['Switch']
  unless params['RefererRules'].nil?
    @RefererRules = []
    params['RefererRules'].each do |i|
      refererrule_tmp = RefererRule.new
      refererrule_tmp.deserialize(i)
      @RefererRules << refererrule_tmp
    end
  end
end