Method: Apcera::SemiPipeRule#initialize

Defined in:
lib/apcera/models/semi_pipe_rule.rb

#initialize(attributes = {}) ⇒ SemiPipeRule

Returns a new instance of SemiPipeRule.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/apcera/models/semi_pipe_rule.rb', line 55

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[:'action']
    self.action = attributes[:'action']
  end
  
  if attributes[:'created_at']
    self.created_at = attributes[:'created_at']
  end
  
  if attributes[:'created_by']
    self.created_by = attributes[:'created_by']
  end
  
  if attributes[:'job']
    self.job = attributes[:'job']
  end
  
  if attributes[:'name']
    self.name = attributes[:'name']
  end
  
  if attributes[:'provider']
    self.provider = attributes[:'provider']
  end
  
  if attributes[:'service']
    self.service = attributes[:'service']
  end
  
  if attributes[:'type']
    self.type = attributes[:'type']
  end
  
  if attributes[:'uuid']
    self.uuid = attributes[:'uuid']
  end
  
end