class Apcera::DrainConfig
Attributes
priority[RW]
protocol[RW]
Public Class Methods
attribute_map()
click to toggle source
attribute mapping from ruby-style variable name to JSON key
# File lib/apcera/models/drain_config.rb, line 6 def self.attribute_map { # The configured syslog priority. :'priority' => :'priority', # The default syslog protocol to dial over. Defaults to TCP. :'protocol' => :'protocol' } end
new(attributes = {})
click to toggle source
# File lib/apcera/models/drain_config.rb, line 27 def initialize(attributes = {}) return if !attributes.is_a?(Hash) || attributes.empty? # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'priority'] self.priority = attributes[:'priority'] end if attributes[:'protocol'] self.protocol = attributes[:'protocol'] end end
swagger_types()
click to toggle source
attribute type
# File lib/apcera/models/drain_config.rb, line 19 def self.swagger_types { :'priority' => :'Integer', :'protocol' => :'String' } end
Public Instance Methods
protocol=(protocol)
click to toggle source
# File lib/apcera/models/drain_config.rb, line 44 def protocol=(protocol) allowed_values = ["udp", "tcp"] if protocol && !allowed_values.include?(protocol) fail "invalid value for 'protocol', must be one of #{allowed_values}" end @protocol = protocol end