Class: Twilio::REST::Autopilot::V1::AssistantInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Autopilot::V1::AssistantInstance
- Defined in:
- lib/twilio-ruby/rest/autopilot/v1/assistant.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Assistant resource.
-
#callback_events ⇒ String
Reserved.
-
#callback_url ⇒ String
Reserved.
-
#context ⇒ AssistantContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT when the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT when the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#defaults ⇒ defaults
Access the defaults.
-
#delete ⇒ Boolean
Delete the AssistantInstance.
-
#development_stage ⇒ String
A string describing the state of the assistant.
-
#dialogues ⇒ dialogues
Access the dialogues.
-
#fetch ⇒ AssistantInstance
Fetch the AssistantInstance.
-
#field_types ⇒ field_types
Access the field_types.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, sid: nil) ⇒ AssistantInstance
constructor
Initialize the AssistantInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#latest_model_build_sid ⇒ String
Reserved.
-
#links ⇒ Hash
A list of the URLs of the Assistant’s related resources.
-
#log_queries ⇒ Boolean
Whether queries should be logged and kept after training.
-
#model_builds ⇒ model_builds
Access the model_builds.
-
#needs_model_build ⇒ Boolean
Whether model needs to be rebuilt.
-
#queries ⇒ queries
Access the queries.
-
#sid ⇒ String
The unique string that we created to identify the Assistant 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
An application-defined string that uniquely identifies the resource.
-
#update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, style_sheet: :unset, defaults: :unset, development_stage: :unset) ⇒ AssistantInstance
Update the AssistantInstance.
-
#url ⇒ String
The absolute URL of the Assistant resource.
-
#webhooks ⇒ webhooks
Access the webhooks.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ AssistantInstance
Initialize the AssistantInstance
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 438 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'], 'development_stage' => payload['development_stage'], 'needs_model_build' => payload['needs_model_build'], '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 SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Assistant resource.
477 478 479 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 477 def account_sid @properties['account_sid'] end |
#callback_events ⇒ String
Returns Reserved.
555 556 557 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 555 def callback_events @properties['callback_events'] end |
#callback_url ⇒ String
Returns Reserved.
549 550 551 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 549 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
468 469 470 471 472 473 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 468 def context unless @instance_context @instance_context = AssistantContext.new(@version , @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
483 484 485 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 483 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
489 490 491 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 489 def date_updated @properties['date_updated'] end |
#defaults ⇒ defaults
Access the defaults
619 620 621 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 619 def defaults context.defaults end |
#delete ⇒ Boolean
Delete the AssistantInstance
562 563 564 565 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 562 def delete context.delete end |
#development_stage ⇒ String
Returns A string describing the state of the assistant.
519 520 521 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 519 def development_stage @properties['development_stage'] end |
#dialogues ⇒ dialogues
Access the dialogues
633 634 635 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 633 def dialogues context.dialogues end |
#fetch ⇒ AssistantInstance
Fetch the AssistantInstance
570 571 572 573 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 570 def fetch context.fetch end |
#field_types ⇒ field_types
Access the field_types
647 648 649 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 647 def field_types context.field_types end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource. It is not unique and can be up to 255 characters long.
495 496 497 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 495 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
674 675 676 677 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 674 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.AssistantInstance #{values}>" end |
#latest_model_build_sid ⇒ String
Returns Reserved.
501 502 503 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 501 def latest_model_build_sid @properties['latest_model_build_sid'] end |
#links ⇒ Hash
Returns A list of the URLs of the Assistant’s related resources.
507 508 509 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 507 def links @properties['links'] end |
#log_queries ⇒ Boolean
Returns Whether queries should be logged and kept after training. Can be: ‘true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored.
513 514 515 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 513 def log_queries @properties['log_queries'] end |
#model_builds ⇒ model_builds
Access the model_builds
640 641 642 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 640 def model_builds context.model_builds end |
#needs_model_build ⇒ Boolean
Returns Whether model needs to be rebuilt.
525 526 527 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 525 def needs_model_build @properties['needs_model_build'] end |
#queries ⇒ queries
Access the queries
661 662 663 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 661 def queries context.queries end |
#sid ⇒ String
Returns The unique string that we created to identify the Assistant resource.
531 532 533 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 531 def sid @properties['sid'] end |
#style_sheet ⇒ style_sheet
Access the style_sheet
654 655 656 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 654 def style_sheet context.style_sheet end |
#tasks ⇒ tasks
Access the tasks
612 613 614 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 612 def tasks context.tasks end |
#to_s ⇒ Object
Provide a user friendly representation
667 668 669 670 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 667 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Autopilot.V1.AssistantInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource. It can be used in place of the resource’s ‘sid` in the URL to address the resource. It can be up to 64 characters long.
537 538 539 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 537 def unique_name @properties['unique_name'] end |
#update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, style_sheet: :unset, defaults: :unset, development_stage: :unset) ⇒ AssistantInstance
Update the AssistantInstance
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 586 def update( friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, style_sheet: :unset, defaults: :unset, development_stage: :unset ) context.update( friendly_name: friendly_name, log_queries: log_queries, unique_name: unique_name, callback_url: callback_url, callback_events: callback_events, style_sheet: style_sheet, defaults: defaults, development_stage: development_stage, ) end |
#url ⇒ String
Returns The absolute URL of the Assistant resource.
543 544 545 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 543 def url @properties['url'] end |
#webhooks ⇒ webhooks
Access the webhooks
626 627 628 |
# File 'lib/twilio-ruby/rest/autopilot/v1/assistant.rb', line 626 def webhooks context.webhooks end |