class Apcera::Route

Attributes

endpoint[RW]
type[RW]
weight[RW]

Public Class Methods

attribute_map() click to toggle source

attribute mapping from ruby-style variable name to JSON key

# File lib/apcera/models/route.rb, line 6
def self.attribute_map
  {
    
    # The URI where the traffic should being routed to. For HTTP routes, the value should contain the route's host and path; for TCP routes, the value should take the form of \"ip:port\".
    :'endpoint' => :'endpoint',
    
    # The type of route. Valid values are `http` or `tcp`.
    :'type' => :'type',
    
    # A value between 0 and 1 that specifies the route's weight, which is used to balance incoming traffic across apps that share the route. Weights are not on a specific scale; weights of all routes for a given job are normalized.
    :'weight' => :'weight'
    
  }
end
new(attributes = {}) click to toggle source
# File lib/apcera/models/route.rb, line 31
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[:'endpoint']
    self.endpoint = attributes[:'endpoint']
  end
  
  if attributes[:'type']
    self.type = attributes[:'type']
  end
  
  if attributes[:'weight']
    self.weight = attributes[:'weight']
  end
  
end
swagger_types() click to toggle source

attribute type

# File lib/apcera/models/route.rb, line 22
def self.swagger_types
  {
    :'endpoint' => :'String',
    :'type' => :'String',
    :'weight' => :'Float'
    
  }
end