Class: TencentCloud::Cdn::V20180606::ErrorPage

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

Overview

状态码重定向配置,默认为关闭状态

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(switch = nil, pagerules = nil) ⇒ ErrorPage

Returns a new instance of ErrorPage.



5153
5154
5155
5156
# File 'lib/v20180606/models.rb', line 5153

def initialize(switch=nil, pagerules=nil)
  @Switch = switch
  @PageRules = pagerules
end

Instance Attribute Details

#PageRulesObject

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

Parameters:

  • Switch:

    状态码重定向配置开关,取值有:

  • PageRules:

    状态码重定向规则配置



5151
5152
5153
# File 'lib/v20180606/models.rb', line 5151

def PageRules
  @PageRules
end

#SwitchObject

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

Parameters:

  • Switch:

    状态码重定向配置开关,取值有:

  • PageRules:

    状态码重定向规则配置



5151
5152
5153
# File 'lib/v20180606/models.rb', line 5151

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
# File 'lib/v20180606/models.rb', line 5158

def deserialize(params)
  @Switch = params['Switch']
  unless params['PageRules'].nil?
    @PageRules = []
    params['PageRules'].each do |i|
      errorpagerule_tmp = ErrorPageRule.new
      errorpagerule_tmp.deserialize(i)
      @PageRules << errorpagerule_tmp
    end
  end
end