Class: TencentCloud::Cdn::V20180606::AccessControl

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, accesscontrolrules = nil, returncode = nil) ⇒ AccessControl

Returns a new instance of AccessControl.



35
36
37
38
39
# File 'lib/v20180606/models.rb', line 35

def initialize(switch=nil, accesscontrolrules=nil, returncode=nil)
  @Switch = switch
  @AccessControlRules = accesscontrolrules
  @ReturnCode = returncode
end

Instance Attribute Details

#AccessControlRulesObject

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

Parameters:

  • Switch:

    启用请求头部及请求url访问控制开关,取值有:

  • AccessControlRules:

    请求头部及请求url访问规则

  • ReturnCode:

    返回状态码



33
34
35
# File 'lib/v20180606/models.rb', line 33

def AccessControlRules
  @AccessControlRules
end

#ReturnCodeObject

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

Parameters:

  • Switch:

    启用请求头部及请求url访问控制开关,取值有:

  • AccessControlRules:

    请求头部及请求url访问规则

  • ReturnCode:

    返回状态码



33
34
35
# File 'lib/v20180606/models.rb', line 33

def ReturnCode
  @ReturnCode
end

#SwitchObject

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

Parameters:

  • Switch:

    启用请求头部及请求url访问控制开关,取值有:

  • AccessControlRules:

    请求头部及请求url访问规则

  • ReturnCode:

    返回状态码



33
34
35
# File 'lib/v20180606/models.rb', line 33

def Switch
  @Switch
end

Instance Method Details

#deserialize(params) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/v20180606/models.rb', line 41

def deserialize(params)
  @Switch = params['Switch']
  unless params['AccessControlRules'].nil?
    @AccessControlRules = []
    params['AccessControlRules'].each do |i|
      accesscontrolrule_tmp = AccessControlRule.new
      accesscontrolrule_tmp.deserialize(i)
      @AccessControlRules << accesscontrolrule_tmp
    end
  end
  @ReturnCode = params['ReturnCode']
end