diff --git a/CHANGES.md b/CHANGES.md
index 595fb6b8e..769e0ee4b 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,71 @@
twilio-csharp Changelog
=======================
+[2024-02-09] Version 6.18.0
+---------------------------
+**Library - Chore**
+- [PR #718](https://github.com/twilio/twilio-csharp/pull/718): added code-signing-workflow. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
+- [PR #719](https://github.com/twilio/twilio-csharp/pull/719): disable cluster test. Thanks to [@sbansla](https://github.com/sbansla)!
+- [PR #717](https://github.com/twilio/twilio-csharp/pull/717): setup java17 in test workflow. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
+
+**Api**
+- Updated service base url for connect apps and authorized connect apps APIs **(breaking change)**
+- Update documentation to reflect RiskCheck GA
+- Added optional parameter `CallToken` for create participant api
+
+**Events**
+- Marked as GA
+
+**Flex**
+- Adding `flex_instance_sid` to Flex Configuration
+- Adding `provisioning_status` for Email Manager
+- Adding `offline_config` to Flex Configuration
+
+**Insights**
+- add flag to restrict access to unapid customers
+- decommission voice-qualitystats-endpoint role
+
+**Intelligence**
+- Add text-generation operator (for example conversation summary) results to existing OperatorResults collection.
+
+**Lookups**
+- Remove `carrier` field from `sms_pumping_risk` and leave `carrier_risk_category` **(breaking change)**
+- Remove carrier information from call forwarding package **(breaking change)**
+
+**Messaging**
+- Add update instance endpoints to us_app_to_person api
+- Add tollfree edit_allowed and edit_reason fields
+- Update Phone Number, Short Code, Alpha Sender, US A2P and Channel Sender documentation
+- Add DELETE support to Tollfree Verification resource
+
+**Numbers**
+- Add Get Port In request api
+
+**Push**
+- Migrated to new Push API V4 with Resilient Notification Delivery.
+
+**Serverless**
+- Add node18 as a valid Build runtime
+
+**Taskrouter**
+- Add `jitter_buffer_size` param in update reservation
+- Add container attribute to task_queue_bulk_real_time_statistics endpoint
+- Remove beta_feature check on task_queue_bulk_real_time_statistics endpoint
+
+**Trusthub**
+- Add optional field NotificationEmail to the POST /v1/ComplianceInquiries/Customers/Initialize API
+- Add additional optional fields in compliance_tollfree_inquiry.json
+- Rename did to tollfree_phone_number in compliance_tollfree_inquiry.json
+- Add new optional field notification_email to compliance_tollfree_inquiry.json
+
+**Verify**
+- `Tags` property added again to Public Docs **(breaking change)**
+- Remove `Tags` from Public Docs **(breaking change)**
+- Add `VerifyEventSubscriptionEnabled` parameter to service create and update endpoints.
+- Add `Tags` optional parameter on Verification creation.
+- Update Verify TOTP maturity to GA.
+
+
[2024-01-25] Version 6.17.0
---------------------------
**Oauth**
diff --git a/src/Twilio/Properties/AssemblyInfo.cs b/src/Twilio/Properties/AssemblyInfo.cs
index 8f9a7e693..6ded43e09 100644
--- a/src/Twilio/Properties/AssemblyInfo.cs
+++ b/src/Twilio/Properties/AssemblyInfo.cs
@@ -10,5 +10,5 @@
internal class AssemblyInfomation
{
- public const string AssemblyInformationalVersion = "6.17.0";
+ public const string AssemblyInformationalVersion = "6.18.0";
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
index 00c511dca..2be4dc1d3 100644
--- a/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppResource.cs
@@ -301,14 +301,6 @@ public static string ToJson(object model)
[JsonProperty("connect_app_sid")]
public string ConnectAppSid { get; private set; }
- /// The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
/// The set of permissions that you authorized for the Connect App. Can be: `get-all` or `post-all`.
[JsonProperty("permissions")]
public List Permissions { get; private set; }
diff --git a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs
index e5ab0b798..854462057 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.cs
@@ -175,6 +175,9 @@ public class CreateParticipantOptions : IOptions
/// Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
public string Trim { get; set; }
+ /// A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
+ public string CallToken { get; set; }
+
/// Construct a new CreateParticipantOptions
/// The SID of the participant's conference.
@@ -385,6 +388,10 @@ public List> GetParams()
{
p.Add(new KeyValuePair("Trim", Trim));
}
+ if (CallToken != null)
+ {
+ p.Add(new KeyValuePair("CallToken", CallToken));
+ }
return p;
}
diff --git a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs
index 69baaa081..42a3abf4b 100644
--- a/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantResource.cs
@@ -145,6 +145,7 @@ public static async System.Threading.Tasks.Task CreateAsync
/// The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
/// The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
/// Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
+ /// A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
/// Client to make requests to Twilio
/// A single instance of Participant
public static ParticipantResource Create(
@@ -197,9 +198,10 @@ public static ParticipantResource Create(
Uri amdStatusCallback = null,
Twilio.Http.HttpMethod amdStatusCallbackMethod = null,
string trim = null,
+ string callToken = null,
ITwilioRestClient client = null)
{
- var options = new CreateParticipantOptions(pathConferenceSid, from, to){ PathAccountSid = pathAccountSid, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Label = label, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, Region = region, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, ConferenceRecordingStatusCallbackEvent = conferenceRecordingStatusCallbackEvent, Coaching = coaching, CallSidToCoach = callSidToCoach, JitterBufferSize = jitterBufferSize, Byoc = byoc, CallerId = callerId, CallReason = callReason, RecordingTrack = recordingTrack, TimeLimit = timeLimit, MachineDetection = machineDetection, MachineDetectionTimeout = machineDetectionTimeout, MachineDetectionSpeechThreshold = machineDetectionSpeechThreshold, MachineDetectionSpeechEndThreshold = machineDetectionSpeechEndThreshold, MachineDetectionSilenceTimeout = machineDetectionSilenceTimeout, AmdStatusCallback = amdStatusCallback, AmdStatusCallbackMethod = amdStatusCallbackMethod, Trim = trim };
+ var options = new CreateParticipantOptions(pathConferenceSid, from, to){ PathAccountSid = pathAccountSid, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Label = label, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, Region = region, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, ConferenceRecordingStatusCallbackEvent = conferenceRecordingStatusCallbackEvent, Coaching = coaching, CallSidToCoach = callSidToCoach, JitterBufferSize = jitterBufferSize, Byoc = byoc, CallerId = callerId, CallReason = callReason, RecordingTrack = recordingTrack, TimeLimit = timeLimit, MachineDetection = machineDetection, MachineDetectionTimeout = machineDetectionTimeout, MachineDetectionSpeechThreshold = machineDetectionSpeechThreshold, MachineDetectionSpeechEndThreshold = machineDetectionSpeechEndThreshold, MachineDetectionSilenceTimeout = machineDetectionSilenceTimeout, AmdStatusCallback = amdStatusCallback, AmdStatusCallbackMethod = amdStatusCallbackMethod, Trim = trim, CallToken = callToken };
return Create(options, client);
}
@@ -254,6 +256,7 @@ public static ParticipantResource Create(
/// The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
/// The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
/// Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
+ /// A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
/// Client to make requests to Twilio
/// Task that resolves to A single instance of Participant
public static async System.Threading.Tasks.Task CreateAsync(
@@ -306,9 +309,10 @@ public static async System.Threading.Tasks.Task CreateAsync
Uri amdStatusCallback = null,
Twilio.Http.HttpMethod amdStatusCallbackMethod = null,
string trim = null,
+ string callToken = null,
ITwilioRestClient client = null)
{
- var options = new CreateParticipantOptions(pathConferenceSid, from, to){ PathAccountSid = pathAccountSid, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Label = label, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, Region = region, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, ConferenceRecordingStatusCallbackEvent = conferenceRecordingStatusCallbackEvent, Coaching = coaching, CallSidToCoach = callSidToCoach, JitterBufferSize = jitterBufferSize, Byoc = byoc, CallerId = callerId, CallReason = callReason, RecordingTrack = recordingTrack, TimeLimit = timeLimit, MachineDetection = machineDetection, MachineDetectionTimeout = machineDetectionTimeout, MachineDetectionSpeechThreshold = machineDetectionSpeechThreshold, MachineDetectionSpeechEndThreshold = machineDetectionSpeechEndThreshold, MachineDetectionSilenceTimeout = machineDetectionSilenceTimeout, AmdStatusCallback = amdStatusCallback, AmdStatusCallbackMethod = amdStatusCallbackMethod, Trim = trim };
+ var options = new CreateParticipantOptions(pathConferenceSid, from, to){ PathAccountSid = pathAccountSid, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Label = label, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, Region = region, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, ConferenceRecordingStatusCallbackEvent = conferenceRecordingStatusCallbackEvent, Coaching = coaching, CallSidToCoach = callSidToCoach, JitterBufferSize = jitterBufferSize, Byoc = byoc, CallerId = callerId, CallReason = callReason, RecordingTrack = recordingTrack, TimeLimit = timeLimit, MachineDetection = machineDetection, MachineDetectionTimeout = machineDetectionTimeout, MachineDetectionSpeechThreshold = machineDetectionSpeechThreshold, MachineDetectionSpeechEndThreshold = machineDetectionSpeechEndThreshold, MachineDetectionSilenceTimeout = machineDetectionSilenceTimeout, AmdStatusCallback = amdStatusCallback, AmdStatusCallbackMethod = amdStatusCallbackMethod, Trim = trim, CallToken = callToken };
return await CreateAsync(options, client);
}
#endif
diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs b/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs
index 431bcc8b9..e07b06dae 100644
--- a/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/MessageOptions.cs
@@ -67,7 +67,7 @@ public class CreateMessageOptions : IOptions
/// Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
public List PersistentAction { get; set; }
- /// For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
+ /// For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
public bool? ShortenUrls { get; set; }
@@ -85,7 +85,7 @@ public class CreateMessageOptions : IOptions
public MessageResource.RiskCheckEnum RiskCheck { get; set; }
- /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
public Types.PhoneNumber From { get; set; }
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
@@ -94,7 +94,7 @@ public class CreateMessageOptions : IOptions
/// The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
public string Body { get; set; }
- /// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
+ /// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
public List MediaUrl { get; set; }
/// For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).
diff --git a/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs b/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs
index 4e6b51d33..ab26d9bd8 100644
--- a/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs
+++ b/src/Twilio/Rest/Api/V2010/Account/MessageResource.cs
@@ -176,10 +176,10 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
/// Send a message
/// The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
- /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
/// The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
- /// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
+ /// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
/// For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).
/// The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
/// The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL.
@@ -192,7 +192,7 @@ public static async System.Threading.Tasks.Task CreateAsync(Cre
///
/// Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
/// Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
- /// For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
+ /// For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
///
/// The time that Twilio will send the message. Must be in ISO 8601 format.
/// If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
@@ -235,10 +235,10 @@ public static MessageResource Create(
/// Send a message
/// The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
/// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
- /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ /// The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
/// The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
/// The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
- /// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
+ /// The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
/// For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).
/// The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
/// The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). If this parameter is provided, the `status_callback` parameter of this request is ignored; [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL.
@@ -251,7 +251,7 @@ public static MessageResource Create(
///
/// Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
/// Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
- /// For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
+ /// For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
///
/// The time that Twilio will send the message. Must be in ISO 8601 format.
/// If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
@@ -707,7 +707,7 @@ public static string ToJson(object model)
[JsonProperty("direction")]
public MessageResource.DirectionEnum Direction { get; private set; }
- /// The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
+ /// The sender's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
[JsonProperty("from")]
[JsonConverter(typeof(PhoneNumberConverter))]
public Types.PhoneNumber From { get; private set; }
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs
deleted file mode 100644
index f9363ca0a..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- /// fetch
- public class FetchDefaultsOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public string PathAssistantSid { get; }
-
-
-
- /// Construct a new FetchDefaultsOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public FetchDefaultsOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// update
- public class UpdateDefaultsOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- public string PathAssistantSid { get; }
-
- /// A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
- public object Defaults { get; set; }
-
-
-
- /// Construct a new UpdateDefaultsOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- public UpdateDefaultsOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Defaults != null)
- {
- p.Add(new KeyValuePair("Defaults", Serializers.JsonObject(Defaults)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs
deleted file mode 100644
index 3420b0167..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsResource.cs
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- public class DefaultsResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchDefaultsOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Defaults";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch Defaults parameters
- /// Client to make requests to Twilio
- /// A single instance of Defaults
- public static DefaultsResource Fetch(FetchDefaultsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch Defaults parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Defaults
- public static async System.Threading.Tasks.Task FetchAsync(FetchDefaultsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of Defaults
- public static DefaultsResource Fetch(
- string pathAssistantSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchDefaultsOptions(pathAssistantSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Defaults
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, ITwilioRestClient client = null)
- {
- var options = new FetchDefaultsOptions(pathAssistantSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildUpdateRequest(UpdateDefaultsOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Defaults";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// update
- /// Update Defaults parameters
- /// Client to make requests to Twilio
- /// A single instance of Defaults
- public static DefaultsResource Update(UpdateDefaultsOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// update
- /// Update Defaults parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Defaults
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateDefaultsOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
- /// Client to make requests to Twilio
- /// A single instance of Defaults
- public static DefaultsResource Update(
- string pathAssistantSid,
- object defaults = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateDefaultsOptions(pathAssistantSid){ Defaults = defaults };
- return Update(options, client);
- }
-
- #if !NET35
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Defaults
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- object defaults = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateDefaultsOptions(pathAssistantSid){ Defaults = defaults };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a DefaultsResource object
- ///
- /// Raw JSON string
- /// DefaultsResource object represented by the provided JSON
- public static DefaultsResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Defaults resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The absolute URL of the Defaults resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
- [JsonProperty("data")]
- public object Data { get; private set; }
-
-
-
- private DefaultsResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs
deleted file mode 100644
index 7aa41e47f..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueOptions.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- /// fetch
- public class FetchDialogueOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the Dialogue resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchDialogueOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Dialogue resource to fetch.
- public FetchDialogueOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs
deleted file mode 100644
index fea7f9fba..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueResource.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- public class DialogueResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchDialogueOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Dialogues/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch Dialogue parameters
- /// Client to make requests to Twilio
- /// A single instance of Dialogue
- public static DialogueResource Fetch(FetchDialogueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch Dialogue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Dialogue
- public static async System.Threading.Tasks.Task FetchAsync(FetchDialogueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Dialogue resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of Dialogue
- public static DialogueResource Fetch(
- string pathAssistantSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchDialogueOptions(pathAssistantSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Dialogue resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Dialogue
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchDialogueOptions(pathAssistantSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a DialogueResource object
- ///
- /// Raw JSON string
- /// DialogueResource object represented by the provided JSON
- public static DialogueResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Dialogue resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The unique string that we created to identify the Dialogue resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The JSON string that describes the dialogue session object.
- [JsonProperty("data")]
- public object Data { get; private set; }
-
- /// The absolute URL of the Dialogue resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
-
-
- private DialogueResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs
deleted file mode 100644
index 6b05f9f7d..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.cs
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant.FieldType
-{
-
- /// create
- public class CreateFieldValueOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the new resource.
- public string PathAssistantSid { get; }
-
- /// The SID of the Field Type associated with the Field Value.
- public string PathFieldTypeSid { get; }
-
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- public string Language { get; }
-
- /// The Field Value data.
- public string Value { get; }
-
- /// The string value that indicates which word the field value is a synonym of.
- public string SynonymOf { get; set; }
-
-
- /// Construct a new CreateFieldValueOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the new resource.
- /// The SID of the Field Type associated with the Field Value.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- /// The Field Value data.
- public CreateFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid, string language, string value)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- Language = language;
- Value = value;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Language != null)
- {
- p.Add(new KeyValuePair("Language", Language));
- }
- if (Value != null)
- {
- p.Add(new KeyValuePair("Value", Value));
- }
- if (SynonymOf != null)
- {
- p.Add(new KeyValuePair("SynonymOf", SynonymOf));
- }
- return p;
- }
-
-
-
- }
- /// delete
- public class DeleteFieldValueOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete.
- public string PathAssistantSid { get; }
-
- /// The SID of the Field Type associated with the Field Value to delete.
- public string PathFieldTypeSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to delete.
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteFieldValueOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete.
- /// The SID of the Field Type associated with the Field Value to delete.
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to delete.
- public DeleteFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// fetch
- public class FetchFieldValueOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource to fetch.
- public string PathAssistantSid { get; }
-
- /// The SID of the Field Type associated with the Field Value to fetch.
- public string PathFieldTypeSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchFieldValueOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource to fetch.
- /// The SID of the Field Type associated with the Field Value to fetch.
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to fetch.
- public FetchFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// read
- public class ReadFieldValueOptions : ReadOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to read.
- public string PathAssistantSid { get; }
-
- /// The SID of the Field Type associated with the Field Value to read.
- public string PathFieldTypeSid { get; }
-
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- public string Language { get; set; }
-
-
-
- /// Construct a new ListFieldValueOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to read.
- /// The SID of the Field Type associated with the Field Value to read.
- public ReadFieldValueOptions(string pathAssistantSid, string pathFieldTypeSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathFieldTypeSid = pathFieldTypeSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Language != null)
- {
- p.Add(new KeyValuePair("Language", Language));
- }
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs
deleted file mode 100644
index e46031b52..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueResource.cs
+++ /dev/null
@@ -1,491 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant.FieldType
-{
- public class FieldValueResource : Resource
- {
-
-
-
-
-
- private static Request BuildCreateRequest(CreateFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// create
- /// Create FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Create(CreateFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// create
- /// Create FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task CreateAsync(CreateFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the new resource.
- /// The SID of the Field Type associated with the Field Value.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- /// The Field Value data.
- /// The string value that indicates which word the field value is a synonym of.
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Create(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string language,
- string value,
- string synonymOf = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateFieldValueOptions(pathAssistantSid, pathFieldTypeSid, language, value){ SynonymOf = synonymOf };
- return Create(options, client);
- }
-
- #if !NET35
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the new resource.
- /// The SID of the Field Type associated with the Field Value.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- /// The Field Value data.
- /// The string value that indicates which word the field value is a synonym of.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task CreateAsync(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string language,
- string value,
- string synonymOf = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateFieldValueOptions(pathAssistantSid, pathFieldTypeSid, language, value){ SynonymOf = synonymOf };
- return await CreateAsync(options, client);
- }
- #endif
-
- /// delete
- /// Delete FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- private static Request BuildDeleteRequest(DeleteFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// delete
- /// Delete FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static bool Delete(DeleteFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// delete
- /// Delete FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete.
- /// The SID of the Field Type associated with the Field Value to delete.
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to delete.
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static bool Delete(string pathAssistantSid, string pathFieldTypeSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to delete.
- /// The SID of the Field Type associated with the Field Value to delete.
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to delete.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task DeleteAsync(string pathAssistantSid, string pathFieldTypeSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Fetch(FetchFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task FetchAsync(FetchFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource to fetch.
- /// The SID of the Field Type associated with the Field Value to fetch.
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static FieldValueResource Fetch(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource to fetch.
- /// The SID of the Field Type associated with the Field Value to fetch.
- /// The Twilio-provided string that uniquely identifies the FieldValue resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathFieldTypeSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchFieldValueOptions(pathAssistantSid, pathFieldTypeSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildReadRequest(ReadFieldValueOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{FieldTypeSid}/FieldValues";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathFieldTypeSid = options.PathFieldTypeSid;
- path = path.Replace("{"+"FieldTypeSid"+"}", PathFieldTypeSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// read
- /// Read FieldValue parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static ResourceSet Read(ReadFieldValueOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("field_values", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// read
- /// Read FieldValue parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task> ReadAsync(ReadFieldValueOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("field_values", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to read.
- /// The SID of the Field Type associated with the Field Value to read.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of FieldValue
- public static ResourceSet Read(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string language = null,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldValueOptions(pathAssistantSid, pathFieldTypeSid){ Language = language, PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resources to read.
- /// The SID of the Field Type associated with the Field Value to read.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldValue
- public static async System.Threading.Tasks.Task> ReadAsync(
- string pathAssistantSid,
- string pathFieldTypeSid,
- string language = null,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldValueOptions(pathAssistantSid, pathFieldTypeSid){ Language = language, PageSize = pageSize, Limit = limit};
- return await ReadAsync(options, client);
- }
- #endif
-
-
- /// Fetch the target page of records
- /// API-generated URL for the requested results page
- /// Client to make requests to Twilio
- /// The target page of records
- public static Page GetPage(string targetUrl, ITwilioRestClient client)
- {
- client = client ?? TwilioClient.GetRestClient();
-
- var request = new Request(
- HttpMethod.Get,
- targetUrl
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_values", response.Content);
- }
-
- /// Fetch the next page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The next page of records
- public static Page NextPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetNextPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_values", response.Content);
- }
-
- /// Fetch the previous page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The previous page of records
- public static Page PreviousPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetPreviousPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_values", response.Content);
- }
-
-
- ///
- /// Converts a JSON string into a FieldValueResource object
- ///
- /// Raw JSON string
- /// FieldValueResource object represented by the provided JSON
- public static FieldValueResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the FieldValue resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The SID of the Field Type associated with the Field Value.
- [JsonProperty("field_type_sid")]
- public string FieldTypeSid { get; private set; }
-
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- [JsonProperty("language")]
- public string Language { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the FieldType associated with the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The unique string that we created to identify the FieldValue resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The Field Value data.
- [JsonProperty("value")]
- public string Value { get; private set; }
-
- /// The absolute URL of the FieldValue resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The word for which the field value is a synonym of.
- [JsonProperty("synonym_of")]
- public string SynonymOf { get; private set; }
-
-
-
- private FieldValueResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs
deleted file mode 100644
index 99cdd13ee..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
-
- /// create
- public class CreateFieldTypeOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- public string PathAssistantSid { get; }
-
- /// An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- public string UniqueName { get; }
-
- /// A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
- public string FriendlyName { get; set; }
-
-
- /// Construct a new CreateFieldTypeOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- public CreateFieldTypeOptions(string pathAssistantSid, string uniqueName)
- {
- PathAssistantSid = pathAssistantSid;
- UniqueName = uniqueName;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (UniqueName != null)
- {
- p.Add(new KeyValuePair("UniqueName", UniqueName));
- }
- if (FriendlyName != null)
- {
- p.Add(new KeyValuePair("FriendlyName", FriendlyName));
- }
- return p;
- }
-
-
-
- }
- /// delete
- public class DeleteFieldTypeOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the FieldType resource to delete.
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteFieldTypeOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to delete.
- public DeleteFieldTypeOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// fetch
- public class FetchFieldTypeOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the FieldType resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchFieldTypeOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to fetch.
- public FetchFieldTypeOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// read
- public class ReadFieldTypeOptions : ReadOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- public string PathAssistantSid { get; }
-
-
-
- /// Construct a new ListFieldTypeOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- public ReadFieldTypeOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
- /// update
- public class UpdateFieldTypeOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the to update.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the FieldType resource to update.
- public string PathSid { get; }
-
- /// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
- public string FriendlyName { get; set; }
-
- /// An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- public string UniqueName { get; set; }
-
-
-
- /// Construct a new UpdateFieldTypeOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the to update.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to update.
- public UpdateFieldTypeOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (FriendlyName != null)
- {
- p.Add(new KeyValuePair("FriendlyName", FriendlyName));
- }
- if (UniqueName != null)
- {
- p.Add(new KeyValuePair("UniqueName", UniqueName));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs
deleted file mode 100644
index b3eb8b84f..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeResource.cs
+++ /dev/null
@@ -1,540 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- public class FieldTypeResource : Resource
- {
-
-
-
-
-
- private static Request BuildCreateRequest(CreateFieldTypeOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// create
- /// Create FieldType parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static FieldTypeResource Create(CreateFieldTypeOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// create
- /// Create FieldType parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task CreateAsync(CreateFieldTypeOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- /// A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static FieldTypeResource Create(
- string pathAssistantSid,
- string uniqueName,
- string friendlyName = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateFieldTypeOptions(pathAssistantSid, uniqueName){ FriendlyName = friendlyName };
- return Create(options, client);
- }
-
- #if !NET35
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- /// A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task CreateAsync(
- string pathAssistantSid,
- string uniqueName,
- string friendlyName = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateFieldTypeOptions(pathAssistantSid, uniqueName){ FriendlyName = friendlyName };
- return await CreateAsync(options, client);
- }
- #endif
-
- /// delete
- /// Delete FieldType parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- private static Request BuildDeleteRequest(DeleteFieldTypeOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// delete
- /// Delete FieldType parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static bool Delete(DeleteFieldTypeOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// delete
- /// Delete FieldType parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteFieldTypeOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to delete.
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static bool Delete(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldTypeOptions(pathAssistantSid, pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to delete.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task DeleteAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldTypeOptions(pathAssistantSid, pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchFieldTypeOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch FieldType parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static FieldTypeResource Fetch(FetchFieldTypeOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch FieldType parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task FetchAsync(FetchFieldTypeOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static FieldTypeResource Fetch(
- string pathAssistantSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchFieldTypeOptions(pathAssistantSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchFieldTypeOptions(pathAssistantSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildReadRequest(ReadFieldTypeOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// read
- /// Read FieldType parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static ResourceSet Read(ReadFieldTypeOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("field_types", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// read
- /// Read FieldType parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task> ReadAsync(ReadFieldTypeOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("field_types", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static ResourceSet Read(
- string pathAssistantSid,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldTypeOptions(pathAssistantSid){ PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task> ReadAsync(
- string pathAssistantSid,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldTypeOptions(pathAssistantSid){ PageSize = pageSize, Limit = limit};
- return await ReadAsync(options, client);
- }
- #endif
-
-
- /// Fetch the target page of records
- /// API-generated URL for the requested results page
- /// Client to make requests to Twilio
- /// The target page of records
- public static Page GetPage(string targetUrl, ITwilioRestClient client)
- {
- client = client ?? TwilioClient.GetRestClient();
-
- var request = new Request(
- HttpMethod.Get,
- targetUrl
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_types", response.Content);
- }
-
- /// Fetch the next page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The next page of records
- public static Page NextPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetNextPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_types", response.Content);
- }
-
- /// Fetch the previous page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The previous page of records
- public static Page PreviousPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetPreviousPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("field_types", response.Content);
- }
-
-
- private static Request BuildUpdateRequest(UpdateFieldTypeOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/FieldTypes/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// update
- /// Update FieldType parameters
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static FieldTypeResource Update(UpdateFieldTypeOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// update
- /// Update FieldType parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateFieldTypeOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the to update.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to update.
- /// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
- /// An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- /// Client to make requests to Twilio
- /// A single instance of FieldType
- public static FieldTypeResource Update(
- string pathAssistantSid,
- string pathSid,
- string friendlyName = null,
- string uniqueName = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateFieldTypeOptions(pathAssistantSid, pathSid){ FriendlyName = friendlyName, UniqueName = uniqueName };
- return Update(options, client);
- }
-
- #if !NET35
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the to update.
- /// The Twilio-provided string that uniquely identifies the FieldType resource to update.
- /// A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
- /// An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of FieldType
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- string pathSid,
- string friendlyName = null,
- string uniqueName = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateFieldTypeOptions(pathAssistantSid, pathSid){ FriendlyName = friendlyName, UniqueName = uniqueName };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a FieldTypeResource object
- ///
- /// Raw JSON string
- /// FieldTypeResource object represented by the provided JSON
- public static FieldTypeResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the FieldType resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The string that you assigned to describe the resource. It is not unique and can be up to 255 characters long.
- [JsonProperty("friendly_name")]
- public string FriendlyName { get; private set; }
-
- /// A list of the URLs of related resources.
- [JsonProperty("links")]
- public Dictionary Links { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The unique string that we created to identify the FieldType resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// 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.
- [JsonProperty("unique_name")]
- public string UniqueName { get; private set; }
-
- /// The absolute URL of the FieldType resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
-
-
- private FieldTypeResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs
deleted file mode 100644
index bf5f521fe..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.cs
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
-
- /// create
- public class CreateModelBuildOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- public string PathAssistantSid { get; }
-
- /// The URL we should call using a POST method to send status information to your application.
- public Uri StatusCallback { get; set; }
-
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- public string UniqueName { get; set; }
-
-
- /// Construct a new CreateModelBuildOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- public CreateModelBuildOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (StatusCallback != null)
- {
- p.Add(new KeyValuePair("StatusCallback", Serializers.Url(StatusCallback)));
- }
- if (UniqueName != null)
- {
- p.Add(new KeyValuePair("UniqueName", UniqueName));
- }
- return p;
- }
-
-
-
- }
- /// delete
- public class DeleteModelBuildOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to delete.
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteModelBuildOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to delete.
- public DeleteModelBuildOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// fetch
- public class FetchModelBuildOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchModelBuildOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch.
- public FetchModelBuildOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// read
- public class ReadModelBuildOptions : ReadOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- public string PathAssistantSid { get; }
-
-
-
- /// Construct a new ListModelBuildOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- public ReadModelBuildOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
- /// update
- public class UpdateModelBuildOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
- public string PathSid { get; }
-
- /// An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- public string UniqueName { get; set; }
-
-
-
- /// Construct a new UpdateModelBuildOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
- public UpdateModelBuildOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (UniqueName != null)
- {
- p.Add(new KeyValuePair("UniqueName", UniqueName));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs
deleted file mode 100644
index 9d5e156c0..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildResource.cs
+++ /dev/null
@@ -1,556 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-using Twilio.Types;
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- public class ModelBuildResource : Resource
- {
-
-
-
- [JsonConverter(typeof(StringEnumConverter))]
- public sealed class StatusEnum : StringEnum
- {
- private StatusEnum(string value) : base(value) {}
- public StatusEnum() {}
- public static implicit operator StatusEnum(string value)
- {
- return new StatusEnum(value);
- }
- public static readonly StatusEnum Enqueued = new StatusEnum("enqueued");
- public static readonly StatusEnum Building = new StatusEnum("building");
- public static readonly StatusEnum Completed = new StatusEnum("completed");
- public static readonly StatusEnum Failed = new StatusEnum("failed");
- public static readonly StatusEnum Canceled = new StatusEnum("canceled");
-
- }
-
-
- private static Request BuildCreateRequest(CreateModelBuildOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/ModelBuilds";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// create
- /// Create ModelBuild parameters
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ModelBuildResource Create(CreateModelBuildOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// create
- /// Create ModelBuild parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task CreateAsync(CreateModelBuildOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// The URL we should call using a POST method to send status information to your application.
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ModelBuildResource Create(
- string pathAssistantSid,
- Uri statusCallback = null,
- string uniqueName = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateModelBuildOptions(pathAssistantSid){ StatusCallback = statusCallback, UniqueName = uniqueName };
- return Create(options, client);
- }
-
- #if !NET35
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// The URL we should call using a POST method to send status information to your application.
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task CreateAsync(
- string pathAssistantSid,
- Uri statusCallback = null,
- string uniqueName = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateModelBuildOptions(pathAssistantSid){ StatusCallback = statusCallback, UniqueName = uniqueName };
- return await CreateAsync(options, client);
- }
- #endif
-
- /// delete
- /// Delete ModelBuild parameters
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- private static Request BuildDeleteRequest(DeleteModelBuildOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// delete
- /// Delete ModelBuild parameters
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static bool Delete(DeleteModelBuildOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// delete
- /// Delete ModelBuild parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteModelBuildOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to delete.
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static bool Delete(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteModelBuildOptions(pathAssistantSid, pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to delete.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task DeleteAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteModelBuildOptions(pathAssistantSid, pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchModelBuildOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch ModelBuild parameters
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ModelBuildResource Fetch(FetchModelBuildOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch ModelBuild parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task FetchAsync(FetchModelBuildOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ModelBuildResource Fetch(
- string pathAssistantSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchModelBuildOptions(pathAssistantSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchModelBuildOptions(pathAssistantSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildReadRequest(ReadModelBuildOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/ModelBuilds";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// read
- /// Read ModelBuild parameters
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ResourceSet Read(ReadModelBuildOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("model_builds", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// read
- /// Read ModelBuild parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task> ReadAsync(ReadModelBuildOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("model_builds", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ResourceSet Read(
- string pathAssistantSid,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadModelBuildOptions(pathAssistantSid){ PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task> ReadAsync(
- string pathAssistantSid,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadModelBuildOptions(pathAssistantSid){ PageSize = pageSize, Limit = limit};
- return await ReadAsync(options, client);
- }
- #endif
-
-
- /// Fetch the target page of records
- /// API-generated URL for the requested results page
- /// Client to make requests to Twilio
- /// The target page of records
- public static Page GetPage(string targetUrl, ITwilioRestClient client)
- {
- client = client ?? TwilioClient.GetRestClient();
-
- var request = new Request(
- HttpMethod.Get,
- targetUrl
- );
-
- var response = client.Request(request);
- return Page.FromJson("model_builds", response.Content);
- }
-
- /// Fetch the next page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The next page of records
- public static Page NextPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetNextPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("model_builds", response.Content);
- }
-
- /// Fetch the previous page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The previous page of records
- public static Page PreviousPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetPreviousPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("model_builds", response.Content);
- }
-
-
- private static Request BuildUpdateRequest(UpdateModelBuildOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/ModelBuilds/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// update
- /// Update ModelBuild parameters
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ModelBuildResource Update(UpdateModelBuildOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// update
- /// Update ModelBuild parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateModelBuildOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
- /// An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- /// Client to make requests to Twilio
- /// A single instance of ModelBuild
- public static ModelBuildResource Update(
- string pathAssistantSid,
- string pathSid,
- string uniqueName = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateModelBuildOptions(pathAssistantSid, pathSid){ UniqueName = uniqueName };
- return Update(options, client);
- }
-
- #if !NET35
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
- /// An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of ModelBuild
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- string pathSid,
- string uniqueName = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateModelBuildOptions(pathAssistantSid, pathSid){ UniqueName = uniqueName };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a ModelBuildResource object
- ///
- /// Raw JSON string
- /// ModelBuildResource object represented by the provided JSON
- public static ModelBuildResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ModelBuild resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The unique string that we created to identify the ModelBuild resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
-
- [JsonProperty("status")]
- public ModelBuildResource.StatusEnum Status { get; private set; }
-
- /// An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource.
- [JsonProperty("unique_name")]
- public string UniqueName { get; private set; }
-
- /// The absolute URL of the ModelBuild resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The time in seconds it took to build the model.
- [JsonProperty("build_duration")]
- public int? BuildDuration { get; private set; }
-
- /// If the `status` for the model build is `failed`, this value is a code to more information about the failure. This value will be null for all other statuses. See [error code dictionary](https://www.twilio.com/docs/api/errors) for a description of the error.
- [JsonProperty("error_code")]
- public int? ErrorCode { get; private set; }
-
-
-
- private ModelBuildResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs
deleted file mode 100644
index 28bf950f2..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.cs
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
-
- /// create
- public class CreateQueryOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- public string PathAssistantSid { get; }
-
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`.
- public string Language { get; }
-
- /// The end-user's natural language input. It can be up to 2048 characters long.
- public string Query { get; }
-
- /// The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take.
- public string Tasks { get; set; }
-
- /// The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- public string ModelBuild { get; set; }
-
-
- /// Construct a new CreateQueryOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`.
- /// The end-user's natural language input. It can be up to 2048 characters long.
- public CreateQueryOptions(string pathAssistantSid, string language, string query)
- {
- PathAssistantSid = pathAssistantSid;
- Language = language;
- Query = query;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Language != null)
- {
- p.Add(new KeyValuePair("Language", Language));
- }
- if (Query != null)
- {
- p.Add(new KeyValuePair("Query", Query));
- }
- if (Tasks != null)
- {
- p.Add(new KeyValuePair("Tasks", Tasks));
- }
- if (ModelBuild != null)
- {
- p.Add(new KeyValuePair("ModelBuild", ModelBuild));
- }
- return p;
- }
-
-
-
- }
- /// delete
- public class DeleteQueryOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the Query resource to delete.
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteQueryOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the Query resource to delete.
- public DeleteQueryOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// fetch
- public class FetchQueryOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the Query resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchQueryOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Query resource to fetch.
- public FetchQueryOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// read
- public class ReadQueryOptions : ReadOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- public string PathAssistantSid { get; }
-
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
- public string Language { get; set; }
-
- /// The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- public string ModelBuild { get; set; }
-
- /// The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded`
- public string Status { get; set; }
-
- /// The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
- public string DialogueSid { get; set; }
-
-
-
- /// Construct a new ListQueryOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- public ReadQueryOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (Language != null)
- {
- p.Add(new KeyValuePair("Language", Language));
- }
- if (ModelBuild != null)
- {
- p.Add(new KeyValuePair("ModelBuild", ModelBuild));
- }
- if (Status != null)
- {
- p.Add(new KeyValuePair("Status", Status));
- }
- if (DialogueSid != null)
- {
- p.Add(new KeyValuePair("DialogueSid", DialogueSid));
- }
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
- /// update
- public class UpdateQueryOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- public string PathAssistantSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the Query resource to update.
- public string PathSid { get; }
-
- /// The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query.
- public string SampleSid { get; set; }
-
- /// The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded`
- public string Status { get; set; }
-
-
-
- /// Construct a new UpdateQueryOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The Twilio-provided string that uniquely identifies the Query resource to update.
- public UpdateQueryOptions(string pathAssistantSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (SampleSid != null)
- {
- p.Add(new KeyValuePair("SampleSid", SampleSid));
- }
- if (Status != null)
- {
- p.Add(new KeyValuePair("Status", Status));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.cs
deleted file mode 100644
index 10ac07dd6..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/QueryResource.cs
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- public class QueryResource : Resource
- {
-
-
-
-
-
- private static Request BuildCreateRequest(CreateQueryOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Queries";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// create
- /// Create Query parameters
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static QueryResource Create(CreateQueryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// create
- /// Create Query parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task CreateAsync(CreateQueryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`.
- /// The end-user's natural language input. It can be up to 2048 characters long.
- /// The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take.
- /// The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static QueryResource Create(
- string pathAssistantSid,
- string language,
- string query,
- string tasks = null,
- string modelBuild = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateQueryOptions(pathAssistantSid, language, query){ Tasks = tasks, ModelBuild = modelBuild };
- return Create(options, client);
- }
-
- #if !NET35
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the new resource.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`.
- /// The end-user's natural language input. It can be up to 2048 characters long.
- /// The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take.
- /// The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task CreateAsync(
- string pathAssistantSid,
- string language,
- string query,
- string tasks = null,
- string modelBuild = null,
- ITwilioRestClient client = null)
- {
- var options = new CreateQueryOptions(pathAssistantSid, language, query){ Tasks = tasks, ModelBuild = modelBuild };
- return await CreateAsync(options, client);
- }
- #endif
-
- /// delete
- /// Delete Query parameters
- /// Client to make requests to Twilio
- /// A single instance of Query
- private static Request BuildDeleteRequest(DeleteQueryOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Queries/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// delete
- /// Delete Query parameters
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static bool Delete(DeleteQueryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// delete
- /// Delete Query parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteQueryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the Query resource to delete.
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static bool Delete(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteQueryOptions(pathAssistantSid, pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to delete.
- /// The Twilio-provided string that uniquely identifies the Query resource to delete.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task DeleteAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteQueryOptions(pathAssistantSid, pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchQueryOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Queries/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch Query parameters
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static QueryResource Fetch(FetchQueryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch Query parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task FetchAsync(FetchQueryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Query resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static QueryResource Fetch(
- string pathAssistantSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchQueryOptions(pathAssistantSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Query resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchQueryOptions(pathAssistantSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildReadRequest(ReadQueryOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Queries";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// read
- /// Read Query parameters
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static ResourceSet Read(ReadQueryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("queries", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// read
- /// Read Query parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task> ReadAsync(ReadQueryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("queries", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
- /// The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- /// The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded`
- /// The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static ResourceSet Read(
- string pathAssistantSid,
- string language = null,
- string modelBuild = null,
- string status = null,
- string dialogueSid = null,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadQueryOptions(pathAssistantSid){ Language = language, ModelBuild = modelBuild, Status = status, DialogueSid = dialogueSid, PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resources to read.
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
- /// The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- /// The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded`
- /// The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task> ReadAsync(
- string pathAssistantSid,
- string language = null,
- string modelBuild = null,
- string status = null,
- string dialogueSid = null,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadQueryOptions(pathAssistantSid){ Language = language, ModelBuild = modelBuild, Status = status, DialogueSid = dialogueSid, PageSize = pageSize, Limit = limit};
- return await ReadAsync(options, client);
- }
- #endif
-
-
- /// Fetch the target page of records
- /// API-generated URL for the requested results page
- /// Client to make requests to Twilio
- /// The target page of records
- public static Page GetPage(string targetUrl, ITwilioRestClient client)
- {
- client = client ?? TwilioClient.GetRestClient();
-
- var request = new Request(
- HttpMethod.Get,
- targetUrl
- );
-
- var response = client.Request(request);
- return Page.FromJson("queries", response.Content);
- }
-
- /// Fetch the next page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The next page of records
- public static Page NextPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetNextPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("queries", response.Content);
- }
-
- /// Fetch the previous page of records
- /// current page of records
- /// Client to make requests to Twilio
- /// The previous page of records
- public static Page PreviousPage(Page page, ITwilioRestClient client)
- {
- var request = new Request(
- HttpMethod.Get,
- page.GetPreviousPageUrl(Rest.Domain.Api)
- );
-
- var response = client.Request(request);
- return Page.FromJson("queries", response.Content);
- }
-
-
- private static Request BuildUpdateRequest(UpdateQueryOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Queries/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// update
- /// Update Query parameters
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static QueryResource Update(UpdateQueryOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// update
- /// Update Query parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateQueryOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The Twilio-provided string that uniquely identifies the Query resource to update.
- /// The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query.
- /// The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded`
- /// Client to make requests to Twilio
- /// A single instance of Query
- public static QueryResource Update(
- string pathAssistantSid,
- string pathSid,
- string sampleSid = null,
- string status = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateQueryOptions(pathAssistantSid, pathSid){ SampleSid = sampleSid, Status = status };
- return Update(options, client);
- }
-
- #if !NET35
- /// update
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The Twilio-provided string that uniquely identifies the Query resource to update.
- /// The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query.
- /// The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded`
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Query
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- string pathSid,
- string sampleSid = null,
- string status = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateQueryOptions(pathAssistantSid, pathSid){ SampleSid = sampleSid, Status = status };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a QueryResource object
- ///
- /// Raw JSON string
- /// QueryResource object represented by the provided JSON
- public static QueryResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Query resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_created")]
- public DateTime? DateCreated { get; private set; }
-
- /// The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
- [JsonProperty("date_updated")]
- public DateTime? DateUpdated { get; private set; }
-
- /// The natural language analysis results that include the [Task](https://www.twilio.com/docs/autopilot/api/task) recognized and a list of identified [Fields](https://www.twilio.com/docs/autopilot/api/task-field).
- [JsonProperty("results")]
- public object Results { get; private set; }
-
- /// The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query. For example: `en-US`.
- [JsonProperty("language")]
- public string Language { get; private set; }
-
- /// The SID of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) queried.
- [JsonProperty("model_build_sid")]
- public string ModelBuildSid { get; private set; }
-
- /// The end-user's natural language input.
- [JsonProperty("query")]
- public string Query { get; private set; }
-
- /// The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query.
- [JsonProperty("sample_sid")]
- public string SampleSid { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The unique string that we created to identify the Query resource.
- [JsonProperty("sid")]
- public string Sid { get; private set; }
-
- /// The status of the Query. Can be: `pending-review`, `reviewed`, or `discarded`
- [JsonProperty("status")]
- public string Status { get; private set; }
-
- /// The absolute URL of the Query resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The communication channel from where the end-user input came.
- [JsonProperty("source_channel")]
- public string SourceChannel { get; private set; }
-
- /// The SID of the [Dialogue](https://www.twilio.com/docs/autopilot/api/dialogue).
- [JsonProperty("dialogue_sid")]
- public string DialogueSid { get; private set; }
-
-
-
- private QueryResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.cs
deleted file mode 100644
index 022a1c5f2..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- /// Returns Style sheet JSON object for the Assistant
- public class FetchStyleSheetOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public string PathAssistantSid { get; }
-
-
-
- /// Construct a new FetchStyleSheetOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- public FetchStyleSheetOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// Updates the style sheet for an Assistant identified by `assistant_sid`.
- public class UpdateStyleSheetOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- public string PathAssistantSid { get; }
-
- /// The JSON string that describes the style sheet object.
- public object StyleSheet { get; set; }
-
-
-
- /// Construct a new UpdateStyleSheetOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- public UpdateStyleSheetOptions(string pathAssistantSid)
- {
- PathAssistantSid = pathAssistantSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (StyleSheet != null)
- {
- p.Add(new KeyValuePair("StyleSheet", Serializers.JsonObject(StyleSheet)));
- }
- return p;
- }
-
-
-
- }
-
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetResource.cs
deleted file mode 100644
index f219cf26b..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetResource.cs
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant
-{
- public class StyleSheetResource : Resource
- {
-
-
-
-
-
- private static Request BuildFetchRequest(FetchStyleSheetOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/StyleSheet";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Returns Style sheet JSON object for the Assistant
- /// Fetch StyleSheet parameters
- /// Client to make requests to Twilio
- /// A single instance of StyleSheet
- public static StyleSheetResource Fetch(FetchStyleSheetOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// Returns Style sheet JSON object for the Assistant
- /// Fetch StyleSheet parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of StyleSheet
- public static async System.Threading.Tasks.Task FetchAsync(FetchStyleSheetOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// Returns Style sheet JSON object for the Assistant
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of StyleSheet
- public static StyleSheetResource Fetch(
- string pathAssistantSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchStyleSheetOptions(pathAssistantSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// Returns Style sheet JSON object for the Assistant
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of StyleSheet
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, ITwilioRestClient client = null)
- {
- var options = new FetchStyleSheetOptions(pathAssistantSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildUpdateRequest(UpdateStyleSheetOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/StyleSheet";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// Updates the style sheet for an Assistant identified by `assistant_sid`.
- /// Update StyleSheet parameters
- /// Client to make requests to Twilio
- /// A single instance of StyleSheet
- public static StyleSheetResource Update(UpdateStyleSheetOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
-
- /// Updates the style sheet for an Assistant identified by `assistant_sid`.
- /// Update StyleSheet parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of StyleSheet
- #if !NET35
- public static async System.Threading.Tasks.Task UpdateAsync(UpdateStyleSheetOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildUpdateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// Updates the style sheet for an Assistant identified by `assistant_sid`.
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The JSON string that describes the style sheet object.
- /// Client to make requests to Twilio
- /// A single instance of StyleSheet
- public static StyleSheetResource Update(
- string pathAssistantSid,
- object styleSheet = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateStyleSheetOptions(pathAssistantSid){ StyleSheet = styleSheet };
- return Update(options, client);
- }
-
- #if !NET35
- /// Updates the style sheet for an Assistant identified by `assistant_sid`.
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
- /// The JSON string that describes the style sheet object.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of StyleSheet
- public static async System.Threading.Tasks.Task UpdateAsync(
- string pathAssistantSid,
- object styleSheet = null,
- ITwilioRestClient client = null)
- {
- var options = new UpdateStyleSheetOptions(pathAssistantSid){ StyleSheet = styleSheet };
- return await UpdateAsync(options, client);
- }
- #endif
-
- ///
- /// Converts a JSON string into a StyleSheetResource object
- ///
- /// Raw JSON string
- /// StyleSheetResource object represented by the provided JSON
- public static StyleSheetResource FromJson(string json)
- {
- try
- {
- return JsonConvert.DeserializeObject(json);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
- ///
- /// Converts an object into a json string
- ///
- /// C# model
- /// JSON string
- public static string ToJson(object model)
- {
- try
- {
- return JsonConvert.SerializeObject(model);
- }
- catch (JsonException e)
- {
- throw new ApiException(e.Message, e);
- }
- }
-
-
- /// The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the StyleSheet resource.
- [JsonProperty("account_sid")]
- public string AccountSid { get; private set; }
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
- [JsonProperty("assistant_sid")]
- public string AssistantSid { get; private set; }
-
- /// The absolute URL of the StyleSheet resource.
- [JsonProperty("url")]
- public Uri Url { get; private set; }
-
- /// The JSON string that describes the style sheet object.
- [JsonProperty("data")]
- public object Data { get; private set; }
-
-
-
- private StyleSheetResource() {
-
- }
- }
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs
deleted file mode 100644
index 4ef6f7e68..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldOptions.cs
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Converters;
-
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant.Task
-{
-
- /// create
- public class CreateFieldOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource.
- public string PathAssistantSid { get; }
-
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the new Field resource.
- public string PathTaskSid { get; }
-
- /// The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type.
- public string FieldType { get; }
-
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- public string UniqueName { get; }
-
-
- /// Construct a new CreateFieldOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the new Field resource.
- /// The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type.
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- public CreateFieldOptions(string pathAssistantSid, string pathTaskSid, string fieldType, string uniqueName)
- {
- PathAssistantSid = pathAssistantSid;
- PathTaskSid = pathTaskSid;
- FieldType = fieldType;
- UniqueName = uniqueName;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (FieldType != null)
- {
- p.Add(new KeyValuePair("FieldType", FieldType));
- }
- if (UniqueName != null)
- {
- p.Add(new KeyValuePair("UniqueName", UniqueName));
- }
- return p;
- }
-
-
-
- }
- /// delete
- public class DeleteFieldOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete.
- public string PathAssistantSid { get; }
-
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete.
- public string PathTaskSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the Field resource to delete.
- public string PathSid { get; }
-
-
-
- /// Construct a new DeleteFieldOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete.
- /// The Twilio-provided string that uniquely identifies the Field resource to delete.
- public DeleteFieldOptions(string pathAssistantSid, string pathTaskSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathTaskSid = pathTaskSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// fetch
- public class FetchFieldOptions : IOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch.
- public string PathAssistantSid { get; }
-
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch.
- public string PathTaskSid { get; }
-
- /// The Twilio-provided string that uniquely identifies the Field resource to fetch.
- public string PathSid { get; }
-
-
-
- /// Construct a new FetchFieldOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Field resource to fetch.
- public FetchFieldOptions(string pathAssistantSid, string pathTaskSid, string pathSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathTaskSid = pathTaskSid;
- PathSid = pathSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- return p;
- }
-
-
-
- }
-
-
- /// read
- public class ReadFieldOptions : ReadOptions
- {
-
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read.
- public string PathAssistantSid { get; }
-
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resources to read.
- public string PathTaskSid { get; }
-
-
-
- /// Construct a new ListFieldOptions
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resources to read.
- public ReadFieldOptions(string pathAssistantSid, string pathTaskSid)
- {
- PathAssistantSid = pathAssistantSid;
- PathTaskSid = pathTaskSid;
- }
-
-
- /// Generate the necessary parameters
- public List> GetParams()
- {
- var p = new List>();
-
- if (PageSize != null)
- {
- p.Add(new KeyValuePair("PageSize", PageSize.ToString()));
- }
- return p;
- }
-
-
-
- }
-
-}
-
diff --git a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.cs b/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.cs
deleted file mode 100644
index 7b5d5b4da..000000000
--- a/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldResource.cs
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- * This code was generated by
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
- *
- * Twilio - Autopilot
- * 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.
- */
-
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Twilio.Base;
-using Twilio.Clients;
-using Twilio.Constant;
-using Twilio.Converters;
-using Twilio.Exceptions;
-using Twilio.Http;
-
-
-
-namespace Twilio.Rest.Autopilot.V1.Assistant.Task
-{
- public class FieldResource : Resource
- {
-
-
-
-
-
- private static Request BuildCreateRequest(CreateFieldOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathTaskSid = options.PathTaskSid;
- path = path.Replace("{"+"TaskSid"+"}", PathTaskSid);
-
- return new Request(
- HttpMethod.Post,
- Rest.Domain.Autopilot,
- path,
- postParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// create
- /// Create Field parameters
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static FieldResource Create(CreateFieldOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// create
- /// Create Field parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task CreateAsync(CreateFieldOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildCreateRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
-
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the new Field resource.
- /// The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type.
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static FieldResource Create(
- string pathAssistantSid,
- string pathTaskSid,
- string fieldType,
- string uniqueName,
- ITwilioRestClient client = null)
- {
- var options = new CreateFieldOptions(pathAssistantSid, pathTaskSid, fieldType, uniqueName){ };
- return Create(options, client);
- }
-
- #if !NET35
- /// create
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the new resource.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the new Field resource.
- /// The Field Type of the new field. Can be: a [Built-in Field Type](https://www.twilio.com/docs/autopilot/built-in-field-types), the `unique_name`, or the `sid` of a custom Field Type.
- /// An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task CreateAsync(
- string pathAssistantSid,
- string pathTaskSid,
- string fieldType,
- string uniqueName,
- ITwilioRestClient client = null)
- {
- var options = new CreateFieldOptions(pathAssistantSid, pathTaskSid, fieldType, uniqueName){ };
- return await CreateAsync(options, client);
- }
- #endif
-
- /// delete
- /// Delete Field parameters
- /// Client to make requests to Twilio
- /// A single instance of Field
- private static Request BuildDeleteRequest(DeleteFieldOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathTaskSid = options.PathTaskSid;
- path = path.Replace("{"+"TaskSid"+"}", PathTaskSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Delete,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// delete
- /// Delete Field parameters
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static bool Delete(DeleteFieldOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
-
- #if !NET35
- /// delete
- /// Delete Field parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task DeleteAsync(DeleteFieldOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildDeleteRequest(options, client));
- return response.StatusCode == System.Net.HttpStatusCode.NoContent;
- }
- #endif
-
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete.
- /// The Twilio-provided string that uniquely identifies the Field resource to delete.
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static bool Delete(string pathAssistantSid, string pathTaskSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldOptions(pathAssistantSid, pathTaskSid, pathSid) ;
- return Delete(options, client);
- }
-
- #if !NET35
- /// delete
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to delete.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to delete.
- /// The Twilio-provided string that uniquely identifies the Field resource to delete.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task DeleteAsync(string pathAssistantSid, string pathTaskSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new DeleteFieldOptions(pathAssistantSid, pathTaskSid, pathSid) ;
- return await DeleteAsync(options, client);
- }
- #endif
-
- private static Request BuildFetchRequest(FetchFieldOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields/{Sid}";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathTaskSid = options.PathTaskSid;
- path = path.Replace("{"+"TaskSid"+"}", PathTaskSid);
- string PathSid = options.PathSid;
- path = path.Replace("{"+"Sid"+"}", PathSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
-
- /// fetch
- /// Fetch Field parameters
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static FieldResource Fetch(FetchFieldOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
-
- #if !NET35
- /// fetch
- /// Fetch Field parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task FetchAsync(FetchFieldOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildFetchRequest(options, client));
- return FromJson(response.Content);
- }
- #endif
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Field resource to fetch.
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static FieldResource Fetch(
- string pathAssistantSid,
- string pathTaskSid,
- string pathSid,
- ITwilioRestClient client = null)
- {
- var options = new FetchFieldOptions(pathAssistantSid, pathTaskSid, pathSid){ };
- return Fetch(options, client);
- }
-
- #if !NET35
- /// fetch
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resource to fetch.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resource to fetch.
- /// The Twilio-provided string that uniquely identifies the Field resource to fetch.
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task FetchAsync(string pathAssistantSid, string pathTaskSid, string pathSid, ITwilioRestClient client = null)
- {
- var options = new FetchFieldOptions(pathAssistantSid, pathTaskSid, pathSid){ };
- return await FetchAsync(options, client);
- }
- #endif
-
- private static Request BuildReadRequest(ReadFieldOptions options, ITwilioRestClient client)
- {
-
- string path = "/v1/Assistants/{AssistantSid}/Tasks/{TaskSid}/Fields";
-
- string PathAssistantSid = options.PathAssistantSid;
- path = path.Replace("{"+"AssistantSid"+"}", PathAssistantSid);
- string PathTaskSid = options.PathTaskSid;
- path = path.Replace("{"+"TaskSid"+"}", PathTaskSid);
-
- return new Request(
- HttpMethod.Get,
- Rest.Domain.Autopilot,
- path,
- queryParams: options.GetParams(),
- headerParams: null
- );
- }
- /// read
- /// Read Field parameters
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static ResourceSet Read(ReadFieldOptions options, ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = client.Request(BuildReadRequest(options, client));
- var page = Page.FromJson("fields", response.Content);
- return new ResourceSet(page, options, client);
- }
-
- #if !NET35
- /// read
- /// Read Field parameters
- /// Client to make requests to Twilio
- /// Task that resolves to A single instance of Field
- public static async System.Threading.Tasks.Task> ReadAsync(ReadFieldOptions options,
- ITwilioRestClient client = null)
- {
- client = client ?? TwilioClient.GetRestClient();
- var response = await client.RequestAsync(BuildReadRequest(options, client));
-
- var page = Page.FromJson("fields", response.Content);
- return new ResourceSet(page, options, client);
- }
- #endif
- /// read
- /// The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the Task associated with the resources to read.
- /// The SID of the [Task](https://www.twilio.com/docs/autopilot/api/task) resource associated with the Field resources to read.
- /// How many resources to return in each list page. The default is 50, and the maximum is 1000.
- /// Record limit
- /// Client to make requests to Twilio
- /// A single instance of Field
- public static ResourceSet Read(
- string pathAssistantSid,
- string pathTaskSid,
- int? pageSize = null,
- long? limit = null,
- ITwilioRestClient client = null)
- {
- var options = new ReadFieldOptions(pathAssistantSid, pathTaskSid){ PageSize = pageSize, Limit = limit};
- return Read(options, client);
- }
-
- #if !NET35
- ///