Class: SDM::NodeCreateResponse
- Inherits:
-
Object
- Object
- SDM::NodeCreateResponse
- Defined in:
- lib/models/porcelain.rb
Overview
NodeCreateResponse reports how the Nodes were created in the system.
Instance Attribute Summary collapse
-
#meta ⇒ Object
Reserved for future use.
-
#node ⇒ Object
The created Node.
-
#rate_limit ⇒ Object
Rate limit information.
-
#token ⇒ Object
The auth token generated for the Node.
Instance Method Summary collapse
-
#initialize(meta: nil, node: nil, rate_limit: nil, token: nil) ⇒ NodeCreateResponse
constructor
A new instance of NodeCreateResponse.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(meta: nil, node: nil, rate_limit: nil, token: nil) ⇒ NodeCreateResponse
Returns a new instance of NodeCreateResponse.
5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 |
# File 'lib/models/porcelain.rb', line 5134 def initialize( meta: nil, node: nil, rate_limit: nil, token: nil ) if != nil @meta = end if node != nil @node = node end if rate_limit != nil @rate_limit = rate_limit end if token != nil @token = token end end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
5125 5126 5127 |
# File 'lib/models/porcelain.rb', line 5125 def @meta end |
#node ⇒ Object
The created Node.
5127 5128 5129 |
# File 'lib/models/porcelain.rb', line 5127 def node @node end |
#rate_limit ⇒ Object
Rate limit information.
5129 5130 5131 |
# File 'lib/models/porcelain.rb', line 5129 def rate_limit @rate_limit end |
#token ⇒ Object
The auth token generated for the Node. The Node will use this token to authenticate with the strongDM API.
5132 5133 5134 |
# File 'lib/models/porcelain.rb', line 5132 def token @token end |
Instance Method Details
#to_json(options = {}) ⇒ Object
5154 5155 5156 5157 5158 5159 5160 |
# File 'lib/models/porcelain.rb', line 5154 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |