Class: TencentCloud::Cdn::V20180606::ScdnBotConfig

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

Overview

bot配置类型

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, botcookie = nil, botjavascript = nil) ⇒ ScdnBotConfig

Returns a new instance of ScdnBotConfig.



11908
11909
11910
11911
11912
# File 'lib/v20180606/models.rb', line 11908

def initialize(switch=nil, botcookie=nil, botjavascript=nil)
  @Switch = switch
  @BotCookie = botcookie
  @BotJavaScript = botjavascript
end

Instance Attribute Details

#BotCookieObject

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

Parameters:

  • Switch:

    Scdn bot配置开关,取值有:

  • BotCookie:

    Bot cookie策略

  • BotJavaScript:

    Bot Js策略



11906
11907
11908
# File 'lib/v20180606/models.rb', line 11906

def BotCookie
  @BotCookie
end

#BotJavaScriptObject

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

Parameters:

  • Switch:

    Scdn bot配置开关,取值有:

  • BotCookie:

    Bot cookie策略

  • BotJavaScript:

    Bot Js策略



11906
11907
11908
# File 'lib/v20180606/models.rb', line 11906

def BotJavaScript
  @BotJavaScript
end

#SwitchObject

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

Parameters:

  • Switch:

    Scdn bot配置开关,取值有:

  • BotCookie:

    Bot cookie策略

  • BotJavaScript:

    Bot Js策略



11906
11907
11908
# File 'lib/v20180606/models.rb', line 11906

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
# File 'lib/v20180606/models.rb', line 11914

def deserialize(params)
  @Switch = params['Switch']
  unless params['BotCookie'].nil?
    @BotCookie = []
    params['BotCookie'].each do |i|
      botcookie_tmp = BotCookie.new
      botcookie_tmp.deserialize(i)
      @BotCookie << botcookie_tmp
    end
  end
  unless params['BotJavaScript'].nil?
    @BotJavaScript = []
    params['BotJavaScript'].each do |i|
      botjavascript_tmp = BotJavaScript.new
      botjavascript_tmp.deserialize(i)
      @BotJavaScript << botjavascript_tmp
    end
  end
end