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.



7495
7496
7497
7498
# File 'lib/v20180606/models.rb', line 7495

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

Instance Attribute Details

#PageRulesObject

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

Parameters:

  • Switch:

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

  • PageRules:

    状态码重定向规则配置



7493
7494
7495
# File 'lib/v20180606/models.rb', line 7493

def PageRules
  @PageRules
end

#SwitchObject

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

Parameters:

  • Switch:

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

  • PageRules:

    状态码重定向规则配置



7493
7494
7495
# File 'lib/v20180606/models.rb', line 7493

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
# File 'lib/v20180606/models.rb', line 7500

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