Class: TencentCloud::Cdn::V20180606::UserAgentFilter

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

Overview

UserAgent黑白名单配置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, filterrules = nil) ⇒ UserAgentFilter

Returns a new instance of UserAgentFilter.



14182
14183
14184
14185
# File 'lib/v20180606/models.rb', line 14182

def initialize(switch=nil, filterrules=nil)
  @Switch = switch
  @FilterRules = filterrules
end

Instance Attribute Details

#FilterRulesObject

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

Parameters:

  • Switch:

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

  • FilterRules:

    UA黑白名单生效规则列表



14180
14181
14182
# File 'lib/v20180606/models.rb', line 14180

def FilterRules
  @FilterRules
end

#SwitchObject

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

Parameters:

  • Switch:

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

  • FilterRules:

    UA黑白名单生效规则列表



14180
14181
14182
# File 'lib/v20180606/models.rb', line 14180

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
# File 'lib/v20180606/models.rb', line 14187

def deserialize(params)
  @Switch = params['Switch']
  unless params['FilterRules'].nil?
    @FilterRules = []
    params['FilterRules'].each do |i|
      useragentfilterrule_tmp = UserAgentFilterRule.new
      useragentfilterrule_tmp.deserialize(i)
      @FilterRules << useragentfilterrule_tmp
    end
  end
end