Class: ZabbixManager::Mediatypes

Inherits:
Basic
  • Object
show all
Defined in:
lib/zabbix_manager/classes/mediatypes.rb

Instance Method Summary collapse

Methods inherited from Basic

#add, #all, #create, #create_or_update, #create_raw, #delete, #delete_raw, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #get_raw, #hash_equals?, #identity_filter, #initialize, #key, #keys, #log, #normalize_hash, #parse_keys, #update, #update_raw

Constructor Details

This class inherits a constructor from ZabbixManager::Basic

Instance Method Details

#default_optionsHash

返回媒介类型的最小默认属性;端点和凭据等版本相关字段由调用方显式提供。

Returns:

  • (Hash)

    媒介类型默认属性



19
20
21
# File 'lib/zabbix_manager/classes/mediatypes.rb', line 19

def default_options
  { type: 0 }
end

#identifyString

返回媒介类型用于业务识别的字段名。

Returns:

  • (String)

    识别字段名



13
14
15
# File 'lib/zabbix_manager/classes/mediatypes.rb', line 13

def identify
  "name"
end

#method_nameString

返回媒介类型对象对应的 Zabbix API 方法前缀。

Returns:

  • (String)

    API 方法前缀



7
8
9
# File 'lib/zabbix_manager/classes/mediatypes.rb', line 7

def method_name
  "mediatype"
end