Class: Twilio::REST::Preview::Understand::AssistantInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::Understand::AssistantInstance
- Defined in:
- lib/twilio-ruby/rest/preview/understand/assistant.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 unique ID of the Account that created this Assistant.
-
#assistant_fallback_actions ⇒ assistant_fallback_actions
Access the assistant_fallback_actions.
-
#assistant_initiation_actions ⇒ assistant_initiation_actions
Access the assistant_initiation_actions.
-
#callback_events ⇒ String
Space-separated list of callback events that will trigger callbacks.
-
#callback_url ⇒ String
A user-provided URL to send event callbacks to.
-
#context ⇒ AssistantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this resource was created.
-
#date_updated ⇒ Time
The date that this resource was last updated.
-
#delete ⇒ Boolean
Delete the AssistantInstance.
-
#dialogues ⇒ dialogues
Access the dialogues.
-
#fetch ⇒ AssistantInstance
Fetch the AssistantInstance.
-
#field_types ⇒ field_types
Access the field_types.
-
#friendly_name ⇒ String
A text description for the Assistant.
-
#initialize(version, payload, sid: nil) ⇒ AssistantInstance
constructor
Initialize the AssistantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#latest_model_build_sid ⇒ String
The unique ID (Sid) of the latest model build.
-
#links ⇒ String
The links.
-
#log_queries ⇒ Boolean
A boolean that specifies whether queries should be logged for 30 days further training.
-
#model_builds ⇒ model_builds
Access the model_builds.
-
#queries ⇒ queries
Access the queries.
-
#sid ⇒ String
A 34 character string that uniquely identifies this resource.
-
#style_sheet ⇒ style_sheet
Access the style_sheet.
-
#tasks ⇒ tasks
Access the tasks.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#unique_name ⇒ String
A user-provided string that uniquely identifies this resource as an alternative to the sid.
-
#update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset, style_sheet: :unset) ⇒ AssistantInstance
Update the AssistantInstance.
-
#url ⇒ String
The url.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AssistantInstance
Initialize the AssistantInstance
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 402 def initialize(version, payload, 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']), 'friendly_name' => payload['friendly_name'], 'latest_model_build_sid' => payload['latest_model_build_sid'], 'links' => payload['links'], 'log_queries' => payload['log_queries'], 'sid' => payload['sid'], 'unique_name' => payload['unique_name'], 'url' => payload['url'], 'callback_url' => payload['callback_url'], 'callback_events' => payload['callback_events'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique ID of the Account that created this Assistant.
439 440 441 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 439 def account_sid @properties['account_sid'] end |
#assistant_fallback_actions ⇒ assistant_fallback_actions
Access the assistant_fallback_actions
587 588 589 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 587 def assistant_fallback_actions context.assistant_fallback_actions end |
#assistant_initiation_actions ⇒ assistant_initiation_actions
Access the assistant_initiation_actions
594 595 596 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 594 def assistant_initiation_actions context.assistant_initiation_actions end |
#callback_events ⇒ String
Returns Space-separated list of callback events that will trigger callbacks.
505 506 507 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 505 def callback_events @properties['callback_events'] end |
#callback_url ⇒ String
Returns A user-provided URL to send event callbacks to.
499 500 501 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 499 def callback_url @properties['callback_url'] end |
#context ⇒ AssistantContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
430 431 432 433 434 435 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 430 def context unless @instance_context @instance_context = AssistantContext.new(@version, @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The date that this resource was created.
445 446 447 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 445 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was last updated.
451 452 453 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 451 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AssistantInstance
552 553 554 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 552 def delete context.delete end |
#dialogues ⇒ dialogues
Access the dialogues
601 602 603 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 601 def dialogues context.dialogues end |
#fetch ⇒ AssistantInstance
Fetch the AssistantInstance
512 513 514 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 512 def fetch context.fetch end |
#field_types ⇒ field_types
Access the field_types
559 560 561 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 559 def field_types context.field_types end |
#friendly_name ⇒ String
Returns A text description for the Assistant. It is non-unique and can up to 255 characters long.
457 458 459 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 457 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
621 622 623 624 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 621 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.AssistantInstance #{values}>" end |
#latest_model_build_sid ⇒ String
Returns The unique ID (Sid) of the latest model build. Null if no model has been built.
463 464 465 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 463 def latest_model_build_sid @properties['latest_model_build_sid'] end |
#links ⇒ String
Returns The links.
469 470 471 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 469 def links @properties['links'] end |
#log_queries ⇒ Boolean
Returns A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter.
475 476 477 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 475 def log_queries @properties['log_queries'] end |
#model_builds ⇒ model_builds
Access the model_builds
573 574 575 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 573 def model_builds context.model_builds end |
#queries ⇒ queries
Access the queries
580 581 582 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 580 def queries context.queries end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
481 482 483 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 481 def sid @properties['sid'] end |
#style_sheet ⇒ style_sheet
Access the style_sheet
608 609 610 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 608 def style_sheet context.style_sheet end |
#tasks ⇒ tasks
Access the tasks
566 567 568 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 566 def tasks context.tasks end |
#to_s ⇒ Object
Provide a user friendly representation
614 615 616 617 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 614 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.Understand.AssistantInstance #{values}>" end |
#unique_name ⇒ String
Returns A user-provided string that uniquely identifies this resource as an alternative to the sid. You can use the unique name in the URL path. Unique up to 64 characters long.
487 488 489 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 487 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset, style_sheet: :unset) ⇒ AssistantInstance
Update the AssistantInstance
536 537 538 539 540 541 542 543 544 545 546 547 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 536 def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset, style_sheet: :unset) context.update( friendly_name: friendly_name, log_queries: log_queries, unique_name: unique_name, callback_url: callback_url, callback_events: callback_events, fallback_actions: fallback_actions, initiation_actions: initiation_actions, style_sheet: style_sheet, ) end |
#url ⇒ String
Returns The url.
493 494 495 |
# File 'lib/twilio-ruby/rest/preview/understand/assistant.rb', line 493 def url @properties['url'] end |