Method: PureCloud::EdgeInterface#initialize

Defined in:
lib/purecloud/models/edge_interface.rb

#initialize(attributes = {}) ⇒ EdgeInterface

Returns a new instance of EdgeInterface.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/purecloud/models/edge_interface.rb', line 75

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'type']
    self.type = attributes[:'type']
  end
  
  if attributes[:'ipAddress']
    self.ip_address = attributes[:'ipAddress']
  end
  
  if attributes[:'name']
    self.name = attributes[:'name']
  end
  
  if attributes[:'macAddress']
    self.mac_address = attributes[:'macAddress']
  end
  
  if attributes[:'ifName']
    self.if_name = attributes[:'ifName']
  end
  
  if attributes[:'endpoints']
    if (value = attributes[:'endpoints']).is_a?(Array)
      self.endpoints = value
    end
  end
  
  if attributes[:'lineTypes']
    if (value = attributes[:'lineTypes']).is_a?(Array)
      self.line_types = value
    end
  end
  
  if attributes[:'addressFamilyId']
    self.address_family_id = attributes[:'addressFamilyId']
  end
  
end