Class: Datarobot::AiApi::Deployment
- Inherits:
-
Object
- Object
- Datarobot::AiApi::Deployment
- Defined in:
- lib/datarobot/ai_api/deployment.rb
Instance Attribute Summary collapse
-
#datarobotKey ⇒ Object
readonly
Returns the value of attribute datarobotKey.
-
#deployment_id ⇒ Object
readonly
Returns the value of attribute deployment_id.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Deployment
constructor
Takes a response body from the API.
Constructor Details
#initialize(options = {}) ⇒ Deployment
Takes a response body from the API. Will set all deployment attributes from the response body
10 11 12 13 14 15 16 17 |
# File 'lib/datarobot/ai_api/deployment.rb', line 10 def initialize(={}) = .collect{|k,v| [k.to_s, v]}.to_h @datarobotKey ||= .dig("datarobot-key") @deploymentId ||= .dig("deploymentId") @url ||= .dig("url") @target ||= .dig("target") end |
Instance Attribute Details
#datarobotKey ⇒ Object (readonly)
Returns the value of attribute datarobotKey.
4 5 6 |
# File 'lib/datarobot/ai_api/deployment.rb', line 4 def datarobotKey @datarobotKey end |
#deployment_id ⇒ Object (readonly)
Returns the value of attribute deployment_id.
4 5 6 |
# File 'lib/datarobot/ai_api/deployment.rb', line 4 def deployment_id @deployment_id end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
4 5 6 |
# File 'lib/datarobot/ai_api/deployment.rb', line 4 def target @target end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/datarobot/ai_api/deployment.rb', line 4 def url @url end |