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
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 249 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.
282 283 284 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 282 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
273 274 275 276 277 278 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 273 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.
288 289 290 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 288 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date_updated.
294 295 296 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 294 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the ModelBuildInstance
346 347 348 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 346 def delete context.delete end |
#fetch ⇒ ModelBuildInstance
Fetch a ModelBuildInstance
331 332 333 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 331 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
359 360 361 362 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 359 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.ModelBuildInstance #{values}>" end |
#service_sid ⇒ String
Returns The service_sid.
300 301 302 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 300 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The sid.
306 307 308 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 306 def sid @properties['sid'] end |
#status ⇒ model_build.Status
Returns The status.
312 313 314 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 312 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
352 353 354 355 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 352 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.ModelBuildInstance #{values}>" end |
#unique_name ⇒ String
Returns The unique_name.
318 319 320 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 318 def unique_name @properties['unique_name'] end |
#update(unique_name: :unset) ⇒ ModelBuildInstance
Update the ModelBuildInstance
339 340 341 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 339 def update(unique_name: :unset) context.update(unique_name: unique_name, ) end |
#url ⇒ String
Returns The url.
324 325 326 |
# File 'lib/twilio-ruby/rest/preview/understand/service/model_build.rb', line 324 def url @properties['url'] end |