Class: TencentCloud::Cwp::V20180228::WebHookPolicy

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

Overview

策略

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id = nil, name = nil, events = nil, hostlabels = nil, receivers = nil, format = nil, customfields = nil, isdisabled = nil, quuids = nil, hostcount = nil, excludedquuids = nil) ⇒ WebHookPolicy

Returns a new instance of WebHookPolicy.



41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
# File 'lib/v20180228/models.rb', line 41536

def initialize(id=nil, name=nil, events=nil, hostlabels=nil, receivers=nil, format=nil, customfields=nil, isdisabled=nil, quuids=nil, hostcount=nil, excludedquuids=nil)
  @Id = id
  @Name = name
  @Events = events
  @HostLabels = hostlabels
  @Receivers = receivers
  @Format = format
  @CustomFields = customfields
  @IsDisabled = isdisabled
  @Quuids = quuids
  @HostCount = hostcount
  @ExcludedQuuids = excludedquuids
end

Instance Attribute Details

#CustomFieldsObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def CustomFields
  @CustomFields
end

#EventsObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def Events
  @Events
end

#ExcludedQuuidsObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def ExcludedQuuids
  @ExcludedQuuids
end

#FormatObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def Format
  @Format
end

#HostCountObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def HostCount
  @HostCount
end

#HostLabelsObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def HostLabels
  @HostLabels
end

#IdObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def Id
  @Id
end

#IsDisabledObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def IsDisabled
  @IsDisabled
end

#NameObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def Name
  @Name
end

#QuuidsObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def Quuids
  @Quuids
end

#ReceiversObject

Parameters:

  • Id:

    id

  • Name:

    策略名称

  • Events:

    事件类型

  • HostLabels:

    主机范围

  • Receivers:

    接收人

  • Format:

    格式 0text 1json

  • CustomFields:

    自定义透传字段

  • IsDisabled:
  • Quuids:

    主机列表

  • HostCount:

    主机数目

  • ExcludedQuuids:

    需排除的机器列表



41534
41535
41536
# File 'lib/v20180228/models.rb', line 41534

def Receivers
  @Receivers
end

Instance Method Details

#deserialize(params) ⇒ Object



41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590
# File 'lib/v20180228/models.rb', line 41550

def deserialize(params)
  @Id = params['Id']
  @Name = params['Name']
  unless params['Events'].nil?
    @Events = []
    params['Events'].each do |i|
      webhookeventkv_tmp = WebHookEventKv.new
      webhookeventkv_tmp.deserialize(i)
      @Events << webhookeventkv_tmp
    end
  end
  unless params['HostLabels'].nil?
    @HostLabels = []
    params['HostLabels'].each do |i|
      webhookhostlabel_tmp = WebHookHostLabel.new
      webhookhostlabel_tmp.deserialize(i)
      @HostLabels << webhookhostlabel_tmp
    end
  end
  unless params['Receivers'].nil?
    @Receivers = []
    params['Receivers'].each do |i|
      webhookreceiver_tmp = WebHookReceiver.new
      webhookreceiver_tmp.deserialize(i)
      @Receivers << webhookreceiver_tmp
    end
  end
  @Format = params['Format']
  unless params['CustomFields'].nil?
    @CustomFields = []
    params['CustomFields'].each do |i|
      webhookcustomfield_tmp = WebHookCustomField.new
      webhookcustomfield_tmp.deserialize(i)
      @CustomFields << webhookcustomfield_tmp
    end
  end
  @IsDisabled = params['IsDisabled']
  @Quuids = params['Quuids']
  @HostCount = params['HostCount']
  @ExcludedQuuids = params['ExcludedQuuids']
end