Skip to content

Commit

Permalink
[Librarian] Regenerated @ 1b6718f23da76f150eac392860c66a26de9af713 ce…
Browse files Browse the repository at this point in the history
…b130295f80bc623f22496076e3dd57e27da2fb
  • Loading branch information
twilio-dx committed Sep 18, 2024
1 parent da84242 commit 5a2e91f
Show file tree
Hide file tree
Showing 52 changed files with 4,810 additions and 64 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
twilio-php Changelog
====================

[2024-09-18] Version 8.3.1
--------------------------
**Intelligence**
- Remove public from operator_type
- Update operator_type to include general-availablity and deprecated

**Numbers**
- Remove beta flag for bundle clone API


[2024-09-05] Version 8.3.0
--------------------------
**Iam**
Expand Down
5 changes: 5 additions & 0 deletions src/Twilio/Rest/Assistants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
namespace Twilio\Rest;

class Assistants extends AssistantsBase {
}
142 changes: 142 additions & 0 deletions src/Twilio/Rest/Assistants/V1.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<?php
/**
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Assistants
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/

namespace Twilio\Rest\Assistants;

use Twilio\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceContext;
use Twilio\Rest\Assistants\V1\AssistantList;
use Twilio\Rest\Assistants\V1\KnowledgeList;
use Twilio\Rest\Assistants\V1\PolicyList;
use Twilio\Rest\Assistants\V1\SessionList;
use Twilio\Rest\Assistants\V1\ToolList;
use Twilio\Version;

/**
* @property AssistantList $assistants
* @property KnowledgeList $knowledge
* @property PolicyList $policies
* @property SessionList $sessions
* @property ToolList $tools
* @method \Twilio\Rest\Assistants\V1\AssistantContext assistants(string $id)
* @method \Twilio\Rest\Assistants\V1\KnowledgeContext knowledge(string $id)
* @method \Twilio\Rest\Assistants\V1\ToolContext tools(string $id)
* @method \Twilio\Rest\Assistants\V1\SessionContext sessions(string $id)
*/
class V1 extends Version
{
protected $_assistants;
protected $_knowledge;
protected $_policies;
protected $_sessions;
protected $_tools;

/**
* Construct the V1 version of Assistants
*
* @param Domain $domain Domain that contains the version
*/
public function __construct(Domain $domain)
{
parent::__construct($domain);
$this->version = 'v1';
}

protected function getAssistants(): AssistantList
{
if (!$this->_assistants) {
$this->_assistants = new AssistantList($this);
}
return $this->_assistants;
}

protected function getKnowledge(): KnowledgeList
{
if (!$this->_knowledge) {
$this->_knowledge = new KnowledgeList($this);
}
return $this->_knowledge;
}

protected function getPolicies(): PolicyList
{
if (!$this->_policies) {
$this->_policies = new PolicyList($this);
}
return $this->_policies;
}

protected function getSessions(): SessionList
{
if (!$this->_sessions) {
$this->_sessions = new SessionList($this);
}
return $this->_sessions;
}

protected function getTools(): ToolList
{
if (!$this->_tools) {
$this->_tools = new ToolList($this);
}
return $this->_tools;
}

/**
* Magic getter to lazy load root resources
*
* @param string $name Resource to return
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
return $this->$method();
}

throw new TwilioException('Unknown resource ' . $name);
}

/**
* Magic caller to get resource contexts
*
* @param string $name Resource to return
* @param array $arguments Context parameters
* @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
return \call_user_func_array(array($property, 'getContext'), $arguments);
}

throw new TwilioException('Resource does not have a context');
}

/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
public function __toString(): string
{
return '[Twilio.Assistants.V1]';
}
}
100 changes: 100 additions & 0 deletions src/Twilio/Rest/Assistants/V1/Assistant/FeedbackInstance.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php

/**
* This code was generated by
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
*
* Twilio - Assistants
* This is the public Twilio REST API.
*
* NOTE: This class is auto generated by OpenAPI Generator.
* https://openapi-generator.tech
* Do not edit the class manually.
*/


namespace Twilio\Rest\Assistants\V1\Assistant;

use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
use Twilio\Deserialize;


/**
* @property string $assistantId
* @property string $id
* @property string $accountSid
* @property string $userSid
* @property string $messageId
* @property string $score
* @property string $sessionId
* @property string $text
* @property \DateTime $dateCreated
* @property \DateTime $dateUpdated
*/
class FeedbackInstance extends InstanceResource
{
/**
* Initialize the FeedbackInstance
*
* @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
* @param string $id The assistant ID.
*/
public function __construct(Version $version, array $payload, string $id)
{
parent::__construct($version);

// Marshaled Properties
$this->properties = [
'assistantId' => Values::array_get($payload, 'assistant_id'),
'id' => Values::array_get($payload, 'id'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'userSid' => Values::array_get($payload, 'user_sid'),
'messageId' => Values::array_get($payload, 'message_id'),
'score' => Values::array_get($payload, 'score'),
'sessionId' => Values::array_get($payload, 'session_id'),
'text' => Values::array_get($payload, 'text'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
];

$this->solution = ['id' => $id, ];
}

/**
* Magic getter to access properties
*
* @param string $name Property to access
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
}

if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
return $this->$method();
}

throw new TwilioException('Unknown property: ' . $name);
}

/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
public function __toString(): string
{
return '[Twilio.Assistants.V1.FeedbackInstance]';
}
}

Loading

0 comments on commit 5a2e91f

Please sign in to comment.