Class: TencentCloud::Cdn::V20180606::UrlRedirect

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

Overview

访问URL重写配置

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, pathrules = nil) ⇒ UrlRedirect

Returns a new instance of UrlRedirect.



14117
14118
14119
14120
# File 'lib/v20180606/models.rb', line 14117

def initialize(switch=nil, pathrules=nil)
  @Switch = switch
  @PathRules = pathrules
end

Instance Attribute Details

#PathRulesObject

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

Parameters:

  • Switch:

    访问URL重写配置开关,取值有:

  • PathRules:

    访问URL重写规则,当Switch为on时必填,规则数量最大为10个。



14115
14116
14117
# File 'lib/v20180606/models.rb', line 14115

def PathRules
  @PathRules
end

#SwitchObject

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

Parameters:

  • Switch:

    访问URL重写配置开关,取值有:

  • PathRules:

    访问URL重写规则,当Switch为on时必填,规则数量最大为10个。



14115
14116
14117
# File 'lib/v20180606/models.rb', line 14115

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
# File 'lib/v20180606/models.rb', line 14122

def deserialize(params)
  @Switch = params['Switch']
  unless params['PathRules'].nil?
    @PathRules = []
    params['PathRules'].each do |i|
      urlredirectrule_tmp = UrlRedirectRule.new
      urlredirectrule_tmp.deserialize(i)
      @PathRules << urlredirectrule_tmp
    end
  end
end