Class: Twilio::REST::Preview::Understand::ServiceContext::ModelBuildInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::ServiceContext::ModelBuildInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/service/model_build.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#account_sid ⇒ String
The account_sid.
-
#context ⇒ ModelBuildContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date_created.
-
#date_updated ⇒ Time
The date_updated.
-
#delete ⇒ Boolean
Deletes the ModelBuildInstance.
-
#fetch ⇒ ModelBuildInstance
Fetch a ModelBuildInstance.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ ModelBuildInstance
constructor
Initialize the ModelBuildInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#service_sid ⇒ String
The service_sid.
-
#sid ⇒ String
The sid.
-
#status ⇒ model_build.Status
The status.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
The unique_name.
-
#update(unique_name: :unset) ⇒ ModelBuildInstance
Update the ModelBuildInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ ModelBuildInstance
Initialize the ModelBuildInstance
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 239 def initialize(version, payload, service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'service_sid' => payload['service_sid'], 'sid' => payload['sid'], 'status' => payload['status'], 'unique_name' => payload['unique_name'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid']} end |
Instance Method Details
#account_sid ⇒ String
Returns The account_sid.
272 273 274 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 272 def account_sid @properties['account_sid'] end |
#context ⇒ ModelBuildContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
263 264 265 266 267 268 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 263 def context unless @instance_context @instance_context = ModelBuildContext.new(@version, @params['service_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date_created.
278 279 280 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 278 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
284 285 286 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 284 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the ModelBuildInstance
336 337 338 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 336 def delete context.delete end |
#fetch ⇒ ModelBuildInstance
Fetch a ModelBuildInstance
321 322 323 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 321 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
349 350 351 352 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 349 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.ModelBuildInstance #{values}>" end |
#service_sid ⇒ String
Returns The service_sid.
290 291 292 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 290 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The sid.
296 297 298 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 296 def sid @properties['sid'] end |
#status ⇒ model_build.Status
Returns The status.
302 303 304 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 302 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
342 343 344 345 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 342 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.ModelBuildInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique_name.
308 309 310 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 308 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset) ⇒ ModelBuildInstance
Update the ModelBuildInstance
329 330 331 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 329 def update(unique_name: :unset) context.update(unique_name: unique_name) end |
#url ⇒ String
Returns The url.
314 315 316 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 314 def url @properties['url'] end |