diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 07178db5f3..d9aace8a70 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -62,7 +62,7 @@ jobs: with: distribution: 'zulu' java-version: '17' - + - name: SonarCloud Scan if: ${{ (github.event_name == 'pull_request' || github.ref_type == 'branch') && matrix.java == 11 && !github.event.pull_request.head.repo.fork }} env: @@ -94,7 +94,7 @@ jobs: - name: Create GitHub Release uses: sendgrid/dx-automator/actions/release@main with: - footer: '**[Maven](https://mvnrepository.com/artifact/com.twilio.sdk/twilio/${version})**' + footer: '**[Maven](https://central.sonatype.com/artifact/com.twilio.sdk/twilio/${version})**' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGES.md b/CHANGES.md index 2a4a510039..70ff8c0dd9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,96 @@ twilio-java changelog ===================== +[2025-09-04] Version 11.0.0-rc.6 +-------------------------------- +**Api** +- Remove usage category enum from usage record and usage triggers API **(breaking change)** + + +[2025-08-28] Version 11.0.0-rc.5 +-------------------------------- +**Studio** +- Add `type` to Step resource APIs + +**Verify** +- Allow to update all passkeys parameters in the service update + + +[2025-08-18] Version 11.0.0-rc.4 +-------------------------------- +**Accounts** +- Update beta feature flag for consent and contact bulk upsert APIs + +**Api** +- Add multiple missing usage categories to usage records and usage triggers api +- Add `channels-whatsapp-template-marketing` and `channels-whatsapp-template-utility` to usage categories + +**Conversations** +- Fix `state` spelling for `initializing` enum value +- Update `state` to include `intializing` for ServiceConversationWithParticipants and ConversationWithParticipants + +**Flex** +- Adding new optional parameter `identity` to `web_channels` API in version `v2` + +**Trusthub** +- Add required Permissions to the ComplianceInquiries API + +**Verify** +- Add passkeys support to Verify API creating and updating services. +- Update `ienum` type for Factor creation +- Add passkeys as challenge and factor type + + +[2025-07-24] Version 11.0.0-rc.3 +-------------------------------- +**Events** +- Remove `SinkSid` parameter when updating subscriptions. **(breaking change)** + +**Twiml** +- Remove Duplicates. +- Add Polly Generative voices. +- Add Latest Google (Chirp3-HD) voices. + + +[2025-07-10] Version 11.0.0-rc.2 +-------------------------------- +**Flex** +- update team name for web_channel, webchat_init_token, webchat_refresh_token + + +[2025-07-03] Version 11.0.0-rc.1 +-------------------------------- +**Library - Chore** +- [PR #875](https://github.com/twilio/twilio-java/pull/875): prepare for RC release. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)! +- [PR #874](https://github.com/twilio/twilio-java/pull/874): Handle List serialization. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)! +- [PR #873](https://github.com/twilio/twilio-java/pull/873): use Object for anyType. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)! + +**Bulkexports** +- Changed the type of 'details' field to be a list of objects instead of a single object + +**Conversations** +- Updates to `method` casing for ConfgurationAddress, ConversationScopedWebhook, and ServiceConversationScopedWebhook for RestProxy compatibility + +**Proxy** +- remove shortcodes resource as its no longer used + +**Serverless** +- Change log field level from type `ienum` to `string` in Logs api + +**Taskrouter** +- Remove `URL-encoded` from attributes param definition in tasks + +**Trunking** +- Added `symmetric_rtp_enabled` property on Trunks. + +**Twiml** +- Add support for `` noun under `` verb + + +[2025-07-03] Version 11.0.0-rc.0 +-------------------------------- +- Release Candidate prep + [2025-06-12] Version 10.9.2 --------------------------- **Library - Chore** diff --git a/README.md b/README.md index dbd9f1c804..c715b3a2fb 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Use the following dependency in your project to grab via Maven: com.twilio.sdk twilio - 10.X.X + 11.X.X-rc.x compile ``` @@ -70,7 +70,7 @@ Use the following dependency in your project to grab via Maven: or Gradle: ```groovy -implementation "com.twilio.sdk:twilio:10.X.X" +implementation "com.twilio.sdk:twilio:11.X.X-rc.x" ``` If you want to compile it yourself, here's how: @@ -221,8 +221,8 @@ public class Example { We are introducing Client Credentials Flow-based OAuth 2.0 authentication. This feature is currently in `beta` and its implementation is subject to change. -- API examples [here](https://github.com/twilio/twilio-java/blob/main/examples/FetchMessageUsingOAuth.md) -- Organisation API examples [here](https://github.com/twilio/twilio-java/blob/main/examples/BearerTokenAuthentication.md) +- API examples [here](https://github.com/twilio/twilio-java/blob/main/examples/PublicOAuthExample.md) +- Organisation API examples [here](https://github.com/twilio/twilio-java/blob/main/examples/OrgsAPIExample.md) ### Iterate through records @@ -366,3 +366,5 @@ If you've instead found a bug in the library or would like new features added, g [apidocs]: https://www.twilio.com/docs/api [twiml]: https://www.twilio.com/docs/api/twiml [libdocs]: https://twilio.github.io/twilio-java + + diff --git a/examples/BearerTokenAuthentication.md b/examples/BearerTokenAuthentication.md deleted file mode 100644 index 2618436b32..0000000000 --- a/examples/BearerTokenAuthentication.md +++ /dev/null @@ -1,26 +0,0 @@ - class BearerTokenAuthenticationExamples { - public static void main { - - private static final String GRANT_TYPE = "grant_type_to_be_used"; - private static final String CLIENT_SID = - "client_id_of_the_organization"; - private static final String CLIENT_SECRET = "client_secret_of_organization"; - private static final String ORGANISATION_ID = "id_of_the_organization"; - - //Getting access token - Method #1 - TwilioOrgsTokenAuth.init(GRANT_TYPE, CLIENT_ID, CLIENT_SECRET); - - //Getting access token - Method #2 - //To provide custom token manager implementation - //Need not call init method if customer token manager is passed - //TwilioOrgsTokenAuth.setTokenManager(new CustomTokenManagerImpl(GRANT_TYPE, CLIENT_ID, CLIENT_SECRET)); - - fetchAccountDetails(); - } - - private static void fetchAccountDetails() { - ResourceSet accountSet = Account.reader(ORGANISATION_ID).read(); - String accountSid = accountSet.iterator().next().getAccountSid(); - System.out.println(accountSid); - } - } \ No newline at end of file diff --git a/examples/FetchMessageUsingOAuth.md b/examples/FetchMessageUsingOAuth.md deleted file mode 100644 index ec667f1ab0..0000000000 --- a/examples/FetchMessageUsingOAuth.md +++ /dev/null @@ -1,21 +0,0 @@ -``` -import com.twilio.Twilio; -import com.twilio.credential.ClientCredentialProvider; -import com.twilio.rest.api.v2010.account.Message; - -public class FetchMessageUsingOAuth { - public static void main(String[] args) { - String clientId = "YOUR_CLIENT_ID"; - String clientSecret = "YOUR_CLIENT_SECRET"; - String accountSid = "YOUR_ACCOUNT_SID"; - Twilio.init(new ClientCredentialProvider(clientId, clientSecret), accountSid); - /* - Or use the following if accountSid is not required as a path parameter for an API or when setting accountSid in the API. - Twilio.init(new ClientCredentialProvider(clientId, clientSecret)); - */ - String messageSid = "YOUR_MESSAGE_SID"; - Message message = Message.fetcher(messageSid).fetch(); - } -} -``` - diff --git a/examples/OrgsAPIExample.md b/examples/OrgsAPIExample.md new file mode 100644 index 0000000000..b4511f88bc --- /dev/null +++ b/examples/OrgsAPIExample.md @@ -0,0 +1,34 @@ + class OrgsAPIExample { + public static void main { + + private static final String GRANT_TYPE = "grant_type_to_be_used"; + private static final String CLIENT_SID = + "client_id_of_the_organization"; + private static final String CLIENT_SECRET = "client_secret_of_organization"; + private static final String ORGANISATION_ID = "id_of_the_organization"; + + //Getting access token - Method #1 + Twilio.init(new OrgsClientCredentialProvider(CLIENT_SID, CLIENT_SECRET)); + fetchAccountDetails(); + + + //Scenario: 2 If in case one doesn't want to change the existing stored credential + // Pass Custom TwilioRestClient + // TokenManager tokenManager = new OrgsTokenManager(GRANT_TYPE, CLIENT_SID, CLIENT_SECRET); + // TokenAuthStrategy tokenAuthStrategy = new TokenAuthStrategy(tokenManager); + // TwilioRestClient client = new TwilioRestClient.Builder(tokenAuthStrategy).build(); + // fetchAccountDetailsWithClient(client); + } + + private static void fetchAccountDetails() { + ResourceSet accountSet = Account.reader(ORGANISATION_ID).read(); + String accountSid = accountSet.iterator().next().getAccountSid(); + System.out.println(accountSid); + } + + private static void fetchAccountDetailsWithClient(TwilioRestClient client) { + ResourceSet accountSet = Account.reader(ORGANISATION_ID).read(client); + String accountSid = accountSet.iterator().next().getAccountSid(); + System.out.println(accountSid); + } + } \ No newline at end of file diff --git a/examples/PublicOAuthExample.md b/examples/PublicOAuthExample.md new file mode 100644 index 0000000000..dce5027e9a --- /dev/null +++ b/examples/PublicOAuthExample.md @@ -0,0 +1,35 @@ +``` +class PublicOAuthExample { + public static void main { + + private static final String GRANT_TYPE = "grant_type_to_be_used"; + private static final String OAUTH_CLIENT_SID = "client_id"; + private static final String OAUTH_CLIENT_SECRET = "client_secret"; + private static final String ACCOUNT_SID = "account_sid"; + private static final String MESSAGE_SID = "message_sid"; + + //Getting access token - Method #1 + Twilio.init(new ClientCredentialProvider(OAUTH_CLIENT_SID, OAUTH_CLIENT_SECRET), ACCOUNT_SID); + fetchMessage(MESSAGE_SID); + + + //Scenario: 2 If in case one doesn't want to change the existing stored credential + // Pass Custom TwilioRestClient + // TokenManager tokenManager = new ApiTokenManager(GRANT_TYPE, OAUTH_CLIENT_SID, OAUTH_CLIENT_SECRET); + // TokenAuthStrategy tokenAuthStrategy = new TokenAuthStrategy(tokenManager); + // TwilioRestClient client = new TwilioRestClient.Builder(tokenAuthStrategy).accountSid(ACCOUNT_SID).build(); + // fetchMessageWithClient(MESSAGE_SID, client); + } + + public static void fetchMessage(String sid) { + Message message = Message.fetcher(sid).fetch(); + System.out.println("Fetched Message SID: " + message.getSid()); + } + + public static void fetchMessageWithClient(String sid, TwilioRestClient client) { + Message message = Message.fetcher(sid).fetch(client); + System.out.println("Fetched Message SID: " + message.getSid()); + } +} +``` + diff --git a/pom.xml b/pom.xml index 69033e805e..7b1a9ae5e1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ twilio jar twilio - 10.9.2 + 11.0.0-rc.6 Twilio Java Helper Library https://www.twilio.com @@ -19,7 +19,7 @@ git@github.com:twilio/twilio-java.git scm:git:git@github.com:twilio/twilio-java.git scm:git:git@github.com:twilio/twilio-java.git - 10.9.2 + 11.0.0-rc.6 @@ -217,9 +217,9 @@ runtime - org.apache.httpcomponents - httpclient - 4.5.13 + org.apache.httpcomponents.client5 + httpclient5 + 5.5 commons-codec @@ -228,9 +228,9 @@ - org.apache.httpcomponents - httpcore - 4.4.13 + org.apache.httpcomponents.core5 + httpcore5 + 5.3.4 com.fasterxml.jackson.core @@ -260,7 +260,7 @@ org.slf4j slf4j-api - 1.7.30 + 1.7.36 junit @@ -268,12 +268,6 @@ 4.13.2 test - - org.apache.httpcomponents - httpmime - 4.5.13 - test - com.tngtech.archunit archunit @@ -316,8 +310,8 @@ org.mockito - mockito-all - 1.10.19 + mockito-core + 4.11.0 test @@ -341,6 +335,12 @@ gson 2.10.1 + + org.mockito + mockito-inline + 4.11.0 + test + @@ -440,6 +440,10 @@ + + org.apache.maven.plugins + maven-surefire-plugin + org.apache.maven.plugins maven-surefire-plugin @@ -490,4 +494,4 @@ - \ No newline at end of file + diff --git a/src/main/java/com/twilio/Domains.java b/src/main/java/com/twilio/Domains.java index 956b8080b9..2baa605f57 100644 --- a/src/main/java/com/twilio/Domains.java +++ b/src/main/java/com/twilio/Domains.java @@ -26,11 +26,9 @@ public enum Domains { INSIGHTS("insights"), INTELLIGENCE("intelligence"), IPMESSAGING("ip-messaging"), - KNOWLEDGE("knowledge"), LOOKUPS("lookups"), MARKETPLACE("marketplace"), MESSAGING("messaging"), - MICROVISOR("microvisor"), MONITOR("monitor"), NOTIFY("notify"), NUMBERS("numbers"), diff --git a/src/main/java/com/twilio/Twilio.java b/src/main/java/com/twilio/Twilio.java index 7ed3da168a..2457814e0d 100644 --- a/src/main/java/com/twilio/Twilio.java +++ b/src/main/java/com/twilio/Twilio.java @@ -24,7 +24,7 @@ */ public class Twilio { - public static final String VERSION = "10.9.2"; + public static final String VERSION = "11.0.0-rc.6"; public static final String JAVA_VERSION = System.getProperty("java.version"); public static final String OS_NAME = System.getProperty("os.name"); public static final String OS_ARCH = System.getProperty("os.arch"); @@ -37,7 +37,7 @@ public class Twilio { private static String edge = System.getenv("TWILIO_EDGE"); private static volatile TwilioRestClient restClient; private static volatile ExecutorService executorService; - + private static CredentialProvider credentialProvider; private Twilio() { @@ -85,7 +85,7 @@ private static void setCredentialProvider(final CredentialProvider credentialPro if (credentialProvider == null) { throw new AuthenticationException("Credential Provider can not be null"); } - + if (!credentialProvider.equals(Twilio.credentialProvider)) { Twilio.invalidate(); } @@ -315,7 +315,7 @@ private static void invalidate() { private static void invalidateOAuthCreds() { Twilio.credentialProvider = null; } - + private static void invalidateBasicCreds() { Twilio.username = null; Twilio.password = null; diff --git a/src/main/java/com/twilio/TwilioOrgsTokenAuth.java b/src/main/java/com/twilio/TwilioOrgsTokenAuth.java deleted file mode 100644 index 9b28d0b06f..0000000000 --- a/src/main/java/com/twilio/TwilioOrgsTokenAuth.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.twilio; - -import com.twilio.annotations.Beta; -import com.twilio.exception.AuthenticationException; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import com.twilio.http.bearertoken.TokenManager; -import com.twilio.http.bearertoken.OrgsTokenManager; - -@Beta -public class TwilioOrgsTokenAuth { - private static String accessToken; - @Getter - private static List userAgentExtensions; - private static String region = System.getenv("TWILIO_REGION"); - private static String edge = System.getenv("TWILIO_EDGE"); - private static volatile BearerTokenTwilioRestClient restClient; - @Getter @Setter - private static TokenManager tokenManager; - - private static volatile ExecutorService executorService; - - private TwilioOrgsTokenAuth() { - } - - public static synchronized void init(String grantType, String clientId, String clientSecret) { - validateAuthCredentials(grantType, clientId, clientSecret); - tokenManager = new OrgsTokenManager(grantType, clientId, clientSecret); - } - public static synchronized void init(String grantType, String clientId, String clientSecret, String code, String redirectUri, String audience, String refreshToken, String scope) { - validateAuthCredentials(grantType, clientId, clientSecret); - tokenManager = new OrgsTokenManager(grantType, clientId, clientSecret, code, redirectUri, audience, refreshToken, scope); - } - - private static void validateAuthCredentials(String grantType, String clientId, String clientSecret){ - if (grantType == null) { - throw new AuthenticationException("Grant Type cannot be null"); - } - if (clientId == null) { - throw new AuthenticationException("Client Id cannot be null"); - } - if (clientSecret == null) { - throw new AuthenticationException("Client Secret cannot be null"); - } - return; - } - - public static BearerTokenTwilioRestClient getRestClient() { - if (TwilioOrgsTokenAuth.restClient == null) { - synchronized (TwilioOrgsTokenAuth.class) { - if (TwilioOrgsTokenAuth.restClient == null) { - TwilioOrgsTokenAuth.restClient = buildOAuthRestClient(); - } - } - } - return TwilioOrgsTokenAuth.restClient; - } - /** - * Returns the Twilio executor service. - * - * @return the Twilio executor service - */ - public static ExecutorService getExecutorService() { - if (TwilioOrgsTokenAuth.executorService == null) { - synchronized (TwilioOrgsTokenAuth.class) { - if (TwilioOrgsTokenAuth.executorService == null) { - TwilioOrgsTokenAuth.executorService = Executors.newCachedThreadPool(); - } - } - } - return TwilioOrgsTokenAuth.executorService; - } - - private static BearerTokenTwilioRestClient buildOAuthRestClient() { - - BearerTokenTwilioRestClient.Builder builder = new BearerTokenTwilioRestClient.Builder(); - - if (userAgentExtensions != null) { - builder.userAgentExtensions(TwilioOrgsTokenAuth.userAgentExtensions); - } - - builder.region(TwilioOrgsTokenAuth.region); - builder.edge(TwilioOrgsTokenAuth.edge); - if(TwilioOrgsTokenAuth.tokenManager == null){ - throw new AuthenticationException("Either initialize the authentications class or pass a custom token manager"); - } - builder.tokenManager(TwilioOrgsTokenAuth.tokenManager); - - return builder.build(); - } - - /** - * Invalidates the volatile state held in the Twilio singleton. - */ - private static void invalidate() { - TwilioOrgsTokenAuth.restClient = null; - TwilioOrgsTokenAuth.tokenManager = null; - } - - -} \ No newline at end of file diff --git a/src/main/java/com/twilio/base/Page.java b/src/main/java/com/twilio/base/Page.java index b03440007e..259e86e480 100644 --- a/src/main/java/com/twilio/base/Page.java +++ b/src/main/java/com/twilio/base/Page.java @@ -169,8 +169,9 @@ private static Page buildPage(JsonNode root, List results) { private static Page buildNextGenPage(JsonNode root, List results) { JsonNode meta = root.get("meta"); - Builder builder = new Builder().url(meta.get("url").asText()); - + Builder builder = new Builder<>(); + if(meta != null && meta.get("url") != null) { + builder = builder.url(meta.get("url").asText()); JsonNode nextPageNode = meta.get("next_page_url"); if (!nextPageNode.isNull()) { builder.nextPageUrl(nextPageNode.asText()); @@ -192,6 +193,7 @@ private static Page buildNextGenPage(JsonNode root, List results) { } else { builder.pageSize(results.size()); } + } return builder.records(results).build(); } diff --git a/src/main/java/com/twilio/base/ResourceSet.java b/src/main/java/com/twilio/base/ResourceSet.java index 37fec6c969..6e5608adce 100644 --- a/src/main/java/com/twilio/base/ResourceSet.java +++ b/src/main/java/com/twilio/base/ResourceSet.java @@ -14,6 +14,7 @@ public class ResourceSet implements Iterable { private final Reader reader; private final TwilioRestClient client; + private final Page firstPage; // Store reference to first page to enable multiple iterations private boolean autoPaging; private long pages = 1; @@ -32,6 +33,7 @@ public class ResourceSet implements Iterable { public ResourceSet(final Reader reader, final TwilioRestClient client, final Page page) { this.reader = reader; this.client = client; + this.firstPage = page; // Save first page to allow resetting iterator state this.page = page; this.iterator = page.getRecords().iterator(); this.autoPaging = true; @@ -74,6 +76,12 @@ public long getPageLimit() { @Override public Iterator iterator() { + // Reset state to allow multiple iterations + this.processed = 0; + this.pages = 1; + this.page = this.firstPage; // Reset to first page for new iteration + this.iterator = this.firstPage.getRecords().iterator(); // Reset iterator to start of first page + return new ResourceSetIterator<>(this); } diff --git a/src/main/java/com/twilio/base/bearertoken/Creator.java b/src/main/java/com/twilio/base/bearertoken/Creator.java deleted file mode 100644 index 8cb676cef6..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Creator.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.twilio.TwilioOrgsTokenAuth; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; - -import java.util.concurrent.CompletableFuture; - -/** - * Executor for creation of a resource. - * - * @param type of the resource - */ -public abstract class Creator { - - /** - * Execute an async request using default client. - * - * @return future that resolves to requested object - */ - public CompletableFuture createAsync() { - return createAsync(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute an async request using specified client. - * - * @param client client used to make request - * @return future that resolves to requested object - */ - public CompletableFuture createAsync(final BearerTokenTwilioRestClient client) { - return CompletableFuture.supplyAsync(() -> create(client), TwilioOrgsTokenAuth.getExecutorService()); - } - - /** - * Execute a request using default client. - * - * @return Requested object - */ - public T create() { - return create(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute a request using specified client. - * - * @param client client used to make request - * @return Requested object - */ - public abstract T create(final BearerTokenTwilioRestClient client); -} diff --git a/src/main/java/com/twilio/base/bearertoken/Deleter.java b/src/main/java/com/twilio/base/bearertoken/Deleter.java deleted file mode 100644 index 3b49cfd0ba..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Deleter.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.twilio.Twilio; -import com.twilio.TwilioOrgsTokenAuth; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; - -import java.util.concurrent.CompletableFuture; - -/** - * Executor for deletes of a resource. - * - * @param type of the resource - */ -public abstract class Deleter { - - /** - * Execute an async request using default client. - * - * @return future that resolves to true if the object was deleted - */ - public CompletableFuture deleteAsync() { - return deleteAsync(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute an async request using specified client. - * - * @param client client used to make request - * @return future that resolves to true if the object was deleted - */ - public CompletableFuture deleteAsync(final BearerTokenTwilioRestClient client) { - return CompletableFuture.supplyAsync(() -> delete(client), Twilio.getExecutorService()); - } - - /** - * Execute a request using default client. - * - * @return true if the object was deleted - */ - public boolean delete() { - return delete(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute a request using specified client. - * - * @param client client used to make request - * @return true if the object was deleted - */ - public abstract boolean delete(final BearerTokenTwilioRestClient client); -} diff --git a/src/main/java/com/twilio/base/bearertoken/Fetcher.java b/src/main/java/com/twilio/base/bearertoken/Fetcher.java deleted file mode 100644 index 5654895a3f..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Fetcher.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.twilio.TwilioOrgsTokenAuth; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; - -import java.util.concurrent.CompletableFuture; - -/** - * Executor for fetches of a resource. - * - * @param type of the resource - */ -public abstract class Fetcher { - - /** - * Execute an async request using default client. - * - * @return future that resolves to requested object - */ - public CompletableFuture fetchAsync() { - return fetchAsync(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute an async request using specified client. - * - * @param client client used to make request - * @return future that resolves to requested object - */ - public CompletableFuture fetchAsync(final BearerTokenTwilioRestClient client) { - return CompletableFuture.supplyAsync(() -> fetch(client), TwilioOrgsTokenAuth.getExecutorService()); - } - - /** - * Execute a request using default client. - * - * @return Requested object - */ - public T fetch() { - return fetch(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute a request using specified client. - * - * @param client client used to make request - * @return Requested object - */ - public abstract T fetch(final BearerTokenTwilioRestClient client); -} diff --git a/src/main/java/com/twilio/base/bearertoken/Page.java b/src/main/java/com/twilio/base/bearertoken/Page.java deleted file mode 100644 index 204c2e98a2..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Page.java +++ /dev/null @@ -1,270 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.exception.ApiConnectionException; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -public class Page { - private final List records; - private final String firstPageUrl; - private final String firstPageUri; - private final String nextPageUrl; - private final String nextPageUri; - private final String previousPageUrl; - private final String previousPageUri; - private final String url; - private final String uri; - private final int pageSize; - - private Page(Builder b) { - this.records = b.records; - this.firstPageUri = b.firstPageUri; - this.firstPageUrl = b.firstPageUrl; - this.nextPageUri = b.nextPageUri; - this.nextPageUrl = b.nextPageUrl; - this.previousPageUri = b.previousPageUri; - this.previousPageUrl = b.previousPageUrl; - this.uri = b.uri; - this.url = b.url; - this.pageSize = b.pageSize; - } - - private String urlFromUri(String domain, String uri) { - return "https://" + domain + ".twilio.com" + uri; - } - - public List getRecords() { - return records; - } - - /** - * Generate first page url for a list result. - * - * @param domain domain to use - * @return the first page url - */ - public String getFirstPageUrl(String domain) { - if (firstPageUrl != null) { - return firstPageUrl; - } - - return urlFromUri(domain, firstPageUri); - } - - /** - * Generate next page url for a list result. - * - * @param domain domain to use - * @return the next page url - */ - public String getNextPageUrl(String domain) { - if (nextPageUrl != null) { - return nextPageUrl; - } - - return urlFromUri(domain, nextPageUri); - } - - /** - * Generate previous page url for a list result. - * - * @param domain domain to use - * @return the previous page url - */ - public String getPreviousPageUrl(String domain) { - if (previousPageUrl != null) { - return previousPageUrl; - } - - return urlFromUri(domain, previousPageUri); - } - - public int getPageSize() { - return pageSize; - } - - /** - * Generate page url for a list result. - * - * @param domain domain to use - * @return the page url - */ - public String getUrl(String domain) { - if (url != null) { - return url; - } - - return urlFromUri(domain, uri); - } - - public boolean hasNextPage() { - return (nextPageUri != null && !nextPageUri.isEmpty()) || (nextPageUrl != null && !nextPageUrl.isEmpty()); - } - - /** - * Create a new page of data from a json blob. - * - * @param recordKey key which holds the records - * @param json json blob - * @param recordType resource type - * @param mapper json parser - * @param record class type - * @return a page of records of type T - */ - public static Page fromJson(String recordKey, String json, Class recordType, ObjectMapper mapper) { - try { - List results = new ArrayList<>(); - JsonNode root = mapper.readTree(json); - JsonNode records = root.get(recordKey); - for (final JsonNode record : records) { - results.add(mapper.readValue(record.toString(), recordType)); - } - - JsonNode uriNode = root.get("uri"); - if (uriNode != null) { - return buildPage(root, results); - } else { - return buildNextGenPage(root, results); - } - - } catch (final IOException e) { - throw new ApiConnectionException( - "Unable to deserialize response: " + e.getMessage() + "\nJSON: " + json, e - ); - } - } - - private static Page buildPage(JsonNode root, List results) { - Builder builder = new Builder() - .uri(root.get("uri").asText()); - - JsonNode nextPageNode = root.get("next_page_uri"); - if (nextPageNode != null && !nextPageNode.isNull()) { - builder.nextPageUri(nextPageNode.asText()); - } - - JsonNode previousPageNode = root.get("previous_page_uri"); - if (previousPageNode != null && !previousPageNode.isNull()) { - builder.previousPageUri(previousPageNode.asText()); - } - - JsonNode firstPageNode = root.get("first_page_uri"); - if (firstPageNode != null && !firstPageNode.isNull()) { - builder.firstPageUri(firstPageNode.asText()); - } - - JsonNode pageSizeNode = root.get("page_size"); - if (pageSizeNode != null && !pageSizeNode.isNull()) { - builder.pageSize(pageSizeNode.asInt()); - } else { - builder.pageSize(results.size()); - } - - return builder.records(results).build(); - } - - private static Page buildNextGenPage(JsonNode root, List results) { - JsonNode meta = root.get("meta"); - Builder builder = new Builder<>(); - if(meta != null && meta.get("url") != null) { - - builder = builder.url(meta.get("url").asText()); - - - JsonNode nextPageNode = meta.get("next_page_url"); - if (!nextPageNode.isNull()) { - builder.nextPageUrl(nextPageNode.asText()); - } - - JsonNode previousPageNode = meta.get("previous_page_url"); - if (!previousPageNode.isNull()) { - builder.previousPageUrl(previousPageNode.asText()); - } - - JsonNode firstPageNode = meta.get("first_page_url"); - if (!firstPageNode.isNull()) { - builder.firstPageUrl(firstPageNode.asText()); - } - - JsonNode pageSizeNode = meta.get("page_size"); - if (!pageSizeNode.isNull()) { - builder.pageSize(pageSizeNode.asInt()); - } else { - builder.pageSize(results.size()); - } - } - - return builder.records(results).build(); - } - - private static class Builder { - private List records; - private String firstPageUrl; - private String firstPageUri; - private String nextPageUrl; - private String nextPageUri; - private String previousPageUrl; - private String previousPageUri; - private String uri; - private String url; - private int pageSize; - - public Builder records(List records) { - this.records = records; - return this; - } - - public Builder firstPageUri(String firstPageUri) { - this.firstPageUri = firstPageUri; - return this; - } - - public Builder firstPageUrl(String firstPageUrl) { - this.firstPageUrl = firstPageUrl; - return this; - } - - public Builder nextPageUri(String nextPageUri) { - this.nextPageUri = nextPageUri; - return this; - } - - public Builder nextPageUrl(String nextPageUrl) { - this.nextPageUrl = nextPageUrl; - return this; - } - - public Builder previousPageUri(String previousPageUri) { - this.previousPageUri = previousPageUri; - return this; - } - - public Builder previousPageUrl(String previousPageUrl) { - this.previousPageUrl = previousPageUrl; - return this; - } - - public Builder uri(String uri) { - this.uri = uri; - return this; - } - - public Builder url(String url) { - this.url = url; - return this; - } - - public Builder pageSize(int pageSize) { - this.pageSize = pageSize; - return this; - } - - public Page build() { - return new Page<>(this); - } - } -} diff --git a/src/main/java/com/twilio/base/bearertoken/Reader.java b/src/main/java/com/twilio/base/bearertoken/Reader.java deleted file mode 100644 index 15e221a3f9..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Reader.java +++ /dev/null @@ -1,156 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.twilio.TwilioOrgsTokenAuth; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; - -import java.util.concurrent.CompletableFuture; - -/** - * Executor for listing of a resource. - * - * @param type of the resource - */ -public abstract class Reader { - - private Integer pageSize; - private Long limit; - - /** - * Execute a request using default client. - * - * @return ResourceSet of objects - */ - public ResourceSet read() { - return read(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute a request using specified client. - * - * @param client client used to make request - * @return ResourceSet of objects - */ - public abstract ResourceSet read(final BearerTokenTwilioRestClient client); - - /** - * Execute an async request using default client. - * - * @return future that resolves to the ResourceSet of objects - */ - public CompletableFuture> readAsync() { - return readAsync(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute an async request using specified client. - * - * @param client client used to make request - * @return future that resolves to the ResourceSet of objects - */ - public CompletableFuture> readAsync(final BearerTokenTwilioRestClient client) { - return CompletableFuture.supplyAsync(() -> read(client), TwilioOrgsTokenAuth.getExecutorService()); - } - - /** - * Fetch the first page of resources. - * - * @return Page containing the first pageSize of resources - */ - public Page firstPage() { - return firstPage(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Fetch the first page of resources using specified client. - * - * @param client client used to fetch - * @return Page containing the first pageSize of resources - */ - public abstract Page firstPage(final BearerTokenTwilioRestClient client); - - /** - * Retrieve the target page of resources. - * - * @param targetUrl API-generated URL for the requested results page - * @return Page containing the target pageSize of resources - */ - public Page getPage(final String targetUrl) { - return getPage(targetUrl, TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Retrieve the target page of resources. - * - * @param targetUrl API-generated URL for the requested results page - * @param client client used to fetch - * @return Page containing the target pageSize of resources - */ - public abstract Page getPage(final String targetUrl, final BearerTokenTwilioRestClient client); - - /** - * Fetch the following page of resources. - * - * @param page current page of resources - * @return Page containing the next pageSize of resources - */ - public Page nextPage(final Page page) { - return nextPage(page, TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Fetch the following page of resources using specified client. - * - * @param page current page of resources - * @param client client used to fetch - * @return Page containing the next pageSize of resources - */ - public abstract Page nextPage(final Page page, final BearerTokenTwilioRestClient client); - - /** - * Fetch the prior page of resources. - * - * @param page current page of resources - * @return Page containing the previous pageSize of resources - */ - public Page previousPage(final Page page) { - return previousPage(page, TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Fetch the prior page of resources using specified client. - * - * @param page current page of resources - * @param client client used to fetch - * @return Page containing the previous pageSize of resources - */ - public abstract Page previousPage(final Page page, final BearerTokenTwilioRestClient client); - - public Integer getPageSize() { - return pageSize; - } - - public Reader pageSize(final int pageSize) { - this.pageSize = pageSize; - return this; - } - - public Long getLimit() { - return limit; - } - - /** - * Sets the max number of records to read. - * - * @param limit max number of records to read - * @return this reader - */ - public Reader limit(final long limit) { - this.limit = limit; - - if (this.pageSize == null) { - this.pageSize = this.limit.intValue(); - } - - return this; - } -} diff --git a/src/main/java/com/twilio/base/bearertoken/Resource.java b/src/main/java/com/twilio/base/bearertoken/Resource.java deleted file mode 100644 index 08dc228556..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Resource.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.twilio.base.bearertoken; - -import java.io.Serializable; - -public abstract class Resource implements Serializable { - - private static final long serialVersionUID = -5898012691404059591L; - -} diff --git a/src/main/java/com/twilio/base/bearertoken/ResourceSet.java b/src/main/java/com/twilio/base/bearertoken/ResourceSet.java deleted file mode 100644 index 16bc369084..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/ResourceSet.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; - -import java.util.Iterator; -import java.util.NoSuchElementException; - -/** - * A collection of resources. - * - * @param type of the resource - */ -public class ResourceSet implements Iterable { - - private final Reader reader; - private final BearerTokenTwilioRestClient client; - - private boolean autoPaging; - private long pages = 1; - private long pageLimit = Long.MAX_VALUE; - private long processed = 0; - private Page page; - private Iterator iterator; - - /** - * Initialize the resource set. - * - * @param reader reader used to fetch next page - * @param client client used to make requests - * @param page page of data - */ - public ResourceSet(final Reader reader, final BearerTokenTwilioRestClient client, final Page page) { - this.reader = reader; - this.client = client; - this.page = page; - this.iterator = page.getRecords().iterator(); - this.autoPaging = true; - - if (reader.getLimit() != null) { - this.pageLimit = (long)(Math.ceil((double)reader.getLimit() / (double)page.getPageSize())); - } - } - - public boolean isAutoPaging() { - return autoPaging; - } - - public ResourceSet setAutoPaging(final boolean autoPaging) { - this.autoPaging = autoPaging; - return this; - } - - public Integer getPageSize() { - return page.getPageSize(); - } - - public ResourceSet setPageSize(final int pageSize) { - reader.pageSize(pageSize); - return this; - } - - public Long getLimit() { - return reader.getLimit(); - } - - public ResourceSet setLimit(final long limit) { - reader.limit(limit); - return this; - } - - public long getPageLimit() { - return pageLimit; - } - - @Override - public Iterator iterator() { - return new ResourceSetIterator<>(this); - } - - private void fetchNextPage() { - if (!page.hasNextPage() || pages >= pageLimit) { - return; - } - - pages++; - page = reader.nextPage(page, client); - iterator = page.getRecords().iterator(); - } - - private class ResourceSetIterator implements Iterator { - private final ResourceSet resourceSet; - - public ResourceSetIterator(final ResourceSet resourceSet) { - this.resourceSet = resourceSet; - } - - @Override - public boolean hasNext() { - if (resourceSet.getLimit() != null && resourceSet.processed >= resourceSet.getLimit()) { - return false; - } - - return resourceSet.iterator.hasNext(); - } - - @Override - public E next() { - if (resourceSet == null || resourceSet.iterator == null) { - throw new NoSuchElementException(); - } - - E element = resourceSet.iterator.next(); - if (resourceSet.isAutoPaging() && !resourceSet.iterator.hasNext()) { - resourceSet.fetchNextPage(); - } - - resourceSet.processed++; - return element; - } - - @Override - public void remove() { - if (resourceSet.iterator != null) { - resourceSet.processed++; - resourceSet.iterator.remove(); - } - } - - } -} diff --git a/src/main/java/com/twilio/base/bearertoken/Updater.java b/src/main/java/com/twilio/base/bearertoken/Updater.java deleted file mode 100644 index 690e3604c5..0000000000 --- a/src/main/java/com/twilio/base/bearertoken/Updater.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.twilio.base.bearertoken; - -import com.twilio.TwilioOrgsTokenAuth; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; - -import java.util.concurrent.CompletableFuture; - -/** - * Executor for updates of a resource. - * - * @param type of the resource - */ -public abstract class Updater { - - /** - * Execute an async request using default client. - * - * @return future that resolves to requested object - */ - public CompletableFuture updateAsync() { - return updateAsync(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute an async request using specified client. - * - * @param client client used to make request - * @return future that resolves to requested object - */ - public CompletableFuture updateAsync(final BearerTokenTwilioRestClient client) { - return CompletableFuture.supplyAsync(() -> update(client), TwilioOrgsTokenAuth.getExecutorService()); - } - - /** - * Execute a request using default client. - * - * @return Requested object - */ - public T update() { - return update(TwilioOrgsTokenAuth.getRestClient()); - } - - /** - * Execute a request using specified client. - * - * @param client client used to make request - * @return Requested object - */ - public abstract T update(final BearerTokenTwilioRestClient client); -} diff --git a/src/main/java/com/twilio/constant/EnumConstants.java b/src/main/java/com/twilio/constant/EnumConstants.java index acd23702f4..f5f8438cf8 100644 --- a/src/main/java/com/twilio/constant/EnumConstants.java +++ b/src/main/java/com/twilio/constant/EnumConstants.java @@ -26,4 +26,15 @@ public enum AuthType { private final String value; } + + @Getter + @RequiredArgsConstructor + public enum ParameterType { + QUERY("Query"), + HEADER("Header"), + URLENCODED("Urlencoded"), + JSON("Json"); + + private final String value; + } } diff --git a/src/main/java/com/twilio/converter/ISO8601Deserializer.java b/src/main/java/com/twilio/converter/ISO8601Deserializer.java new file mode 100644 index 0000000000..a867287b63 --- /dev/null +++ b/src/main/java/com/twilio/converter/ISO8601Deserializer.java @@ -0,0 +1,17 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +import java.io.IOException; +import java.time.ZonedDateTime; + +// open-api spec "format: date-time" +public class ISO8601Deserializer extends JsonDeserializer { + @Override + public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + String dateString = parser.getText(); + return DateConverter.iso8601DateTimeFromString(dateString); + } +} \ No newline at end of file diff --git a/src/main/java/com/twilio/converter/LocalDateDeserializer.java b/src/main/java/com/twilio/converter/LocalDateDeserializer.java new file mode 100644 index 0000000000..a8a2260a4d --- /dev/null +++ b/src/main/java/com/twilio/converter/LocalDateDeserializer.java @@ -0,0 +1,17 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +import java.io.IOException; +import java.time.LocalDate; + +// open-api spec "format: date" +public class LocalDateDeserializer extends JsonDeserializer { + @Override + public LocalDate deserialize(JsonParser parser, DeserializationContext context) throws IOException { + String dateString = parser.getText(); + return DateConverter.localDateFromString(dateString); + } +} \ No newline at end of file diff --git a/src/main/java/com/twilio/converter/RFC2822Deserializer.java b/src/main/java/com/twilio/converter/RFC2822Deserializer.java new file mode 100644 index 0000000000..56eb3e891d --- /dev/null +++ b/src/main/java/com/twilio/converter/RFC2822Deserializer.java @@ -0,0 +1,17 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +import java.io.IOException; +import java.time.ZonedDateTime; + +// open-api spec "format: date-time-rfc-2822" +public class RFC2822Deserializer extends JsonDeserializer { + @Override + public ZonedDateTime deserialize(JsonParser parser, DeserializationContext context) throws IOException { + String dateString = parser.getText(); + return DateConverter.rfc2822DateTimeFromString(dateString); + } +} \ No newline at end of file diff --git a/src/main/java/com/twilio/converter/Serializer.java b/src/main/java/com/twilio/converter/Serializer.java new file mode 100644 index 0000000000..f0ba1e46a1 --- /dev/null +++ b/src/main/java/com/twilio/converter/Serializer.java @@ -0,0 +1,100 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import com.twilio.http.Request; +import java.io.IOException; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.util.Map; +import java.util.Objects; + +public class Serializer { + + public static void toString(Request request, String key, T value, ParameterType parameterType) { + if (value == null) return; + + String stringValue = convertToString(value); + addParamToRequest(request, key, stringValue, parameterType); + } + + public static void toString(Request request, ObjectMapper mapper, T value) { + if (value == null) return; + + if (mapper == null) { + throw new IllegalArgumentException("ObjectMapper is required for JSON serialization"); + } + + String stringValue = toJson(value, mapper); + request.setBody(stringValue); + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException e) { + throw new ApiException(e.getMessage(), e); + } catch (JsonProcessingException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + private static String convertToString(T value) { + if (value instanceof Map) { + return Converter.mapToJson((Map) value); + } else { + return String.valueOf(value); + } + } + + private static void addParamToRequest(Request request, String key, String value, ParameterType parameterType) { + Objects.requireNonNull(parameterType, "ParameterType cannot be null"); + switch (parameterType) { + case HEADER: + request.addHeaderParam(key, value); + break; + case QUERY: + request.addQueryParam(key, value); + break; + case URLENCODED: + request.addPostParam(key, value); + break; + case JSON: + request.setBody(value); + default: + throw new IllegalArgumentException("Unsupported ParameterType: " + parameterType); + } + } + + /* + Inequality fields are only supported in Query parameters. + dateBefore is upperBound and dateAfter is lowerBound + */ + public static void toString(final Request request, final String key, LocalDate date, LocalDate dateBefore, LocalDate dateAfter) { + if (date != null) { + request.addQueryParam(key, date.format(DateTimeFormatter.ofPattern(Request.QUERY_STRING_DATE_FORMAT))); + } else if (dateAfter != null || dateBefore != null) { + request.addQueryDateRange(key, dateAfter, dateBefore); + } + } + + /* + Inequality fields are only supported in Query parameters. + dateBefore is upperBound and dateAfter is lowerBound + */ + public static void toString(final Request request, final String key, ZonedDateTime date, ZonedDateTime dateBefore, ZonedDateTime dateAfter) { + if (date != null) { + request.addQueryParam(key, date.format(DateTimeFormatter.ofPattern(Request.QUERY_STRING_DATE_TIME_FORMAT))); + } else if (dateAfter != null || dateBefore != null) { + request.addQueryDateTimeRange(key, dateAfter, dateBefore); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java b/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java new file mode 100644 index 0000000000..2d98994219 --- /dev/null +++ b/src/main/java/com/twilio/converter/ZonedDateTimeListDeserializer.java @@ -0,0 +1,28 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; + +import java.io.IOException; +import java.time.ZonedDateTime; +import java.util.ArrayList; +import java.util.List; + +public class ZonedDateTimeListDeserializer extends JsonDeserializer> { + + @Override + public List deserialize(JsonParser parser, DeserializationContext context) throws IOException { + List dateStrings = parser.readValueAs(new TypeReference>() { + }); + List dates = new ArrayList<>(); + for (String dateString : dateStrings) { + ZonedDateTime date = DateConverter.rfc2822DateTimeFromString(dateString); + if (date != null) { + dates.add(date); + } + } + return dates; + } +} \ No newline at end of file diff --git a/src/main/java/com/twilio/credential/orgs/OrgsClientCredentialProvider.java b/src/main/java/com/twilio/credential/orgs/OrgsClientCredentialProvider.java index 9d5687a64a..5d93404bc6 100644 --- a/src/main/java/com/twilio/credential/orgs/OrgsClientCredentialProvider.java +++ b/src/main/java/com/twilio/credential/orgs/OrgsClientCredentialProvider.java @@ -1,4 +1,64 @@ package com.twilio.credential.orgs; -public class OrgsClientCredentialProvider { +import com.twilio.auth_strategy.AuthStrategy; +import com.twilio.auth_strategy.TokenAuthStrategy; +import com.twilio.constant.EnumConstants; +import com.twilio.credential.CredentialProvider; +import com.twilio.exception.AuthenticationException; +import com.twilio.http.bearertoken.OrgsTokenManager; +import com.twilio.http.bearertoken.TokenManager; + +import java.util.Objects; + +public class OrgsClientCredentialProvider extends CredentialProvider { + private String grantType; + private String clientId; + private String clientSecret; + private TokenManager tokenManager; + + public OrgsClientCredentialProvider(String clientId, String clientSecret) { + super(EnumConstants.AuthType.CLIENT_CREDENTIALS); + if (clientId == null || clientSecret == null) { + throw new AuthenticationException("ClientId or ClientSecret can not be null"); + } + this.grantType = "client_credentials"; + this.clientId = clientId; + this.clientSecret = clientSecret; + this.tokenManager = null; + } + + public OrgsClientCredentialProvider(String clientId, String clientSecret, TokenManager tokenManager) { + super(EnumConstants.AuthType.CLIENT_CREDENTIALS); + if (clientId == null || clientSecret == null || tokenManager == null) { + throw new AuthenticationException("ClientId or ClientSecret or TokenManager can not be null"); + } + this.grantType = "client_credentials"; + this.clientId = clientId; + this.clientSecret = clientSecret; + this.tokenManager = tokenManager; + } + + @Override + public AuthStrategy toAuthStrategy() { + if (tokenManager == null) { + tokenManager = new OrgsTokenManager(grantType, clientId, clientSecret); + } + return new TokenAuthStrategy(tokenManager); + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + OrgsClientCredentialProvider other = (OrgsClientCredentialProvider) o; + return Objects.equals(clientId, other.clientId) && + Objects.equals(clientSecret, other.clientSecret) && + Objects.equals(tokenManager, other.tokenManager); + } } diff --git a/src/main/java/com/twilio/http/HttpClient.java b/src/main/java/com/twilio/http/HttpClient.java index 71e595ff34..fd98f445e1 100644 --- a/src/main/java/com/twilio/http/HttpClient.java +++ b/src/main/java/com/twilio/http/HttpClient.java @@ -1,26 +1,52 @@ package com.twilio.http; +import java.nio.file.Path; import lombok.Getter; import lombok.Setter; -import org.apache.http.client.RedirectStrategy; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.config.SocketConfig; -import org.apache.http.impl.client.DefaultRedirectStrategy; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.DefaultRedirectStrategy; +import org.apache.hc.client5.http.protocol.RedirectStrategy; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.util.Timeout; + +/** + * Abstract class representing an HTTP client. + * This class provides methods to make reliable HTTP requests with retry logic and customizable request configurations. + */ public abstract class HttpClient { - public static final int CONNECTION_TIMEOUT = 10000; - public static final int SOCKET_TIMEOUT = 30500; + public static final Timeout CONNECTION_TIMEOUT = Timeout.ofMilliseconds(10000); // The default connection timeout is 10 seconds + public static final Timeout CONNECT_TIMEOUT = Timeout.ofMilliseconds(30500); // The default socket timeout is 30.5 seconds + public static final Timeout CONNECTION_KEEP_ALIVE = Timeout.ofMilliseconds(60000); // The default keep-alive timeout is 60 seconds + public static final Timeout SOCKET_TIMEOUT = Timeout.ofMilliseconds(30000); // The default socket timeout is 30 seconds + /** + * Default request configuration for the HTTP client. + * This configuration sets the connection request timeout, socket timeout, and connection keep-alive timeout. + */ public static final RequestConfig DEFAULT_REQUEST_CONFIG = RequestConfig .custom() - .setConnectTimeout(CONNECTION_TIMEOUT) - .setSocketTimeout(SOCKET_TIMEOUT) + .setConnectionRequestTimeout(CONNECTION_TIMEOUT) + .setConnectTimeout(CONNECT_TIMEOUT) + .setConnectionKeepAlive(CONNECTION_KEEP_ALIVE) .build(); - public static final SocketConfig DEFAULT_SOCKET_CONFIG = SocketConfig - .custom() + /** + * Default socket configuration for the HTTP client. + * This configuration sets the socket timeout and enables keep-alive. + */ + public static final SocketConfig DEFAULT_SOCKET_CONFIG = SocketConfig.custom() .setSoTimeout(SOCKET_TIMEOUT) + .setSoKeepAlive(true) .build(); + public static final int ANY_500 = -500; public static final int ANY_400 = -400; public static final int ANY_300 = -300; @@ -34,7 +60,7 @@ public abstract class HttpClient { // Default redirect strategy to not auto-redirect for any methods (empty string array). @Getter @Setter - private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(new String[0]); + private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); @Getter private Response lastResponse; @@ -131,5 +157,31 @@ protected boolean shouldRetry(final Response response, final int[] retryCodes) { return false; } + public static ContentType getContentType(Path filePath) { + String fileName = filePath.getFileName().toString().toLowerCase(); + + if (fileName.endsWith(".pdf")) { + return ContentType.create("application/pdf"); + } else if (fileName.endsWith(".jpg") || fileName.endsWith(".jpeg")) { + return ContentType.create("image/jpeg"); + } else if (fileName.endsWith(".png")) { + return ContentType.create("image/png"); + } else { + return ContentType.create("application/octet-stream"); // using "application/octet-stream" for generic binary data, often used by browsers for unknown binary files to prompt the user to download them + } + } + + public static HttpUriRequestBase createHttpUriRequestBase(final IRequest request) { + HttpUriRequestBase httpUriRequestBase = null; + switch (request.getMethod().toString().toUpperCase()) { + case "POST": httpUriRequestBase = new HttpPost(request.constructURL().toString()); break; + case "PUT": httpUriRequestBase = new HttpPut(request.constructURL().toString()); break; + case "PATCH": httpUriRequestBase = new HttpPatch(request.constructURL().toString()); break; + case "DELETE": httpUriRequestBase = new HttpDelete(request.constructURL().toString()); break; + case "GET": httpUriRequestBase = new HttpGet(request.constructURL().toString()); break; + } + return httpUriRequestBase; + } + public abstract Response makeRequest(final Request request); } diff --git a/src/main/java/com/twilio/http/IRequest.java b/src/main/java/com/twilio/http/IRequest.java index 584951f34b..aff228bc57 100644 --- a/src/main/java/com/twilio/http/IRequest.java +++ b/src/main/java/com/twilio/http/IRequest.java @@ -32,6 +32,7 @@ public class IRequest { protected final Map> queryParams; protected final Map> postParams; protected final Map> headerParams; + protected List formParameters; protected String region; protected String edge; @@ -42,6 +43,34 @@ public class IRequest { private String body; + public static class FormParameters { + private String name; + private Type type; + private Object value; + + public enum Type { + TEXT, FILE + } + + public FormParameters(String name, Type type, Object value) { + this.name = name; + this.type = type; + this.value = value; + } + + public String getName() { + return name; + } + + public Type getType() { + return type; + } + + public Object getValue() { + return value; + } + } + /** * Create a new API request. * @@ -54,6 +83,7 @@ public IRequest(final HttpMethod method, final String url) { this.queryParams = new HashMap<>(); this.postParams = new HashMap<>(); this.headerParams = new HashMap<>(); + this.formParameters = new ArrayList<>(); } /** @@ -83,6 +113,7 @@ public IRequest(final HttpMethod method, final String domain, final String uri, this.queryParams = new HashMap<>(); this.postParams = new HashMap<>(); this.headerParams = new HashMap<>(); + this.formParameters = new ArrayList<>(); } public HttpMethod getMethod() { @@ -125,6 +156,21 @@ public void setBody(String body) { this.body = body; } + public List getFormParameters() { + return this.formParameters; + } + + public void addFormParameter(String name, FormParameters.Type type, Object value) { + this.formParameters.add(new FormParameters(name, type, value)); + } + + public void setFormParameters(final List formParameters) { + if (formParameters == null) { + throw new IllegalArgumentException("Form parameters cannot be null"); + } + this.formParameters.addAll(formParameters); + } + /** * Build the URL for the request. * diff --git a/src/main/java/com/twilio/http/NetworkHttpClient.java b/src/main/java/com/twilio/http/NetworkHttpClient.java index 2b557a273b..0d40e4cb8c 100644 --- a/src/main/java/com/twilio/http/NetworkHttpClient.java +++ b/src/main/java/com/twilio/http/NetworkHttpClient.java @@ -4,31 +4,46 @@ import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiException; +import com.twilio.http.IRequest.FormParameters; +import com.twilio.http.IRequest.FormParameters.Type; import java.io.IOException; import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; -import java.util.Map; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpHeaders; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.client.utils.HttpClientUtils; -import org.apache.http.config.SocketConfig; -import org.apache.http.entity.BufferedHttpEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.message.BasicHeader; +import java.util.Map.Entry; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.entity.UrlEncodedFormEntity; +import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.http.HttpVersion; +import org.apache.hc.core5.http.NameValuePair; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.http.io.entity.BufferedHttpEntity; +import org.apache.hc.core5.http.io.entity.StringEntity; +import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.hc.core5.http.message.BasicNameValuePair; + public class NetworkHttpClient extends HttpClient { - protected final org.apache.http.client.HttpClient client; + protected final CloseableHttpClient client; private boolean isCustomClient; @@ -57,14 +72,14 @@ public NetworkHttpClient(final RequestConfig requestConfig) { public NetworkHttpClient(final RequestConfig requestConfig, final SocketConfig socketConfig) { Collection headers = Arrays.asList( new BasicHeader("X-Twilio-Client", "java-" + Twilio.VERSION), - new BasicHeader(HttpHeaders.ACCEPT, "application/json"), + // The Accept header is intentionally omitted to support both SCIM and JSON content types. new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "utf-8") ); String googleAppEngineVersion = System.getProperty("com.google.appengine.runtime.version"); boolean isGoogleAppEngine = googleAppEngineVersion != null && !googleAppEngineVersion.isEmpty(); - org.apache.http.impl.client.HttpClientBuilder clientBuilder = HttpClientBuilder.create(); + HttpClientBuilder clientBuilder = HttpClientBuilder.create(); if (!isGoogleAppEngine) { clientBuilder.useSystemProperties(); @@ -113,21 +128,22 @@ public NetworkHttpClient(HttpClientBuilder clientBuilder) { * @param request request to make * @return Response of the HTTP request */ - public Response makeRequest(final Request request) { + public Response makeRequest(final Request request) { HttpMethod method = request.getMethod(); - RequestBuilder builder = RequestBuilder.create(method.toString()) - .setUri(request.constructURL().toString()) - .setVersion(HttpVersion.HTTP_1_1) - .setCharset(StandardCharsets.UTF_8); + HttpUriRequestBase httpUriRequestBase = createHttpUriRequestBase(request); + + httpUriRequestBase.setConfig(DEFAULT_REQUEST_CONFIG); + + httpUriRequestBase.setVersion(HttpVersion.HTTP_1_1); if (request.requiresAuthentication()) { - builder.addHeader(HttpHeaders.AUTHORIZATION, request.getAuthString()); + httpUriRequestBase.addHeader(HttpHeaders.AUTHORIZATION, request.getAuthString()); } - for (Map.Entry> entry : request.getHeaderParams().entrySet()) { + for (Entry> entry : request.getHeaderParams().entrySet()) { for (String value : entry.getValue()) { - builder.addHeader(entry.getKey(), value); + httpUriRequestBase.addHeader(entry.getKey(), value); } } @@ -136,40 +152,63 @@ public Response makeRequest(final Request request) { if (request.getContentType() == null) request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); if (EnumConstants.ContentType.JSON.getValue().equals(request.getContentType().getValue())) { HttpEntity entity = new StringEntity(request.getBody(), ContentType.APPLICATION_JSON); - builder.setEntity(entity); - builder.addHeader( + httpUriRequestBase.setEntity(entity); + httpUriRequestBase.addHeader( HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.JSON.getValue()); - } else { - builder.addHeader( - HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.FORM_URLENCODED.getValue()); - for (Map.Entry> entry : request.getPostParams().entrySet()) { + } else if (EnumConstants.ContentType.MULTIPART_FORM_DATA.getValue().equals(request.getContentType().getValue())) { + + MultipartEntityBuilder httpEntityBuilder = MultipartEntityBuilder.create(); + for( FormParameters formParameter: request.getFormParameters()) { + // Create a file to upload. + if ( formParameter.getType().equals(Type.TEXT) ) + httpEntityBuilder.addTextBody(formParameter.getName(), formParameter.getValue().toString()); + else if ( formParameter.getType().equals(Type.FILE) ) + { + Path path = Paths.get(formParameter.getValue().toString()); + byte[] fileBytes = null; + try{ + fileBytes = Files.readAllBytes(path); + } catch (IOException e) { + System.err.println("Failed to read file for upload: " + path + ". " + e.getMessage()); + throw new ApiException("Failed to read file for upload: " + path, e); + } + String fileName = path.getFileName().toString(); + ContentType contentType = getContentType(path); + httpEntityBuilder.addBinaryBody(formParameter.getName(), fileBytes, contentType, fileName); + } + } + httpUriRequestBase.setEntity(httpEntityBuilder.build()); + } + else { + List formParams = new ArrayList<>(); + for ( Entry> entry : request.getPostParams().entrySet()) { for (String value : entry.getValue()) { - builder.addParameter(entry.getKey(), value); + formParams.add(new BasicNameValuePair(entry.getKey(), value)); } } + + // Build the entity with URL form encoded parameters + UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(formParams, StandardCharsets.UTF_8); + // Set the entity on the request + httpUriRequestBase.setEntity(formEntity); } } - builder.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions(), isCustomClient)); + httpUriRequestBase.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions(), isCustomClient)); - HttpResponse response = null; try { - response = client.execute(builder.build()); + CloseableHttpResponse response = client.execute(httpUriRequestBase); HttpEntity entity = response.getEntity(); return new Response( // Consume the entire HTTP response before returning the stream entity == null ? null : new BufferedHttpEntity(entity).getContent(), - response.getStatusLine().getStatusCode(), - response.getAllHeaders() + response.getCode(), + response.getHeaders() ); } catch (IOException e) { throw new ApiException(e.getMessage(), e); - } finally { - - // Ensure this response is properly closed - HttpClientUtils.closeQuietly(response); - } } + } diff --git a/src/main/java/com/twilio/http/Response.java b/src/main/java/com/twilio/http/Response.java index b16098403c..05f675ab7e 100644 --- a/src/main/java/com/twilio/http/Response.java +++ b/src/main/java/com/twilio/http/Response.java @@ -1,7 +1,7 @@ package com.twilio.http; import com.twilio.exception.ApiException; -import org.apache.http.Header; +import org.apache.hc.core5.http.Header; import java.io.ByteArrayInputStream; import java.io.InputStream; diff --git a/src/main/java/com/twilio/http/TwilioRestClient.java b/src/main/java/com/twilio/http/TwilioRestClient.java index a902f0fee6..c4b8ff2b41 100644 --- a/src/main/java/com/twilio/http/TwilioRestClient.java +++ b/src/main/java/com/twilio/http/TwilioRestClient.java @@ -9,6 +9,7 @@ import java.util.Map; import java.util.function.Predicate; import lombok.Getter; +import org.apache.hc.core5.http.Header; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -114,7 +115,7 @@ public Response request(final Request request) { if (logger.isDebugEnabled()) { logger.debug("status code: {}", statusCode); - org.apache.http.Header[] responseHeaders = response.getHeaders(); + Header[] responseHeaders = response.getHeaders(); logger.debug("response headers:"); for (int i = 0; i < responseHeaders.length; i++) { logger.debug("responseHeader: {}", responseHeaders[i]); diff --git a/src/main/java/com/twilio/http/ValidationClient.java b/src/main/java/com/twilio/http/ValidationClient.java index b455db435e..439aaf98a2 100644 --- a/src/main/java/com/twilio/http/ValidationClient.java +++ b/src/main/java/com/twilio/http/ValidationClient.java @@ -4,18 +4,27 @@ import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiException; import io.jsonwebtoken.SignatureAlgorithm; -import org.apache.http.HttpEntity; -import org.apache.http.HttpHeaders; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.config.SocketConfig; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.message.BasicHeader; +import java.util.ArrayList; +import java.util.Map.Entry; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.entity.UrlEncodedFormEntity; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.http.NameValuePair; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.http.io.entity.StringEntity; +import org.apache.hc.core5.http.message.BasicHeader; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -24,12 +33,13 @@ import java.util.Collection; import java.util.List; import java.util.Map; +import org.apache.hc.core5.http.message.BasicNameValuePair; import static io.jsonwebtoken.SignatureAlgorithm.RS256; public class ValidationClient extends HttpClient { - private final org.apache.http.client.HttpClient client; + private final CloseableHttpClient client; /** * Create a new ValidationClient. @@ -158,50 +168,54 @@ public ValidationClient(final String accountSid, .setConnectionManager(connectionManager) .setDefaultRequestConfig(requestConfig) .setDefaultHeaders(headers) - .addInterceptorLast(new ValidationInterceptor(accountSid, credentialSid, signingKey, privateKey, algorithm)) + .addRequestInterceptorLast(new ValidationInterceptor(accountSid, credentialSid, signingKey, privateKey, algorithm)) .setRedirectStrategy(this.getRedirectStrategy()) .build(); } @Override public Response makeRequest(Request request) { - RequestBuilder builder = RequestBuilder.create(request.getMethod().toString()) - .setUri(request.constructURL().toString()) - .setVersion(HttpVersion.HTTP_1_1) - .setCharset(StandardCharsets.UTF_8); + HttpMethod method = request.getMethod(); + HttpUriRequestBase httpUriRequestBase = createHttpUriRequestBase(request); if (request.requiresAuthentication()) { - builder.addHeader(HttpHeaders.AUTHORIZATION, request.getAuthString()); + httpUriRequestBase.addHeader(HttpHeaders.AUTHORIZATION, request.getAuthString()); } - HttpMethod method = request.getMethod(); if (method != HttpMethod.GET) { // TODO: It will be removed after one RC Release. if (request.getContentType() == null) request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); if (EnumConstants.ContentType.JSON.getValue().equals(request.getContentType().getValue())) { HttpEntity entity = new StringEntity(request.getBody(), ContentType.APPLICATION_JSON); - builder.setEntity(entity); - builder.addHeader( + httpUriRequestBase.setEntity(entity); + httpUriRequestBase.addHeader( HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.JSON.getValue()); } else { - builder.addHeader( + httpUriRequestBase.addHeader( HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.FORM_URLENCODED.getValue()); - for (Map.Entry> entry : request.getPostParams().entrySet()) { + // Create your form parameters + List formParams = new ArrayList<>(); + for ( Entry> entry : request.getPostParams().entrySet()) { for (String value : entry.getValue()) { - builder.addParameter(entry.getKey(), value); + formParams.add(new BasicNameValuePair(entry.getKey(), value)); } } + + // Build the entity with URL form encoded parameters + UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(formParams, StandardCharsets.UTF_8); + // Set the entity on the request + httpUriRequestBase.setEntity(formEntity); } } - builder.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions())); + httpUriRequestBase.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions())); try { - HttpResponse response = client.execute(builder.build()); + CloseableHttpResponse response = client.execute(httpUriRequestBase); return new Response( response.getEntity() == null ? null : response.getEntity().getContent(), - response.getStatusLine().getStatusCode(), - response.getAllHeaders() + response.getCode(), + response.getHeaders() ); } catch (IOException e) { throw new ApiException(e.getMessage(), e); diff --git a/src/main/java/com/twilio/http/ValidationInterceptor.java b/src/main/java/com/twilio/http/ValidationInterceptor.java index 8e3cfcd441..0a7de0cbe4 100644 --- a/src/main/java/com/twilio/http/ValidationInterceptor.java +++ b/src/main/java/com/twilio/http/ValidationInterceptor.java @@ -3,15 +3,17 @@ import com.twilio.jwt.Jwt; import com.twilio.jwt.validation.ValidationToken; import io.jsonwebtoken.SignatureAlgorithm; -import org.apache.http.HttpException; -import org.apache.http.HttpRequest; -import org.apache.http.HttpRequestInterceptor; -import org.apache.http.protocol.HttpContext; +import org.apache.hc.core5.http.EntityDetails; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpException; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.core5.http.HttpRequestInterceptor; import java.io.IOException; import java.security.PrivateKey; import java.util.Arrays; import java.util.List; +import org.apache.hc.core5.http.protocol.HttpContext; public class ValidationInterceptor implements HttpRequestInterceptor { @@ -56,7 +58,7 @@ public ValidationInterceptor(String accountSid, String credentialSid, String sig } @Override - public void process(HttpRequest request, HttpContext context) throws HttpException, IOException { + public void process(HttpRequest request, EntityDetails httpEntity, HttpContext context) throws HttpException, IOException { Jwt jwt = ValidationToken.fromHttpRequest( accountSid, credentialSid, diff --git a/src/main/java/com/twilio/http/bearertoken/BearerTokenHttpClient.java b/src/main/java/com/twilio/http/bearertoken/BearerTokenHttpClient.java deleted file mode 100644 index 919e8b0054..0000000000 --- a/src/main/java/com/twilio/http/bearertoken/BearerTokenHttpClient.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.twilio.http.bearertoken; - -import com.twilio.http.HttpClient; -import com.twilio.http.Request; -import com.twilio.http.Response; -import lombok.Getter; -import lombok.Setter; -import org.apache.http.client.RedirectStrategy; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.config.SocketConfig; -import org.apache.http.impl.client.DefaultRedirectStrategy; - -public abstract class BearerTokenHttpClient { - // Use constants from HttpClient - public static final RequestConfig DEFAULT_REQUEST_CONFIG = RequestConfig - .custom() - .setConnectTimeout(HttpClient.CONNECTION_TIMEOUT) - .setSocketTimeout(HttpClient.SOCKET_TIMEOUT) - .build(); - public static final SocketConfig DEFAULT_SOCKET_CONFIG = SocketConfig - .custom() - .setSoTimeout(HttpClient.SOCKET_TIMEOUT) - .build(); - @Getter - @Setter - private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(new String[0]); - - @Getter - private Response lastResponse; - @Getter - private BearerTokenRequest lastRequest; - - public Response reliableRequest(final BearerTokenRequest request) { - return reliableRequest(request, HttpClient.RETRY_CODES, HttpClient.RETRIES, HttpClient.DELAY_MILLIS); - } - - public Response reliableRequest(final BearerTokenRequest request, final int[] retryCodes, int retries, - final long delayMillis) { - lastRequest = request; - Response response = null; - while (retries > 0) { - response = makeRequest(request); - - if (!shouldRetry(response, retryCodes)) { - break; - } - - try { - Thread.sleep(delayMillis); - } catch (final InterruptedException e) { - // Delay failed, continue - } - - // Decrement retries - retries--; - } - - lastResponse = response; - - return response; - } - - protected boolean shouldRetry(final Response response, final int[] retryCodes) { - if (response == null) { - return true; - } - - int statusCode = response.getStatusCode(); - int category = (int) Math.floor(statusCode / 100.0); - - for (final int retryCode : retryCodes) { - switch (retryCode) { - case HttpClient.ANY_100: - if (category == 1) { - return true; - } - break; - case HttpClient.ANY_200: - if (category == 2) { - return true; - } - break; - case HttpClient.ANY_300: - if (category == 3) { - return true; - } - break; - case HttpClient.ANY_400: - if (category == 4) { - return true; - } - break; - case HttpClient.ANY_500: - if (category == 5) { - return true; - } - break; - default: - if (statusCode == retryCode) { - return true; - } - break; - } - } - return false; - } - - public abstract Response makeRequest(final BearerTokenRequest request); -} diff --git a/src/main/java/com/twilio/http/bearertoken/BearerTokenNetworkHttpClient.java b/src/main/java/com/twilio/http/bearertoken/BearerTokenNetworkHttpClient.java deleted file mode 100644 index dbbd4b6d19..0000000000 --- a/src/main/java/com/twilio/http/bearertoken/BearerTokenNetworkHttpClient.java +++ /dev/null @@ -1,179 +0,0 @@ -package com.twilio.http.bearertoken; - -import com.twilio.Twilio; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiException; -import com.twilio.http.HttpClient; -import com.twilio.http.HttpMethod; -import com.twilio.http.HttpUtility; -import com.twilio.http.Request; -import com.twilio.http.Response; -import org.apache.http.HttpEntity; -import org.apache.http.HttpHeaders; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.client.utils.HttpClientUtils; -import org.apache.http.config.SocketConfig; -import org.apache.http.entity.BufferedHttpEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.message.BasicHeader; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -public class BearerTokenNetworkHttpClient extends BearerTokenHttpClient { - - protected final org.apache.http.client.HttpClient client; - - private boolean isCustomClient; - - /** - * Create a new HTTP Client. - */ - public BearerTokenNetworkHttpClient() { - this(DEFAULT_REQUEST_CONFIG); - } - - /** - * Create a new HTTP Client with a custom request config. - * - * @param requestConfig a RequestConfig. - */ - public BearerTokenNetworkHttpClient(final RequestConfig requestConfig) { - this(requestConfig, DEFAULT_SOCKET_CONFIG); - } - - /** - * Create a new HTTP Client with a custom request and socket config. - * - * @param requestConfig a RequestConfig. - * @param socketConfig a SocketConfig. - */ - public BearerTokenNetworkHttpClient(final RequestConfig requestConfig, final SocketConfig socketConfig) { - Collection headers = Arrays.asList( - new BasicHeader("X-Twilio-Client", "java-" + Twilio.VERSION), - //new BasicHeader(HttpHeaders.ACCEPT, "application/json"), Orgs API has scim or json support. - new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "utf-8") - ); - - String googleAppEngineVersion = System.getProperty("com.google.appengine.runtime.version"); - boolean isGoogleAppEngine = googleAppEngineVersion != null && !googleAppEngineVersion.isEmpty(); - - org.apache.http.impl.client.HttpClientBuilder clientBuilder = HttpClientBuilder.create(); - - if (!isGoogleAppEngine) { - clientBuilder.useSystemProperties(); - } - - PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); - connectionManager.setDefaultSocketConfig(socketConfig); - /* - * Example: Lets say client has one server. - * There are 4 servers on edge handling client request. - * Each request takes on an average 500ms (2 request per second) - * Total number request can be server in a second from a route: 20 * 4 * 2 (DefaultMaxPerRoute * edge servers * request per second) - */ - connectionManager.setDefaultMaxPerRoute(20); - connectionManager.setMaxTotal(100); - - client = clientBuilder - .setConnectionManager(connectionManager) - .setDefaultRequestConfig(requestConfig) - .setDefaultHeaders(headers) - .setRedirectStrategy(this.getRedirectStrategy()) - .build(); - } - - /** - * Create a new HTTP Client using custom configuration. - * @param clientBuilder an HttpClientBuilder. - */ - public BearerTokenNetworkHttpClient(HttpClientBuilder clientBuilder) { - Collection headers = Arrays.asList( - new BasicHeader("X-Twilio-Client", "java-" + Twilio.VERSION), - //new BasicHeader(HttpHeaders.ACCEPT, "application/json"), Orgs API has scim or json support. - new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "utf-8") - ); - isCustomClient = true; - - client = clientBuilder - .setDefaultHeaders(headers) - .setRedirectStrategy(this.getRedirectStrategy()) - .build(); - } - - /** - * Make a request. - * - * @param request request to make - * @return Response of the HTTP request - */ - public Response makeRequest(final BearerTokenRequest request) { - - HttpMethod method = request.getMethod(); - RequestBuilder builder = RequestBuilder.create(method.toString()) - .setUri(request.constructURL().toString()) - .setVersion(HttpVersion.HTTP_1_1) - .setCharset(StandardCharsets.UTF_8); - - if (request.requiresAuthentication()) { - builder.addHeader(HttpHeaders.AUTHORIZATION, request.getAuthString()); - } - - for (Map.Entry> entry : request.getHeaderParams().entrySet()) { - for (String value : entry.getValue()) { - builder.addHeader(entry.getKey(), value); - } - } - - if (method != HttpMethod.GET) { - // TODO: It will be removed after one RC Release. - if (request.getContentType() == null) request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - if (EnumConstants.ContentType.JSON.getValue().equals(request.getContentType().getValue())) { - HttpEntity entity = new StringEntity(request.getBody(), ContentType.APPLICATION_JSON); - builder.setEntity(entity); - builder.addHeader( - HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.JSON.getValue()); - } else { - builder.addHeader( - HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.FORM_URLENCODED.getValue()); - for (Map.Entry> entry : request.getPostParams().entrySet()) { - for (String value : entry.getValue()) { - builder.addParameter(entry.getKey(), value); - } - } - } - - } - builder.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions(), isCustomClient)); - - HttpResponse response = null; - - try { - response = client.execute(builder.build()); - HttpEntity entity = response.getEntity(); - return new Response( - // Consume the entire HTTP response before returning the stream - entity == null ? null : new BufferedHttpEntity(entity).getContent(), - response.getStatusLine().getStatusCode(), - response.getAllHeaders() - ); - } catch (IOException e) { - throw new ApiException(e.getMessage(), e); - } finally { - - // Ensure this response is properly closed - HttpClientUtils.closeQuietly(response); - - } - } -} diff --git a/src/main/java/com/twilio/http/bearertoken/BearerTokenRequest.java b/src/main/java/com/twilio/http/bearertoken/BearerTokenRequest.java deleted file mode 100644 index 83976c2e45..0000000000 --- a/src/main/java/com/twilio/http/bearertoken/BearerTokenRequest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.twilio.http.bearertoken; - -import com.twilio.http.HttpMethod; -import com.twilio.http.IRequest; - -public class BearerTokenRequest extends IRequest { - - private String accessToken; - - public BearerTokenRequest(HttpMethod method, String url) { - super(method, url); - } - - public BearerTokenRequest(HttpMethod method, String domain, String uri) { - super(method, domain, uri); - } - - public BearerTokenRequest(HttpMethod method, String domain, String uri, String region) { - super(method, domain, uri, region); - } - - /** - * Create auth string from accessToken. - * - * @return basic authentication string - */ - public String getAuthString() { - return "Bearer " + accessToken; - } - - public boolean requiresAuthentication() { - return accessToken != null; - } - - public void setAuth(String accessToken) { - this.accessToken = accessToken; - } -} diff --git a/src/main/java/com/twilio/http/bearertoken/BearerTokenTwilioRestClient.java b/src/main/java/com/twilio/http/bearertoken/BearerTokenTwilioRestClient.java deleted file mode 100644 index f3ba9fac59..0000000000 --- a/src/main/java/com/twilio/http/bearertoken/BearerTokenTwilioRestClient.java +++ /dev/null @@ -1,186 +0,0 @@ -package com.twilio.http.bearertoken; - -import com.auth0.jwt.JWT; -import com.auth0.jwt.interfaces.DecodedJWT; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.twilio.http.Response; -import lombok.Getter; -import lombok.Setter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.function.Predicate; - - -/* - * Use this BearerToken Rest Client if no authentication is involved in an API. - */ -public class BearerTokenTwilioRestClient { - public static final int HTTP_STATUS_CODE_CREATED = 201; - public static final int HTTP_STATUS_CODE_NO_CONTENT = 204; - public static final int HTTP_STATUS_CODE_OK = 200; - public static final Predicate SUCCESS = i -> i != null && i >= 200 && i < 400; - @Getter - private final ObjectMapper objectMapper; - private String accessToken; - @Getter - private final String region; - @Getter - private final String edge; - @Getter - private final BearerTokenHttpClient httpClient; - @Getter - private final List userAgentExtensions; - @Setter - private final TokenManager tokenManager; - private static final Logger logger = LoggerFactory.getLogger(BearerTokenTwilioRestClient.class); - - private BearerTokenTwilioRestClient(BearerTokenTwilioRestClient.Builder b) { - this.region = b.region; - this.edge = b.edge; - this.httpClient = b.httpClient; - this.objectMapper = b.objectMapper; - this.userAgentExtensions = b.userAgentExtensions; - this.tokenManager = b.tokenManager; - } - - public static class Builder { - // This module configures the ObjectMapper to use - // public API methods for manipulating java.time.* - // classes. The alternative is to use reflection which - // generates warnings from the module system on Java 9+ - private static final ObjectMapper DEFAULT_OBJECT_MAPPER = new ObjectMapper() - .registerModule(new JavaTimeModule()); - - private String region; - private String edge; - private BearerTokenHttpClient httpClient; - private List userAgentExtensions; - private TokenManager tokenManager; - private ObjectMapper objectMapper = DEFAULT_OBJECT_MAPPER; - - public Builder() { - this.region = System.getenv("TWILIO_REGION"); - this.edge = System.getenv("TWILIO_EDGE"); - userAgentExtensions = new ArrayList<>(); - } - - public BearerTokenTwilioRestClient.Builder region(final String region) { - this.region = region; - return this; - } - - public BearerTokenTwilioRestClient.Builder edge(final String edge) { - this.edge = edge; - return this; - } - - public BearerTokenTwilioRestClient.Builder tokenManager(final TokenManager tokenManager) { - this.tokenManager = tokenManager; - return this; - } - - public BearerTokenTwilioRestClient.Builder httpClient(final BearerTokenHttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - public BearerTokenTwilioRestClient.Builder userAgentExtensions(final List userAgentExtensions) { - if (userAgentExtensions != null && !userAgentExtensions.isEmpty()) { - this.userAgentExtensions = new ArrayList<>(userAgentExtensions); - } - return this; - } - - public BearerTokenTwilioRestClient.Builder objectMapper(final ObjectMapper objectMapper) { - this.objectMapper = objectMapper; - return this; - } - - public BearerTokenTwilioRestClient build() { - if (this.httpClient == null) { - this.httpClient = new BearerTokenNetworkHttpClient(); - } - return new BearerTokenTwilioRestClient(this); - } - } - public Response request(BearerTokenRequest request) { - - if (accessToken == null || accessToken.isEmpty() || isTokenExpired(this.accessToken)) { - synchronized (BearerTokenTwilioRestClient.class){ - if (accessToken == null || accessToken.isEmpty() || isTokenExpired(this.accessToken)) { - this.accessToken = tokenManager.fetchAccessToken(); - } - } - } - - request.setAuth(accessToken); - if (region != null) - request.setRegion(region); - if (edge != null) - request.setEdge(edge); - - if (userAgentExtensions != null && !userAgentExtensions.isEmpty()) { - request.setUserAgentExtensions(userAgentExtensions); - } - logRequest(request); - Response response = httpClient.reliableRequest(request); - if(response != null) { - int statusCode = response.getStatusCode(); - if (statusCode == 401) { - this.accessToken = tokenManager.fetchAccessToken(); - request.setAuth(accessToken); - response = httpClient.reliableRequest(request); - } - - if (logger.isDebugEnabled()) { - logger.debug("status code: {}", statusCode); - org.apache.http.Header[] responseHeaders = response.getHeaders(); - logger.debug("response headers:"); - for (int i = 0; i < responseHeaders.length; i++) { - logger.debug("responseHeader: {}", responseHeaders[i]); - } - } - } - - return response; - } - - public boolean isTokenExpired(String token) { - DecodedJWT jwt = JWT.decode(token); - Date expiresAt = jwt.getExpiresAt(); - // Add a buffer of 30 seconds - long bufferMilliseconds = 30 * 1000; - Date bufferExpiresAt = new Date(expiresAt.getTime() - bufferMilliseconds); - return bufferExpiresAt.before(new Date()); - } - - public void logRequest(final BearerTokenRequest request) { - if (logger.isDebugEnabled()) { - logger.debug("-- BEGIN Twilio API BearerTokenRequest --"); - logger.debug("request method: " + request.getMethod()); - logger.debug("request URL: " + request.constructURL().toString()); - final Map> queryParams = request.getQueryParams(); - final Map> headerParams = request.getHeaderParams(); - - if (queryParams != null && !queryParams.isEmpty()) { - logger.debug("query parameters: " + queryParams); - } - - if (headerParams != null && !headerParams.isEmpty()) { - logger.debug("header parameters: "); - for (String key : headerParams.keySet()) { - if (!key.toLowerCase().contains("authorization")) { - logger.debug(key + ": " + headerParams.get(key)); - } - } - } - logger.debug("-- END Twilio API BearerTokenRequest --"); - } - } -} diff --git a/src/main/java/com/twilio/http/noauth/NoAuthHttpClient.java b/src/main/java/com/twilio/http/noauth/NoAuthHttpClient.java index 8ae8d7d2bf..09a159bb74 100644 --- a/src/main/java/com/twilio/http/noauth/NoAuthHttpClient.java +++ b/src/main/java/com/twilio/http/noauth/NoAuthHttpClient.java @@ -4,16 +4,15 @@ import com.twilio.http.Response; import lombok.Getter; import lombok.Setter; -import org.apache.http.client.RedirectStrategy; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.config.SocketConfig; -import org.apache.http.impl.client.DefaultRedirectStrategy; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.DefaultRedirectStrategy; +import org.apache.hc.client5.http.protocol.RedirectStrategy; +import org.apache.hc.core5.http.io.SocketConfig; public abstract class NoAuthHttpClient { public static final RequestConfig DEFAULT_REQUEST_CONFIG = RequestConfig .custom() .setConnectTimeout(HttpClient.CONNECTION_TIMEOUT) - .setSocketTimeout(HttpClient.SOCKET_TIMEOUT) .build(); public static final SocketConfig DEFAULT_SOCKET_CONFIG = SocketConfig .custom() @@ -21,7 +20,7 @@ public abstract class NoAuthHttpClient { .build(); @Getter @Setter - private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(new String[0]); + private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); @Getter private Response lastResponse; @@ -102,6 +101,6 @@ protected boolean shouldRetry(final Response response, final int[] retryCodes) { } return false; } - + public abstract Response makeRequest(NoAuthRequest request); } diff --git a/src/main/java/com/twilio/http/noauth/NoAuthNetworkHttpClient.java b/src/main/java/com/twilio/http/noauth/NoAuthNetworkHttpClient.java index df87ef709b..a1b84a5532 100644 --- a/src/main/java/com/twilio/http/noauth/NoAuthNetworkHttpClient.java +++ b/src/main/java/com/twilio/http/noauth/NoAuthNetworkHttpClient.java @@ -1,37 +1,48 @@ package com.twilio.http.noauth; +import static com.twilio.http.HttpClient.createHttpUriRequestBase; + import com.twilio.Twilio; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiException; import com.twilio.http.HttpMethod; import com.twilio.http.HttpUtility; -import com.twilio.http.Request; import com.twilio.http.Response; -import org.apache.http.HttpEntity; -import org.apache.http.HttpHeaders; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.client.utils.HttpClientUtils; -import org.apache.http.config.SocketConfig; -import org.apache.http.entity.BufferedHttpEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.message.BasicHeader; +import java.util.ArrayList; +import java.util.Map.Entry; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.entity.UrlEncodedFormEntity; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.http.HttpVersion; +import org.apache.hc.core5.http.NameValuePair; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.http.io.entity.BufferedHttpEntity; +import org.apache.hc.core5.http.io.entity.StringEntity; +import org.apache.hc.core5.http.message.BasicHeader; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.Collection; import java.util.List; -import java.util.Map; +import org.apache.hc.core5.http.message.BasicNameValuePair; public class NoAuthNetworkHttpClient extends NoAuthHttpClient { - protected final org.apache.http.client.HttpClient client; + protected final CloseableHttpClient client; + public NoAuthNetworkHttpClient() { this(DEFAULT_REQUEST_CONFIG); } @@ -50,7 +61,7 @@ public NoAuthNetworkHttpClient(final RequestConfig requestConfig, final SocketCo String googleAppEngineVersion = System.getProperty("com.google.appengine.runtime.version"); boolean isGoogleAppEngine = googleAppEngineVersion != null && !googleAppEngineVersion.isEmpty(); - org.apache.http.impl.client.HttpClientBuilder clientBuilder = HttpClientBuilder.create(); + HttpClientBuilder clientBuilder = HttpClientBuilder.create(); if (!isGoogleAppEngine) { clientBuilder.useSystemProperties(); @@ -74,61 +85,55 @@ public NoAuthNetworkHttpClient(final RequestConfig requestConfig, final SocketCo .setRedirectStrategy(this.getRedirectStrategy()) .build(); } - + @Override public Response makeRequest(NoAuthRequest request) { HttpMethod method = request.getMethod(); - RequestBuilder builder = RequestBuilder.create(method.toString()) - .setUri(request.constructURL().toString()) - .setVersion(HttpVersion.HTTP_1_1) - .setCharset(StandardCharsets.UTF_8); - - for (Map.Entry> entry : request.getHeaderParams().entrySet()) { - for (String value : entry.getValue()) { - builder.addHeader(entry.getKey(), value); - } - } + HttpUriRequestBase httpUriRequestBase = createHttpUriRequestBase(request); + + httpUriRequestBase.setConfig(DEFAULT_REQUEST_CONFIG); + + httpUriRequestBase.setVersion(HttpVersion.HTTP_1_1); if (method != HttpMethod.GET) { // TODO: It will be removed after one RC Release. if (request.getContentType() == null) request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); if (EnumConstants.ContentType.JSON.getValue().equals(request.getContentType().getValue())) { HttpEntity entity = new StringEntity(request.getBody(), ContentType.APPLICATION_JSON); - builder.setEntity(entity); - builder.addHeader( - HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.JSON.getValue()); + httpUriRequestBase.setEntity(entity); + httpUriRequestBase.addHeader( + HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.JSON.getValue()); } else { - builder.addHeader( + httpUriRequestBase.addHeader( HttpHeaders.CONTENT_TYPE, EnumConstants.ContentType.FORM_URLENCODED.getValue()); - for (Map.Entry> entry : request.getPostParams().entrySet()) { + // Create your form parameters + List formParams = new ArrayList<>(); + for ( Entry> entry : request.getPostParams().entrySet()) { for (String value : entry.getValue()) { - builder.addParameter(entry.getKey(), value); + formParams.add(new BasicNameValuePair(entry.getKey(), value)); } } + + // Build the entity with URL form encoded parameters + UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(formParams, StandardCharsets.UTF_8); + // Set the entity on the request + httpUriRequestBase.setEntity(formEntity); } } - builder.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions())); - - HttpResponse response = null; + httpUriRequestBase.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions())); try { - response = client.execute(builder.build()); + CloseableHttpResponse response = client.execute(httpUriRequestBase); HttpEntity entity = response.getEntity(); return new Response( // Consume the entire HTTP response before returning the stream entity == null ? null : new BufferedHttpEntity(entity).getContent(), - response.getStatusLine().getStatusCode(), - response.getAllHeaders() + response.getCode(), + response.getHeaders() ); } catch (IOException e) { throw new ApiException(e.getMessage(), e); - } finally { - - // Ensure this response is properly closed - HttpClientUtils.closeQuietly(response); - } - } } diff --git a/src/main/java/com/twilio/http/noauth/NoAuthRequest.java b/src/main/java/com/twilio/http/noauth/NoAuthRequest.java index 00cc7bf140..1d216699eb 100644 --- a/src/main/java/com/twilio/http/noauth/NoAuthRequest.java +++ b/src/main/java/com/twilio/http/noauth/NoAuthRequest.java @@ -4,7 +4,7 @@ import com.twilio.http.IRequest; public class NoAuthRequest extends IRequest { - + public NoAuthRequest(HttpMethod method, String url) { super(method, url); } diff --git a/src/main/java/com/twilio/http/noauth/NoAuthTwilioRestClient.java b/src/main/java/com/twilio/http/noauth/NoAuthTwilioRestClient.java index 93da0f361a..ff2e790380 100644 --- a/src/main/java/com/twilio/http/noauth/NoAuthTwilioRestClient.java +++ b/src/main/java/com/twilio/http/noauth/NoAuthTwilioRestClient.java @@ -21,7 +21,7 @@ public class NoAuthTwilioRestClient { @Getter private final ObjectMapper objectMapper; - + @Getter private final String region; @Getter @@ -110,7 +110,7 @@ public Response request(NoAuthRequest request) { if (logger.isDebugEnabled()) { logger.debug("status code: {}", response.getStatusCode()); - org.apache.http.Header[] responseHeaders = response.getHeaders(); + org.apache.hc.core5.http.Header[] responseHeaders = response.getHeaders(); logger.debug("response headers:"); for (int i = 0; i < responseHeaders.length; i++) { logger.debug("responseHeader: {}", responseHeaders[i]); diff --git a/src/main/java/com/twilio/jwt/validation/RequestCanonicalizer.java b/src/main/java/com/twilio/jwt/validation/RequestCanonicalizer.java index 01be9e08b3..2c34f385bf 100644 --- a/src/main/java/com/twilio/jwt/validation/RequestCanonicalizer.java +++ b/src/main/java/com/twilio/jwt/validation/RequestCanonicalizer.java @@ -2,8 +2,6 @@ import com.twilio.exception.InvalidRequestException; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.http.Header; -import org.apache.http.message.BasicHeader; import java.io.UnsupportedEncodingException; import java.net.URI; @@ -13,6 +11,8 @@ import java.util.function.Function; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.message.BasicHeader; /** * Creates a canonical string out of HTTP request components. diff --git a/src/main/java/com/twilio/jwt/validation/ValidationToken.java b/src/main/java/com/twilio/jwt/validation/ValidationToken.java index 4a1f48dc60..15f25618a8 100644 --- a/src/main/java/com/twilio/jwt/validation/ValidationToken.java +++ b/src/main/java/com/twilio/jwt/validation/ValidationToken.java @@ -4,18 +4,17 @@ import io.jsonwebtoken.SignatureAlgorithm; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.IOUtils; -import org.apache.http.Header; -import org.apache.http.HttpEntity; -import org.apache.http.HttpEntityEnclosingRequest; -import org.apache.http.HttpRequest; -import org.apache.http.impl.auth.UnsupportedDigestAlgorithmException; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.security.PrivateKey; import java.util.*; import java.util.function.Function; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.client5.http.classic.methods.HttpPost; import static io.jsonwebtoken.SignatureAlgorithm.PS256; import static io.jsonwebtoken.SignatureAlgorithm.RS256; @@ -134,11 +133,11 @@ public static ValidationToken fromHttpRequest( ) throws IOException { Builder builder = new Builder(accountSid, credentialSid, signingKeySid, privateKey); - String method = request.getRequestLine().getMethod(); + String method = request.getMethod(); builder.method(method); builder.algorithm(algorithm); - String uri = request.getRequestLine().getUri(); + String uri = request.getRequestUri(); if (uri.contains("?")) { String[] uriParts = uri.split("\\?"); builder.uri(uriParts[0]); @@ -147,7 +146,7 @@ public static ValidationToken fromHttpRequest( builder.uri(uri); } - builder.headers(request.getAllHeaders()); + builder.headers(request.getHeaders()); builder.signedHeaders(signedHeaders); /** @@ -156,8 +155,8 @@ public static ValidationToken fromHttpRequest( * * @see org.apache.http.client.methods.RequestBuilder#build */ - if (request instanceof HttpEntityEnclosingRequest) { - HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity(); + if (request instanceof HttpUriRequestBase) { + HttpEntity entity = ((HttpUriRequestBase) request).getEntity(); builder.requestBody(IOUtils.toString(entity.getContent(), StandardCharsets.UTF_8)); } diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java index 2ef3ff3e24..8c8eee79da 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkConsents.java @@ -38,9 +38,7 @@ public class BulkConsents extends Resource { private static final long serialVersionUID = 126137950684284L; - public static BulkConsentsCreator creator( - final List> items - ) { + public static BulkConsentsCreator creator(final List items) { return new BulkConsentsCreator(items); } diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkConsentsCreator.java b/src/main/java/com/twilio/rest/accounts/v1/BulkConsentsCreator.java index 93a1b73bbf..1155c9fd32 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkConsentsCreator.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkConsentsCreator.java @@ -29,23 +29,21 @@ import com.twilio.rest.Domains; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class BulkConsentsCreator extends Creator { - private List> items; + private List items; - public BulkConsentsCreator(final List> items) { + public BulkConsentsCreator(final List items) { this.items = items; } - public BulkConsentsCreator setItems(final List> items) { + public BulkConsentsCreator setItems(final List items) { this.items = items; return this; } - public BulkConsentsCreator setItems(final Map items) { + public BulkConsentsCreator setItems(final Object items) { return setItems(Promoter.listOfOne(items)); } @@ -89,8 +87,8 @@ public BulkConsents create(final TwilioRestClient client) { private void addPostParams(final Request request) { if (items != null) { - for (Map prop : items) { - request.addPostParam("Items", Converter.mapToJson(prop)); + for (Object prop : items) { + request.addPostParam("Items", Converter.objectToJson(prop)); } } } diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java index fbb28d1b7f..b4ff307a19 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkContacts.java @@ -38,9 +38,7 @@ public class BulkContacts extends Resource { private static final long serialVersionUID = 126137950684284L; - public static BulkContactsCreator creator( - final List> items - ) { + public static BulkContactsCreator creator(final List items) { return new BulkContactsCreator(items); } diff --git a/src/main/java/com/twilio/rest/accounts/v1/BulkContactsCreator.java b/src/main/java/com/twilio/rest/accounts/v1/BulkContactsCreator.java index 0f3653b994..7dc970c184 100644 --- a/src/main/java/com/twilio/rest/accounts/v1/BulkContactsCreator.java +++ b/src/main/java/com/twilio/rest/accounts/v1/BulkContactsCreator.java @@ -29,23 +29,21 @@ import com.twilio.rest.Domains; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class BulkContactsCreator extends Creator { - private List> items; + private List items; - public BulkContactsCreator(final List> items) { + public BulkContactsCreator(final List items) { this.items = items; } - public BulkContactsCreator setItems(final List> items) { + public BulkContactsCreator setItems(final List items) { this.items = items; return this; } - public BulkContactsCreator setItems(final Map items) { + public BulkContactsCreator setItems(final Object items) { return setItems(Promoter.listOfOne(items)); } @@ -89,8 +87,8 @@ public BulkContacts create(final TwilioRestClient client) { private void addPostParams(final Request request) { if (items != null) { - for (Map prop : items) { - request.addPostParam("Items", Converter.mapToJson(prop)); + for (Object prop : items) { + request.addPostParam("Items", Converter.objectToJson(prop)); } } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java index 4ee0387373..c938512a64 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/MessageCreator.java @@ -318,7 +318,7 @@ public Message create(final TwilioRestClient client) { "{" + "AccountSid" + "}", this.pathAccountSid.toString() ); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); Request request = new Request( HttpMethod.POST, diff --git a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java index b98f8f62b9..15486f1597 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/ValidationRequestCreator.java @@ -115,7 +115,7 @@ public ValidationRequest create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java index b92f9468f1..c34dfa3202 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/call/PaymentCreator.java @@ -31,8 +31,6 @@ import java.math.BigDecimal; import java.net.URI; import java.net.URI; -import java.util.Map; -import java.util.Map; public class PaymentCreator extends Creator { @@ -46,7 +44,7 @@ public class PaymentCreator extends Creator { private String description; private String input; private Integer minPostalCodeLength; - private Map parameter; + private Object parameter; private String paymentConnector; private Payment.PaymentMethod paymentMethod; private Boolean postalCode; @@ -125,7 +123,7 @@ public PaymentCreator setMinPostalCodeLength( return this; } - public PaymentCreator setParameter(final Map parameter) { + public PaymentCreator setParameter(final Object parameter) { this.parameter = parameter; return this; } @@ -251,7 +249,10 @@ private void addPostParams(final Request request) { ); } if (parameter != null) { - request.addPostParam("Parameter", Converter.mapToJson(parameter)); + request.addPostParam( + "Parameter", + Converter.objectToJson(parameter) + ); } if (paymentConnector != null) { request.addPostParam("PaymentConnector", paymentConnector); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java index 27ecf933c4..25a74eb499 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/LocalCreator.java @@ -241,7 +241,7 @@ public Local create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java index 5a40e409a0..6fe7fa36c0 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/MobileCreator.java @@ -241,7 +241,7 @@ public Mobile create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java index c6426ab2ce..61034d20c3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/incomingphonenumber/TollFreeCreator.java @@ -243,7 +243,7 @@ public TollFree create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java index 5c05e36626..26d3c3d8bf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/Record.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class Record extends Resource { - private static final long serialVersionUID = 267972709897131L; + private static final long serialVersionUID = 158026917970511L; public static RecordReader reader() { return new RecordReader(); @@ -98,7 +97,7 @@ public static Record fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final Record.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private Record( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final Record.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final Record.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java index bccb2d1371..69dea74697 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/RecordReader.java @@ -32,7 +32,7 @@ public class RecordReader extends Reader { private String pathAccountSid; - private Record.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public RecordReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public RecordReader setCategory(final Record.Category category) { + public RecordReader setCategory(final String category) { this.category = category; return this; } @@ -167,7 +167,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java index e18017d6e6..9e548a35d4 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/Trigger.java @@ -38,12 +38,12 @@ @ToString public class Trigger extends Resource { - private static final long serialVersionUID = 180476898929579L; + private static final long serialVersionUID = 156058914793532L; public static TriggerCreator creator( final URI callbackUrl, final String triggerValue, - final Trigger.UsageCategory usageCategory + final String usageCategory ) { return new TriggerCreator(callbackUrl, triggerValue, usageCategory); } @@ -52,7 +52,7 @@ public static TriggerCreator creator( final String pathAccountSid, final URI callbackUrl, final String triggerValue, - final Trigger.UsageCategory usageCategory + final String usageCategory ) { return new TriggerCreator( pathAccountSid, @@ -160,7 +160,7 @@ public static Trigger fromJson( private final Trigger.TriggerField triggerBy; private final String triggerValue; private final String uri; - private final Trigger.UsageCategory usageCategory; + private final String usageCategory; private final String usageRecordUri; @JsonCreator @@ -179,9 +179,7 @@ private Trigger( @JsonProperty("trigger_by") final Trigger.TriggerField triggerBy, @JsonProperty("trigger_value") final String triggerValue, @JsonProperty("uri") final String uri, - @JsonProperty( - "usage_category" - ) final Trigger.UsageCategory usageCategory, + @JsonProperty("usage_category") final String usageCategory, @JsonProperty("usage_record_uri") final String usageRecordUri ) { this.accountSid = accountSid; @@ -258,7 +256,7 @@ public final String getUri() { return this.uri; } - public final Trigger.UsageCategory getUsageCategory() { + public final String getUsageCategory() { return this.usageCategory; } @@ -320,931 +318,6 @@ public int hashCode() { ); } - public enum UsageCategory { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private UsageCategory(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static UsageCategory forValue(final String value) { - return Promoter.enumFromString(value, UsageCategory.values()); - } - } - public enum Recurring { DAILY("daily"), MONTHLY("monthly"), diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java index a917684656..1609ff12a8 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerCreator.java @@ -32,7 +32,7 @@ public class TriggerCreator extends Creator { private URI callbackUrl; private String triggerValue; - private Trigger.UsageCategory usageCategory; + private String usageCategory; private String pathAccountSid; private HttpMethod callbackMethod; private String friendlyName; @@ -42,7 +42,7 @@ public class TriggerCreator extends Creator { public TriggerCreator( final URI callbackUrl, final String triggerValue, - final Trigger.UsageCategory usageCategory + final String usageCategory ) { this.callbackUrl = callbackUrl; this.triggerValue = triggerValue; @@ -53,7 +53,7 @@ public TriggerCreator( final String pathAccountSid, final URI callbackUrl, final String triggerValue, - final Trigger.UsageCategory usageCategory + final String usageCategory ) { this.pathAccountSid = pathAccountSid; this.callbackUrl = callbackUrl; @@ -75,9 +75,7 @@ public TriggerCreator setTriggerValue(final String triggerValue) { return this; } - public TriggerCreator setUsageCategory( - final Trigger.UsageCategory usageCategory - ) { + public TriggerCreator setUsageCategory(final String usageCategory) { this.usageCategory = usageCategory; return this; } @@ -168,7 +166,7 @@ private void addPostParams(final Request request) { request.addPostParam("TriggerValue", triggerValue); } if (usageCategory != null) { - request.addPostParam("UsageCategory", usageCategory.toString()); + request.addPostParam("UsageCategory", usageCategory); } if (callbackMethod != null) { request.addPostParam("CallbackMethod", callbackMethod.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java index 3e0b03871d..6e839f3bcd 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/TriggerReader.java @@ -32,7 +32,7 @@ public class TriggerReader extends Reader { private String pathAccountSid; private Trigger.Recurring recurring; private Trigger.TriggerField triggerBy; - private Trigger.UsageCategory usageCategory; + private String usageCategory; private Long pageSize; public TriggerReader() {} @@ -51,9 +51,7 @@ public TriggerReader setTriggerBy(final Trigger.TriggerField triggerBy) { return this; } - public TriggerReader setUsageCategory( - final Trigger.UsageCategory usageCategory - ) { + public TriggerReader setUsageCategory(final String usageCategory) { this.usageCategory = usageCategory; return this; } @@ -165,7 +163,7 @@ private void addQueryParams(final Request request) { request.addQueryParam("TriggerBy", triggerBy.toString()); } if (usageCategory != null) { - request.addQueryParam("UsageCategory", usageCategory.toString()); + request.addQueryParam("UsageCategory", usageCategory); } if (pageSize != null) { request.addQueryParam("PageSize", pageSize.toString()); diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java index 2e5e8e1938..bf2f4409bf 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTime.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class AllTime extends Resource { - private static final long serialVersionUID = 119534363835835L; + private static final long serialVersionUID = 158026917970511L; public static AllTimeReader reader() { return new AllTimeReader(); @@ -98,7 +97,7 @@ public static AllTime fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final AllTime.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private AllTime( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final AllTime.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final AllTime.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java index a37156682f..5d8d1e2f79 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/AllTimeReader.java @@ -32,7 +32,7 @@ public class AllTimeReader extends Reader { private String pathAccountSid; - private AllTime.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public AllTimeReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public AllTimeReader setCategory(final AllTime.Category category) { + public AllTimeReader setCategory(final String category) { this.category = category; return this; } @@ -168,7 +168,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java index c562e8b219..34441ee37d 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Daily.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class Daily extends Resource { - private static final long serialVersionUID = 73710721233963L; + private static final long serialVersionUID = 158026917970511L; public static DailyReader reader() { return new DailyReader(); @@ -98,7 +97,7 @@ public static Daily fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final Daily.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private Daily( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final Daily.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final Daily.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java index b3cf835c6e..a62bbfe107 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/DailyReader.java @@ -32,7 +32,7 @@ public class DailyReader extends Reader { private String pathAccountSid; - private Daily.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public DailyReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public DailyReader setCategory(final Daily.Category category) { + public DailyReader setCategory(final String category) { this.category = category; return this; } @@ -166,7 +166,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java index 471a20a4d8..920a2a555f 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonth.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class LastMonth extends Resource { - private static final long serialVersionUID = 240801278405798L; + private static final long serialVersionUID = 158026917970511L; public static LastMonthReader reader() { return new LastMonthReader(); @@ -98,7 +97,7 @@ public static LastMonth fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final LastMonth.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private LastMonth( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final LastMonth.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final LastMonth.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java index cfda6eefd5..b7e7e08fae 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/LastMonthReader.java @@ -32,7 +32,7 @@ public class LastMonthReader extends Reader { private String pathAccountSid; - private LastMonth.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public LastMonthReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public LastMonthReader setCategory(final LastMonth.Category category) { + public LastMonthReader setCategory(final String category) { this.category = category; return this; } @@ -168,7 +168,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java index 315837e39e..9394d8b01a 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Monthly.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class Monthly extends Resource { - private static final long serialVersionUID = 22373500842023L; + private static final long serialVersionUID = 158026917970511L; public static MonthlyReader reader() { return new MonthlyReader(); @@ -98,7 +97,7 @@ public static Monthly fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final Monthly.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private Monthly( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final Monthly.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final Monthly.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java index 45ed86e749..a6e596d267 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/MonthlyReader.java @@ -32,7 +32,7 @@ public class MonthlyReader extends Reader { private String pathAccountSid; - private Monthly.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public MonthlyReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public MonthlyReader setCategory(final Monthly.Category category) { + public MonthlyReader setCategory(final String category) { this.category = category; return this; } @@ -168,7 +168,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java index f0799a55f9..ebd25dee79 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonth.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class ThisMonth extends Resource { - private static final long serialVersionUID = 273687321693897L; + private static final long serialVersionUID = 158026917970511L; public static ThisMonthReader reader() { return new ThisMonthReader(); @@ -98,7 +97,7 @@ public static ThisMonth fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final ThisMonth.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private ThisMonth( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final ThisMonth.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final ThisMonth.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java index 75a05e825d..c68527fae5 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/ThisMonthReader.java @@ -32,7 +32,7 @@ public class ThisMonthReader extends Reader { private String pathAccountSid; - private ThisMonth.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public ThisMonthReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public ThisMonthReader setCategory(final ThisMonth.Category category) { + public ThisMonthReader setCategory(final String category) { this.category = category; return this; } @@ -168,7 +168,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java index 38c0f84024..61c98c4bc3 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Today.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class Today extends Resource { - private static final long serialVersionUID = 120182361368915L; + private static final long serialVersionUID = 158026917970511L; public static TodayReader reader() { return new TodayReader(); @@ -98,7 +97,7 @@ public static Today fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final Today.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private Today( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final Today.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final Today.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java index 3ea401df3d..daac07498b 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/TodayReader.java @@ -32,7 +32,7 @@ public class TodayReader extends Reader { private String pathAccountSid; - private Today.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public TodayReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public TodayReader setCategory(final Today.Category category) { + public TodayReader setCategory(final String category) { this.category = category; return this; } @@ -166,7 +166,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java index bc447957ac..aea93b7084 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yearly.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class Yearly extends Resource { - private static final long serialVersionUID = 266687924235941L; + private static final long serialVersionUID = 158026917970511L; public static YearlyReader reader() { return new YearlyReader(); @@ -98,7 +97,7 @@ public static Yearly fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final Yearly.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private Yearly( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final Yearly.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final Yearly.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java index efc5743989..2c0d681587 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YearlyReader.java @@ -32,7 +32,7 @@ public class YearlyReader extends Reader { private String pathAccountSid; - private Yearly.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public YearlyReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public YearlyReader setCategory(final Yearly.Category category) { + public YearlyReader setCategory(final String category) { this.category = category; return this; } @@ -168,7 +168,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java index f271504c4b..50d71c25ab 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/Yesterday.java @@ -24,7 +24,6 @@ import com.twilio.base.Resource; import com.twilio.converter.CurrencyDeserializer; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -42,7 +41,7 @@ @ToString public class Yesterday extends Resource { - private static final long serialVersionUID = 252061486411277L; + private static final long serialVersionUID = 158026917970511L; public static YesterdayReader reader() { return new YesterdayReader(); @@ -98,7 +97,7 @@ public static Yesterday fromJson( private final String accountSid; private final String apiVersion; private final String asOf; - private final Yesterday.Category category; + private final String category; private final String count; private final String countUnit; private final String description; @@ -116,7 +115,7 @@ private Yesterday( @JsonProperty("account_sid") final String accountSid, @JsonProperty("api_version") final String apiVersion, @JsonProperty("as_of") final String asOf, - @JsonProperty("category") final Yesterday.Category category, + @JsonProperty("category") final String category, @JsonProperty("count") final String count, @JsonProperty("count_unit") final String countUnit, @JsonProperty("description") final String description, @@ -163,7 +162,7 @@ public final String getAsOf() { return this.asOf; } - public final Yesterday.Category getCategory() { + public final String getCategory() { return this.category; } @@ -262,929 +261,4 @@ public int hashCode() { usageUnit ); } - - public enum Category { - A2P_10DLC_REGISTRATIONFEES_BRANDREGISTRATION( - "a2p-10dlc-registrationfees-brandregistration" - ), - A2P_10DLC_REGISTRATIONFEES_BV("a2p-10dlc-registrationfees-bv"), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNCHARGES( - "a2p-10dlc-registrationfees-campaigncharges" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNREGISTRATION( - "a2p-10dlc-registrationfees-campaignregistration" - ), - A2P_10DLC_REGISTRATIONFEES_CAMPAIGNVETTING( - "a2p-10dlc-registrationfees-campaignvetting" - ), - A2P_10DLC_REGISTRATIONFEES_MONTHLY( - "a2p-10dlc-registrationfees-monthly" - ), - A2P_10DLC_REGISTRATIONFEES_ONETIME( - "a2p-10dlc-registrationfees-onetime" - ), - A2P_REGISTRATION_FEES("a2p-registration-fees"), - ACCOUNT_SECURITY("account-security"), - AGENT_CONFERENCE("agent-conference"), - AGENT_COPILOT("agent-copilot"), - AGENT_COPILOT_MESSAGES("agent-copilot-messages"), - AGENT_COPILOT_PARTICIPANT_MINUTES("agent-copilot-participant-minutes"), - AI_ASSISTANTS("ai-assistants"), - AI_ASSISTANTS_VOICE("ai-assistants-voice"), - AMAZON_POLLY("amazon-polly"), - ANSWERING_MACHINE_DETECTION("answering-machine-detection"), - ASSETS("assets"), - AUDIENCE_MINUTES("audience-minutes"), - AUDIENCE_MINUTES_AUDIO("audience-minutes-audio"), - AUTHY_AUTHENTICATIONS("authy-authentications"), - AUTHY_CALLS_OUTBOUND("authy-calls-outbound"), - AUTHY_EMAIL_AUTHENTICATIONS("authy-email-authentications"), - AUTHY_MONTHLY_FEES("authy-monthly-fees"), - AUTHY_OUTBOUND_EMAIL("authy-outbound-email"), - AUTHY_PHONE_INTELLIGENCE("authy-phone-intelligence"), - AUTHY_PHONE_VERIFICATIONS("authy-phone-verifications"), - AUTHY_SMS_OUTBOUND("authy-sms-outbound"), - AUTHY_VERIFY_EMAIL_VERIFICATIONS("authy-verify-email-verifications"), - AUTHY_VERIFY_OUTBOUND_EMAIL("authy-verify-outbound-email"), - AUTOPILOT("autopilot"), - AUTOPILOT_HOME_ASSISTANTS("autopilot-home-assistants"), - AUTOPILOT_MESSAGING("autopilot-messaging"), - AUTOPILOT_OTHER("autopilot-other"), - AUTOPILOT_VOICE("autopilot-voice"), - BASIC_PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "basic-peer-to-peer-rooms-participant-minutes" - ), - BRANDED_CALLING("branded-calling"), - BUNDLE_SMS_BUCKET("bundle-sms-bucket"), - BUNDLE_SUBSCRIPTION_FEES("bundle-subscription-fees"), - CALL_FORWARDING_LOOKUPS("call-forwarding-lookups"), - CALL_PROGESS_EVENTS("call-progess-events"), - CALLERIDLOOKUPS("calleridlookups"), - CALLS("calls"), - CALLS_CLIENT("calls-client"), - CALLS_EMERGENCY("calls-emergency"), - CALLS_GLOBALCONFERENCE("calls-globalconference"), - CALLS_INBOUND("calls-inbound"), - CALLS_INBOUND_LOCAL("calls-inbound-local"), - CALLS_INBOUND_MOBILE("calls-inbound-mobile"), - CALLS_INBOUND_TOLLFREE("calls-inbound-tollfree"), - CALLS_INBOUND_TOLLFREE_LOCAL("calls-inbound-tollfree-local"), - CALLS_INBOUND_TOLLFREE_MOBILE("calls-inbound-tollfree-mobile"), - CALLS_MEDIA_STREAM_MINUTES("calls-media-stream-minutes"), - CALLS_OUTBOUND("calls-outbound"), - CALLS_PAY_VERB_TRANSACTIONS("calls-pay-verb-transactions"), - CALLS_RECORDINGS("calls-recordings"), - CALLS_SIP("calls-sip"), - CALLS_SIP_INBOUND("calls-sip-inbound"), - CALLS_SIP_OUTBOUND("calls-sip-outbound"), - CALLS_TEXT_TO_SPEECH("calls-text-to-speech"), - CALLS_TRANSFERS("calls-transfers"), - CARRIER_LOOKUPS("carrier-lookups"), - CATEGORY("category"), - CHANNELS("channels"), - CHANNELS_MESSAGING("channels-messaging"), - CHANNELS_MESSAGING_INBOUND("channels-messaging-inbound"), - CHANNELS_MESSAGING_OUTBOUND("channels-messaging-outbound"), - CHANNELS_WHATSAPP("channels-whatsapp"), - CHANNELS_WHATSAPP_CONVERSATION_AUTHENTICATION( - "channels-whatsapp-conversation-authentication" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE( - "channels-whatsapp-conversation-free" - ), - CHANNELS_WHATSAPP_CONVERSATION_MARKETING( - "channels-whatsapp-conversation-marketing" - ), - CHANNELS_WHATSAPP_CONVERSATION_SERVICE( - "channels-whatsapp-conversation-service" - ), - CHANNELS_WHATSAPP_CONVERSATION_UTILITY( - "channels-whatsapp-conversation-utility" - ), - CHANNELS_WHATSAPP_INBOUND("channels-whatsapp-inbound"), - CHANNELS_WHATSAPP_OUTBOUND("channels-whatsapp-outbound"), - CHAT_VIRTUAL_AGENT("chat-virtual-agent"), - CONVERSATION_RELAY("conversation-relay"), - CONVERSATIONS("conversations"), - CONVERSATIONS_API_REQUESTS("conversations-api-requests"), - CONVERSATIONS_CONVERSATION_EVENTS("conversations-conversation-events"), - CONVERSATIONS_ENDPOINT_CONNECTIVITY( - "conversations-endpoint-connectivity" - ), - CONVERSATIONS_EVENTS("conversations-events"), - CONVERSATIONS_PARTICIPANT_EVENTS("conversations-participant-events"), - CONVERSATIONS_PARTICIPANTS("conversations-participants"), - CPS("cps"), - CREDIT_TRANSFER("credit-transfer"), - EMAIL("email"), - EMERGING_TECH("emerging-tech"), - ENGAGEMENT_SUITE_PACKAGED_PLANS("engagement-suite-packaged-plans"), - ENHANCED_LINE_TYPE_LOOKUPS("enhanced-line-type-lookups"), - ENTERPRISE("enterprise"), - EVENTS("events"), - EXPERIMENT_FRANCE_SMS("experiment-france-sms"), - EXPERIMENT_INDIA_SMS("experiment-india-sms"), - EXPERIMENT_UK_SMS("experiment-uk-sms"), - FAILED_MESSAGE_PROCESSING_FEE("failed-message-processing-fee"), - FLEX("flex"), - FLEX_ACTIVE_USER_HOURS("flex-active-user-hours"), - FLEX_CONCURRENT_USERS("flex-concurrent-users"), - FLEX_CONVERSATIONAL_INSIGHTS("flex-conversational-insights"), - FLEX_CONVERSATIONAL_INSIGHTS_MESSAGES( - "flex-conversational-insights-messages" - ), - FLEX_CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "flex-conversational-insights-voice-minutes" - ), - FLEX_EMAIL_USAGE("flex-email-usage"), - FLEX_MESSAGING_USAGE("flex-messaging-usage"), - FLEX_PARTNER_SPINSCI("flex-partner-spinsci"), - FLEX_PARTNER_XCELERATE("flex-partner-xcelerate"), - FLEX_RESELLER_ECOSYSTEM("flex-reseller-ecosystem"), - FLEX_UNIQUE_USER("flex-unique-user"), - FLEX_USAGE("flex-usage"), - FLEX_USERS("flex-users"), - FLEX_VOICE_MINUTE("flex-voice-minute"), - FLEX_YTICA("flex-ytica"), - FRAUD_LOOKUPS("fraud-lookups"), - FRONTLINE("frontline"), - FRONTLINE_USERS("frontline-users"), - FUNCTIONS("functions"), - GENERIC_PAY_TRANSACTIONS("generic-pay-transactions"), - GROUP_ROOMS("group-rooms"), - GROUP_ROOMS_DATA_TRACK("group-rooms-data-track"), - GROUP_ROOMS_ENCRYPTED_MEDIA_RECORDED( - "group-rooms-encrypted-media-recorded" - ), - GROUP_ROOMS_MEDIA_DOWNLOADED("group-rooms-media-downloaded"), - GROUP_ROOMS_MEDIA_RECORDED("group-rooms-media-recorded"), - GROUP_ROOMS_MEDIA_ROUTED("group-rooms-media-routed"), - GROUP_ROOMS_MEDIA_STORED("group-rooms-media-stored"), - GROUP_ROOMS_PARTICIPANT_MINUTES("group-rooms-participant-minutes"), - GROUP_ROOMS_RECORDED_MINUTES("group-rooms-recorded-minutes"), - IP_MESSAGING("ip-messaging"), - IP_MESSAGING_COMMANDS("ip-messaging-commands"), - IP_MESSAGING_DATA_STORAGE("ip-messaging-data-storage"), - IP_MESSAGING_DATA_TRANSFER("ip-messaging-data-transfer"), - IP_MESSAGING_ENDPOINT_CONNECTIVITY( - "ip-messaging-endpoint-connectivity" - ), - IVR_VIRTUAL_AGENT_CUSTOM_VOICES("ivr-virtual-agent-custom-voices"), - IVR_VIRTUAL_AGENT_GENAI("ivr-virtual-agent-genai"), - LINE_STATUS_LOOKUPS("line-status-lookups"), - LIVE_ACTIVITY_LOOKUPS("live-activity-lookups"), - LOOKUP_BUCKET_ADJUSTMENT("lookup-bucket-adjustment"), - LOOKUP_IDENTITY_MATCH("lookup-identity-match"), - LOOKUPS("lookups"), - MARKETPLACE("marketplace"), - MARKETPLACE_ALGORITHMIA_NAMED_ENTITY_RECOGNITION( - "marketplace-algorithmia-named-entity-recognition" - ), - MARKETPLACE_CADENCE_TRANSCRIPTION("marketplace-cadence-transcription"), - MARKETPLACE_CADENCE_TRANSLATION("marketplace-cadence-translation"), - MARKETPLACE_CAPIO_SPEECH_TO_TEXT("marketplace-capio-speech-to-text"), - MARKETPLACE_CONVRIZA_ABABA("marketplace-convriza-ababa"), - MARKETPLACE_DEEPGRAM_PHRASE_DETECTOR( - "marketplace-deepgram-phrase-detector" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION( - "marketplace-deepgram-transcription" - ), - MARKETPLACE_DEEPGRAM_TRANSCRIPTION_BASE( - "marketplace-deepgram-transcription-base" - ), - MARKETPLACE_DEEPGRAM_TRANSSCRIPTION_ENHANCED( - "marketplace-deepgram-transscription-enhanced" - ), - MARKETPLACE_DIGITAL_SEGMENT_BUSINESS_INFO( - "marketplace-digital-segment-business-info" - ), - MARKETPLACE_FACEBOOK_OFFLINE_CONVERSIONS( - "marketplace-facebook-offline-conversions" - ), - MARKETPLACE_GOOGLE_SPEECH_TO_TEXT("marketplace-google-speech-to-text"), - MARKETPLACE_IBM_WATSON_MESSAGE_INSIGHTS( - "marketplace-ibm-watson-message-insights" - ), - MARKETPLACE_IBM_WATSON_MESSAGE_SENTIMENT( - "marketplace-ibm-watson-message-sentiment" - ), - MARKETPLACE_IBM_WATSON_RECORDING_ANALYSIS( - "marketplace-ibm-watson-recording-analysis" - ), - MARKETPLACE_IBM_WATSON_TONE_ANALYZER( - "marketplace-ibm-watson-tone-analyzer" - ), - MARKETPLACE_ICEHOOK_SYSTEMS_SCOUT("marketplace-icehook-systems-scout"), - MARKETPLACE_INFOGROUP_DATAAXLE_BIZINFO( - "marketplace-infogroup-dataaxle-bizinfo" - ), - MARKETPLACE_KEEN_IO_CONTACT_CENTER_ANALYTICS( - "marketplace-keen-io-contact-center-analytics" - ), - MARKETPLACE_MARCHEX_CLEANCALL("marketplace-marchex-cleancall"), - MARKETPLACE_MARCHEX_RECORDING_ANALYSIS( - "marketplace-marchex-recording-analysis" - ), - MARKETPLACE_MARCHEX_SENTIMENT_ANALYSIS_FOR_SMS( - "marketplace-marchex-sentiment-analysis-for-sms" - ), - MARKETPLACE_MARKETPLACE_NEXTCALLER_SOCIAL_ID( - "marketplace-marketplace-nextcaller-social-id" - ), - MARKETPLACE_MOBILE_COMMONS_OPT_OUT_CLASSIFIER( - "marketplace-mobile-commons-opt-out-classifier" - ), - MARKETPLACE_NEXIWAVE_VOICEMAIL_TO_TEXT( - "marketplace-nexiwave-voicemail-to-text" - ), - MARKETPLACE_NEXTCALLER_ADVANCED_CALLER_IDENTIFICATION( - "marketplace-nextcaller-advanced-caller-identification" - ), - MARKETPLACE_NOMOROBO_SPAM_SCORE("marketplace-nomorobo-spam-score"), - MARKETPLACE_PAY_ADDONS("marketplace-pay-addons"), - MARKETPLACE_PAY_ADDONS_BASECOMMERCE_PAY_CONNECTOR( - "marketplace-pay-addons-basecommerce-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_BRAINTREE_PAY_CONNECTOR( - "marketplace-pay-addons-braintree-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CARDCONNECT_PAY_CONNECTOR( - "marketplace-pay-addons-cardconnect-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_CHASE_PAY_CONNECTOR( - "marketplace-pay-addons-chase-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplace-pay-addons-shuttle-pay-connector" - ), - MARKETPLACE_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplace-pay-addons-stripe-pay-connector" - ), - MARKETPLACE_PAYFONE_TCPA_COMPLIANCE( - "marketplace-payfone-tcpa-compliance" - ), - MARKETPLACE_POLY_AI_CONNECTOR("marketplace-poly-ai-connector"), - MARKETPLACE_REALPHONEVALIDATION("marketplace-realphonevalidation"), - MARKETPLACE_REMEETING_AUTOMATIC_SPEECH_RECOGNITION( - "marketplace-remeeting-automatic-speech-recognition" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_PRO( - "marketplace-spoke-phone-license-pro" - ), - MARKETPLACE_SPOKE_PHONE_LICENSE_STANDARD( - "marketplace-spoke-phone-license-standard" - ), - MARKETPLACE_TCPA_DEFENSE_SOLUTIONS_BLACKLIST_FEED( - "marketplace-tcpa-defense-solutions-blacklist-feed" - ), - MARKETPLACE_TELO_OPENCNAM("marketplace-telo-opencnam"), - MARKETPLACE_TRESTLE_SOLUTIONS_CALLER_IDENTIFICATION( - "marketplace-trestle-solutions-caller-identification" - ), - MARKETPLACE_TRUECNAM_TRUE_SPAM("marketplace-truecnam-true-spam"), - MARKETPLACE_TWILIO_CALLER_NAME_LOOKUP_US( - "marketplace-twilio-caller-name-lookup-us" - ), - MARKETPLACE_TWILIO_CARRIER_INFORMATION_LOOKUP( - "marketplace-twilio-carrier-information-lookup" - ), - MARKETPLACE_VOICEBASE_PCI("marketplace-voicebase-pci"), - MARKETPLACE_VOICEBASE_TRANSCRIPTION( - "marketplace-voicebase-transcription" - ), - MARKETPLACE_VOICEBASE_TRANSCRIPTION_CUSTOM_VOCABULARY( - "marketplace-voicebase-transcription-custom-vocabulary" - ), - MARKETPLACE_WEB_PURIFY_PROFANITY_FILTER( - "marketplace-web-purify-profanity-filter" - ), - MARKETPLACE_WHITEPAGES_PRO_CALLER_IDENTIFICATION( - "marketplace-whitepages-pro-caller-identification" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_INTELLIGENCE( - "marketplace-whitepages-pro-phone-intelligence" - ), - MARKETPLACE_WHITEPAGES_PRO_PHONE_REPUTATION( - "marketplace-whitepages-pro-phone-reputation" - ), - MARKETPLACE_WOLFARM_SPOKEN_RESULTS( - "marketplace-wolfarm-spoken-results" - ), - MARKETPLACE_WOLFRAM_SHORT_ANSWER("marketplace-wolfram-short-answer"), - MARKETPLACE_YTICA_CONTACT_CENTER_REPORTING_ANALYTICS( - "marketplace-ytica-contact-center-reporting-analytics" - ), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR( - "marketplay-pay-addons-shuttle-pay-connector" - ), - MEDIA_COMPOSER_MINUTES("media-composer-minutes"), - MEDIASTORAGE("mediastorage"), - MIN_SPEND_ADJUSTMENTS("min-spend-adjustments"), - MMS("mms"), - MMS_INBOUND("mms-inbound"), - MMS_INBOUND_LONGCODE("mms-inbound-longcode"), - MMS_INBOUND_SHORTCODE("mms-inbound-shortcode"), - MMS_INBOUND_TOLL_FREE("mms-inbound-toll-free"), - MMS_MESSAGES_CARRIERFEES("mms-messages-carrierfees"), - MMS_OUTBOUND("mms-outbound"), - MMS_OUTBOUND_LONGCODE("mms-outbound-longcode"), - MMS_OUTBOUND_SHORTCODE("mms-outbound-shortcode"), - MMS_OUTBOUND_TOLLFREE("mms-outbound-tollfree"), - MONITOR("monitor"), - MONITOR_READS("monitor-reads"), - MONITOR_STORAGE("monitor-storage"), - MONITOR_WRITES("monitor-writes"), - NOTIFY("notify"), - NOTIFY_ACTIONS_ATTEMPTS("notify-actions-attempts"), - NOTIFY_CHANNELS("notify-channels"), - NUMBER_FORMAT_LOOKUPS("number-format-lookups"), - PCHAT("pchat"), - PCHAT_ACTIONS("pchat-actions"), - PCHAT_APS("pchat-aps"), - PCHAT_CONV_MED_STORAGE("pchat-conv-med-storage"), - PCHAT_MESSAGES("pchat-messages"), - PCHAT_NOTIFICATIONS("pchat-notifications"), - PCHAT_READS("pchat-reads"), - PCHAT_USERS("pchat-users"), - PEER_TO_PEER_ROOMS_PARTICIPANT_MINUTES( - "peer-to-peer-rooms-participant-minutes" - ), - PFAX("pfax"), - PFAX_MINUTES("pfax-minutes"), - PFAX_MINUTES_INBOUND("pfax-minutes-inbound"), - PFAX_MINUTES_OUTBOUND("pfax-minutes-outbound"), - PFAX_PAGES("pfax-pages"), - PHONE_QUALITY_SCORE_LOOKUPS("phone-quality-score-lookups"), - PHONENUMBERS("phonenumbers"), - PHONENUMBERS_CPS("phonenumbers-cps"), - PHONENUMBERS_EMERGENCY("phonenumbers-emergency"), - PHONENUMBERS_LOCAL("phonenumbers-local"), - PHONENUMBERS_MOBILE("phonenumbers-mobile"), - PHONENUMBERS_PORTING("phonenumbers-porting"), - PHONENUMBERS_SETUPS("phonenumbers-setups"), - PHONENUMBERS_TOLLFREE("phonenumbers-tollfree"), - PREMIUMSUPPORT("premiumsupport"), - PREMIUMSUPPORT_PERCENTAGE_SPEND("premiumsupport-percentage-spend"), - PROGRAMMABLEVOICE_PLATFORM("programmablevoice-platform"), - PROGRAMMABLEVOICECONN_CLIENTSDK("programmablevoiceconn-clientsdk"), - PROGRAMMABLEVOICECONN_CLIENTSDK_INBOUND( - "programmablevoiceconn-clientsdk-inbound" - ), - PROGRAMMABLEVOICECONN_CLIENTSDK_OUTBOUND( - "programmablevoiceconn-clientsdk-outbound" - ), - PROGRAMMABLEVOICECONN_ONNET("programmablevoiceconn-onnet"), - PROGRAMMABLEVOICECONN_ONNET_INBOUND( - "programmablevoiceconn-onnet-inbound" - ), - PROGRAMMABLEVOICECONN_ONNET_OUTBOUND( - "programmablevoiceconn-onnet-outbound" - ), - PROGRAMMABLEVOICECONN_SIP("programmablevoiceconn-sip"), - PROGRAMMABLEVOICECONN_SIP_INBOUND("programmablevoiceconn-sip-inbound"), - PROGRAMMABLEVOICECONN_SIP_OUTBOUND( - "programmablevoiceconn-sip-outbound" - ), - PROGRAMMABLEVOICECONNECTIVITY("programmablevoiceconnectivity"), - PROXY("proxy"), - PROXY_ACTIVE_SESSIONS("proxy-active-sessions"), - PROXY_BUCKET_ADJUSTMENT("proxy-bucket-adjustment"), - PROXY_LICENSES("proxy-licenses"), - PSTNCONNECTIVITY("pstnconnectivity"), - PSTNCONNECTIVITY_INBOUND("pstnconnectivity-inbound"), - PSTNCONNECTIVITY_OUTBOUND("pstnconnectivity-outbound"), - PV("pv"), - PV_BASIC_ROOMS("pv-basic-rooms"), - PV_COMPOSITION_MEDIA_DOWNLOADED("pv-composition-media-downloaded"), - PV_COMPOSITION_MEDIA_ENCRYPTED("pv-composition-media-encrypted"), - PV_COMPOSITION_MEDIA_STORED("pv-composition-media-stored"), - PV_COMPOSITION_MINUTES("pv-composition-minutes"), - PV_RECORDING_COMPOSITIONS("pv-recording-compositions"), - PV_ROOM_PARTICIPANTS("pv-room-participants"), - PV_ROOM_PARTICIPANTS_AU1("pv-room-participants-au1"), - PV_ROOM_PARTICIPANTS_BR1("pv-room-participants-br1"), - PV_ROOM_PARTICIPANTS_IE1("pv-room-participants-ie1"), - PV_ROOM_PARTICIPANTS_JP1("pv-room-participants-jp1"), - PV_ROOM_PARTICIPANTS_SG1("pv-room-participants-sg1"), - PV_ROOM_PARTICIPANTS_US1("pv-room-participants-us1"), - PV_ROOM_PARTICIPANTS_US2("pv-room-participants-us2"), - PV_ROOMS("pv-rooms"), - PV_SIP_ENDPOINT_REGISTRATIONS("pv-sip-endpoint-registrations"), - RCS_MESSAGES("rcs-messages"), - REASSIGNED_NUMBER("reassigned-number"), - RECORDINGS("recordings"), - RECORDINGSTORAGE("recordingstorage"), - SHORTCODES("shortcodes"), - SHORTCODES_CUSTOMEROWNED("shortcodes-customerowned"), - SHORTCODES_MMS_ENABLEMENT("shortcodes-mms-enablement"), - SHORTCODES_MPS("shortcodes-mps"), - SHORTCODES_RANDOM("shortcodes-random"), - SHORTCODES_SETUP_FEES("shortcodes-setup-fees"), - SHORTCODES_UK("shortcodes-uk"), - SHORTCODES_VANITY("shortcodes-vanity"), - SIM_SWAP_LOOKUPS("sim-swap-lookups"), - SIP_SECURE_MEDIA("sip-secure-media"), - SMALL_GROUP_ROOMS("small-group-rooms"), - SMALL_GROUP_ROOMS_DATA_TRACK("small-group-rooms-data-track"), - SMALL_GROUP_ROOMS_PARTICIPANT_MINUTES( - "small-group-rooms-participant-minutes" - ), - SMS("sms"), - SMS_INBOUND("sms-inbound"), - SMS_INBOUND_LONGCODE("sms-inbound-longcode"), - SMS_INBOUND_SHORTCODE("sms-inbound-shortcode"), - SMS_INBOUND_TOLLFREE("sms-inbound-tollfree"), - SMS_MESSAGES_CARRIERFEES("sms-messages-carrierfees"), - SMS_MESSAGES_FEATURES("sms-messages-features"), - SMS_MESSAGES_FEATURES_ENGAGEMENT_SUITE( - "sms-messages-features-engagement-suite" - ), - SMS_MESSAGES_FEATURES_MESSAGE_REDACTION( - "sms-messages-features-message-redaction" - ), - SMS_MESSAGES_FEATURES_SENDERID("sms-messages-features-senderid"), - SMS_MPS("sms-mps"), - SMS_MPS_SHORTCODE("sms-mps-shortcode"), - SMS_MPS_TOLLFREE("sms-mps-tollfree"), - SMS_MPS_TOLLFREE_SETUP("sms-mps-tollfree-setup"), - SMS_NATIONAL_REGULATORY_PROTECTION( - "sms-national-regulatory-protection" - ), - SMS_OUTBOUND("sms-outbound"), - SMS_OUTBOUND_CONTENT_INSPECTION("sms-outbound-content-inspection"), - SMS_OUTBOUND_LONGCODE("sms-outbound-longcode"), - SMS_OUTBOUND_SHORTCODE("sms-outbound-shortcode"), - SMS_OUTBOUND_TOLLFREE("sms-outbound-tollfree"), - SMS_PUMPING_PROTECTION("sms-pumping-protection"), - SMS_PUMPING_RISK("sms-pumping-risk"), - SMSMESSAGES_BUCKET_ADJUSTMENTS("smsmessages-bucket-adjustments"), - SMSMESSAGES_OUTBOUND_DOMESTIC("smsmessages-outbound-domestic"), - SPEECH_RECOGNITION("speech-recognition"), - STUDIO_ENGAGEMENTS("studio-engagements"), - SYNC("sync"), - SYNC_ACTIONS("sync-actions"), - SYNC_ENDPOINT_HOURS("sync-endpoint-hours"), - SYNC_ENDPOINT_HOURS_ABOVE_DAILY_CAP( - "sync-endpoint-hours-above-daily-cap" - ), - TASKROUTER_TASKS("taskrouter-tasks"), - TOTALPRICE("totalprice"), - TRANSCRIPTIONS("transcriptions"), - TRUNKING_CPS("trunking-cps"), - TRUNKING_EMERGENCY_CALLS("trunking-emergency-calls"), - TRUNKING_ORIGINATION("trunking-origination"), - TRUNKING_ORIGINATION_LOCAL("trunking-origination-local"), - TRUNKING_ORIGINATION_MOBILE("trunking-origination-mobile"), - TRUNKING_ORIGINATION_TOLLFREE("trunking-origination-tollfree"), - TRUNKING_RECORDINGS("trunking-recordings"), - TRUNKING_SECURE("trunking-secure"), - TRUNKING_TERMINATION("trunking-termination"), - TTS_GOOGLE("tts-google"), - TURNMEGABYTES("turnmegabytes"), - TURNMEGABYTES_AUSTRALIA("turnmegabytes-australia"), - TURNMEGABYTES_BRASIL("turnmegabytes-brasil"), - TURNMEGABYTES_GERMANY("turnmegabytes-germany"), - TURNMEGABYTES_INDIA("turnmegabytes-india"), - TURNMEGABYTES_IRELAND("turnmegabytes-ireland"), - TURNMEGABYTES_JAPAN("turnmegabytes-japan"), - TURNMEGABYTES_SINGAPORE("turnmegabytes-singapore"), - TURNMEGABYTES_USEAST("turnmegabytes-useast"), - TURNMEGABYTES_USWEST("turnmegabytes-uswest"), - TWILIO_FOR_SALESFORCE("twilio-for-salesforce"), - TWILIO_FOR_SALESFORCE_LICENSES("twilio-for-salesforce-licenses"), - TWILIO_INTERCONNECT("twilio-interconnect"), - TWIML("twiml"), - USAGE_FLEX_VIDEO("usage-flex-video"), - USAGE_FUNCTIONS("usage-functions"), - USAGE_RCS_BASIC_MESSAGES_OUTBOUND("usage-rcs-basic-messages-outbound"), - USAGE_RCS_MESSAGES("usage-rcs-messages"), - USAGE_RCS_MESSAGES_INBOUND("usage-rcs-messages-inbound"), - USAGE_RCS_MESSAGING_CARRIER_FEES("usage-rcs-messaging-carrier-fees"), - USAGE_RCS_SINGLE_MESSAGES_OUTBOUND( - "usage-rcs-single-messages-outbound" - ), - VERIFY_PACKAGE_PLANS("verify-package-plans"), - VERIFY_PUSH("verify-push"), - VERIFY_SNA("verify-sna"), - VERIFY_TOTP("verify-totp"), - VERIFY_VOICE_SMS("verify-voice-sms"), - VERIFY_WHATSAPP_CONVERSATIONS_BUSINESS_INITIATED( - "verify-whatsapp-conversations-business-initiated" - ), - VIDEO_RECORDINGS("video-recordings"), - VIDEO_ROOMS_TURN_MEGABYTES("video-rooms-turn-megabytes"), - VIRTUAL_AGENT("virtual-agent"), - VOICE_INSIGHTS("voice-insights"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-client-insights-on-demand-minute" - ), - VOICE_INSIGHTS_PTSN_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-ptsn-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_INTERFACE_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-interface-insights-on-demand-minute" - ), - VOICE_INSIGHTS_SIP_TRUNKING_INSIGHTS_ON_DEMAND_MINUTE( - "voice-insights-sip-trunking-insights-on-demand-minute" - ), - VOICE_INTELLIGENCE("voice-intelligence"), - VOICE_INTELLIGENCE_EIP_OPERATORS("voice-intelligence-eip-operators"), - VOICE_INTELLIGENCE_OPERATORS("voice-intelligence-operators"), - VOICE_INTELLIGENCE_TRANSCRIPTION("voice-intelligence-transcription"), - WDS("wds"), - WIRELESS("wireless"), - WIRELESS_DATA("wireless-data"), - WIRELESS_DATA_PAYG("wireless-data-payg"), - WIRELESS_DATA_PAYG_AFRICA("wireless-data-payg-africa"), - WIRELESS_DATA_PAYG_ASIA("wireless-data-payg-asia"), - WIRELESS_DATA_PAYG_CENTRALANDSOUTHAMERICA( - "wireless-data-payg-centralandsouthamerica" - ), - WIRELESS_DATA_PAYG_EUROPE("wireless-data-payg-europe"), - WIRELESS_DATA_PAYG_NORTHAMERICA("wireless-data-payg-northamerica"), - WIRELESS_DATA_PAYG_OCEANIA("wireless-data-payg-oceania"), - WIRELESS_DATA_QUOTA1("wireless-data-quota1"), - WIRELESS_DATA_QUOTA1_AFRICA("wireless-data-quota1-africa"), - WIRELESS_DATA_QUOTA1_ASIA("wireless-data-quota1-asia"), - WIRELESS_DATA_QUOTA1_CENTRALANDSOUTHAMERICA( - "wireless-data-quota1-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA1_EUROPE("wireless-data-quota1-europe"), - WIRELESS_DATA_QUOTA1_NORTHAMERICA("wireless-data-quota1-northamerica"), - WIRELESS_DATA_QUOTA1_OCEANIA("wireless-data-quota1-oceania"), - WIRELESS_DATA_QUOTA10("wireless-data-quota10"), - WIRELESS_DATA_QUOTA10_AFRICA("wireless-data-quota10-africa"), - WIRELESS_DATA_QUOTA10_ASIA("wireless-data-quota10-asia"), - WIRELESS_DATA_QUOTA10_CENTRALANDSOUTHAMERICA( - "wireless-data-quota10-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA10_EUROPE("wireless-data-quota10-europe"), - WIRELESS_DATA_QUOTA10_NORTHAMERICA( - "wireless-data-quota10-northamerica" - ), - WIRELESS_DATA_QUOTA10_OCEANIA("wireless-data-quota10-oceania"), - WIRELESS_DATA_QUOTA50("wireless-data-quota50"), - WIRELESS_DATA_QUOTA50_AFRICA("wireless-data-quota50-africa"), - WIRELESS_DATA_QUOTA50_ASIA("wireless-data-quota50-asia"), - WIRELESS_DATA_QUOTA50_CENTRALANDSOUTHAMERICA( - "wireless-data-quota50-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTA50_EUROPE("wireless-data-quota50-europe"), - WIRELESS_DATA_QUOTA50_NORTHAMERICA( - "wireless-data-quota50-northamerica" - ), - WIRELESS_DATA_QUOTA50_OCEANIA("wireless-data-quota50-oceania"), - WIRELESS_DATA_QUOTACUSTOM("wireless-data-quotacustom"), - WIRELESS_DATA_QUOTACUSTOM_AFRICA("wireless-data-quotacustom-africa"), - WIRELESS_DATA_QUOTACUSTOM_ASIA("wireless-data-quotacustom-asia"), - WIRELESS_DATA_QUOTACUSTOM_CENTRALANDSOUTHAMERICA( - "wireless-data-quotacustom-centralandsouthamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_EUROPE("wireless-data-quotacustom-europe"), - WIRELESS_DATA_QUOTACUSTOM_NORTHAMERICA( - "wireless-data-quotacustom-northamerica" - ), - WIRELESS_DATA_QUOTACUSTOM_OCEANIA("wireless-data-quotacustom-oceania"), - WIRELESS_MRC_PAYG("wireless-mrc-payg"), - WIRELESS_MRC_QUOTA1("wireless-mrc-quota1"), - WIRELESS_MRC_QUOTA10("wireless-mrc-quota10"), - WIRELESS_MRC_QUOTA50("wireless-mrc-quota50"), - WIRELESS_MRC_QUOTACUSTOM("wireless-mrc-quotacustom"), - WIRELESS_ORDERS("wireless-orders"), - WIRELESS_ORDERS_ARTWORK("wireless-orders-artwork"), - WIRELESS_ORDERS_BULK("wireless-orders-bulk"), - WIRELESS_ORDERS_ESIM("wireless-orders-esim"), - WIRELESS_ORDERS_STARTER("wireless-orders-starter"), - WIRELESS_QUOTAS("wireless-quotas"), - WIRELESS_SMS_AFRICA("wireless-sms-africa"), - WIRELESS_SMS_ASIA("wireless-sms-asia"), - WIRELESS_SMS_CENTRALANDSOUTHAMERICA( - "wireless-sms-centralandsouthamerica" - ), - WIRELESS_SMS_EUROPE("wireless-sms-europe"), - WIRELESS_SMS_NORTHAMERICA("wireless-sms-northamerica"), - WIRELESS_SMS_OCEANIA("wireless-sms-oceania"), - WIRELESS_SUPER_SIM("wireless-super-sim"), - WIRELESS_SUPER_SIM_DATA("wireless-super-sim-data"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA_USA( - "wireless-super-sim-data-north-america-usa" - ), - WIRELESS_SUPER_SIM_DATA_PAYG("wireless-super-sim-data-payg"), - WIRELESS_SUPER_SIM_DATA_PAYG_EUROPE( - "wireless-super-sim-data-payg-europe" - ), - WIRELESS_SUPER_SIM_DATA_PAYG_NORTH_AMERICA( - "wireless-super-sim-data-payg-north-america" - ), - WIRELESS_SUPER_SIM_HARDWARE("wireless-super-sim-hardware"), - WIRELESS_SUPER_SIM_HARDWARE_BULK("wireless-super-sim-hardware-bulk"), - WIRELESS_SUPER_SIM_SMSCOMMANDS("wireless-super-sim-smscommands"), - WIRELESS_SUPER_SIM_SMSCOMMANDS_AFRICA( - "wireless-super-sim-smscommands-africa" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_ASIA( - "wireless-super-sim-smscommands-asia" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_CENT_AND_SOUTH_AMERICA( - "wireless-super-sim-smscommands-cent-and-south-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_EUROPE( - "wireless-super-sim-smscommands-europe" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_NORTH_AMERICA( - "wireless-super-sim-smscommands-north-america" - ), - WIRELESS_SUPER_SIM_SMSCOMMANDS_OCEANIA( - "wireless-super-sim-smscommands-oceania" - ), - WIRELESS_SUPER_SIM_SUBSCRIPTION("wireless-super-sim-subscription"), - WIRELESS_SUPER_SIM_SUBSCRIPTION_PAYG( - "wireless-super-sim-subscription-payg" - ), - WIRELESS_USAGE("wireless-usage"), - WIRELESS_USAGE_COMMANDS("wireless-usage-commands"), - WIRELESS_USAGE_COMMANDS_AFRICA("wireless-usage-commands-africa"), - WIRELESS_USAGE_COMMANDS_ASIA("wireless-usage-commands-asia"), - WIRELESS_USAGE_COMMANDS_CENTRALANDSOUTHAMERICA( - "wireless-usage-commands-centralandsouthamerica" - ), - WIRELESS_USAGE_COMMANDS_EUROPE("wireless-usage-commands-europe"), - WIRELESS_USAGE_COMMANDS_HOME("wireless-usage-commands-home"), - WIRELESS_USAGE_COMMANDS_NORTHAMERICA( - "wireless-usage-commands-northamerica" - ), - WIRELESS_USAGE_COMMANDS_OCEANIA("wireless-usage-commands-oceania"), - WIRELESS_USAGE_COMMANDS_ROAMING("wireless-usage-commands-roaming"), - WIRELESS_USAGE_DATA("wireless-usage-data"), - WIRELESS_USAGE_DATA_AFRICA("wireless-usage-data-africa"), - WIRELESS_USAGE_DATA_ASIA("wireless-usage-data-asia"), - WIRELESS_USAGE_DATA_CENTRALANDSOUTHAMERICA( - "wireless-usage-data-centralandsouthamerica" - ), - WIRELESS_USAGE_DATA_CUSTOM_ADDITIONALMB( - "wireless-usage-data-custom-additionalmb" - ), - WIRELESS_USAGE_DATA_CUSTOM_FIRST5MB( - "wireless-usage-data-custom-first5mb" - ), - WIRELESS_USAGE_DATA_DOMESTIC_ROAMING( - "wireless-usage-data-domestic-roaming" - ), - WIRELESS_USAGE_DATA_EUROPE("wireless-usage-data-europe"), - WIRELESS_USAGE_DATA_INDIVIDUAL_ADDITIONALGB( - "wireless-usage-data-individual-additionalgb" - ), - WIRELESS_USAGE_DATA_INDIVIDUAL_FIRSTGB( - "wireless-usage-data-individual-firstgb" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_CANADA( - "wireless-usage-data-international-roaming-canada" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_INDIA( - "wireless-usage-data-international-roaming-india" - ), - WIRELESS_USAGE_DATA_INTERNATIONAL_ROAMING_MEXICO( - "wireless-usage-data-international-roaming-mexico" - ), - WIRELESS_USAGE_DATA_NORTHAMERICA("wireless-usage-data-northamerica"), - WIRELESS_USAGE_DATA_OCEANIA("wireless-usage-data-oceania"), - WIRELESS_USAGE_DATA_POOLED("wireless-usage-data-pooled"), - WIRELESS_USAGE_DATA_POOLED_DOWNLINK( - "wireless-usage-data-pooled-downlink" - ), - WIRELESS_USAGE_DATA_POOLED_UPLINK("wireless-usage-data-pooled-uplink"), - WIRELESS_USAGE_MRC("wireless-usage-mrc"), - WIRELESS_USAGE_MRC_CUSTOM("wireless-usage-mrc-custom"), - WIRELESS_USAGE_MRC_INDIVIDUAL("wireless-usage-mrc-individual"), - WIRELESS_USAGE_MRC_POOLED("wireless-usage-mrc-pooled"), - WIRELESS_USAGE_MRC_SUSPENDED("wireless-usage-mrc-suspended"), - WIRELESS_USAGE_SMS("wireless-usage-sms"), - WIRELESS_USAGE_VOICE("wireless-usage-voice"), - A2P_FAST_TRACK_ONBOARDING("a2p-fast-track-onboarding"), - ADVISORY_SERVICES("advisory-services"), - ADVISORY_SERVICES_BILLED("advisory-services-billed"), - ADVISORY_SERVICES_CALL_TRACKING("advisory-services-call-tracking"), - ADVISORY_SERVICES_DATA_SERVICES("advisory-services-data-services"), - ADVISORY_SERVICES_EXPENSES("advisory-services-expenses"), - ADVISORY_SERVICES_SIP_TRUNKING("advisory-services-sip-trunking"), - ASSETS_REQUESTS("assets-requests"), - AUDIENCE_MINUTES_VIDEO("audience-minutes-video"), - AUTHY_BUCKET_ADJUSTMENT("authy-bucket-adjustment"), - AUTHY_SOFTWARE("authy-software"), - CALLERIDLOOKUPS_API("calleridlookups-api"), - CALLERIDLOOKUPS_PROGRAMMABLEVOICE("calleridlookups-programmablevoice"), - CALLERIDLOOKUPS_TRUNKING("calleridlookups-trunking"), - CALLS_TRUNKING_INBOUND_TOLLFREE_LOCAL( - "calls-trunking-inbound-tollfree-local" - ), - CALLS_TRUNKING_INBOUND_TOLLFREE_MOBILE( - "calls-trunking-inbound-tollfree-mobile" - ), - CHANNELS_WHATSAPP_CONVERSATION_FREE_1( - "channels-whatsapp-conversation-free-1" - ), - CONFERENCE("conference"), - CONVERSATIONAL_INSIGHTS("conversational-insights"), - CONVERSATIONAL_INSIGHTS_MESSAGES("conversational-insights-messages"), - CONVERSATIONAL_INSIGHTS_VOICE_MINUTES( - "conversational-insights-voice-minutes" - ), - DEMO("demo"), - DEMO_UC_SCRIPT_TEST("demo-uc-script-test"), - ELASTIC_SIP_TRUNKING("elastic-sip-trunking"), - ELASTIC_SIP_TRUNKING_CALL_TRANSFERS( - "elastic-sip-trunking-call-transfers" - ), - ENTERPRISE_HIPPA("enterprise-hippa"), - FLEX_NAMED_USERS("flex-named-users"), - FLEX_SPINSCI("flex-spinsci"), - FLEX_USERS_1("flex-users-1"), - FLEX_WFO_PREMIUM_SPEECH_ANALYTICS("flex-wfo-premium-speech-analytics"), - FLEX_XCELERATE("flex-xcelerate"), - FUNCTIONS_ROLLUP("functions-rollup"), - IMP_V1_USAGE("imp-v1-usage"), - IP_MESSAGING_ADDONS("ip-messaging-addons"), - IVR("ivr"), - IVR_CONVERSATIONAL("ivr-conversational"), - IVR_DTMF("ivr-dtmf"), - IVR_VIRTUALAGENT("ivr-virtualagent"), - LIVE("live"), - LIVE_MEDIA_RECORDING_MINUTES("live-media-recording-minutes"), - LONGCODE_MPS("longcode-mps"), - MARKETPLACE_ANALYTICS_ADDONS("marketplace-analytics-addons"), - MARKETPLACE_ISV_ADDONS("marketplace-isv-addons"), - MARKETPLACE_MESSAGING_ADDONS("marketplace-messaging-addons"), - MARKETPLACE_PHONENUMBERS_ADDONS("marketplace-phonenumbers-addons"), - MARKETPLACE_RECORDING_ADDONS("marketplace-recording-addons"), - MARKETPLACE_VIRTUALAGENT_ADDONS("marketplace-virtualagent-addons"), - MARKETPLAY_PAY_ADDONS_SHUTTLE_PAY_CONNECTOR_1( - "marketplay-pay-addons-shuttle-pay-connector-1" - ), - MARKETPLAY_PAY_ADDONS_STRIPE_PAY_CONNECTOR( - "marketplay-pay-addons-stripe-pay-connector" - ), - MMS_INBOUND_LONGCODE_CANADA("mms-inbound-longcode-canada"), - MMS_INBOUND_LONGCODE_UNITEDSTATES("mms-inbound-longcode-unitedstates"), - MMS_OUTBOUND_LONGCODE_CANADA("mms-outbound-longcode-canada"), - MMS_OUTBOUND_LONGCODE_UNITEDSTATES( - "mms-outbound-longcode-unitedstates" - ), - MMS_OUTBOUND_TOLL_FREE("mms-outbound-toll-free"), - NOTIFY_CHATAPPSANDOTHERCHANNELS("notify-chatappsandotherchannels"), - NOTIFY_NOTIFYSERVICES("notify-notifyservices"), - NOTIFY_PUSHNOTIFICATIONS("notify-pushnotifications"), - PAYMENT_GATEWAY_CONNECTORS("payment-gateway-connectors"), - PAYMENT_SOLUTIONS("payment-solutions"), - PCHAT_BUCKET_ADJUSTMENT("pchat-bucket-adjustment"), - PHONENUMBERS_NUMBERS("phonenumbers-numbers"), - PROG_VOICE_CLIENT_ANDROID("prog-voice-client-android"), - PROG_VOICE_CLIENT_ANDROID_INBOUND("prog-voice-client-android-inbound"), - PROG_VOICE_CLIENT_ANDROID_OUTBOUND( - "prog-voice-client-android-outbound" - ), - PROG_VOICE_CLIENT_IOS("prog-voice-client-ios"), - PROG_VOICE_CLIENT_IOS_INBOUND("prog-voice-client-ios-inbound"), - PROG_VOICE_CLIENT_IOS_OUTBOUND("prog-voice-client-ios-outbound"), - PROG_VOICE_CLIENT_SDK("prog-voice-client-sdk"), - PROG_VOICE_CLIENT_WEB("prog-voice-client-web"), - PROG_VOICE_CLIENT_WEB_INBOUND("prog-voice-client-web-inbound"), - PROG_VOICE_CLIENT_WEB_OUTBOUND("prog-voice-client-web-outbound"), - PROGRAMMABLEVOICECONNECTIVITY_MEDIA_STREAMS( - "programmablevoiceconnectivity-media-streams" - ), - PSTNCONNECTIVITY_BYOC("pstnconnectivity-byoc"), - PSTNCONNECTIVITY_EMERGENCY("pstnconnectivity-emergency"), - PSTNCONNECTIVITY_MINUTES("pstnconnectivity-minutes"), - PSTNCONNECTIVITY_MINUTES_1("pstnconnectivity-minutes-1"), - PSTNCONNECTIVITY_MINUTESINBOUNDLOCAL( - "pstnconnectivity-minutesinboundlocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDMOBILE( - "pstnconnectivity-minutesinboundmobile" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREE( - "pstnconnectivity-minutesinboundtollfree" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREELOCAL( - "pstnconnectivity-minutesinboundtollfreelocal" - ), - PSTNCONNECTIVITY_MINUTESINBOUNDTOLLFREEMOBILE( - "pstnconnectivity-minutesinboundtollfreemobile" - ), - PV_ROOM_HOURS("pv-room-hours"), - PV_ROOM_SIMULTANEOUS_PARTICIPANT_CONNECTIONS( - "pv-room-simultaneous-participant-connections" - ), - PVIDEO_ROOM_HOURS_AU1("pvideo-room-hours-au1"), - PVIDEO_ROOM_HOURS_BR1("pvideo-room-hours-br1"), - PVIDEO_ROOM_HOURS_IE1("pvideo-room-hours-ie1"), - PVIDEO_ROOM_HOURS_JP1("pvideo-room-hours-jp1"), - PVIDEO_ROOM_HOURS_SG1("pvideo-room-hours-sg1"), - PVIDEO_ROOM_HOURS_US1("pvideo-room-hours-us1"), - PVIDEO_ROOM_HOURS_US2("pvideo-room-hours-us2"), - RECORDINGS_ENCRYPTED("recordings-encrypted"), - SHORT_CODE_SETUP_FEES("short-code-setup-fees"), - SHORTCODES_MESSAGES_INBOUND("shortcodes-messages-inbound"), - SHORTCODES_MESSAGES_OUTBOUND("shortcodes-messages-outbound"), - SMS_MESSAGES_REGISTRATIONFEES("sms-messages-registrationfees"), - SMS_MMS_PENALTY_FEES("sms-mms-penalty-fees"), - SMS_MMS_PENALTY_FEES_1("sms-mms-penalty-fees-1"), - SMS_PUMPING_PROTECTION_NON_USCA("sms-pumping-protection-non-usca"), - SMS_PUMPING_PROTECTION_USCA("sms-pumping-protection-usca"), - STUDIO("studio"), - STUDIO_MONTHLY_FEES("studio-monthly-fees"), - SUPERSIM("supersim"), - TASK_ROUTER("task-router"), - TASK_ROUTER_WORKERS("task-router-workers"), - TEST_QUOTA_BUCKETS("test-quota-buckets"), - TEST_UC_SCRIPT_1("test-uc-script-1"), - TEST_UC_SCRIPT_DEMO_2("test-uc-script-demo-2"), - TEXT_TO_SPEECH("text-to-speech"), - TME("tme"), - TTS_BASIC("tts-basic"), - TWILIO_EDITIONS("twilio-editions"), - TWILIO_INTERCONNECT_CALIFORNIA("twilio-interconnect-california"), - TWILIO_INTERCONNECT_CALIFORNIA_MONTHLY( - "twilio-interconnect-california-monthly" - ), - TWILIO_INTERCONNECT_CALIFORNIA_SETUP( - "twilio-interconnect-california-setup" - ), - TWILIO_INTERCONNECT_FRANKFURT("twilio-interconnect-frankfurt"), - TWILIO_INTERCONNECT_FRANKFURT_MO("twilio-interconnect-frankfurt-mo"), - TWILIO_INTERCONNECT_FRANKFURT_SETUP( - "twilio-interconnect-frankfurt-setup" - ), - TWILIO_INTERCONNECT_LONDON("twilio-interconnect-london"), - TWILIO_INTERCONNECT_LONDON_MO("twilio-interconnect-london-mo"), - TWILIO_INTERCONNECT_LONDON_SETUP("twilio-interconnect-london-setup"), - TWILIO_INTERCONNECT_SAO_PAULO("twilio-interconnect-sao-paulo"), - TWILIO_INTERCONNECT_SAO_PAULO_MONTHLY( - "twilio-interconnect-sao-paulo-monthly" - ), - TWILIO_INTERCONNECT_SAO_PAULO_SETUP( - "twilio-interconnect-sao-paulo-setup" - ), - TWILIO_INTERCONNECT_SINGAPORE("twilio-interconnect-singapore"), - TWILIO_INTERCONNECT_SINGAPORE_MO("twilio-interconnect-singapore-mo"), - TWILIO_INTERCONNECT_SINGAPORE_SETUP( - "twilio-interconnect-singapore-setup" - ), - TWILIO_INTERCONNECT_SYDNEY("twilio-interconnect-sydney"), - TWILIO_INTERCONNECT_SYDNEY_MO("twilio-interconnect-sydney-mo"), - TWILIO_INTERCONNECT_SYDNEY_SETUP("twilio-interconnect-sydney-setup"), - TWILIO_INTERCONNECT_TOKYO("twilio-interconnect-tokyo"), - TWILIO_INTERCONNECT_TOKYO_MO("twilio-interconnect-tokyo-mo"), - TWILIO_INTERCONNECT_TOKYO_SETUP("twilio-interconnect-tokyo-setup"), - TWILIO_INTERCONNECT_VA("twilio-interconnect-va"), - TWILIO_INTERCONNECT_VA_MO("twilio-interconnect-va-mo"), - TWILIO_INTERCONNECT_VA_SETUP("twilio-interconnect-va-setup"), - TWIML_VERBS("twiml-verbs"), - TWIML_VERBS_SAY("twiml-verbs-say"), - USAGE_PROGRAMMABLE_MESSAGING_ENGAGEMENT_SUITE( - "usage-programmable-messaging-engagement-suite" - ), - USAGE_PROGRAMMABLE_MESSAGING_FEES_SERVICES( - "usage-programmable-messaging-fees-services" - ), - VERIFY_OUTBOUND_EMAIL("verify-outbound-email"), - VERIFY_PACKAGED_PLANS("verify-packaged-plans"), - VERIFY_SILENT_NETWORK_AUTH("verify-silent-network-auth"), - VERIFY_VOICE_AND_SMS("verify-voice-and-sms"), - VOICE_INSIGHTS_CLIENT_INSIGHTS_MONTHY_COMMIT( - "voice-insights-client-insights-monthy-commit" - ), - WIRELESS_DATA_PAYG_ASIA_AFG("wireless-data-payg-asia-afg"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS("wireless-multi-imsi-sim-commands"), - WIRELESS_MULTI_IMSI_SIM_COMMANDS_USA( - "wireless-multi-imsi-sim-commands-usa" - ), - WIRELESS_MULTI_IMSI_SIM_DATA("wireless-multi-imsi-sim-data"), - WIRELESS_MULTI_IMSI_SIM_DATA_EU28("wireless-multi-imsi-sim-data-eu28"), - WIRELESS_MULTI_IMSI_SIM_DATA_USA("wireless-multi-imsi-sim-data-usa"), - WIRELESS_MULTI_IMSI_SIM_MONTHLY_FEES( - "wireless-multi-imsi-sim-monthly-fees" - ), - WIRELESS_MULTI_IMSI_SIM_USAGE("wireless-multi-imsi-sim-usage"), - WIRELESS_SUPER_SIM_DATA_NORTH_AMERICA( - "wireless-super-sim-data-north-america" - ), - WIRELESS_SUPER_SIM_USAGE("wireless-super-sim-usage"); - - private final String value; - - private Category(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Category forValue(final String value) { - return Promoter.enumFromString(value, Category.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java index 02af335b4b..08ea9f7fe9 100644 --- a/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java +++ b/src/main/java/com/twilio/rest/api/v2010/account/usage/record/YesterdayReader.java @@ -32,7 +32,7 @@ public class YesterdayReader extends Reader { private String pathAccountSid; - private Yesterday.Category category; + private String category; private LocalDate startDate; private LocalDate endDate; private Boolean includeSubaccounts; @@ -44,7 +44,7 @@ public YesterdayReader(final String pathAccountSid) { this.pathAccountSid = pathAccountSid; } - public YesterdayReader setCategory(final Yesterday.Category category) { + public YesterdayReader setCategory(final String category) { this.category = category; return this; } @@ -168,7 +168,7 @@ public Page getPage( private void addQueryParams(final Request request) { if (category != null) { - request.addQueryParam("Category", category.toString()); + request.addQueryParam("Category", category); } if (startDate != null) { request.addQueryParam( diff --git a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java index 94f290b45d..0c4ed48947 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Assistant.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Assistant.java @@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Resource; -import com.twilio.converter.Converter; import com.twilio.converter.DateConverter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -136,7 +135,9 @@ public static class AssistantsV1ServiceCreateAssistantRequest { @Setter private AssistantsV1ServiceSegmentCredential segmentCredential; - public AssistantsV1ServiceCreateAssistantRequest() {} + public AssistantsV1ServiceCreateAssistantRequest(final String name) { + this.name = name; + } public static AssistantsV1ServiceCreateAssistantRequest fromJson( String jsonString, @@ -222,10 +223,6 @@ public static class AssistantsV1ServiceKnowledge { @Setter private Map knowledgeSourceDetails; - public String getKnowledgeSourceDetails() { - return Converter.mapToJson(knowledgeSourceDetails); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @Getter @@ -320,10 +317,6 @@ public static class AssistantsV1ServiceTool { @Setter private Map meta; - public String getMeta() { - return Converter.mapToJson(meta); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @Getter diff --git a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java index 0f5b469bb2..a899609713 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Knowledge.java @@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Resource; -import com.twilio.converter.Converter; import com.twilio.converter.DateConverter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -71,10 +70,6 @@ public static class AssistantsV1ServiceCreatePolicyRequest { @Setter private Object policyDetails; - public String getPolicyDetails() { - return Converter.objectToJson(policyDetails); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("type") @Getter @@ -113,10 +108,6 @@ public static class AssistantsV1ServiceCreateKnowledgeRequest { @Setter private Map knowledgeSourceDetails; - public String getKnowledgeSourceDetails() { - return Converter.mapToJson(knowledgeSourceDetails); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @Getter @@ -141,7 +132,13 @@ public String getKnowledgeSourceDetails() { @Setter private String embeddingModel; - public AssistantsV1ServiceCreateKnowledgeRequest() {} + public AssistantsV1ServiceCreateKnowledgeRequest( + final String name, + final String type + ) { + this.name = name; + this.type = type; + } public static AssistantsV1ServiceCreateKnowledgeRequest fromJson( String jsonString, @@ -169,10 +166,6 @@ public static class AssistantsV1ServiceUpdateKnowledgeRequest { @Setter private Map knowledgeSourceDetails; - public String getKnowledgeSourceDetails() { - return Converter.mapToJson(knowledgeSourceDetails); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @Getter diff --git a/src/main/java/com/twilio/rest/assistants/v1/Tool.java b/src/main/java/com/twilio/rest/assistants/v1/Tool.java index c4dbbf3be2..48770ad6a1 100644 --- a/src/main/java/com/twilio/rest/assistants/v1/Tool.java +++ b/src/main/java/com/twilio/rest/assistants/v1/Tool.java @@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Resource; -import com.twilio.converter.Converter; import com.twilio.converter.DateConverter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -72,10 +71,6 @@ public static class AssistantsV1ServiceCreatePolicyRequest { @Setter private Object policyDetails; - public String getPolicyDetails() { - return Converter.objectToJson(policyDetails); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("type") @Getter @@ -120,10 +115,6 @@ public static class AssistantsV1ServiceCreateToolRequest { @Setter private Map meta; - public String getMeta() { - return Converter.mapToJson(meta); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @Getter @@ -142,7 +133,15 @@ public String getMeta() { @Setter private String type; - public AssistantsV1ServiceCreateToolRequest() {} + public AssistantsV1ServiceCreateToolRequest( + final Boolean enabled, + final String name, + final String type + ) { + this.enabled = enabled; + this.name = name; + this.type = type; + } public static AssistantsV1ServiceCreateToolRequest fromJson( String jsonString, @@ -182,10 +181,6 @@ public static class AssistantsV1ServiceUpdateToolRequest { @Setter private Map meta; - public String getMeta() { - return Converter.mapToJson(meta); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("name") @Getter @@ -262,10 +257,6 @@ public static class AssistantsV1ServicePolicy { @Setter private Map policyDetails; - public String getPolicyDetails() { - return Converter.mapToJson(policyDetails); - } - @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("dateCreated") @Getter diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java index 058ef9a15c..ee3bc089bb 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/ExportCustomJob.java @@ -25,6 +25,7 @@ import com.twilio.exception.ApiException; import java.io.IOException; import java.io.InputStream; +import java.util.List; import java.util.Map; import java.util.Map; import java.util.Objects; @@ -35,7 +36,7 @@ @ToString public class ExportCustomJob extends Resource { - private static final long serialVersionUID = 125242558228L; + private static final long serialVersionUID = 87737406045908L; public static ExportCustomJobCreator creator( final String pathResourceType, @@ -106,7 +107,7 @@ public static ExportCustomJob fromJson( private final String webhookMethod; private final String email; private final String jobSid; - private final Map details; + private final List> details; private final String jobQueuePosition; private final String estimatedCompletionTime; @@ -120,7 +121,7 @@ private ExportCustomJob( @JsonProperty("webhook_method") final String webhookMethod, @JsonProperty("email") final String email, @JsonProperty("job_sid") final String jobSid, - @JsonProperty("details") final Map details, + @JsonProperty("details") final List> details, @JsonProperty("job_queue_position") final String jobQueuePosition, @JsonProperty( "estimated_completion_time" @@ -171,7 +172,7 @@ public final String getJobSid() { return this.jobSid; } - public final Map getDetails() { + public final List> getDetails() { return this.details; } diff --git a/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java b/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java index 52fce1b2eb..685913964b 100644 --- a/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java +++ b/src/main/java/com/twilio/rest/bulkexports/v1/export/Job.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URI; +import java.util.List; import java.util.Map; import java.util.Map; import java.util.Objects; @@ -36,7 +37,7 @@ @ToString public class Job extends Resource { - private static final long serialVersionUID = 103628862500013L; + private static final long serialVersionUID = 152000944333983L; public static JobDeleter deleter(final String pathJobSid) { return new JobDeleter(pathJobSid); @@ -91,7 +92,7 @@ public static Job fromJson( private final String resourceType; private final String friendlyName; - private final Map details; + private final List> details; private final String startDay; private final String endDay; private final String jobSid; @@ -106,7 +107,7 @@ public static Job fromJson( private Job( @JsonProperty("resource_type") final String resourceType, @JsonProperty("friendly_name") final String friendlyName, - @JsonProperty("details") final Map details, + @JsonProperty("details") final List> details, @JsonProperty("start_day") final String startDay, @JsonProperty("end_day") final String endDay, @JsonProperty("job_sid") final String jobSid, @@ -141,7 +142,7 @@ public final String getFriendlyName() { return this.friendlyName; } - public final Map getDetails() { + public final List> getDetails() { return this.details; } diff --git a/src/main/java/com/twilio/rest/content/v1/Content.java b/src/main/java/com/twilio/rest/content/v1/Content.java index addc44ae73..1b21e6becb 100644 --- a/src/main/java/com/twilio/rest/content/v1/Content.java +++ b/src/main/java/com/twilio/rest/content/v1/Content.java @@ -34,12 +34,10 @@ import java.time.ZonedDateTime; import java.util.List; import java.util.Map; -import java.util.Map; import java.util.Objects; import lombok.Getter; import lombok.Setter; import lombok.ToString; -import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString @@ -345,6 +343,12 @@ public static class CardAction { @Setter private String code; + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("webview_size") + @Getter + @Setter + private WebviewSizeType webviewSize; + public static CardAction fromJson( String jsonString, ObjectMapper mapper @@ -1154,6 +1158,28 @@ public static QuickReplyActionType forValue(final String value) { } } + public enum WebviewSizeType { + TALL("TALL"), + FULL("FULL"), + HALF("HALF"), + NONE("NONE"); + + private final String value; + + private WebviewSizeType(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static WebviewSizeType forValue(final String value) { + return Promoter.enumFromString(value, WebviewSizeType.values()); + } + } + public enum CardActionType { URL("URL"), PHONE_NUMBER("PHONE_NUMBER"), diff --git a/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java b/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java index e621325249..b0b200cf5f 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java +++ b/src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java @@ -246,19 +246,13 @@ public static AutoCreationType forValue(final String value) { } } - public enum Type { - SMS("sms"), - WHATSAPP("whatsapp"), - MESSENGER("messenger"), - GBM("gbm"), - EMAIL("email"), - RCS("rcs"), - APPLE("apple"), - CHAT("chat"); + public enum Method { + GET("get"), + POST("post"); private final String value; - private Type(final String value) { + private Method(final String value) { this.value = value; } @@ -267,18 +261,24 @@ public String toString() { } @JsonCreator - public static Type forValue(final String value) { - return Promoter.enumFromString(value, Type.values()); + public static Method forValue(final String value) { + return Promoter.enumFromString(value, Method.values()); } } - public enum Method { - GET("GET"), - POST("POST"); + public enum Type { + SMS("sms"), + WHATSAPP("whatsapp"), + MESSENGER("messenger"), + GBM("gbm"), + EMAIL("email"), + RCS("rcs"), + APPLE("apple"), + CHAT("chat"); private final String value; - private Method(final String value) { + private Type(final String value) { this.value = value; } @@ -287,8 +287,8 @@ public String toString() { } @JsonCreator - public static Method forValue(final String value) { - return Promoter.enumFromString(value, Method.values()); + public static Type forValue(final String value) { + return Promoter.enumFromString(value, Type.values()); } } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/Conversation.java b/src/main/java/com/twilio/rest/conversations/v1/Conversation.java index dc54e2affc..6a849cb54e 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/Conversation.java +++ b/src/main/java/com/twilio/rest/conversations/v1/Conversation.java @@ -258,14 +258,13 @@ public int hashCode() { ); } - public enum State { - INACTIVE("inactive"), - ACTIVE("active"), - CLOSED("closed"); + public enum WebhookEnabledType { + TRUE("true"), + FALSE("false"); private final String value; - private State(final String value) { + private WebhookEnabledType(final String value) { this.value = value; } @@ -274,18 +273,20 @@ public String toString() { } @JsonCreator - public static State forValue(final String value) { - return Promoter.enumFromString(value, State.values()); + public static WebhookEnabledType forValue(final String value) { + return Promoter.enumFromString(value, WebhookEnabledType.values()); } } - public enum WebhookEnabledType { - TRUE("true"), - FALSE("false"); + public enum State { + INITIALIZING("initializing"), + INACTIVE("inactive"), + ACTIVE("active"), + CLOSED("closed"); private final String value; - private WebhookEnabledType(final String value) { + private State(final String value) { this.value = value; } @@ -294,8 +295,8 @@ public String toString() { } @JsonCreator - public static WebhookEnabledType forValue(final String value) { - return Promoter.enumFromString(value, WebhookEnabledType.values()); + public static State forValue(final String value) { + return Promoter.enumFromString(value, State.values()); } } } diff --git a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java index ac73b9afa2..5ae7e297d4 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java +++ b/src/main/java/com/twilio/rest/conversations/v1/ConversationWithParticipants.java @@ -249,6 +249,7 @@ public int hashCode() { } public enum State { + INITIALIZING("initializing"), INACTIVE("inactive"), ACTIVE("active"), CLOSED("closed"); diff --git a/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java index f6da62268d..8bfea294d0 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/conversation/Webhook.java @@ -238,8 +238,8 @@ public static Target forValue(final String value) { } public enum Method { - GET("GET"), - POST("POST"); + GET("get"), + POST("post"); private final String value; diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java index 939f0389d7..6726d9630b 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/ConversationWithParticipants.java @@ -251,6 +251,7 @@ public int hashCode() { } public enum State { + INITIALIZING("initializing"), INACTIVE("inactive"), ACTIVE("active"), CLOSED("closed"); diff --git a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java index dfaee4587f..3df7568adc 100644 --- a/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java +++ b/src/main/java/com/twilio/rest/conversations/v1/service/conversation/Webhook.java @@ -270,8 +270,8 @@ public static Target forValue(final String value) { } public enum Method { - GET("GET"), - POST("POST"); + GET("get"), + POST("post"); private final String value; diff --git a/src/main/java/com/twilio/rest/events/v1/Sink.java b/src/main/java/com/twilio/rest/events/v1/Sink.java index 1a0f0eb112..8a5ea31e9c 100644 --- a/src/main/java/com/twilio/rest/events/v1/Sink.java +++ b/src/main/java/com/twilio/rest/events/v1/Sink.java @@ -43,7 +43,7 @@ public class Sink extends Resource { public static SinkCreator creator( final String description, - final Map sinkConfiguration, + final Object sinkConfiguration, final Sink.SinkType sinkType ) { return new SinkCreator(description, sinkConfiguration, sinkType); diff --git a/src/main/java/com/twilio/rest/events/v1/SinkCreator.java b/src/main/java/com/twilio/rest/events/v1/SinkCreator.java index 781066e4cd..632c1d9aec 100644 --- a/src/main/java/com/twilio/rest/events/v1/SinkCreator.java +++ b/src/main/java/com/twilio/rest/events/v1/SinkCreator.java @@ -26,18 +26,16 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class SinkCreator extends Creator { private String description; - private Map sinkConfiguration; + private Object sinkConfiguration; private Sink.SinkType sinkType; public SinkCreator( final String description, - final Map sinkConfiguration, + final Object sinkConfiguration, final Sink.SinkType sinkType ) { this.description = description; @@ -50,9 +48,7 @@ public SinkCreator setDescription(final String description) { return this; } - public SinkCreator setSinkConfiguration( - final Map sinkConfiguration - ) { + public SinkCreator setSinkConfiguration(final Object sinkConfiguration) { this.sinkConfiguration = sinkConfiguration; return this; } @@ -114,7 +110,7 @@ private void addPostParams(final Request request) { if (sinkConfiguration != null) { request.addPostParam( "SinkConfiguration", - Converter.mapToJson(sinkConfiguration) + Converter.objectToJson(sinkConfiguration) ); } if (sinkType != null) { diff --git a/src/main/java/com/twilio/rest/events/v1/Subscription.java b/src/main/java/com/twilio/rest/events/v1/Subscription.java index 0a37de2b4a..123ccdbbfc 100644 --- a/src/main/java/com/twilio/rest/events/v1/Subscription.java +++ b/src/main/java/com/twilio/rest/events/v1/Subscription.java @@ -44,7 +44,7 @@ public class Subscription extends Resource { public static SubscriptionCreator creator( final String description, final String sinkSid, - final List> types + final List types ) { return new SubscriptionCreator(description, sinkSid, types); } diff --git a/src/main/java/com/twilio/rest/events/v1/SubscriptionCreator.java b/src/main/java/com/twilio/rest/events/v1/SubscriptionCreator.java index 449e4aa7cd..32e9a37342 100644 --- a/src/main/java/com/twilio/rest/events/v1/SubscriptionCreator.java +++ b/src/main/java/com/twilio/rest/events/v1/SubscriptionCreator.java @@ -29,19 +29,17 @@ import com.twilio.rest.Domains; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class SubscriptionCreator extends Creator { private String description; private String sinkSid; - private List> types; + private List types; public SubscriptionCreator( final String description, final String sinkSid, - final List> types + final List types ) { this.description = description; this.sinkSid = sinkSid; @@ -58,12 +56,12 @@ public SubscriptionCreator setSinkSid(final String sinkSid) { return this; } - public SubscriptionCreator setTypes(final List> types) { + public SubscriptionCreator setTypes(final List types) { this.types = types; return this; } - public SubscriptionCreator setTypes(final Map types) { + public SubscriptionCreator setTypes(final Object types) { return setTypes(Promoter.listOfOne(types)); } @@ -119,8 +117,8 @@ private void addPostParams(final Request request) { request.addPostParam("SinkSid", sinkSid); } if (types != null) { - for (Map prop : types) { - request.addPostParam("Types", Converter.mapToJson(prop)); + for (Object prop : types) { + request.addPostParam("Types", Converter.objectToJson(prop)); } } } diff --git a/src/main/java/com/twilio/rest/events/v1/SubscriptionUpdater.java b/src/main/java/com/twilio/rest/events/v1/SubscriptionUpdater.java index adefd8eab6..a6907cb6e5 100644 --- a/src/main/java/com/twilio/rest/events/v1/SubscriptionUpdater.java +++ b/src/main/java/com/twilio/rest/events/v1/SubscriptionUpdater.java @@ -29,7 +29,6 @@ public class SubscriptionUpdater extends Updater { private String pathSid; private String description; - private String sinkSid; public SubscriptionUpdater(final String pathSid) { this.pathSid = pathSid; @@ -40,11 +39,6 @@ public SubscriptionUpdater setDescription(final String description) { return this; } - public SubscriptionUpdater setSinkSid(final String sinkSid) { - this.sinkSid = sinkSid; - return this; - } - @Override public Subscription update(final TwilioRestClient client) { String path = "/v1/Subscriptions/{Sid}"; @@ -87,8 +81,5 @@ private void addPostParams(final Request request) { if (description != null) { request.addPostParam("Description", description); } - if (sinkSid != null) { - request.addPostParam("SinkSid", sinkSid); - } } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java b/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java index 7bade94c98..21563c4279 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Assessments.java @@ -37,7 +37,7 @@ @ToString public class Assessments extends Resource { - private static final long serialVersionUID = 249351913918322L; + private static final long serialVersionUID = 2474918794072L; public static AssessmentsCreator creator( final String categorySid, @@ -128,9 +128,9 @@ public static Assessments fromJson( private final String accountSid; private final String assessmentSid; - private final BigDecimal offset; + private final String offset; private final Boolean report; - private final BigDecimal weight; + private final String weight; private final String agentId; private final String segmentId; private final String userName; @@ -138,16 +138,16 @@ public static Assessments fromJson( private final String answerText; private final String answerId; private final Map assessment; - private final BigDecimal timestamp; + private final String timestamp; private final URI url; @JsonCreator private Assessments( @JsonProperty("account_sid") final String accountSid, @JsonProperty("assessment_sid") final String assessmentSid, - @JsonProperty("offset") final BigDecimal offset, + @JsonProperty("offset") final String offset, @JsonProperty("report") final Boolean report, - @JsonProperty("weight") final BigDecimal weight, + @JsonProperty("weight") final String weight, @JsonProperty("agent_id") final String agentId, @JsonProperty("segment_id") final String segmentId, @JsonProperty("user_name") final String userName, @@ -155,7 +155,7 @@ private Assessments( @JsonProperty("answer_text") final String answerText, @JsonProperty("answer_id") final String answerId, @JsonProperty("assessment") final Map assessment, - @JsonProperty("timestamp") final BigDecimal timestamp, + @JsonProperty("timestamp") final String timestamp, @JsonProperty("url") final URI url ) { this.accountSid = accountSid; @@ -182,7 +182,7 @@ public final String getAssessmentSid() { return this.assessmentSid; } - public final BigDecimal getOffset() { + public final String getOffset() { return this.offset; } @@ -190,7 +190,7 @@ public final Boolean getReport() { return this.report; } - public final BigDecimal getWeight() { + public final String getWeight() { return this.weight; } @@ -222,7 +222,7 @@ public final Map getAssessment() { return this.assessment; } - public final BigDecimal getTimestamp() { + public final String getTimestamp() { return this.timestamp; } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java index 115b9e464b..d895b3d0e4 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InsightsAssessmentsComment.java @@ -37,7 +37,7 @@ @ToString public class InsightsAssessmentsComment extends Resource { - private static final long serialVersionUID = 175598645429423L; + private static final long serialVersionUID = 119423741777853L; public static InsightsAssessmentsCommentCreator creator( final String categoryId, @@ -113,14 +113,14 @@ public static InsightsAssessmentsComment fromJson( private final String accountSid; private final String assessmentSid; private final Map comment; - private final BigDecimal offset; + private final String offset; private final Boolean report; - private final BigDecimal weight; + private final String weight; private final String agentId; private final String segmentId; private final String userName; private final String userEmail; - private final BigDecimal timestamp; + private final String timestamp; private final URI url; @JsonCreator @@ -128,14 +128,14 @@ private InsightsAssessmentsComment( @JsonProperty("account_sid") final String accountSid, @JsonProperty("assessment_sid") final String assessmentSid, @JsonProperty("comment") final Map comment, - @JsonProperty("offset") final BigDecimal offset, + @JsonProperty("offset") final String offset, @JsonProperty("report") final Boolean report, - @JsonProperty("weight") final BigDecimal weight, + @JsonProperty("weight") final String weight, @JsonProperty("agent_id") final String agentId, @JsonProperty("segment_id") final String segmentId, @JsonProperty("user_name") final String userName, @JsonProperty("user_email") final String userEmail, - @JsonProperty("timestamp") final BigDecimal timestamp, + @JsonProperty("timestamp") final String timestamp, @JsonProperty("url") final URI url ) { this.accountSid = accountSid; @@ -164,7 +164,7 @@ public final Map getComment() { return this.comment; } - public final BigDecimal getOffset() { + public final String getOffset() { return this.offset; } @@ -172,7 +172,7 @@ public final Boolean getReport() { return this.report; } - public final BigDecimal getWeight() { + public final String getWeight() { return this.weight; } @@ -192,7 +192,7 @@ public final String getUserEmail() { return this.userEmail; } - public final BigDecimal getTimestamp() { + public final String getTimestamp() { return this.timestamp; } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java b/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java index 9bce2d74ec..99af3da8ff 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/Interaction.java @@ -38,9 +38,7 @@ public class Interaction extends Resource { private static final long serialVersionUID = 256485735361091L; - public static InteractionCreator creator( - final Map channel - ) { + public static InteractionCreator creator(final Object channel) { return new InteractionCreator(channel); } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/InteractionCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/InteractionCreator.java index fa70c4a23e..4ac64c4b4a 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/InteractionCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/InteractionCreator.java @@ -26,26 +26,24 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class InteractionCreator extends Creator { - private Map channel; - private Map routing; + private Object channel; + private Object routing; private String interactionContextSid; private String webhookTtid; - public InteractionCreator(final Map channel) { + public InteractionCreator(final Object channel) { this.channel = channel; } - public InteractionCreator setChannel(final Map channel) { + public InteractionCreator setChannel(final Object channel) { this.channel = channel; return this; } - public InteractionCreator setRouting(final Map routing) { + public InteractionCreator setRouting(final Object routing) { this.routing = routing; return this; } @@ -102,10 +100,10 @@ public Interaction create(final TwilioRestClient client) { private void addPostParams(final Request request) { if (channel != null) { - request.addPostParam("Channel", Converter.mapToJson(channel)); + request.addPostParam("Channel", Converter.objectToJson(channel)); } if (routing != null) { - request.addPostParam("Routing", Converter.mapToJson(routing)); + request.addPostParam("Routing", Converter.objectToJson(routing)); } if (interactionContextSid != null) { request.addPostParam( diff --git a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationCreator.java index 0450fd0ae1..3fc0e2b9d8 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/PluginConfigurationCreator.java @@ -29,14 +29,12 @@ import com.twilio.rest.Domains; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class PluginConfigurationCreator extends Creator { private String name; private String flexMetadata; - private List> plugins; + private List plugins; private String description; public PluginConfigurationCreator(final String name) { @@ -55,16 +53,12 @@ public PluginConfigurationCreator setFlexMetadata( return this; } - public PluginConfigurationCreator setPlugins( - final List> plugins - ) { + public PluginConfigurationCreator setPlugins(final List plugins) { this.plugins = plugins; return this; } - public PluginConfigurationCreator setPlugins( - final Map plugins - ) { + public PluginConfigurationCreator setPlugins(final Object plugins) { return setPlugins(Promoter.listOfOne(plugins)); } @@ -117,8 +111,8 @@ private void addPostParams(final Request request) { request.addPostParam("Name", name); } if (plugins != null) { - for (Map prop : plugins) { - request.addPostParam("Plugins", Converter.mapToJson(prop)); + for (Object prop : plugins) { + request.addPostParam("Plugins", Converter.objectToJson(prop)); } } if (description != null) { diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java index 22a50f6d76..3c61717b83 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/InteractionChannelUpdater.java @@ -25,14 +25,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class InteractionChannelUpdater extends Updater { private String pathInteractionSid; private String pathSid; private InteractionChannel.UpdateChannelStatus status; - private Map routing; + private Object routing; public InteractionChannelUpdater( final String pathInteractionSid, @@ -51,9 +50,7 @@ public InteractionChannelUpdater setStatus( return this; } - public InteractionChannelUpdater setRouting( - final Map routing - ) { + public InteractionChannelUpdater setRouting(final Object routing) { this.routing = routing; return this; } @@ -107,7 +104,7 @@ private void addPostParams(final Request request) { request.addPostParam("Status", status.toString()); } if (routing != null) { - request.addPostParam("Routing", Converter.mapToJson(routing)); + request.addPostParam("Routing", Converter.objectToJson(routing)); } } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java index 6a9e79717b..da656b886a 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInvite.java @@ -41,7 +41,7 @@ public class InteractionChannelInvite extends Resource { public static InteractionChannelInviteCreator creator( final String pathInteractionSid, final String pathChannelSid, - final Map routing + final Object routing ) { return new InteractionChannelInviteCreator( pathInteractionSid, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java index 94643ed2dd..89dd3e12be 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelInviteCreator.java @@ -26,29 +26,25 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class InteractionChannelInviteCreator extends Creator { private String pathInteractionSid; private String pathChannelSid; - private Map routing; + private Object routing; public InteractionChannelInviteCreator( final String pathInteractionSid, final String pathChannelSid, - final Map routing + final Object routing ) { this.pathInteractionSid = pathInteractionSid; this.pathChannelSid = pathChannelSid; this.routing = routing; } - public InteractionChannelInviteCreator setRouting( - final Map routing - ) { + public InteractionChannelInviteCreator setRouting(final Object routing) { this.routing = routing; return this; } @@ -104,7 +100,7 @@ public InteractionChannelInvite create(final TwilioRestClient client) { private void addPostParams(final Request request) { if (routing != null) { - request.addPostParam("Routing", Converter.mapToJson(routing)); + request.addPostParam("Routing", Converter.objectToJson(routing)); } } } diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java index 390638a66e..16c65ee470 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipant.java @@ -43,7 +43,7 @@ public static InteractionChannelParticipantCreator creator( final String pathInteractionSid, final String pathChannelSid, final InteractionChannelParticipant.Type type, - final Map mediaProperties + final Object mediaProperties ) { return new InteractionChannelParticipantCreator( pathInteractionSid, diff --git a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java index 587a591060..0de36280bf 100644 --- a/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v1/interaction/interactionchannel/InteractionChannelParticipantCreator.java @@ -26,8 +26,6 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class InteractionChannelParticipantCreator extends Creator { @@ -35,14 +33,14 @@ public class InteractionChannelParticipantCreator private String pathInteractionSid; private String pathChannelSid; private InteractionChannelParticipant.Type type; - private Map mediaProperties; - private Map routingProperties; + private Object mediaProperties; + private Object routingProperties; public InteractionChannelParticipantCreator( final String pathInteractionSid, final String pathChannelSid, final InteractionChannelParticipant.Type type, - final Map mediaProperties + final Object mediaProperties ) { this.pathInteractionSid = pathInteractionSid; this.pathChannelSid = pathChannelSid; @@ -58,14 +56,14 @@ public InteractionChannelParticipantCreator setType( } public InteractionChannelParticipantCreator setMediaProperties( - final Map mediaProperties + final Object mediaProperties ) { this.mediaProperties = mediaProperties; return this; } public InteractionChannelParticipantCreator setRoutingProperties( - final Map routingProperties + final Object routingProperties ) { this.routingProperties = routingProperties; return this; @@ -132,13 +130,13 @@ private void addPostParams(final Request request) { if (mediaProperties != null) { request.addPostParam( "MediaProperties", - Converter.mapToJson(mediaProperties) + Converter.objectToJson(mediaProperties) ); } if (routingProperties != null) { request.addPostParam( "RoutingProperties", - Converter.mapToJson(routingProperties) + Converter.objectToJson(routingProperties) ); } } diff --git a/src/main/java/com/twilio/rest/flexapi/v2/WebChannelsCreator.java b/src/main/java/com/twilio/rest/flexapi/v2/WebChannelsCreator.java index e01a533e65..764380105a 100644 --- a/src/main/java/com/twilio/rest/flexapi/v2/WebChannelsCreator.java +++ b/src/main/java/com/twilio/rest/flexapi/v2/WebChannelsCreator.java @@ -32,6 +32,7 @@ public class WebChannelsCreator extends Creator { private String chatFriendlyName; private String customerFriendlyName; private String preEngagementData; + private String identity; public WebChannelsCreator(final String addressSid) { this.addressSid = addressSid; @@ -68,6 +69,11 @@ public WebChannelsCreator setPreEngagementData( return this; } + public WebChannelsCreator setIdentity(final String identity) { + this.identity = identity; + return this; + } + @Override public WebChannels create(final TwilioRestClient client) { String path = "/v2/WebChats"; @@ -121,6 +127,9 @@ private void addPostParams(final Request request) { if (preEngagementData != null) { request.addPostParam("PreEngagementData", preEngagementData); } + if (identity != null) { + request.addPostParam("Identity", identity); + } } private void addHeaderParams(final Request request) { diff --git a/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java b/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java index 56a2d87548..9357e8697e 100644 --- a/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java +++ b/src/main/java/com/twilio/rest/iam/v1/GetApiKeys.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.io.InputStream; import java.time.ZonedDateTime; +import java.util.List; import java.util.Objects; import lombok.ToString; import lombok.ToString; @@ -35,7 +36,7 @@ @ToString public class GetApiKeys extends Resource { - private static final long serialVersionUID = 35259719636912L; + private static final long serialVersionUID = 72145637372666L; public static GetApiKeysReader reader(final String accountSid) { return new GetApiKeysReader(accountSid); @@ -88,18 +89,21 @@ public static GetApiKeys fromJson( private final String friendlyName; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; + private final List flags; @JsonCreator private GetApiKeys( @JsonProperty("sid") final String sid, @JsonProperty("friendly_name") final String friendlyName, @JsonProperty("date_created") final String dateCreated, - @JsonProperty("date_updated") final String dateUpdated + @JsonProperty("date_updated") final String dateUpdated, + @JsonProperty("flags") final List flags ) { this.sid = sid; this.friendlyName = friendlyName; this.dateCreated = DateConverter.rfc2822DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.rfc2822DateTimeFromString(dateUpdated); + this.flags = flags; } public final String getSid() { @@ -118,6 +122,10 @@ public final ZonedDateTime getDateUpdated() { return this.dateUpdated; } + public final List getFlags() { + return this.flags; + } + @Override public boolean equals(final Object o) { if (this == o) { @@ -134,12 +142,13 @@ public boolean equals(final Object o) { Objects.equals(sid, other.sid) && Objects.equals(friendlyName, other.friendlyName) && Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(flags, other.flags) ); } @Override public int hashCode() { - return Objects.hash(sid, friendlyName, dateCreated, dateUpdated); + return Objects.hash(sid, friendlyName, dateCreated, dateUpdated, flags); } } diff --git a/src/main/java/com/twilio/rest/insights/v1/CallSummariesReader.java b/src/main/java/com/twilio/rest/insights/v1/CallSummariesReader.java index 5c1f1334a7..b298cde879 100644 --- a/src/main/java/com/twilio/rest/insights/v1/CallSummariesReader.java +++ b/src/main/java/com/twilio/rest/insights/v1/CallSummariesReader.java @@ -55,6 +55,10 @@ public class CallSummariesReader extends Reader { private Boolean brandedEnabled; private Boolean voiceIntegrityEnabled; private String brandedBundleSid; + private Boolean brandedLogo; + private String brandedType; + private String brandedUseCase; + private String brandedCallReason; private String voiceIntegrityBundleSid; private String voiceIntegrityUseCase; private String businessProfileIdentity; @@ -215,6 +219,28 @@ public CallSummariesReader setBrandedBundleSid( return this; } + public CallSummariesReader setBrandedLogo(final Boolean brandedLogo) { + this.brandedLogo = brandedLogo; + return this; + } + + public CallSummariesReader setBrandedType(final String brandedType) { + this.brandedType = brandedType; + return this; + } + + public CallSummariesReader setBrandedUseCase(final String brandedUseCase) { + this.brandedUseCase = brandedUseCase; + return this; + } + + public CallSummariesReader setBrandedCallReason( + final String brandedCallReason + ) { + this.brandedCallReason = brandedCallReason; + return this; + } + public CallSummariesReader setVoiceIntegrityBundleSid( final String voiceIntegrityBundleSid ) { @@ -441,6 +467,18 @@ private void addQueryParams(final Request request) { if (brandedBundleSid != null) { request.addQueryParam("BrandedBundleSid", brandedBundleSid); } + if (brandedLogo != null) { + request.addQueryParam("BrandedLogo", brandedLogo.toString()); + } + if (brandedType != null) { + request.addQueryParam("BrandedType", brandedType); + } + if (brandedUseCase != null) { + request.addQueryParam("BrandedUseCase", brandedUseCase); + } + if (brandedCallReason != null) { + request.addQueryParam("BrandedCallReason", brandedCallReason); + } if (voiceIntegrityBundleSid != null) { request.addQueryParam( "VoiceIntegrityBundleSid", diff --git a/src/main/java/com/twilio/rest/insights/v1/Room.java b/src/main/java/com/twilio/rest/insights/v1/Room.java index 32a1fb2ece..762e15d75d 100644 --- a/src/main/java/com/twilio/rest/insights/v1/Room.java +++ b/src/main/java/com/twilio/rest/insights/v1/Room.java @@ -437,19 +437,7 @@ public enum TwilioRealm { SG1("sg1"), IN1("in1"), DE1("de1"), - GLL("gll"), - STAGE_US1("stage_us1"), - STAGE_US2("stage_us2"), - DEV_US1("dev_us1"), - DEV_US2("dev_us2"), - STAGE_DE1("stage_de1"), - STAGE_IN1("stage_in1"), - STAGE_IE1("stage_ie1"), - STAGE_BR1("stage_br1"), - STAGE_AU1("stage_au1"), - STAGE_SG1("stage_sg1"), - STAGE_JP1("stage_jp1"), - OUTSIDE("outside"); + GLL("gll"); private final String value; diff --git a/src/main/java/com/twilio/rest/insights/v1/room/Participant.java b/src/main/java/com/twilio/rest/insights/v1/room/Participant.java index db0b8b2325..b575a7042a 100644 --- a/src/main/java/com/twilio/rest/insights/v1/room/Participant.java +++ b/src/main/java/com/twilio/rest/insights/v1/room/Participant.java @@ -279,15 +279,21 @@ public int hashCode() { ); } - public enum RoomStatus { - IN_PROGRESS("in_progress"), - CONNECTED("connected"), - COMPLETED("completed"), - DISCONNECTED("disconnected"); + public enum TwilioRealm { + US1("us1"), + US2("us2"), + AU1("au1"), + BR1("br1"), + IE1("ie1"), + JP1("jp1"), + SG1("sg1"), + IN1("in1"), + DE1("de1"), + GLL("gll"); private final String value; - private RoomStatus(final String value) { + private TwilioRealm(final String value) { this.value = value; } @@ -296,38 +302,20 @@ public String toString() { } @JsonCreator - public static RoomStatus forValue(final String value) { - return Promoter.enumFromString(value, RoomStatus.values()); + public static TwilioRealm forValue(final String value) { + return Promoter.enumFromString(value, TwilioRealm.values()); } } - public enum TwilioRealm { - US1("us1"), - US2("us2"), - AU1("au1"), - BR1("br1"), - IE1("ie1"), - JP1("jp1"), - SG1("sg1"), - IN1("in1"), - DE1("de1"), - GLL("gll"), - STAGE_US1("stage_us1"), - DEV_US1("dev_us1"), - STAGE_AU1("stage_au1"), - STAGE_SG1("stage_sg1"), - STAGE_BR1("stage_br1"), - STAGE_IN1("stage_in1"), - STAGE_JP1("stage_jp1"), - STAGE_DE1("stage_de1"), - STAGE_IE1("stage_ie1"), - STAGE_US2("stage_us2"), - DEV_US2("dev_us2"), - OUTSIDE("outside"); + public enum RoomStatus { + IN_PROGRESS("in_progress"), + CONNECTED("connected"), + COMPLETED("completed"), + DISCONNECTED("disconnected"); private final String value; - private TwilioRealm(final String value) { + private RoomStatus(final String value) { this.value = value; } @@ -336,8 +324,8 @@ public String toString() { } @JsonCreator - public static TwilioRealm forValue(final String value) { - return Promoter.enumFromString(value, TwilioRealm.values()); + public static RoomStatus forValue(final String value) { + return Promoter.enumFromString(value, RoomStatus.values()); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java index fa1df6c2b0..577770f332 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperator.java @@ -44,7 +44,7 @@ public class CustomOperator extends Resource { public static CustomOperatorCreator creator( final String friendlyName, final String operatorType, - final Map config + final Object config ) { return new CustomOperatorCreator(friendlyName, operatorType, config); } @@ -64,7 +64,7 @@ public static CustomOperatorReader reader() { public static CustomOperatorUpdater updater( final String pathSid, final String friendlyName, - final Map config + final Object config ) { return new CustomOperatorUpdater(pathSid, friendlyName, config); } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorCreator.java b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorCreator.java index 1f8707d982..85535d3191 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorCreator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorCreator.java @@ -26,19 +26,17 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class CustomOperatorCreator extends Creator { private String friendlyName; private String operatorType; - private Map config; + private Object config; public CustomOperatorCreator( final String friendlyName, final String operatorType, - final Map config + final Object config ) { this.friendlyName = friendlyName; this.operatorType = operatorType; @@ -55,7 +53,7 @@ public CustomOperatorCreator setOperatorType(final String operatorType) { return this; } - public CustomOperatorCreator setConfig(final Map config) { + public CustomOperatorCreator setConfig(final Object config) { this.config = config; return this; } @@ -116,7 +114,7 @@ private void addPostParams(final Request request) { request.addPostParam("OperatorType", operatorType); } if (config != null) { - request.addPostParam("Config", Converter.mapToJson(config)); + request.addPostParam("Config", Converter.objectToJson(config)); } } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorUpdater.java b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorUpdater.java index 45dbf98813..73c396b60d 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorUpdater.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/CustomOperatorUpdater.java @@ -25,19 +25,18 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class CustomOperatorUpdater extends Updater { private String pathSid; private String friendlyName; - private Map config; + private Object config; private String ifMatch; public CustomOperatorUpdater( final String pathSid, final String friendlyName, - final Map config + final Object config ) { this.pathSid = pathSid; this.friendlyName = friendlyName; @@ -49,7 +48,7 @@ public CustomOperatorUpdater setFriendlyName(final String friendlyName) { return this; } - public CustomOperatorUpdater setConfig(final Map config) { + public CustomOperatorUpdater setConfig(final Object config) { this.config = config; return this; } @@ -109,7 +108,7 @@ private void addPostParams(final Request request) { request.addPostParam("FriendlyName", friendlyName); } if (config != null) { - request.addPostParam("Config", Converter.mapToJson(config)); + request.addPostParam("Config", Converter.objectToJson(config)); } } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java b/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java index fa0fddb1df..0e19d311a1 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/Transcript.java @@ -43,7 +43,7 @@ public class Transcript extends Resource { public static TranscriptCreator creator( final String serviceSid, - final Map channel + final Object channel ) { return new TranscriptCreator(serviceSid, channel); } diff --git a/src/main/java/com/twilio/rest/intelligence/v2/TranscriptCreator.java b/src/main/java/com/twilio/rest/intelligence/v2/TranscriptCreator.java index 8ab04ae15c..7a9249f442 100644 --- a/src/main/java/com/twilio/rest/intelligence/v2/TranscriptCreator.java +++ b/src/main/java/com/twilio/rest/intelligence/v2/TranscriptCreator.java @@ -27,20 +27,15 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; import java.time.ZonedDateTime; -import java.util.Map; -import java.util.Map; public class TranscriptCreator extends Creator { private String serviceSid; - private Map channel; + private Object channel; private String customerKey; private ZonedDateTime mediaStartTime; - public TranscriptCreator( - final String serviceSid, - final Map channel - ) { + public TranscriptCreator(final String serviceSid, final Object channel) { this.serviceSid = serviceSid; this.channel = channel; } @@ -50,7 +45,7 @@ public TranscriptCreator setServiceSid(final String serviceSid) { return this; } - public TranscriptCreator setChannel(final Map channel) { + public TranscriptCreator setChannel(final Object channel) { this.channel = channel; return this; } @@ -112,7 +107,7 @@ private void addPostParams(final Request request) { request.addPostParam("ServiceSid", serviceSid); } if (channel != null) { - request.addPostParam("Channel", Converter.mapToJson(channel)); + request.addPostParam("Channel", Converter.objectToJson(channel)); } if (customerKey != null) { request.addPostParam("CustomerKey", customerKey); diff --git a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java b/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java deleted file mode 100644 index a2a7a572e3..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/Knowledge.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.Converter; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.time.ZonedDateTime; -import java.util.Map; -import java.util.Map; -import java.util.Objects; -import lombok.Getter; -import lombok.Setter; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Knowledge extends Resource { - - private static final long serialVersionUID = 142704301669097L; - - @ToString - public static class KnowledgeV1ServiceCreatePolicyRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - @Setter - private String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("id") - @Getter - @Setter - private String id; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - @Setter - private String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy_details") - @Getter - @Setter - private Object policyDetails; - - public String getPolicyDetails() { - return Converter.objectToJson(policyDetails); - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - @Setter - private String type; - - public static KnowledgeV1ServiceCreatePolicyRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - KnowledgeV1ServiceCreatePolicyRequest.class - ); - } - } - - @ToString - public static class KnowledgeV1ServiceCreateKnowledgeRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - @Setter - private String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - @Getter - @Setter - private Map knowledgeSourceDetails; - - public String getKnowledgeSourceDetails() { - return Converter.mapToJson(knowledgeSourceDetails); - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - @Setter - private String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - @Getter - @Setter - private KnowledgeV1ServiceCreatePolicyRequest policy; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - @Setter - private String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - @Getter - @Setter - private String embeddingModel; - - public KnowledgeV1ServiceCreateKnowledgeRequest() {} - - public static KnowledgeV1ServiceCreateKnowledgeRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - KnowledgeV1ServiceCreateKnowledgeRequest.class - ); - } - } - - @ToString - public static class KnowledgeV1ServiceUpdateKnowledgeRequest { - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("description") - @Getter - @Setter - private String description; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("knowledge_source_details") - @Getter - @Setter - private Map knowledgeSourceDetails; - - public String getKnowledgeSourceDetails() { - return Converter.mapToJson(knowledgeSourceDetails); - } - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("name") - @Getter - @Setter - private String name; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("policy") - @Getter - @Setter - private KnowledgeV1ServiceCreatePolicyRequest policy; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("type") - @Getter - @Setter - private String type; - - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("embedding_model") - @Getter - @Setter - private String embeddingModel; - - public KnowledgeV1ServiceUpdateKnowledgeRequest() {} - - public static KnowledgeV1ServiceUpdateKnowledgeRequest fromJson( - String jsonString, - ObjectMapper mapper - ) throws IOException { - return mapper.readValue( - jsonString, - KnowledgeV1ServiceUpdateKnowledgeRequest.class - ); - } - } - - public static KnowledgeCreator creator( - final Knowledge.KnowledgeV1ServiceCreateKnowledgeRequest knowledgeV1ServiceCreateKnowledgeRequest - ) { - return new KnowledgeCreator(knowledgeV1ServiceCreateKnowledgeRequest); - } - - public static KnowledgeDeleter deleter(final String pathId) { - return new KnowledgeDeleter(pathId); - } - - public static KnowledgeFetcher fetcher(final String pathId) { - return new KnowledgeFetcher(pathId); - } - - public static KnowledgeReader reader() { - return new KnowledgeReader(); - } - - public static KnowledgeUpdater updater(final String pathId) { - return new KnowledgeUpdater(pathId); - } - - /** - * Converts a JSON String into a Knowledge object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Knowledge object represented by the provided JSON - */ - public static Knowledge fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Knowledge object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Knowledge object represented by the provided JSON - */ - public static Knowledge fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Knowledge.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - public static String toJson(Object object, ObjectMapper mapper) { - try { - return mapper.writeValueAsString(object); - } catch (final JsonMappingException e) { - throw new ApiException(e.getMessage(), e); - } catch (JsonProcessingException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String description; - private final String id; - private final String accountSid; - private final Map knowledgeSourceDetails; - private final String name; - private final String status; - private final String type; - private final String url; - private final String embeddingModel; - private final ZonedDateTime dateCreated; - private final ZonedDateTime dateUpdated; - - @JsonCreator - private Knowledge( - @JsonProperty("description") final String description, - @JsonProperty("id") final String id, - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("knowledge_source_details") final Map< - String, - Object - > knowledgeSourceDetails, - @JsonProperty("name") final String name, - @JsonProperty("status") final String status, - @JsonProperty("type") final String type, - @JsonProperty("url") final String url, - @JsonProperty("embedding_model") final String embeddingModel, - @JsonProperty("date_created") final String dateCreated, - @JsonProperty("date_updated") final String dateUpdated - ) { - this.description = description; - this.id = id; - this.accountSid = accountSid; - this.knowledgeSourceDetails = knowledgeSourceDetails; - this.name = name; - this.status = status; - this.type = type; - this.url = url; - this.embeddingModel = embeddingModel; - this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - } - - public final String getDescription() { - return this.description; - } - - public final String getId() { - return this.id; - } - - public final String getAccountSid() { - return this.accountSid; - } - - public final Map getKnowledgeSourceDetails() { - return this.knowledgeSourceDetails; - } - - public final String getName() { - return this.name; - } - - public final String getStatus() { - return this.status; - } - - public final String getType() { - return this.type; - } - - public final String getUrl() { - return this.url; - } - - public final String getEmbeddingModel() { - return this.embeddingModel; - } - - public final ZonedDateTime getDateCreated() { - return this.dateCreated; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Knowledge other = (Knowledge) o; - - return ( - Objects.equals(description, other.description) && - Objects.equals(id, other.id) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals( - knowledgeSourceDetails, - other.knowledgeSourceDetails - ) && - Objects.equals(name, other.name) && - Objects.equals(status, other.status) && - Objects.equals(type, other.type) && - Objects.equals(url, other.url) && - Objects.equals(embeddingModel, other.embeddingModel) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - description, - id, - accountSid, - knowledgeSourceDetails, - name, - status, - type, - url, - embeddingModel, - dateCreated, - dateUpdated - ); - } -} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeDeleter.java b/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeDeleter.java deleted file mode 100644 index 59804cdc4e..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeDeleter.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1; - -import com.twilio.base.Deleter; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class KnowledgeDeleter extends Deleter { - - private String pathId; - - public KnowledgeDeleter(final String pathId) { - this.pathId = pathId; - } - - @Override - public boolean delete(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); - - Request request = new Request( - HttpMethod.DELETE, - Domains.KNOWLEDGE.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "Knowledge delete failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response.getStatusCode() == 204; - } -} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeReader.java b/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeReader.java deleted file mode 100644 index f0d8abd0f5..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeReader.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class KnowledgeReader extends Reader { - - private Integer pageSize; - private String tags; - - public KnowledgeReader() {} - - public KnowledgeReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - public KnowledgeReader setTags(final String tags) { - this.tags = tags; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Knowledge"; - - Request request = new Request( - HttpMethod.GET, - Domains.KNOWLEDGE.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "Knowledge read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "knowledge", - response.getContent(), - Knowledge.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.KNOWLEDGE.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.KNOWLEDGE.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - if (tags != null) { - request.addQueryParam("Tags", tags); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java deleted file mode 100644 index b0336d7aa9..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/Chunk.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1.knowledge; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.time.ZonedDateTime; -import java.util.Map; -import java.util.Map; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Chunk extends Resource { - - private static final long serialVersionUID = 152804488582909L; - - public static ChunkReader reader(final String pathId) { - return new ChunkReader(pathId); - } - - /** - * Converts a JSON String into a Chunk object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Chunk object represented by the provided JSON - */ - public static Chunk fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Chunk.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Chunk object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Chunk object represented by the provided JSON - */ - public static Chunk fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Chunk.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String accountSid; - private final String content; - private final Map metadata; - private final ZonedDateTime dateCreated; - private final ZonedDateTime dateUpdated; - - @JsonCreator - private Chunk( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("content") final String content, - @JsonProperty("metadata") final Map metadata, - @JsonProperty("date_created") final String dateCreated, - @JsonProperty("date_updated") final String dateUpdated - ) { - this.accountSid = accountSid; - this.content = content; - this.metadata = metadata; - this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - } - - public final String getAccountSid() { - return this.accountSid; - } - - public final String getContent() { - return this.content; - } - - public final Map getMetadata() { - return this.metadata; - } - - public final ZonedDateTime getDateCreated() { - return this.dateCreated; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Chunk other = (Chunk) o; - - return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(content, other.content) && - Objects.equals(metadata, other.metadata) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - accountSid, - content, - metadata, - dateCreated, - dateUpdated - ); - } -} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/ChunkReader.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/ChunkReader.java deleted file mode 100644 index bceed7b7f8..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/ChunkReader.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1.knowledge; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class ChunkReader extends Reader { - - private String pathId; - private Integer pageSize; - - public ChunkReader(final String pathId) { - this.pathId = pathId; - } - - public ChunkReader setPageSize(final Integer pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}/Chunks"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.KNOWLEDGE.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "Chunk read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "chunks", - response.getContent(), - Chunk.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.KNOWLEDGE.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.KNOWLEDGE.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java deleted file mode 100644 index ded378b2d8..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatus.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1.knowledge; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.time.ZonedDateTime; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class KnowledgeStatus extends Resource { - - private static final long serialVersionUID = 178959927465400L; - - public static KnowledgeStatusFetcher fetcher(final String pathId) { - return new KnowledgeStatusFetcher(pathId); - } - - /** - * Converts a JSON String into a KnowledgeStatus object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return KnowledgeStatus object represented by the provided JSON - */ - public static KnowledgeStatus fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, KnowledgeStatus.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a KnowledgeStatus object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return KnowledgeStatus object represented by the provided JSON - */ - public static KnowledgeStatus fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, KnowledgeStatus.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String accountSid; - private final String status; - private final String lastStatus; - private final ZonedDateTime dateUpdated; - - @JsonCreator - private KnowledgeStatus( - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("status") final String status, - @JsonProperty("last_status") final String lastStatus, - @JsonProperty("date_updated") final String dateUpdated - ) { - this.accountSid = accountSid; - this.status = status; - this.lastStatus = lastStatus; - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - } - - public final String getAccountSid() { - return this.accountSid; - } - - public final String getStatus() { - return this.status; - } - - public final String getLastStatus() { - return this.lastStatus; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - KnowledgeStatus other = (KnowledgeStatus) o; - - return ( - Objects.equals(accountSid, other.accountSid) && - Objects.equals(status, other.status) && - Objects.equals(lastStatus, other.lastStatus) && - Objects.equals(dateUpdated, other.dateUpdated) - ); - } - - @Override - public int hashCode() { - return Objects.hash(accountSid, status, lastStatus, dateUpdated); - } -} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatusFetcher.java b/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatusFetcher.java deleted file mode 100644 index 93c2e7bfb6..0000000000 --- a/src/main/java/com/twilio/rest/knowledge/v1/knowledge/KnowledgeStatusFetcher.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Knowledge - * 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. - */ - -package com.twilio.rest.knowledge.v1.knowledge; - -import com.twilio.base.Fetcher; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class KnowledgeStatusFetcher extends Fetcher { - - private String pathId; - - public KnowledgeStatusFetcher(final String pathId) { - this.pathId = pathId; - } - - @Override - public KnowledgeStatus fetch(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}/Status"; - - path = path.replace("{" + "id" + "}", this.pathId.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.KNOWLEDGE.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "KnowledgeStatus fetch failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return KnowledgeStatus.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } -} diff --git a/src/main/java/com/twilio/rest/lookups/v2/Bucket.java b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java new file mode 100644 index 0000000000..221da7456a --- /dev/null +++ b/src/main/java/com/twilio/rest/lookups/v2/Bucket.java @@ -0,0 +1,209 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Lookups + * 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. + */ + +package com.twilio.rest.lookups.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Resource; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import java.io.IOException; +import java.io.InputStream; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class Bucket extends Resource { + + private static final long serialVersionUID = 277677635778369L; + + @ToString + public static class RateLimitRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("limit") + @Getter + @Setter + private Integer limit; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("ttl") + @Getter + @Setter + private Integer ttl; + + public RateLimitRequest() {} + + public static RateLimitRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, RateLimitRequest.class); + } + } + + public static BucketDeleter deleter( + final String pathField, + final String pathBucket + ) { + return new BucketDeleter(pathField, pathBucket); + } + + public static BucketFetcher fetcher( + final String pathField, + final String pathBucket + ) { + return new BucketFetcher(pathField, pathBucket); + } + + public static BucketUpdater updater( + final String pathField, + final String pathBucket + ) { + return new BucketUpdater(pathField, pathBucket); + } + + /** + * Converts a JSON String into a Bucket object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return Bucket object represented by the provided JSON + */ + public static Bucket fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Bucket.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a Bucket object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return Bucket object represented by the provided JSON + */ + public static Bucket fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Bucket.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException e) { + throw new ApiException(e.getMessage(), e); + } catch (JsonProcessingException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + private final String field; + private final Integer limit; + private final String bucket; + private final String owner; + private final Integer ttl; + + @JsonCreator + private Bucket( + @JsonProperty("field") final String field, + @JsonProperty("limit") final Integer limit, + @JsonProperty("bucket") final String bucket, + @JsonProperty("owner") final String owner, + @JsonProperty("ttl") final Integer ttl + ) { + this.field = field; + this.limit = limit; + this.bucket = bucket; + this.owner = owner; + this.ttl = ttl; + } + + public final String getField() { + return this.field; + } + + public final Integer getLimit() { + return this.limit; + } + + public final String getBucket() { + return this.bucket; + } + + public final String getOwner() { + return this.owner; + } + + public final Integer getTtl() { + return this.ttl; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Bucket other = (Bucket) o; + + return ( + Objects.equals(field, other.field) && + Objects.equals(limit, other.limit) && + Objects.equals(bucket, other.bucket) && + Objects.equals(owner, other.owner) && + Objects.equals(ttl, other.ttl) + ); + } + + @Override + public int hashCode() { + return Objects.hash(field, limit, bucket, owner, ttl); + } +} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigDeleter.java b/src/main/java/com/twilio/rest/lookups/v2/BucketDeleter.java similarity index 73% rename from src/main/java/com/twilio/rest/microvisor/v1/AccountConfigDeleter.java rename to src/main/java/com/twilio/rest/lookups/v2/BucketDeleter.java index 9529bba7b5..511751bad2 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigDeleter.java +++ b/src/main/java/com/twilio/rest/lookups/v2/BucketDeleter.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1; +package com.twilio.rest.lookups.v2; import com.twilio.base.Deleter; import com.twilio.constant.EnumConstants; @@ -25,23 +25,26 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class AccountConfigDeleter extends Deleter { +public class BucketDeleter extends Deleter { - private String pathKey; + private String pathField; + private String pathBucket; - public AccountConfigDeleter(final String pathKey) { - this.pathKey = pathKey; + public BucketDeleter(final String pathField, final String pathBucket) { + this.pathField = pathField; + this.pathBucket = pathBucket; } @Override public boolean delete(final TwilioRestClient client) { - String path = "/v1/Configs/{Key}"; + String path = "/v2/RateLimits/Fields/{Field}/Bucket/{Bucket}"; - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); + path = path.replace("{" + "Field" + "}", this.pathField.toString()); + path = path.replace("{" + "Bucket" + "}", this.pathBucket.toString()); Request request = new Request( HttpMethod.DELETE, - Domains.MICROVISOR.toString(), + Domains.LOOKUPS.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -49,7 +52,7 @@ public boolean delete(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "AccountConfig delete failed: Unable to connect to server" + "Bucket delete failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( diff --git a/src/main/java/com/twilio/rest/microvisor/v1/DeviceFetcher.java b/src/main/java/com/twilio/rest/lookups/v2/BucketFetcher.java similarity index 69% rename from src/main/java/com/twilio/rest/microvisor/v1/DeviceFetcher.java rename to src/main/java/com/twilio/rest/lookups/v2/BucketFetcher.java index 6192902ea2..c73c369da4 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/DeviceFetcher.java +++ b/src/main/java/com/twilio/rest/lookups/v2/BucketFetcher.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1; +package com.twilio.rest.lookups.v2; import com.twilio.base.Fetcher; import com.twilio.constant.EnumConstants; @@ -25,23 +25,26 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class DeviceFetcher extends Fetcher { +public class BucketFetcher extends Fetcher { - private String pathSid; + private String pathField; + private String pathBucket; - public DeviceFetcher(final String pathSid) { - this.pathSid = pathSid; + public BucketFetcher(final String pathField, final String pathBucket) { + this.pathField = pathField; + this.pathBucket = pathBucket; } @Override - public Device fetch(final TwilioRestClient client) { - String path = "/v1/Devices/{Sid}"; + public Bucket fetch(final TwilioRestClient client) { + String path = "/v2/RateLimits/Fields/{Field}/Bucket/{Bucket}"; - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); + path = path.replace("{" + "Field" + "}", this.pathField.toString()); + path = path.replace("{" + "Bucket" + "}", this.pathBucket.toString()); Request request = new Request( HttpMethod.GET, - Domains.MICROVISOR.toString(), + Domains.LOOKUPS.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -49,7 +52,7 @@ public Device fetch(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "Device fetch failed: Unable to connect to server" + "Bucket fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -65,6 +68,6 @@ public Device fetch(final TwilioRestClient client) { throw new ApiException(restException); } - return Device.fromJson(response.getStream(), client.getObjectMapper()); + return Bucket.fromJson(response.getStream(), client.getObjectMapper()); } } diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigUpdater.java b/src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java similarity index 53% rename from src/main/java/com/twilio/rest/microvisor/v1/AccountConfigUpdater.java rename to src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java index 0c2c55a496..ebb98856f1 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigUpdater.java +++ b/src/main/java/com/twilio/rest/lookups/v2/BucketUpdater.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,8 +12,9 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1; +package com.twilio.rest.lookups.v2; +import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; @@ -25,39 +26,42 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class AccountConfigUpdater extends Updater { +public class BucketUpdater extends Updater { - private String pathKey; - private String value; + private String pathField; + private String pathBucket; + private Bucket.RateLimitRequest rateLimitRequest; - public AccountConfigUpdater(final String pathKey, final String value) { - this.pathKey = pathKey; - this.value = value; + public BucketUpdater(final String pathField, final String pathBucket) { + this.pathField = pathField; + this.pathBucket = pathBucket; } - public AccountConfigUpdater setValue(final String value) { - this.value = value; + public BucketUpdater setRateLimitRequest( + final Bucket.RateLimitRequest rateLimitRequest + ) { + this.rateLimitRequest = rateLimitRequest; return this; } @Override - public AccountConfig update(final TwilioRestClient client) { - String path = "/v1/Configs/{Key}"; + public Bucket update(final TwilioRestClient client) { + String path = "/v2/RateLimits/Fields/{Field}/Bucket/{Bucket}"; - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); + path = path.replace("{" + "Field" + "}", this.pathField.toString()); + path = path.replace("{" + "Bucket" + "}", this.pathBucket.toString()); Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), + HttpMethod.PUT, + Domains.LOOKUPS.toString(), path ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); + request.setContentType(EnumConstants.ContentType.JSON); + addPostParams(request, client); Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "AccountConfig update failed: Unable to connect to server" + "Bucket update failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -73,15 +77,13 @@ public AccountConfig update(final TwilioRestClient client) { throw new ApiException(restException); } - return AccountConfig.fromJson( - response.getStream(), - client.getObjectMapper() - ); + return Bucket.fromJson(response.getStream(), client.getObjectMapper()); } - private void addPostParams(final Request request) { - if (value != null) { - request.addPostParam("Value", value); + private void addPostParams(final Request request, TwilioRestClient client) { + ObjectMapper objectMapper = client.getObjectMapper(); + if (rateLimitRequest != null) { + request.setBody(Bucket.toJson(rateLimitRequest, objectMapper)); } } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java new file mode 100644 index 0000000000..69b4c42558 --- /dev/null +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverride.java @@ -0,0 +1,337 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Lookups + * 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. + */ + +package com.twilio.rest.lookups.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Resource; +import com.twilio.converter.DateConverter; +import com.twilio.converter.Promoter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import java.io.IOException; +import java.io.InputStream; +import java.time.ZonedDateTime; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class LookupOverride extends Resource { + + private static final long serialVersionUID = 147188354779019L; + + @ToString + public static class OverridesRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("line_type") + @Getter + @Setter + private LineTypeEnum lineType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("reason") + @Getter + @Setter + private String reason; + + public OverridesRequest() {} + + public static OverridesRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, OverridesRequest.class); + } + } + + public static LookupOverrideCreator creator( + final String pathField, + final String pathPhoneNumber + ) { + return new LookupOverrideCreator(pathField, pathPhoneNumber); + } + + public static LookupOverrideDeleter deleter( + final String pathField, + final String pathPhoneNumber + ) { + return new LookupOverrideDeleter(pathField, pathPhoneNumber); + } + + public static LookupOverrideFetcher fetcher( + final String pathField, + final String pathPhoneNumber + ) { + return new LookupOverrideFetcher(pathField, pathPhoneNumber); + } + + public static LookupOverrideUpdater updater( + final String pathField, + final String pathPhoneNumber + ) { + return new LookupOverrideUpdater(pathField, pathPhoneNumber); + } + + /** + * Converts a JSON String into a LookupOverride object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return LookupOverride object represented by the provided JSON + */ + public static LookupOverride fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, LookupOverride.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a LookupOverride object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return LookupOverride object represented by the provided JSON + */ + public static LookupOverride fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, LookupOverride.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException e) { + throw new ApiException(e.getMessage(), e); + } catch (JsonProcessingException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + private final String phoneNumber; + private final LookupOverride.OriginalLineTypeEnum originalLineType; + private final LookupOverride.OverriddenLineTypeEnum overriddenLineType; + private final String overrideReason; + private final ZonedDateTime overrideTimestamp; + private final String overriddenByAccountSid; + + @JsonCreator + private LookupOverride( + @JsonProperty("phone_number") final String phoneNumber, + @JsonProperty( + "original_line_type" + ) final LookupOverride.OriginalLineTypeEnum originalLineType, + @JsonProperty( + "overridden_line_type" + ) final LookupOverride.OverriddenLineTypeEnum overriddenLineType, + @JsonProperty("override_reason") final String overrideReason, + @JsonProperty("override_timestamp") final String overrideTimestamp, + @JsonProperty( + "overridden_by_account_sid" + ) final String overriddenByAccountSid + ) { + this.phoneNumber = phoneNumber; + this.originalLineType = originalLineType; + this.overriddenLineType = overriddenLineType; + this.overrideReason = overrideReason; + this.overrideTimestamp = + DateConverter.iso8601DateTimeFromString(overrideTimestamp); + this.overriddenByAccountSid = overriddenByAccountSid; + } + + public final String getPhoneNumber() { + return this.phoneNumber; + } + + public final LookupOverride.OriginalLineTypeEnum getOriginalLineType() { + return this.originalLineType; + } + + public final LookupOverride.OverriddenLineTypeEnum getOverriddenLineType() { + return this.overriddenLineType; + } + + public final String getOverrideReason() { + return this.overrideReason; + } + + public final ZonedDateTime getOverrideTimestamp() { + return this.overrideTimestamp; + } + + public final String getOverriddenByAccountSid() { + return this.overriddenByAccountSid; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + LookupOverride other = (LookupOverride) o; + + return ( + Objects.equals(phoneNumber, other.phoneNumber) && + Objects.equals(originalLineType, other.originalLineType) && + Objects.equals(overriddenLineType, other.overriddenLineType) && + Objects.equals(overrideReason, other.overrideReason) && + Objects.equals(overrideTimestamp, other.overrideTimestamp) && + Objects.equals(overriddenByAccountSid, other.overriddenByAccountSid) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + phoneNumber, + originalLineType, + overriddenLineType, + overrideReason, + overrideTimestamp, + overriddenByAccountSid + ); + } + + public enum OverriddenLineTypeEnum { + MOBILE("mobile"), + LANDLINE("landline"), + TOLLFREE("tollFree"), + FIXEDVOIP("fixedVoip"), + NONFIXEDVOIP("nonFixedVoip"), + PERSONAL("personal"), + PREMIUM("premium"), + VOICEMAIL("voicemail"), + SHAREDCOST("sharedCost"), + UAN("uan"), + PAGER("pager"), + UNKNOWN("unknown"); + + private final String value; + + private OverriddenLineTypeEnum(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static OverriddenLineTypeEnum forValue(final String value) { + return Promoter.enumFromString( + value, + OverriddenLineTypeEnum.values() + ); + } + } + + public enum LineTypeEnum { + MOBILE("mobile"), + LANDLINE("landline"), + TOLLFREE("tollFree"), + FIXEDVOIP("fixedVoip"), + NONFIXEDVOIP("nonFixedVoip"), + PERSONAL("personal"), + PREMIUM("premium"), + VOICEMAIL("voicemail"), + SHAREDCOST("sharedCost"), + UAN("uan"), + PAGER("pager"), + UNKNOWN("unknown"); + + private final String value; + + private LineTypeEnum(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static LineTypeEnum forValue(final String value) { + return Promoter.enumFromString(value, LineTypeEnum.values()); + } + } + + public enum OriginalLineTypeEnum { + MOBILE("mobile"), + LANDLINE("landline"), + TOLLFREE("tollFree"), + FIXEDVOIP("fixedVoip"), + NONFIXEDVOIP("nonFixedVoip"), + PERSONAL("personal"), + PREMIUM("premium"), + VOICEMAIL("voicemail"), + SHAREDCOST("sharedCost"), + UAN("uan"), + PAGER("pager"), + UNKNOWN("unknown"); + + private final String value; + + private OriginalLineTypeEnum(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static OriginalLineTypeEnum forValue(final String value) { + return Promoter.enumFromString( + value, + OriginalLineTypeEnum.values() + ); + } + } +} diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java similarity index 61% rename from src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java rename to src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java index 943ed52437..bdc0dc5304 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeCreator.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Knowledge + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.knowledge.v1; +package com.twilio.rest.lookups.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Creator; @@ -26,38 +26,41 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class KnowledgeCreator extends Creator { +public class LookupOverrideCreator extends Creator { - private Knowledge.KnowledgeV1ServiceCreateKnowledgeRequest knowledgeV1ServiceCreateKnowledgeRequest; + private String pathField; + private String pathPhoneNumber; + private LookupOverride.OverridesRequest overridesRequest; - public KnowledgeCreator( - final Knowledge.KnowledgeV1ServiceCreateKnowledgeRequest knowledgeV1ServiceCreateKnowledgeRequest + public LookupOverrideCreator( + final String pathField, + final String pathPhoneNumber ) { - this.knowledgeV1ServiceCreateKnowledgeRequest = - knowledgeV1ServiceCreateKnowledgeRequest; + this.pathField = pathField; + this.pathPhoneNumber = pathPhoneNumber; } - public KnowledgeCreator setKnowledgeV1ServiceCreateKnowledgeRequest( - final Knowledge.KnowledgeV1ServiceCreateKnowledgeRequest knowledgeV1ServiceCreateKnowledgeRequest + public LookupOverrideCreator setOverridesRequest( + final LookupOverride.OverridesRequest overridesRequest ) { - this.knowledgeV1ServiceCreateKnowledgeRequest = - knowledgeV1ServiceCreateKnowledgeRequest; + this.overridesRequest = overridesRequest; return this; } @Override - public Knowledge create(final TwilioRestClient client) { - String path = "/v1/Knowledge"; + public LookupOverride create(final TwilioRestClient client) { + String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; + path = path.replace("{" + "Field" + "}", this.pathField.toString()); path = path.replace( - "{" + "KnowledgeV1ServiceCreateKnowledgeRequest" + "}", - this.knowledgeV1ServiceCreateKnowledgeRequest.toString() + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() ); Request request = new Request( HttpMethod.POST, - Domains.KNOWLEDGE.toString(), + Domains.LOOKUPS.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -65,7 +68,7 @@ public Knowledge create(final TwilioRestClient client) { Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "Knowledge creation failed: Unable to connect to server" + "LookupOverride creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -81,7 +84,7 @@ public Knowledge create(final TwilioRestClient client) { throw new ApiException(restException); } - return Knowledge.fromJson( + return LookupOverride.fromJson( response.getStream(), client.getObjectMapper() ); @@ -89,12 +92,9 @@ public Knowledge create(final TwilioRestClient client) { private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (knowledgeV1ServiceCreateKnowledgeRequest != null) { + if (overridesRequest != null) { request.setBody( - Knowledge.toJson( - knowledgeV1ServiceCreateKnowledgeRequest, - objectMapper - ) + LookupOverride.toJson(overridesRequest, objectMapper) ); } } diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigDeleter.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java similarity index 71% rename from src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigDeleter.java rename to src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java index e471b64a72..7a13b9fcf0 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigDeleter.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideDeleter.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1.device; +package com.twilio.rest.lookups.v2; import com.twilio.base.Deleter; import com.twilio.constant.EnumConstants; @@ -25,33 +25,33 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class DeviceConfigDeleter extends Deleter { +public class LookupOverrideDeleter extends Deleter { - private String pathDeviceSid; - private String pathKey; + private String pathField; + private String pathPhoneNumber; - public DeviceConfigDeleter( - final String pathDeviceSid, - final String pathKey + public LookupOverrideDeleter( + final String pathField, + final String pathPhoneNumber ) { - this.pathDeviceSid = pathDeviceSid; - this.pathKey = pathKey; + this.pathField = pathField; + this.pathPhoneNumber = pathPhoneNumber; } @Override public boolean delete(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Configs/{Key}"; + String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; + path = path.replace("{" + "Field" + "}", this.pathField.toString()); path = path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() ); - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); Request request = new Request( HttpMethod.DELETE, - Domains.MICROVISOR.toString(), + Domains.LOOKUPS.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -59,7 +59,7 @@ public boolean delete(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "DeviceConfig delete failed: Unable to connect to server" + "LookupOverride delete failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigFetcher.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java similarity index 68% rename from src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigFetcher.java rename to src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java index 3b0d148d4a..f345b4a4e4 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigFetcher.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideFetcher.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1.device; +package com.twilio.rest.lookups.v2; import com.twilio.base.Fetcher; import com.twilio.constant.EnumConstants; @@ -25,33 +25,33 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class DeviceConfigFetcher extends Fetcher { +public class LookupOverrideFetcher extends Fetcher { - private String pathDeviceSid; - private String pathKey; + private String pathField; + private String pathPhoneNumber; - public DeviceConfigFetcher( - final String pathDeviceSid, - final String pathKey + public LookupOverrideFetcher( + final String pathField, + final String pathPhoneNumber ) { - this.pathDeviceSid = pathDeviceSid; - this.pathKey = pathKey; + this.pathField = pathField; + this.pathPhoneNumber = pathPhoneNumber; } @Override - public DeviceConfig fetch(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Configs/{Key}"; + public LookupOverride fetch(final TwilioRestClient client) { + String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; + path = path.replace("{" + "Field" + "}", this.pathField.toString()); path = path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() ); - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); Request request = new Request( HttpMethod.GET, - Domains.MICROVISOR.toString(), + Domains.LOOKUPS.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -59,7 +59,7 @@ public DeviceConfig fetch(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "DeviceConfig fetch failed: Unable to connect to server" + "LookupOverride fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -75,7 +75,7 @@ public DeviceConfig fetch(final TwilioRestClient client) { throw new ApiException(restException); } - return DeviceConfig.fromJson( + return LookupOverride.fromJson( response.getStream(), client.getObjectMapper() ); diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java similarity index 63% rename from src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java rename to src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java index bfa6ca6ee5..5674e6110a 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeUpdater.java +++ b/src/main/java/com/twilio/rest/lookups/v2/LookupOverrideUpdater.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Knowledge + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.knowledge.v1; +package com.twilio.rest.lookups.v2; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Updater; @@ -26,32 +26,41 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class KnowledgeUpdater extends Updater { +public class LookupOverrideUpdater extends Updater { - private String pathId; - private Knowledge.KnowledgeV1ServiceUpdateKnowledgeRequest knowledgeV1ServiceUpdateKnowledgeRequest; + private String pathField; + private String pathPhoneNumber; + private LookupOverride.OverridesRequest overridesRequest; - public KnowledgeUpdater(final String pathId) { - this.pathId = pathId; + public LookupOverrideUpdater( + final String pathField, + final String pathPhoneNumber + ) { + this.pathField = pathField; + this.pathPhoneNumber = pathPhoneNumber; } - public KnowledgeUpdater setKnowledgeV1ServiceUpdateKnowledgeRequest( - final Knowledge.KnowledgeV1ServiceUpdateKnowledgeRequest knowledgeV1ServiceUpdateKnowledgeRequest + public LookupOverrideUpdater setOverridesRequest( + final LookupOverride.OverridesRequest overridesRequest ) { - this.knowledgeV1ServiceUpdateKnowledgeRequest = - knowledgeV1ServiceUpdateKnowledgeRequest; + this.overridesRequest = overridesRequest; return this; } @Override - public Knowledge update(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}"; + public LookupOverride update(final TwilioRestClient client) { + String path = "/v2/PhoneNumbers/{PhoneNumber}/Overrides/{Field}"; - path = path.replace("{" + "id" + "}", this.pathId.toString()); + path = path.replace("{" + "Field" + "}", this.pathField.toString()); + path = + path.replace( + "{" + "PhoneNumber" + "}", + this.pathPhoneNumber.toString() + ); Request request = new Request( HttpMethod.PUT, - Domains.KNOWLEDGE.toString(), + Domains.LOOKUPS.toString(), path ); request.setContentType(EnumConstants.ContentType.JSON); @@ -59,7 +68,7 @@ public Knowledge update(final TwilioRestClient client) { Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "Knowledge update failed: Unable to connect to server" + "LookupOverride update failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -75,7 +84,7 @@ public Knowledge update(final TwilioRestClient client) { throw new ApiException(restException); } - return Knowledge.fromJson( + return LookupOverride.fromJson( response.getStream(), client.getObjectMapper() ); @@ -83,12 +92,9 @@ public Knowledge update(final TwilioRestClient client) { private void addPostParams(final Request request, TwilioRestClient client) { ObjectMapper objectMapper = client.getObjectMapper(); - if (knowledgeV1ServiceUpdateKnowledgeRequest != null) { + if (overridesRequest != null) { request.setBody( - Knowledge.toJson( - knowledgeV1ServiceUpdateKnowledgeRequest, - objectMapper - ) + LookupOverride.toJson(overridesRequest, objectMapper) ); } } diff --git a/src/main/java/com/twilio/rest/lookups/v2/Query.java b/src/main/java/com/twilio/rest/lookups/v2/Query.java new file mode 100644 index 0000000000..14e8748259 --- /dev/null +++ b/src/main/java/com/twilio/rest/lookups/v2/Query.java @@ -0,0 +1,799 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Lookups + * 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. + */ + +package com.twilio.rest.lookups.v2; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Resource; +import com.twilio.converter.Promoter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import java.io.IOException; +import java.io.InputStream; +import java.time.ZonedDateTime; +import java.util.List; +import java.util.Objects; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class Query extends Resource { + + private static final long serialVersionUID = 115616150775512L; + + @ToString + public static class IdentityMatchParameters { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("first_name") + @Getter + @Setter + private String firstName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_name") + @Getter + @Setter + private String lastName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("address_line1") + @Getter + @Setter + private String addressLine1; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("address_line2") + @Getter + @Setter + private String addressLine2; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("city") + @Getter + @Setter + private String city; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("state") + @Getter + @Setter + private String state; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("postal_code") + @Getter + @Setter + private String postalCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("address_country_code") + @Getter + @Setter + private String addressCountryCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("national_id") + @Getter + @Setter + private String nationalId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("date_of_birth") + @Getter + @Setter + private String dateOfBirth; + + public static IdentityMatchParameters fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, IdentityMatchParameters.class); + } + } + + @ToString + public static class ReassignedNumberRequest { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_verified_date") + @Getter + @Setter + private String lastVerifiedDate; + + public static ReassignedNumberRequest fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, ReassignedNumberRequest.class); + } + } + + @ToString + public static class SmsPumpingRiskParameters { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("partner_sub_id") + @Getter + @Setter + private String partnerSubId; + + public static SmsPumpingRiskParameters fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, SmsPumpingRiskParameters.class); + } + } + + @ToString + public static class LookupRequestWithCorId { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("correlation_id") + @Getter + @Setter + private String correlationId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("phone_number") + @Getter + @Setter + private String phoneNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("fields") + @Getter + @Setter + private List fields; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("country_code") + @Getter + @Setter + private String countryCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("identity_match") + @Getter + @Setter + private IdentityMatchParameters identityMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("reassigned_number") + @Getter + @Setter + private ReassignedNumberRequest reassignedNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("sms_pumping_risk") + @Getter + @Setter + private SmsPumpingRiskParameters smsPumpingRisk; + + public static LookupRequestWithCorId fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LookupRequestWithCorId.class); + } + } + + @ToString + public static class LookupRequest1 { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("phone_numbers") + @Getter + @Setter + private List phoneNumbers; + + public LookupRequest1() {} + + public static LookupRequest1 fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LookupRequest1.class); + } + } + + @ToString + public static class CallerName { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("caller_name") + @Getter + @Setter + private String callerName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("caller_type") + @Getter + @Setter + private String callerType; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + public static CallerName fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, CallerName.class); + } + } + + @ToString + public static class LastSimSwap { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_sim_swap_date") + @Getter + @Setter + private ZonedDateTime lastSimSwapDate; + + public String getLastSimSwapDate() { + return lastSimSwapDate.toInstant().toString(); + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("swapped_period") + @Getter + @Setter + private String swappedPeriod; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("swapped_in_period") + @Getter + @Setter + private Boolean swappedInPeriod; + + public static LastSimSwap fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LastSimSwap.class); + } + } + + @ToString + public static class SimSwap { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_sim_swap") + @Getter + @Setter + private LastSimSwap lastSimSwap; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("carrier_name") + @Getter + @Setter + private String carrierName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("mobile_country_code") + @Getter + @Setter + private String mobileCountryCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("mobile_network_code") + @Getter + @Setter + private String mobileNetworkCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + public static SimSwap fromJson(String jsonString, ObjectMapper mapper) + throws IOException { + return mapper.readValue(jsonString, SimSwap.class); + } + } + + @ToString + public static class CallForwarding { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("call_forwarding_enabled") + @Getter + @Setter + private Boolean callForwardingEnabled; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + public static CallForwarding fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, CallForwarding.class); + } + } + + @ToString + public static class LineTypeIntelligence { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("type") + @Getter + @Setter + private String type; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("carrier_name") + @Getter + @Setter + private String carrierName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("mobile_country_code") + @Getter + @Setter + private String mobileCountryCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("mobile_network_code") + @Getter + @Setter + private String mobileNetworkCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + public static LineTypeIntelligence fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LineTypeIntelligence.class); + } + } + + @ToString + public static class LineStatus { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("status") + @Getter + @Setter + private String status; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + public static LineStatus fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LineStatus.class); + } + } + + @ToString + public static class IdentityMatch { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("first_name_match") + @Getter + @Setter + private String firstNameMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_name_match") + @Getter + @Setter + private String lastNameMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("address_line_match") + @Getter + @Setter + private String addressLineMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("city_match") + @Getter + @Setter + private String cityMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("state_match") + @Getter + @Setter + private String stateMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("postal_code_match") + @Getter + @Setter + private String postalCodeMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("country_code_match") + @Getter + @Setter + private String countryCodeMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("national_id_match") + @Getter + @Setter + private String nationalIdMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("date_of_birth_match") + @Getter + @Setter + private String dateOfBirthMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("summary_score") + @Getter + @Setter + private Integer summaryScore; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_message") + @Getter + @Setter + private String errorMessage; + + public static IdentityMatch fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, IdentityMatch.class); + } + } + + @ToString + public static class ReassignedNumberResponse { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("last_verified_date") + @Getter + @Setter + private String lastVerifiedDate; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("is_number_reassigned") + @Getter + @Setter + private String isNumberReassigned; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private String errorCode; + + public static ReassignedNumberResponse fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, ReassignedNumberResponse.class); + } + } + + @ToString + public static class SmsPumpingRisk { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("carrier_risk_category") + @Getter + @Setter + private String carrierRiskCategory; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("number_blocked") + @Getter + @Setter + private Boolean numberBlocked; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("number_blocked_date") + @Getter + @Setter + private ZonedDateTime numberBlockedDate; + + public String getNumberBlockedDate() { + return numberBlockedDate.toInstant().toString(); + } + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("number_blocked_last_3_months") + @Getter + @Setter + private Boolean numberBlockedLast3Months; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("sms_pumping_risk_score") + @Getter + @Setter + private Integer smsPumpingRiskScore; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("error_code") + @Getter + @Setter + private Integer errorCode; + + public static SmsPumpingRisk fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, SmsPumpingRisk.class); + } + } + + @ToString + public static class LookupResponseWithCorId { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("correlation_id") + @Getter + @Setter + private String correlationId; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("twilio_error_code") + @Getter + @Setter + private Integer twilioErrorCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("calling_country_code") + @Getter + @Setter + private String callingCountryCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("country_code") + @Getter + @Setter + private String countryCode; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("phone_number") + @Getter + @Setter + private String phoneNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("national_format") + @Getter + @Setter + private String nationalFormat; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("valid") + @Getter + @Setter + private Boolean valid; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("validation_errors") + @Getter + @Setter + private List validationErrors; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("caller_name") + @Getter + @Setter + private CallerName callerName; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("sim_swap") + @Getter + @Setter + private SimSwap simSwap; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("call_forwarding") + @Getter + @Setter + private CallForwarding callForwarding; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("line_type_intelligence") + @Getter + @Setter + private LineTypeIntelligence lineTypeIntelligence; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("line_status") + @Getter + @Setter + private LineStatus lineStatus; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("identity_match") + @Getter + @Setter + private IdentityMatch identityMatch; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("reassigned_number") + @Getter + @Setter + private ReassignedNumberResponse reassignedNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("sms_pumping_risk") + @Getter + @Setter + private SmsPumpingRisk smsPumpingRisk; + + public static LookupResponseWithCorId fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, LookupResponseWithCorId.class); + } + } + + public static QueryCreator creator() { + return new QueryCreator(); + } + + /** + * Converts a JSON String into a Query object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return Query object represented by the provided JSON + */ + public static Query fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Query.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a Query object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return Query object represented by the provided JSON + */ + public static Query fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Query.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + public static String toJson(Object object, ObjectMapper mapper) { + try { + return mapper.writeValueAsString(object); + } catch (final JsonMappingException e) { + throw new ApiException(e.getMessage(), e); + } catch (JsonProcessingException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + private final List phoneNumbers; + + @JsonCreator + private Query( + @JsonProperty("phone_numbers") final List< + LookupResponseWithCorId + > phoneNumbers + ) { + this.phoneNumbers = phoneNumbers; + } + + public final List getPhoneNumbers() { + return this.phoneNumbers; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Query other = (Query) o; + + return Objects.equals(phoneNumbers, other.phoneNumbers); + } + + @Override + public int hashCode() { + return Objects.hash(phoneNumbers); + } + + public enum FieldsEnum { + CALLER_NAME("caller_name"), + SIM_SWAP("sim_swap"), + CALL_FORWARDING("call_forwarding"), + LINE_TYPE_INTELLIGENCE("line_type_intelligence"), + LINE_STATUS("line_status"), + IDENTITY_MATCH("identity_match"), + REASSIGNED_NUMBER("reassigned_number"), + SMS_PUMPING_RISK("sms_pumping_risk"); + + private final String value; + + private FieldsEnum(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static FieldsEnum forValue(final String value) { + return Promoter.enumFromString(value, FieldsEnum.values()); + } + } +} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretDeleter.java b/src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java similarity index 58% rename from src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretDeleter.java rename to src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java index 992f623f57..e7481c28d8 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretDeleter.java +++ b/src/main/java/com/twilio/rest/lookups/v2/QueryCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,9 +12,10 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1.device; +package com.twilio.rest.lookups.v2; -import com.twilio.base.Deleter; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Creator; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -25,41 +26,34 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class DeviceSecretDeleter extends Deleter { +public class QueryCreator extends Creator { - private String pathDeviceSid; - private String pathKey; + private Query.LookupRequest1 lookupRequest1; - public DeviceSecretDeleter( - final String pathDeviceSid, - final String pathKey + public QueryCreator() {} + + public QueryCreator setLookupRequest1( + final Query.LookupRequest1 lookupRequest1 ) { - this.pathDeviceSid = pathDeviceSid; - this.pathKey = pathKey; + this.lookupRequest1 = lookupRequest1; + return this; } @Override - public boolean delete(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Secrets/{Key}"; - - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); + public Query create(final TwilioRestClient client) { + String path = "/v2/batch/query"; Request request = new Request( - HttpMethod.DELETE, - Domains.MICROVISOR.toString(), + HttpMethod.POST, + Domains.LOOKUPS.toString(), path ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + request.setContentType(EnumConstants.ContentType.JSON); + addPostParams(request, client); Response response = client.request(request); - if (response == null) { throw new ApiConnectionException( - "DeviceSecret delete failed: Unable to connect to server" + "Query creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -74,6 +68,14 @@ public boolean delete(final TwilioRestClient client) { } throw new ApiException(restException); } - return response.getStatusCode() == 204; + + return Query.fromJson(response.getStream(), client.getObjectMapper()); + } + + private void addPostParams(final Request request, TwilioRestClient client) { + ObjectMapper objectMapper = client.getObjectMapper(); + if (lookupRequest1 != null) { + request.setBody(Query.toJson(lookupRequest1, objectMapper)); + } } } diff --git a/src/main/java/com/twilio/rest/microvisor/v1/app/AppManifest.java b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java similarity index 52% rename from src/main/java/com/twilio/rest/microvisor/v1/app/AppManifest.java rename to src/main/java/com/twilio/rest/lookups/v2/RateLimit.java index 9beb04ce48..0551523fd0 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/app/AppManifest.java +++ b/src/main/java/com/twilio/rest/lookups/v2/RateLimit.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,10 +12,11 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1.app; +package com.twilio.rest.lookups.v2; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; @@ -25,35 +26,78 @@ import com.twilio.exception.ApiException; import java.io.IOException; import java.io.InputStream; -import java.net.URI; +import java.util.List; import java.util.Objects; +import lombok.Getter; +import lombok.Setter; import lombok.ToString; import lombok.ToString; @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class AppManifest extends Resource { - - private static final long serialVersionUID = 249809073531699L; +public class RateLimit extends Resource { + + private static final long serialVersionUID = 36869169584327L; + + @ToString + public static class RateLimitResponse { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("field") + @Getter + @Setter + private String field; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("limit") + @Getter + @Setter + private Integer limit; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("bucket") + @Getter + @Setter + private String bucket; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("owner") + @Getter + @Setter + private String owner; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("ttl") + @Getter + @Setter + private Integer ttl; + + public static RateLimitResponse fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, RateLimitResponse.class); + } + } - public static AppManifestFetcher fetcher(final String pathAppSid) { - return new AppManifestFetcher(pathAppSid); + public static RateLimitFetcher fetcher() { + return new RateLimitFetcher(); } /** - * Converts a JSON String into a AppManifest object using the provided ObjectMapper. + * Converts a JSON String into a RateLimit object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return AppManifest object represented by the provided JSON + * @return RateLimit object represented by the provided JSON */ - public static AppManifest fromJson( + public static RateLimit fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, AppManifest.class); + return objectMapper.readValue(json, RateLimit.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -62,20 +106,20 @@ public static AppManifest fromJson( } /** - * Converts a JSON InputStream into a AppManifest object using the provided + * Converts a JSON InputStream into a RateLimit object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return AppManifest object represented by the provided JSON + * @return RateLimit object represented by the provided JSON */ - public static AppManifest fromJson( + public static RateLimit fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue(json, AppManifest.class); + return objectMapper.readValue(json, RateLimit.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -83,38 +127,17 @@ public static AppManifest fromJson( } } - private final String appSid; - private final String hash; - private final String encodedBytes; - private final URI url; + private final List rateLimits; @JsonCreator - private AppManifest( - @JsonProperty("app_sid") final String appSid, - @JsonProperty("hash") final String hash, - @JsonProperty("encoded_bytes") final String encodedBytes, - @JsonProperty("url") final URI url + private RateLimit( + @JsonProperty("rate_limits") final List rateLimits ) { - this.appSid = appSid; - this.hash = hash; - this.encodedBytes = encodedBytes; - this.url = url; - } - - public final String getAppSid() { - return this.appSid; - } - - public final String getHash() { - return this.hash; - } - - public final String getEncodedBytes() { - return this.encodedBytes; + this.rateLimits = rateLimits; } - public final URI getUrl() { - return this.url; + public final List getRateLimits() { + return this.rateLimits; } @Override @@ -127,18 +150,13 @@ public boolean equals(final Object o) { return false; } - AppManifest other = (AppManifest) o; + RateLimit other = (RateLimit) o; - return ( - Objects.equals(appSid, other.appSid) && - Objects.equals(hash, other.hash) && - Objects.equals(encodedBytes, other.encodedBytes) && - Objects.equals(url, other.url) - ); + return Objects.equals(rateLimits, other.rateLimits); } @Override public int hashCode() { - return Objects.hash(appSid, hash, encodedBytes, url); + return Objects.hash(rateLimits); } } diff --git a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeFetcher.java b/src/main/java/com/twilio/rest/lookups/v2/RateLimitFetcher.java similarity index 65% rename from src/main/java/com/twilio/rest/knowledge/v1/KnowledgeFetcher.java rename to src/main/java/com/twilio/rest/lookups/v2/RateLimitFetcher.java index 5e7aea48b0..8d3e241b82 100644 --- a/src/main/java/com/twilio/rest/knowledge/v1/KnowledgeFetcher.java +++ b/src/main/java/com/twilio/rest/lookups/v2/RateLimitFetcher.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Knowledge + * Twilio - Lookups * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,10 +12,11 @@ * Do not edit the class manually. */ -package com.twilio.rest.knowledge.v1; +package com.twilio.rest.lookups.v2; import com.twilio.base.Fetcher; import com.twilio.constant.EnumConstants; +import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; @@ -24,32 +25,39 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; +import java.util.List; -public class KnowledgeFetcher extends Fetcher { +public class RateLimitFetcher extends Fetcher { - private String pathId; + private List fields; - public KnowledgeFetcher(final String pathId) { - this.pathId = pathId; + public RateLimitFetcher() {} + + public RateLimitFetcher setFields(final List fields) { + this.fields = fields; + return this; } - @Override - public Knowledge fetch(final TwilioRestClient client) { - String path = "/v1/Knowledge/{id}"; + public RateLimitFetcher setFields(final String fields) { + return setFields(Promoter.listOfOne(fields)); + } - path = path.replace("{" + "id" + "}", this.pathId.toString()); + @Override + public RateLimit fetch(final TwilioRestClient client) { + String path = "/v2/RateLimits"; Request request = new Request( HttpMethod.GET, - Domains.KNOWLEDGE.toString(), + Domains.LOOKUPS.toString(), path ); + addQueryParams(request); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "Knowledge fetch failed: Unable to connect to server" + "RateLimit fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -65,9 +73,17 @@ public Knowledge fetch(final TwilioRestClient client) { throw new ApiException(restException); } - return Knowledge.fromJson( + return RateLimit.fromJson( response.getStream(), client.getObjectMapper() ); } + + private void addQueryParams(final Request request) { + if (fields != null) { + for (String prop : fields) { + request.addQueryParam("Fields", prop); + } + } + } } diff --git a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java index 0560e1d4ce..457b66eaf8 100644 --- a/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java +++ b/src/main/java/com/twilio/rest/messaging/v2/ChannelsSender.java @@ -23,7 +23,6 @@ import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Resource; -import com.twilio.converter.Converter; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; @@ -41,7 +40,7 @@ @ToString public class ChannelsSender extends Resource { - private static final long serialVersionUID = 42075077215889L; + private static final long serialVersionUID = 140943943425747L; @ToString public static class MessagingV2ChannelsSenderConfiguration { @@ -159,20 +158,34 @@ public static class MessagingV2ChannelsSenderProfile { private String description; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("emails") + @JsonProperty("logo_url") @Getter @Setter - private Object emails; + private String logoUrl; - public String getEmails() { - return Converter.objectToJson(emails); - } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("banner_url") + @Getter + @Setter + private String bannerUrl; @JsonInclude(JsonInclude.Include.NON_EMPTY) - @JsonProperty("logo_url") + @JsonProperty("privacy_url") @Getter @Setter - private String logoUrl; + private String privacyUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("terms_of_service_url") + @Getter + @Setter + private String termsOfServiceUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("accent_color") + @Getter + @Setter + private String accentColor; @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonProperty("vertical") @@ -186,9 +199,17 @@ public String getEmails() { @Setter private Object websites; - public String getWebsites() { - return Converter.objectToJson(websites); - } + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("emails") + @Getter + @Setter + private Object emails; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("phone_numbers") + @Getter + @Setter + private Object phoneNumbers; public static MessagingV2ChannelsSenderProfile fromJson( String jsonString, @@ -228,7 +249,9 @@ public static class MessagingV2ChannelsSenderRequestsCreate { @Setter private MessagingV2ChannelsSenderProfile profile; - public MessagingV2ChannelsSenderRequestsCreate() {} + public MessagingV2ChannelsSenderRequestsCreate(final String senderId) { + this.senderId = senderId; + } public static MessagingV2ChannelsSenderRequestsCreate fromJson( String jsonString, @@ -275,6 +298,182 @@ public static MessagingV2ChannelsSenderRequestsUpdate fromJson( } } + @ToString + public static class MessagingV2ChannelsSenderProfileGenericResponseWebsites { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("website") + @Getter + @Setter + private String website; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("label") + @Getter + @Setter + private String label; + + public static MessagingV2ChannelsSenderProfileGenericResponseWebsites fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + MessagingV2ChannelsSenderProfileGenericResponseWebsites.class + ); + } + } + + @ToString + public static class MessagingV2ChannelsSenderProfileGenericResponseEmails { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("email") + @Getter + @Setter + private String email; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("label") + @Getter + @Setter + private String label; + + public static MessagingV2ChannelsSenderProfileGenericResponseEmails fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + MessagingV2ChannelsSenderProfileGenericResponseEmails.class + ); + } + } + + @ToString + public static class MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("phone_number") + @Getter + @Setter + private String phoneNumber; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("label") + @Getter + @Setter + private String label; + + public static MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers.class + ); + } + } + + @ToString + public static class MessagingV2ChannelsSenderProfileGenericResponse { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("name") + @Getter + @Setter + private String name; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("about") + @Getter + @Setter + private String about; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("address") + @Getter + @Setter + private String address; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("description") + @Getter + @Setter + private String description; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("logo_url") + @Getter + @Setter + private String logoUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("banner_url") + @Getter + @Setter + private String bannerUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("privacy_url") + @Getter + @Setter + private String privacyUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("terms_of_service_url") + @Getter + @Setter + private String termsOfServiceUrl; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("accent_color") + @Getter + @Setter + private String accentColor; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("vertical") + @Getter + @Setter + private String vertical; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("websites") + @Getter + @Setter + private List< + MessagingV2ChannelsSenderProfileGenericResponseWebsites + > websites; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("emails") + @Getter + @Setter + private List< + MessagingV2ChannelsSenderProfileGenericResponseEmails + > emails; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("phone_numbers") + @Getter + @Setter + private List< + MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers + > phoneNumbers; + + public static MessagingV2ChannelsSenderProfileGenericResponse fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + MessagingV2ChannelsSenderProfileGenericResponse.class + ); + } + } + @ToString public static class MessagingV2ChannelsSenderProperties { @@ -333,6 +532,93 @@ public static MessagingV2ChannelsSenderOfflineReasonsItems fromJson( } } + @ToString + public static class MessagingV2RcsCarrier { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("name") + @Getter + @Setter + private String name; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("status") + @Getter + @Setter + private MessagingV2RcsCarrierStatus status; + + public static MessagingV2RcsCarrier fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue(jsonString, MessagingV2RcsCarrier.class); + } + } + + @ToString + public static class MessagingV2RcsComplianceCountryResponse { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("country") + @Getter + @Setter + private String country; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("registration_sid") + @Getter + @Setter + private String registrationSid; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("status") + @Getter + @Setter + private MessagingV2RcsCountryStatus status; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("carriers") + @Getter + @Setter + private List carriers; + + public static MessagingV2RcsComplianceCountryResponse fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + MessagingV2RcsComplianceCountryResponse.class + ); + } + } + + @ToString + public static class MessagingV2RcsComplianceResponse { + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("registration_sid") + @Getter + @Setter + private String registrationSid; + + @JsonInclude(JsonInclude.Include.NON_EMPTY) + @JsonProperty("countries") + @Getter + @Setter + private List countries; + + public static MessagingV2RcsComplianceResponse fromJson( + String jsonString, + ObjectMapper mapper + ) throws IOException { + return mapper.readValue( + jsonString, + MessagingV2RcsComplianceResponse.class + ); + } + } + public static ChannelsSenderCreator creator( final ChannelsSender.MessagingV2ChannelsSenderRequestsCreate messagingV2ChannelsSenderRequestsCreate ) { @@ -417,11 +703,12 @@ public static String toJson(Object object, ObjectMapper mapper) { private final String senderId; private final MessagingV2ChannelsSenderConfiguration configuration; private final MessagingV2ChannelsSenderWebhook webhook; - private final MessagingV2ChannelsSenderProfile profile; + private final MessagingV2ChannelsSenderProfileGenericResponse profile; private final MessagingV2ChannelsSenderProperties properties; private final List< MessagingV2ChannelsSenderOfflineReasonsItems > offlineReasons; + private final MessagingV2RcsComplianceResponse compliance; private final URI url; @JsonCreator @@ -433,13 +720,18 @@ private ChannelsSender( "configuration" ) final MessagingV2ChannelsSenderConfiguration configuration, @JsonProperty("webhook") final MessagingV2ChannelsSenderWebhook webhook, - @JsonProperty("profile") final MessagingV2ChannelsSenderProfile profile, + @JsonProperty( + "profile" + ) final MessagingV2ChannelsSenderProfileGenericResponse profile, @JsonProperty( "properties" ) final MessagingV2ChannelsSenderProperties properties, @JsonProperty("offline_reasons") final List< MessagingV2ChannelsSenderOfflineReasonsItems > offlineReasons, + @JsonProperty( + "compliance" + ) final MessagingV2RcsComplianceResponse compliance, @JsonProperty("url") final URI url ) { this.sid = sid; @@ -450,6 +742,7 @@ private ChannelsSender( this.profile = profile; this.properties = properties; this.offlineReasons = offlineReasons; + this.compliance = compliance; this.url = url; } @@ -473,7 +766,7 @@ public final MessagingV2ChannelsSenderWebhook getWebhook() { return this.webhook; } - public final MessagingV2ChannelsSenderProfile getProfile() { + public final MessagingV2ChannelsSenderProfileGenericResponse getProfile() { return this.profile; } @@ -487,6 +780,10 @@ > getOfflineReasons() { return this.offlineReasons; } + public final MessagingV2RcsComplianceResponse getCompliance() { + return this.compliance; + } + public final URI getUrl() { return this.url; } @@ -512,6 +809,7 @@ public boolean equals(final Object o) { Objects.equals(profile, other.profile) && Objects.equals(properties, other.properties) && Objects.equals(offlineReasons, other.offlineReasons) && + Objects.equals(compliance, other.compliance) && Objects.equals(url, other.url) ); } @@ -527,17 +825,20 @@ public int hashCode() { profile, properties, offlineReasons, + compliance, url ); } - public enum VerificationMethodEnum { - SMS("sms"), - VOICE("voice"); + public enum MessagingV2RcsCountryStatus { + ONLINE("ONLINE"), + OFFLINE("OFFLINE"), + TWILIO_REVIEW("TWILIO_REVIEW"), + PENDING_VERIFICATION("PENDING_VERIFICATION"); private final String value; - private VerificationMethodEnum(final String value) { + private MessagingV2RcsCountryStatus(final String value) { this.value = value; } @@ -546,14 +847,61 @@ public String toString() { } @JsonCreator - public static VerificationMethodEnum forValue(final String value) { + public static MessagingV2RcsCountryStatus forValue(final String value) { return Promoter.enumFromString( value, - VerificationMethodEnum.values() + MessagingV2RcsCountryStatus.values() ); } } + public enum MessagingV2RcsCarrierStatus { + UNKNOWN("UNKNOWN"), + UNLAUNCHED("UNLAUNCHED"), + CARRIER_REVIEW("CARRIER_REVIEW"), + APPROVED("APPROVED"), + REJECTED("REJECTED"), + SUSPENDED("SUSPENDED"); + + private final String value; + + private MessagingV2RcsCarrierStatus(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static MessagingV2RcsCarrierStatus forValue(final String value) { + return Promoter.enumFromString( + value, + MessagingV2RcsCarrierStatus.values() + ); + } + } + + public enum CallbackMethodEnum { + POST("POST"), + PUT("PUT"); + + private final String value; + + private CallbackMethodEnum(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static CallbackMethodEnum forValue(final String value) { + return Promoter.enumFromString(value, CallbackMethodEnum.values()); + } + } + public enum FallbackMethodEnum { POST("POST"), PUT("PUT"); @@ -574,18 +922,13 @@ public static FallbackMethodEnum forValue(final String value) { } } - public enum Status { - CREATING("CREATING"), - ONLINE("ONLINE"), - OFFLINE("OFFLINE"), - PENDING_VERIFICATION("PENDING_VERIFICATION"), - VERIFYING("VERIFYING"), - ONLINE_UPDATING("ONLINE:UPDATING"), - STUBBED("STUBBED"); + public enum VerificationMethodEnum { + SMS("sms"), + VOICE("voice"); private final String value; - private Status(final String value) { + private VerificationMethodEnum(final String value) { this.value = value; } @@ -594,18 +937,27 @@ public String toString() { } @JsonCreator - public static Status forValue(final String value) { - return Promoter.enumFromString(value, Status.values()); + public static VerificationMethodEnum forValue(final String value) { + return Promoter.enumFromString( + value, + VerificationMethodEnum.values() + ); } } - public enum CallbackMethodEnum { - POST("POST"), - PUT("PUT"); + public enum Status { + CREATING("CREATING"), + ONLINE("ONLINE"), + OFFLINE("OFFLINE"), + PENDING_VERIFICATION("PENDING_VERIFICATION"), + VERIFYING("VERIFYING"), + ONLINE_UPDATING("ONLINE:UPDATING"), + TWILIO_REVIEW("TWILIO_REVIEW"), + DRAFT("DRAFT"); private final String value; - private CallbackMethodEnum(final String value) { + private Status(final String value) { this.value = value; } @@ -614,8 +966,8 @@ public String toString() { } @JsonCreator - public static CallbackMethodEnum forValue(final String value) { - return Promoter.enumFromString(value, CallbackMethodEnum.values()); + public static Status forValue(final String value) { + return Promoter.enumFromString(value, Status.values()); } } } diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfig.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountConfig.java deleted file mode 100644 index f51341b9ef..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfig.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class AccountConfig extends Resource { - - private static final long serialVersionUID = 212393375904180L; - - public static AccountConfigCreator creator( - final String key, - final String value - ) { - return new AccountConfigCreator(key, value); - } - - public static AccountConfigDeleter deleter(final String pathKey) { - return new AccountConfigDeleter(pathKey); - } - - public static AccountConfigFetcher fetcher(final String pathKey) { - return new AccountConfigFetcher(pathKey); - } - - public static AccountConfigReader reader() { - return new AccountConfigReader(); - } - - public static AccountConfigUpdater updater( - final String pathKey, - final String value - ) { - return new AccountConfigUpdater(pathKey, value); - } - - /** - * Converts a JSON String into a AccountConfig object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return AccountConfig object represented by the provided JSON - */ - public static AccountConfig fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, AccountConfig.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a AccountConfig object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return AccountConfig object represented by the provided JSON - */ - public static AccountConfig fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, AccountConfig.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String key; - private final ZonedDateTime dateUpdated; - private final String value; - private final URI url; - - @JsonCreator - private AccountConfig( - @JsonProperty("key") final String key, - @JsonProperty("date_updated") final String dateUpdated, - @JsonProperty("value") final String value, - @JsonProperty("url") final URI url - ) { - this.key = key; - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - this.value = value; - this.url = url; - } - - public final String getKey() { - return this.key; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - public final String getValue() { - return this.value; - } - - public final URI getUrl() { - return this.url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AccountConfig other = (AccountConfig) o; - - return ( - Objects.equals(key, other.key) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(value, other.value) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash(key, dateUpdated, value, url); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigCreator.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigCreator.java deleted file mode 100644 index 7070bac8d9..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigCreator.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Creator; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AccountConfigCreator extends Creator { - - private String key; - private String value; - - public AccountConfigCreator(final String key, final String value) { - this.key = key; - this.value = value; - } - - public AccountConfigCreator setKey(final String key) { - this.key = key; - return this; - } - - public AccountConfigCreator setValue(final String value) { - this.value = value; - return this; - } - - @Override - public AccountConfig create(final TwilioRestClient client) { - String path = "/v1/Configs"; - - path = path.replace("{" + "Key" + "}", this.key.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "AccountConfig creation failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return AccountConfig.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (key != null) { - request.addPostParam("Key", key); - } - if (value != null) { - request.addPostParam("Value", value); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigFetcher.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigFetcher.java deleted file mode 100644 index 54949a068e..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigFetcher.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Fetcher; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AccountConfigFetcher extends Fetcher { - - private String pathKey; - - public AccountConfigFetcher(final String pathKey) { - this.pathKey = pathKey; - } - - @Override - public AccountConfig fetch(final TwilioRestClient client) { - String path = "/v1/Configs/{Key}"; - - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "AccountConfig fetch failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return AccountConfig.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigReader.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigReader.java deleted file mode 100644 index 5e68b1b2bd..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountConfigReader.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AccountConfigReader extends Reader { - - private Long pageSize; - - public AccountConfigReader() {} - - public AccountConfigReader setPageSize(final Long pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Configs"; - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "AccountConfig read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "configs", - response.getContent(), - AccountConfig.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecret.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountSecret.java deleted file mode 100644 index 65fab57e56..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecret.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class AccountSecret extends Resource { - - private static final long serialVersionUID = 245444757442788L; - - public static AccountSecretCreator creator( - final String key, - final String value - ) { - return new AccountSecretCreator(key, value); - } - - public static AccountSecretDeleter deleter(final String pathKey) { - return new AccountSecretDeleter(pathKey); - } - - public static AccountSecretFetcher fetcher(final String pathKey) { - return new AccountSecretFetcher(pathKey); - } - - public static AccountSecretReader reader() { - return new AccountSecretReader(); - } - - public static AccountSecretUpdater updater( - final String pathKey, - final String value - ) { - return new AccountSecretUpdater(pathKey, value); - } - - /** - * Converts a JSON String into a AccountSecret object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return AccountSecret object represented by the provided JSON - */ - public static AccountSecret fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, AccountSecret.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a AccountSecret object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return AccountSecret object represented by the provided JSON - */ - public static AccountSecret fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, AccountSecret.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String key; - private final ZonedDateTime dateRotated; - private final URI url; - - @JsonCreator - private AccountSecret( - @JsonProperty("key") final String key, - @JsonProperty("date_rotated") final String dateRotated, - @JsonProperty("url") final URI url - ) { - this.key = key; - this.dateRotated = DateConverter.iso8601DateTimeFromString(dateRotated); - this.url = url; - } - - public final String getKey() { - return this.key; - } - - public final ZonedDateTime getDateRotated() { - return this.dateRotated; - } - - public final URI getUrl() { - return this.url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - AccountSecret other = (AccountSecret) o; - - return ( - Objects.equals(key, other.key) && - Objects.equals(dateRotated, other.dateRotated) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash(key, dateRotated, url); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretCreator.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretCreator.java deleted file mode 100644 index 2652846681..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretCreator.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Creator; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AccountSecretCreator extends Creator { - - private String key; - private String value; - - public AccountSecretCreator(final String key, final String value) { - this.key = key; - this.value = value; - } - - public AccountSecretCreator setKey(final String key) { - this.key = key; - return this; - } - - public AccountSecretCreator setValue(final String value) { - this.value = value; - return this; - } - - @Override - public AccountSecret create(final TwilioRestClient client) { - String path = "/v1/Secrets"; - - path = path.replace("{" + "Key" + "}", this.key.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "AccountSecret creation failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return AccountSecret.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (key != null) { - request.addPostParam("Key", key); - } - if (value != null) { - request.addPostParam("Value", value); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretDeleter.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretDeleter.java deleted file mode 100644 index c427b71904..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretDeleter.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Deleter; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AccountSecretDeleter extends Deleter { - - private String pathKey; - - public AccountSecretDeleter(final String pathKey) { - this.pathKey = pathKey; - } - - @Override - public boolean delete(final TwilioRestClient client) { - String path = "/v1/Secrets/{Key}"; - - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - - Request request = new Request( - HttpMethod.DELETE, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "AccountSecret delete failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response.getStatusCode() == 204; - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretReader.java b/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretReader.java deleted file mode 100644 index eeeccfb5f1..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretReader.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AccountSecretReader extends Reader { - - private Long pageSize; - - public AccountSecretReader() {} - - public AccountSecretReader setPageSize(final Long pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Secrets"; - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "AccountSecret read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "secrets", - response.getContent(), - AccountSecret.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/App.java b/src/main/java/com/twilio/rest/microvisor/v1/App.java deleted file mode 100644 index 23827af572..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/App.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Map; -import java.util.Map; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class App extends Resource { - - private static final long serialVersionUID = 223120562272974L; - - public static AppDeleter deleter(final String pathSid) { - return new AppDeleter(pathSid); - } - - public static AppFetcher fetcher(final String pathSid) { - return new AppFetcher(pathSid); - } - - public static AppReader reader() { - return new AppReader(); - } - - /** - * Converts a JSON String into a App object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return App object represented by the provided JSON - */ - public static App fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, App.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a App object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return App object represented by the provided JSON - */ - public static App fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, App.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String sid; - private final String accountSid; - private final String hash; - private final String uniqueName; - private final ZonedDateTime dateCreated; - private final ZonedDateTime dateUpdated; - private final URI url; - private final Map links; - - @JsonCreator - private App( - @JsonProperty("sid") final String sid, - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("hash") final String hash, - @JsonProperty("unique_name") final String uniqueName, - @JsonProperty("date_created") final String dateCreated, - @JsonProperty("date_updated") final String dateUpdated, - @JsonProperty("url") final URI url, - @JsonProperty("links") final Map links - ) { - this.sid = sid; - this.accountSid = accountSid; - this.hash = hash; - this.uniqueName = uniqueName; - this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - this.url = url; - this.links = links; - } - - public final String getSid() { - return this.sid; - } - - public final String getAccountSid() { - return this.accountSid; - } - - public final String getHash() { - return this.hash; - } - - public final String getUniqueName() { - return this.uniqueName; - } - - public final ZonedDateTime getDateCreated() { - return this.dateCreated; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - public final URI getUrl() { - return this.url; - } - - public final Map getLinks() { - return this.links; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - App other = (App) o; - - return ( - Objects.equals(sid, other.sid) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals(hash, other.hash) && - Objects.equals(uniqueName, other.uniqueName) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(url, other.url) && - Objects.equals(links, other.links) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - sid, - accountSid, - hash, - uniqueName, - dateCreated, - dateUpdated, - url, - links - ); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AppDeleter.java b/src/main/java/com/twilio/rest/microvisor/v1/AppDeleter.java deleted file mode 100644 index ee834cbce9..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AppDeleter.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Deleter; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AppDeleter extends Deleter { - - private String pathSid; - - public AppDeleter(final String pathSid) { - this.pathSid = pathSid; - } - - @Override - public boolean delete(final TwilioRestClient client) { - String path = "/v1/Apps/{Sid}"; - - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - - Request request = new Request( - HttpMethod.DELETE, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "App delete failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response.getStatusCode() == 204; - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AppFetcher.java b/src/main/java/com/twilio/rest/microvisor/v1/AppFetcher.java deleted file mode 100644 index e5f7fb789a..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AppFetcher.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Fetcher; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AppFetcher extends Fetcher { - - private String pathSid; - - public AppFetcher(final String pathSid) { - this.pathSid = pathSid; - } - - @Override - public App fetch(final TwilioRestClient client) { - String path = "/v1/Apps/{Sid}"; - - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "App fetch failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return App.fromJson(response.getStream(), client.getObjectMapper()); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AppReader.java b/src/main/java/com/twilio/rest/microvisor/v1/AppReader.java deleted file mode 100644 index 2c0d0efdf5..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/AppReader.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AppReader extends Reader { - - private Long pageSize; - - public AppReader() {} - - public AppReader setPageSize(final Long pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Apps"; - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "App read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "apps", - response.getContent(), - App.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/Device.java b/src/main/java/com/twilio/rest/microvisor/v1/Device.java deleted file mode 100644 index 6775341645..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/Device.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Map; -import java.util.Map; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class Device extends Resource { - - private static final long serialVersionUID = 266652017538801L; - - public static DeviceFetcher fetcher(final String pathSid) { - return new DeviceFetcher(pathSid); - } - - public static DeviceReader reader() { - return new DeviceReader(); - } - - public static DeviceUpdater updater(final String pathSid) { - return new DeviceUpdater(pathSid); - } - - /** - * Converts a JSON String into a Device object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return Device object represented by the provided JSON - */ - public static Device fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Device.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a Device object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return Device object represented by the provided JSON - */ - public static Device fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, Device.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String sid; - private final String uniqueName; - private final String accountSid; - private final Map app; - private final Map logging; - private final ZonedDateTime dateCreated; - private final ZonedDateTime dateUpdated; - private final URI url; - private final Map links; - - @JsonCreator - private Device( - @JsonProperty("sid") final String sid, - @JsonProperty("unique_name") final String uniqueName, - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("app") final Map app, - @JsonProperty("logging") final Map logging, - @JsonProperty("date_created") final String dateCreated, - @JsonProperty("date_updated") final String dateUpdated, - @JsonProperty("url") final URI url, - @JsonProperty("links") final Map links - ) { - this.sid = sid; - this.uniqueName = uniqueName; - this.accountSid = accountSid; - this.app = app; - this.logging = logging; - this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - this.url = url; - this.links = links; - } - - public final String getSid() { - return this.sid; - } - - public final String getUniqueName() { - return this.uniqueName; - } - - public final String getAccountSid() { - return this.accountSid; - } - - public final Map getApp() { - return this.app; - } - - public final Map getLogging() { - return this.logging; - } - - public final ZonedDateTime getDateCreated() { - return this.dateCreated; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - public final URI getUrl() { - return this.url; - } - - public final Map getLinks() { - return this.links; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - Device other = (Device) o; - - return ( - Objects.equals(sid, other.sid) && - Objects.equals(uniqueName, other.uniqueName) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals(app, other.app) && - Objects.equals(logging, other.logging) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(url, other.url) && - Objects.equals(links, other.links) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - sid, - uniqueName, - accountSid, - app, - logging, - dateCreated, - dateUpdated, - url, - links - ); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/DeviceUpdater.java b/src/main/java/com/twilio/rest/microvisor/v1/DeviceUpdater.java deleted file mode 100644 index 4c451aa3c0..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/DeviceUpdater.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1; - -import com.twilio.base.Updater; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceUpdater extends Updater { - - private String pathSid; - private String uniqueName; - private String targetApp; - private Boolean loggingEnabled; - private Boolean restartApp; - - public DeviceUpdater(final String pathSid) { - this.pathSid = pathSid; - } - - public DeviceUpdater setUniqueName(final String uniqueName) { - this.uniqueName = uniqueName; - return this; - } - - public DeviceUpdater setTargetApp(final String targetApp) { - this.targetApp = targetApp; - return this; - } - - public DeviceUpdater setLoggingEnabled(final Boolean loggingEnabled) { - this.loggingEnabled = loggingEnabled; - return this; - } - - public DeviceUpdater setRestartApp(final Boolean restartApp) { - this.restartApp = restartApp; - return this; - } - - @Override - public Device update(final TwilioRestClient client) { - String path = "/v1/Devices/{Sid}"; - - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "Device update failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Device.fromJson(response.getStream(), client.getObjectMapper()); - } - - private void addPostParams(final Request request) { - if (uniqueName != null) { - request.addPostParam("UniqueName", uniqueName); - } - if (targetApp != null) { - request.addPostParam("TargetApp", targetApp); - } - if (loggingEnabled != null) { - request.addPostParam("LoggingEnabled", loggingEnabled.toString()); - } - if (restartApp != null) { - request.addPostParam("RestartApp", restartApp.toString()); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/app/AppManifestFetcher.java b/src/main/java/com/twilio/rest/microvisor/v1/app/AppManifestFetcher.java deleted file mode 100644 index 296b8d3a0a..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/app/AppManifestFetcher.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.app; - -import com.twilio.base.Fetcher; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class AppManifestFetcher extends Fetcher { - - private String pathAppSid; - - public AppManifestFetcher(final String pathAppSid) { - this.pathAppSid = pathAppSid; - } - - @Override - public AppManifest fetch(final TwilioRestClient client) { - String path = "/v1/Apps/{AppSid}/Manifest"; - - path = path.replace("{" + "AppSid" + "}", this.pathAppSid.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "AppManifest fetch failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return AppManifest.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfig.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfig.java deleted file mode 100644 index 3574a6e773..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfig.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class DeviceConfig extends Resource { - - private static final long serialVersionUID = 4121523224128L; - - public static DeviceConfigCreator creator( - final String pathDeviceSid, - final String key, - final String value - ) { - return new DeviceConfigCreator(pathDeviceSid, key, value); - } - - public static DeviceConfigDeleter deleter( - final String pathDeviceSid, - final String pathKey - ) { - return new DeviceConfigDeleter(pathDeviceSid, pathKey); - } - - public static DeviceConfigFetcher fetcher( - final String pathDeviceSid, - final String pathKey - ) { - return new DeviceConfigFetcher(pathDeviceSid, pathKey); - } - - public static DeviceConfigReader reader(final String pathDeviceSid) { - return new DeviceConfigReader(pathDeviceSid); - } - - public static DeviceConfigUpdater updater( - final String pathDeviceSid, - final String pathKey, - final String value - ) { - return new DeviceConfigUpdater(pathDeviceSid, pathKey, value); - } - - /** - * Converts a JSON String into a DeviceConfig object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return DeviceConfig object represented by the provided JSON - */ - public static DeviceConfig fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, DeviceConfig.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a DeviceConfig object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return DeviceConfig object represented by the provided JSON - */ - public static DeviceConfig fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, DeviceConfig.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String deviceSid; - private final String key; - private final String value; - private final ZonedDateTime dateUpdated; - private final URI url; - - @JsonCreator - private DeviceConfig( - @JsonProperty("device_sid") final String deviceSid, - @JsonProperty("key") final String key, - @JsonProperty("value") final String value, - @JsonProperty("date_updated") final String dateUpdated, - @JsonProperty("url") final URI url - ) { - this.deviceSid = deviceSid; - this.key = key; - this.value = value; - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - this.url = url; - } - - public final String getDeviceSid() { - return this.deviceSid; - } - - public final String getKey() { - return this.key; - } - - public final String getValue() { - return this.value; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - public final URI getUrl() { - return this.url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - DeviceConfig other = (DeviceConfig) o; - - return ( - Objects.equals(deviceSid, other.deviceSid) && - Objects.equals(key, other.key) && - Objects.equals(value, other.value) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash(deviceSid, key, value, dateUpdated, url); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigCreator.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigCreator.java deleted file mode 100644 index badaac3ead..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigCreator.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Creator; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceConfigCreator extends Creator { - - private String pathDeviceSid; - private String key; - private String value; - - public DeviceConfigCreator( - final String pathDeviceSid, - final String key, - final String value - ) { - this.pathDeviceSid = pathDeviceSid; - this.key = key; - this.value = value; - } - - public DeviceConfigCreator setKey(final String key) { - this.key = key; - return this; - } - - public DeviceConfigCreator setValue(final String value) { - this.value = value; - return this; - } - - @Override - public DeviceConfig create(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Configs"; - - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - path = path.replace("{" + "Key" + "}", this.key.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "DeviceConfig creation failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return DeviceConfig.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (key != null) { - request.addPostParam("Key", key); - } - if (value != null) { - request.addPostParam("Value", value); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigReader.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigReader.java deleted file mode 100644 index aa855c227d..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigReader.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceConfigReader extends Reader { - - private String pathDeviceSid; - private Long pageSize; - - public DeviceConfigReader(final String pathDeviceSid) { - this.pathDeviceSid = pathDeviceSid; - } - - public DeviceConfigReader setPageSize(final Long pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Configs"; - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "DeviceConfig read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "configs", - response.getContent(), - DeviceConfig.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigUpdater.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigUpdater.java deleted file mode 100644 index d2f55627e1..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceConfigUpdater.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Updater; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceConfigUpdater extends Updater { - - private String pathDeviceSid; - private String pathKey; - private String value; - - public DeviceConfigUpdater( - final String pathDeviceSid, - final String pathKey, - final String value - ) { - this.pathDeviceSid = pathDeviceSid; - this.pathKey = pathKey; - this.value = value; - } - - public DeviceConfigUpdater setValue(final String value) { - this.value = value; - return this; - } - - @Override - public DeviceConfig update(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Configs/{Key}"; - - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "DeviceConfig update failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return DeviceConfig.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (value != null) { - request.addPostParam("Value", value); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecret.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecret.java deleted file mode 100644 index 36e7e8916a..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecret.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class DeviceSecret extends Resource { - - private static final long serialVersionUID = 4318157927104L; - - public static DeviceSecretCreator creator( - final String pathDeviceSid, - final String key, - final String value - ) { - return new DeviceSecretCreator(pathDeviceSid, key, value); - } - - public static DeviceSecretDeleter deleter( - final String pathDeviceSid, - final String pathKey - ) { - return new DeviceSecretDeleter(pathDeviceSid, pathKey); - } - - public static DeviceSecretFetcher fetcher( - final String pathDeviceSid, - final String pathKey - ) { - return new DeviceSecretFetcher(pathDeviceSid, pathKey); - } - - public static DeviceSecretReader reader(final String pathDeviceSid) { - return new DeviceSecretReader(pathDeviceSid); - } - - public static DeviceSecretUpdater updater( - final String pathDeviceSid, - final String pathKey, - final String value - ) { - return new DeviceSecretUpdater(pathDeviceSid, pathKey, value); - } - - /** - * Converts a JSON String into a DeviceSecret object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return DeviceSecret object represented by the provided JSON - */ - public static DeviceSecret fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, DeviceSecret.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a DeviceSecret object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return DeviceSecret object represented by the provided JSON - */ - public static DeviceSecret fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, DeviceSecret.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String deviceSid; - private final String key; - private final ZonedDateTime dateRotated; - private final URI url; - - @JsonCreator - private DeviceSecret( - @JsonProperty("device_sid") final String deviceSid, - @JsonProperty("key") final String key, - @JsonProperty("date_rotated") final String dateRotated, - @JsonProperty("url") final URI url - ) { - this.deviceSid = deviceSid; - this.key = key; - this.dateRotated = DateConverter.iso8601DateTimeFromString(dateRotated); - this.url = url; - } - - public final String getDeviceSid() { - return this.deviceSid; - } - - public final String getKey() { - return this.key; - } - - public final ZonedDateTime getDateRotated() { - return this.dateRotated; - } - - public final URI getUrl() { - return this.url; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - DeviceSecret other = (DeviceSecret) o; - - return ( - Objects.equals(deviceSid, other.deviceSid) && - Objects.equals(key, other.key) && - Objects.equals(dateRotated, other.dateRotated) && - Objects.equals(url, other.url) - ); - } - - @Override - public int hashCode() { - return Objects.hash(deviceSid, key, dateRotated, url); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretCreator.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretCreator.java deleted file mode 100644 index 33e07b238c..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretCreator.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Creator; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceSecretCreator extends Creator { - - private String pathDeviceSid; - private String key; - private String value; - - public DeviceSecretCreator( - final String pathDeviceSid, - final String key, - final String value - ) { - this.pathDeviceSid = pathDeviceSid; - this.key = key; - this.value = value; - } - - public DeviceSecretCreator setKey(final String key) { - this.key = key; - return this; - } - - public DeviceSecretCreator setValue(final String value) { - this.value = value; - return this; - } - - @Override - public DeviceSecret create(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Secrets"; - - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - path = path.replace("{" + "Key" + "}", this.key.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "DeviceSecret creation failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return DeviceSecret.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (key != null) { - request.addPostParam("Key", key); - } - if (value != null) { - request.addPostParam("Value", value); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretFetcher.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretFetcher.java deleted file mode 100644 index 363d966e83..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretFetcher.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Fetcher; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceSecretFetcher extends Fetcher { - - private String pathDeviceSid; - private String pathKey; - - public DeviceSecretFetcher( - final String pathDeviceSid, - final String pathKey - ) { - this.pathDeviceSid = pathDeviceSid; - this.pathKey = pathKey; - } - - @Override - public DeviceSecret fetch(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Secrets/{Key}"; - - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "DeviceSecret fetch failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return DeviceSecret.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretReader.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretReader.java deleted file mode 100644 index 4eb5e21ae8..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretReader.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceSecretReader extends Reader { - - private String pathDeviceSid; - private Long pageSize; - - public DeviceSecretReader(final String pathDeviceSid) { - this.pathDeviceSid = pathDeviceSid; - } - - public DeviceSecretReader setPageSize(final Long pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Secrets"; - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - - Request request = new Request( - HttpMethod.GET, - Domains.MICROVISOR.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "DeviceSecret read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "secrets", - response.getContent(), - DeviceSecret.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.MICROVISOR.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretUpdater.java b/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretUpdater.java deleted file mode 100644 index ec9105b461..0000000000 --- a/src/main/java/com/twilio/rest/microvisor/v1/device/DeviceSecretUpdater.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Microvisor - * 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. - */ - -package com.twilio.rest.microvisor.v1.device; - -import com.twilio.base.Updater; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class DeviceSecretUpdater extends Updater { - - private String pathDeviceSid; - private String pathKey; - private String value; - - public DeviceSecretUpdater( - final String pathDeviceSid, - final String pathKey, - final String value - ) { - this.pathDeviceSid = pathDeviceSid; - this.pathKey = pathKey; - this.value = value; - } - - public DeviceSecretUpdater setValue(final String value) { - this.value = value; - return this; - } - - @Override - public DeviceSecret update(final TwilioRestClient client) { - String path = "/v1/Devices/{DeviceSid}/Secrets/{Key}"; - - path = - path.replace( - "{" + "DeviceSid" + "}", - this.pathDeviceSid.toString() - ); - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.MICROVISOR.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "DeviceSecret update failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return DeviceSecret.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (value != null) { - request.addPostParam("Value", value); - } - } -} diff --git a/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java b/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java index c1debefd56..249e0f9685 100644 --- a/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java +++ b/src/main/java/com/twilio/rest/notify/v1/service/NotificationCreator.java @@ -29,8 +29,6 @@ import com.twilio.rest.Domains; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class NotificationCreator extends Creator { @@ -41,14 +39,14 @@ public class NotificationCreator extends Creator { private String title; private String sound; private String action; - private Map data; - private Map apn; - private Map gcm; - private Map sms; - private Map facebookMessenger; - private Map fcm; + private Object data; + private Object apn; + private Object gcm; + private Object sms; + private Object facebookMessenger; + private Object fcm; private List segment; - private Map alexa; + private Object alexa; private List toBinding; private String deliveryCallbackUrl; private List identity; @@ -90,34 +88,34 @@ public NotificationCreator setAction(final String action) { return this; } - public NotificationCreator setData(final Map data) { + public NotificationCreator setData(final Object data) { this.data = data; return this; } - public NotificationCreator setApn(final Map apn) { + public NotificationCreator setApn(final Object apn) { this.apn = apn; return this; } - public NotificationCreator setGcm(final Map gcm) { + public NotificationCreator setGcm(final Object gcm) { this.gcm = gcm; return this; } - public NotificationCreator setSms(final Map sms) { + public NotificationCreator setSms(final Object sms) { this.sms = sms; return this; } public NotificationCreator setFacebookMessenger( - final Map facebookMessenger + final Object facebookMessenger ) { this.facebookMessenger = facebookMessenger; return this; } - public NotificationCreator setFcm(final Map fcm) { + public NotificationCreator setFcm(final Object fcm) { this.fcm = fcm; return this; } @@ -131,7 +129,7 @@ public NotificationCreator setSegment(final String segment) { return setSegment(Promoter.listOfOne(segment)); } - public NotificationCreator setAlexa(final Map alexa) { + public NotificationCreator setAlexa(final Object alexa) { this.alexa = alexa; return this; } @@ -232,25 +230,25 @@ private void addPostParams(final Request request) { request.addPostParam("Action", action); } if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (apn != null) { - request.addPostParam("Apn", Converter.mapToJson(apn)); + request.addPostParam("Apn", Converter.objectToJson(apn)); } if (gcm != null) { - request.addPostParam("Gcm", Converter.mapToJson(gcm)); + request.addPostParam("Gcm", Converter.objectToJson(gcm)); } if (sms != null) { - request.addPostParam("Sms", Converter.mapToJson(sms)); + request.addPostParam("Sms", Converter.objectToJson(sms)); } if (facebookMessenger != null) { request.addPostParam( "FacebookMessenger", - Converter.mapToJson(facebookMessenger) + Converter.objectToJson(facebookMessenger) ); } if (fcm != null) { - request.addPostParam("Fcm", Converter.mapToJson(fcm)); + request.addPostParam("Fcm", Converter.objectToJson(fcm)); } if (segment != null) { for (String prop : segment) { @@ -258,7 +256,7 @@ private void addPostParams(final Request request) { } } if (alexa != null) { - request.addPostParam("Alexa", Converter.mapToJson(alexa)); + request.addPostParam("Alexa", Converter.objectToJson(alexa)); } if (toBinding != null) { for (String prop : toBinding) { diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java index e399bb5b31..d3fc89c41a 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortIn.java @@ -41,7 +41,7 @@ @ToString public class PortingPortIn extends Resource { - private static final long serialVersionUID = 79710628855525L; + private static final long serialVersionUID = 109031413524724L; public static PortingPortInCreator creator() { return new PortingPortInCreator(); @@ -124,6 +124,9 @@ public static String toJson(Object object, ObjectMapper mapper) { private final String portInRequestStatus; private final Map losingCarrierInformation; private final List> phoneNumbers; + private final String bundleSid; + private final String portabilityAdvanceCarrier; + private final String autoCancelApprovalNumbers; private final List documents; private final ZonedDateTime dateCreated; @@ -152,6 +155,13 @@ private PortingPortIn( @JsonProperty("phone_numbers") final List< Map > phoneNumbers, + @JsonProperty("bundle_sid") final String bundleSid, + @JsonProperty( + "portability_advance_carrier" + ) final String portabilityAdvanceCarrier, + @JsonProperty( + "auto_cancel_approval_numbers" + ) final String autoCancelApprovalNumbers, @JsonProperty("documents") final List documents, @JsonProperty("date_created") final String dateCreated ) { @@ -166,6 +176,9 @@ private PortingPortIn( this.portInRequestStatus = portInRequestStatus; this.losingCarrierInformation = losingCarrierInformation; this.phoneNumbers = phoneNumbers; + this.bundleSid = bundleSid; + this.portabilityAdvanceCarrier = portabilityAdvanceCarrier; + this.autoCancelApprovalNumbers = autoCancelApprovalNumbers; this.documents = documents; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); } @@ -210,6 +223,18 @@ public final List> getPhoneNumbers() { return this.phoneNumbers; } + public final String getBundleSid() { + return this.bundleSid; + } + + public final String getPortabilityAdvanceCarrier() { + return this.portabilityAdvanceCarrier; + } + + public final String getAutoCancelApprovalNumbers() { + return this.autoCancelApprovalNumbers; + } + public final List getDocuments() { return this.documents; } @@ -250,6 +275,15 @@ public boolean equals(final Object o) { other.losingCarrierInformation ) && Objects.equals(phoneNumbers, other.phoneNumbers) && + Objects.equals(bundleSid, other.bundleSid) && + Objects.equals( + portabilityAdvanceCarrier, + other.portabilityAdvanceCarrier + ) && + Objects.equals( + autoCancelApprovalNumbers, + other.autoCancelApprovalNumbers + ) && Objects.equals(documents, other.documents) && Objects.equals(dateCreated, other.dateCreated) ); @@ -268,6 +302,9 @@ public int hashCode() { portInRequestStatus, losingCarrierInformation, phoneNumbers, + bundleSid, + portabilityAdvanceCarrier, + autoCancelApprovalNumbers, documents, dateCreated ); diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java index eedc6e5dc1..3eec9d2bbe 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/PortingPortabilityFetcher.java @@ -56,7 +56,7 @@ public PortingPortability fetch(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.pathPhoneNumber.encode("utf-8") + this.pathPhoneNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetch.java b/src/main/java/com/twilio/rest/numbers/v1/Webhook.java similarity index 82% rename from src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetch.java rename to src/main/java/com/twilio/rest/numbers/v1/Webhook.java index 53c0f02a23..6e9c6921dd 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetch.java +++ b/src/main/java/com/twilio/rest/numbers/v1/Webhook.java @@ -35,31 +35,28 @@ @JsonIgnoreProperties(ignoreUnknown = true) @ToString -public class PortingWebhookConfigurationFetch extends Resource { +public class Webhook extends Resource { private static final long serialVersionUID = 270526030240961L; - public static PortingWebhookConfigurationFetchFetcher fetcher() { - return new PortingWebhookConfigurationFetchFetcher(); + public static WebhookFetcher fetcher() { + return new WebhookFetcher(); } /** - * Converts a JSON String into a PortingWebhookConfigurationFetch object using the provided ObjectMapper. + * Converts a JSON String into a Webhook object using the provided ObjectMapper. * * @param json Raw JSON String * @param objectMapper Jackson ObjectMapper - * @return PortingWebhookConfigurationFetch object represented by the provided JSON + * @return Webhook object represented by the provided JSON */ - public static PortingWebhookConfigurationFetch fromJson( + public static Webhook fromJson( final String json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue( - json, - PortingWebhookConfigurationFetch.class - ); + return objectMapper.readValue(json, Webhook.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -68,23 +65,20 @@ public static PortingWebhookConfigurationFetch fromJson( } /** - * Converts a JSON InputStream into a PortingWebhookConfigurationFetch object using the provided + * Converts a JSON InputStream into a Webhook object using the provided * ObjectMapper. * * @param json Raw JSON InputStream * @param objectMapper Jackson ObjectMapper - * @return PortingWebhookConfigurationFetch object represented by the provided JSON + * @return Webhook object represented by the provided JSON */ - public static PortingWebhookConfigurationFetch fromJson( + public static Webhook fromJson( final InputStream json, final ObjectMapper objectMapper ) { // Convert all checked exceptions to Runtime try { - return objectMapper.readValue( - json, - PortingWebhookConfigurationFetch.class - ); + return objectMapper.readValue(json, Webhook.class); } catch (final JsonMappingException | JsonParseException e) { throw new ApiException(e.getMessage(), e); } catch (final IOException e) { @@ -100,7 +94,7 @@ public static PortingWebhookConfigurationFetch fromJson( private final ZonedDateTime portOutTargetDateCreated; @JsonCreator - private PortingWebhookConfigurationFetch( + private Webhook( @JsonProperty("url") final URI url, @JsonProperty("port_in_target_url") final URI portInTargetUrl, @JsonProperty("port_out_target_url") final URI portOutTargetUrl, @@ -156,8 +150,7 @@ public boolean equals(final Object o) { return false; } - PortingWebhookConfigurationFetch other = - (PortingWebhookConfigurationFetch) o; + Webhook other = (Webhook) o; return ( Objects.equals(url, other.url) && diff --git a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetchFetcher.java b/src/main/java/com/twilio/rest/numbers/v1/WebhookFetcher.java similarity index 79% rename from src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetchFetcher.java rename to src/main/java/com/twilio/rest/numbers/v1/WebhookFetcher.java index 59d0dc599f..ccffc00624 100644 --- a/src/main/java/com/twilio/rest/numbers/v1/PortingWebhookConfigurationFetchFetcher.java +++ b/src/main/java/com/twilio/rest/numbers/v1/WebhookFetcher.java @@ -25,15 +25,12 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class PortingWebhookConfigurationFetchFetcher - extends Fetcher { +public class WebhookFetcher extends Fetcher { - public PortingWebhookConfigurationFetchFetcher() {} + public WebhookFetcher() {} @Override - public PortingWebhookConfigurationFetch fetch( - final TwilioRestClient client - ) { + public Webhook fetch(final TwilioRestClient client) { String path = "/v1/Porting/Configuration/Webhook"; Request request = new Request( @@ -46,7 +43,7 @@ public PortingWebhookConfigurationFetch fetch( if (response == null) { throw new ApiConnectionException( - "PortingWebhookConfigurationFetch fetch failed: Unable to connect to server" + "Webhook fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -62,9 +59,6 @@ public PortingWebhookConfigurationFetch fetch( throw new ApiException(restException); } - return PortingWebhookConfigurationFetch.fromJson( - response.getStream(), - client.getObjectMapper() - ); + return Webhook.fromJson(response.getStream(), client.getObjectMapper()); } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java index fded505c8a..3e9f6c5dd8 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/AuthorizationDocumentCreator.java @@ -118,7 +118,7 @@ public AuthorizationDocument create(final TwilioRestClient client) { path = path.replace( "{" + "ContactPhoneNumber" + "}", - this.contactPhoneNumber.encode("utf-8") + this.contactPhoneNumber.toString() ); path = path.replace( diff --git a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java index 7de5551daf..1345e5ce8a 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/HostedNumberOrderCreator.java @@ -196,12 +196,12 @@ public HostedNumberOrder create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); path = path.replace( "{" + "ContactPhoneNumber" + "}", - this.contactPhoneNumber.encode("utf-8") + this.contactPhoneNumber.toString() ); path = path.replace("{" + "AddressSid" + "}", this.addressSid.toString()); diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserCreator.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserCreator.java index 52ac79162d..9f301c0623 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class EndUserCreator extends Creator { private String friendlyName; private EndUser.Type type; - private Map attributes; + private Object attributes; public EndUserCreator(final String friendlyName, final EndUser.Type type) { this.friendlyName = friendlyName; @@ -50,7 +48,7 @@ public EndUserCreator setType(final EndUser.Type type) { return this; } - public EndUserCreator setAttributes(final Map attributes) { + public EndUserCreator setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -103,7 +101,10 @@ private void addPostParams(final Request request) { request.addPostParam("Type", type.toString()); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserUpdater.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserUpdater.java index 0abd35a726..189bd34787 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserUpdater.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/EndUserUpdater.java @@ -25,13 +25,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class EndUserUpdater extends Updater { private String pathSid; private String friendlyName; - private Map attributes; + private Object attributes; public EndUserUpdater(final String pathSid) { this.pathSid = pathSid; @@ -42,7 +41,7 @@ public EndUserUpdater setFriendlyName(final String friendlyName) { return this; } - public EndUserUpdater setAttributes(final Map attributes) { + public EndUserUpdater setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -87,7 +86,10 @@ private void addPostParams(final Request request) { request.addPostParam("FriendlyName", friendlyName); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentCreator.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentCreator.java index 61701ee5a0..9c53a94eb5 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentCreator.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class SupportingDocumentCreator extends Creator { private String friendlyName; private String type; - private Map attributes; + private Object attributes; public SupportingDocumentCreator( final String friendlyName, @@ -55,9 +53,7 @@ public SupportingDocumentCreator setType(final String type) { return this; } - public SupportingDocumentCreator setAttributes( - final Map attributes - ) { + public SupportingDocumentCreator setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -113,7 +109,10 @@ private void addPostParams(final Request request) { request.addPostParam("Type", type); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentUpdater.java b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentUpdater.java index 9e8edb947e..4a243f5fc5 100644 --- a/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentUpdater.java +++ b/src/main/java/com/twilio/rest/numbers/v2/regulatorycompliance/SupportingDocumentUpdater.java @@ -25,13 +25,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class SupportingDocumentUpdater extends Updater { private String pathSid; private String friendlyName; - private Map attributes; + private Object attributes; public SupportingDocumentUpdater(final String pathSid) { this.pathSid = pathSid; @@ -44,9 +43,7 @@ public SupportingDocumentUpdater setFriendlyName( return this; } - public SupportingDocumentUpdater setAttributes( - final Map attributes - ) { + public SupportingDocumentUpdater setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -94,7 +91,10 @@ private void addPostParams(final Request request) { request.addPostParam("FriendlyName", friendlyName); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java index 4f48c3128b..927eba9f60 100644 --- a/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java +++ b/src/main/java/com/twilio/rest/preview/hostedNumbers/HostedNumberOrderCreator.java @@ -192,7 +192,7 @@ public HostedNumberOrder create(final TwilioRestClient client) { path = path.replace( "{" + "PhoneNumber" + "}", - this.phoneNumber.encode("utf-8") + this.phoneNumber.toString() ); path = path.replace( diff --git a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnCreator.java b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnCreator.java index 881b0d804c..21254453bc 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnCreator.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class InstalledAddOnCreator extends Creator { private String availableAddOnSid; private Boolean acceptTermsOfService; - private Map configuration; + private Object configuration; private String uniqueName; public InstalledAddOnCreator( @@ -58,9 +56,7 @@ public InstalledAddOnCreator setAcceptTermsOfService( return this; } - public InstalledAddOnCreator setConfiguration( - final Map configuration - ) { + public InstalledAddOnCreator setConfiguration(final Object configuration) { this.configuration = configuration; return this; } @@ -130,7 +126,7 @@ private void addPostParams(final Request request) { if (configuration != null) { request.addPostParam( "Configuration", - Converter.mapToJson(configuration) + Converter.objectToJson(configuration) ); } if (uniqueName != null) { diff --git a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnUpdater.java b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnUpdater.java index 72748e7594..bb4dc1e55b 100644 --- a/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnUpdater.java +++ b/src/main/java/com/twilio/rest/preview/marketplace/InstalledAddOnUpdater.java @@ -25,21 +25,18 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class InstalledAddOnUpdater extends Updater { private String pathSid; - private Map configuration; + private Object configuration; private String uniqueName; public InstalledAddOnUpdater(final String pathSid) { this.pathSid = pathSid; } - public InstalledAddOnUpdater setConfiguration( - final Map configuration - ) { + public InstalledAddOnUpdater setConfiguration(final Object configuration) { this.configuration = configuration; return this; } @@ -91,7 +88,7 @@ private void addPostParams(final Request request) { if (configuration != null) { request.addPostParam( "Configuration", - Converter.mapToJson(configuration) + Converter.objectToJson(configuration) ); } if (uniqueName != null) { diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/Account.java b/src/main/java/com/twilio/rest/previewiam/organizations/Account.java index 388b31fa34..bffd937287 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/Account.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/Account.java @@ -20,7 +20,7 @@ import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.bearertoken.Resource; +import com.twilio.base.Resource; import com.twilio.converter.DateConverter; import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java b/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java index 57dc7b088e..1949891f1d 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/AccountFetcher.java @@ -14,15 +14,15 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Fetcher; +import com.twilio.base.Fetcher; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; +import com.twilio.http.Request; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class AccountFetcher extends Fetcher { @@ -39,7 +39,7 @@ public AccountFetcher( } @Override - public Account fetch(final BearerTokenTwilioRestClient client) { + public Account fetch(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/Accounts/{AccountSid}"; path = @@ -53,7 +53,7 @@ public Account fetch(final BearerTokenTwilioRestClient client) { this.pathAccountSid.toString() ); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, Domains.PREVIEWIAM.toString(), path @@ -66,7 +66,7 @@ public Account fetch(final BearerTokenTwilioRestClient client) { "Account fetch failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java b/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java index 5ad736ac13..7c2a384f3f 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/AccountReader.java @@ -14,17 +14,17 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Page; -import com.twilio.base.bearertoken.Reader; -import com.twilio.base.bearertoken.ResourceSet; +import com.twilio.base.Page; +import com.twilio.base.Reader; +import com.twilio.base.ResourceSet; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; +import com.twilio.http.Request; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class AccountReader extends Reader { @@ -42,11 +42,11 @@ public AccountReader setPageSize(final Integer pageSize) { } @Override - public ResourceSet read(final BearerTokenTwilioRestClient client) { + public ResourceSet read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); } - public Page firstPage(final BearerTokenTwilioRestClient client) { + public Page firstPage(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/Accounts"; path = path.replace( @@ -54,7 +54,7 @@ public Page firstPage(final BearerTokenTwilioRestClient client) { this.pathOrganizationSid.toString() ); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, Domains.PREVIEWIAM.toString(), path @@ -66,8 +66,8 @@ public Page firstPage(final BearerTokenTwilioRestClient client) { } private Page pageForRequest( - final BearerTokenTwilioRestClient client, - final BearerTokenRequest request + final TwilioRestClient client, + final Request request ) { Response response = client.request(request); @@ -76,7 +76,7 @@ private Page pageForRequest( "Account read failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), @@ -102,9 +102,9 @@ private Page pageForRequest( @Override public Page previousPage( final Page page, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl(Domains.PREVIEWIAM.toString()) ); @@ -114,9 +114,9 @@ public Page previousPage( @Override public Page nextPage( final Page page, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, page.getNextPageUrl(Domains.PREVIEWIAM.toString()) ); @@ -126,9 +126,9 @@ public Page nextPage( @Override public Page getPage( final String targetUrl, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, targetUrl ); @@ -136,7 +136,7 @@ public Page getPage( return pageForRequest(client, request); } - private void addQueryParams(final BearerTokenRequest request) { + private void addQueryParams(final Request request) { if (pageSize != null) { request.addQueryParam("PageSize", pageSize.toString()); } diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java index 875068a004..882781fe09 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignment.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.bearertoken.Resource; +import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java index e95e19a4b1..1a22c181ed 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentCreator.java @@ -15,15 +15,15 @@ package com.twilio.rest.previewiam.organizations; import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.bearertoken.Creator; +import com.twilio.base.Creator; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; +import com.twilio.http.Request; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class RoleAssignmentCreator extends Creator { @@ -49,7 +49,7 @@ public RoleAssignmentCreator setPublicApiCreateRoleAssignmentRequest( } @Override - public RoleAssignment create(final BearerTokenTwilioRestClient client) { + public RoleAssignment create(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/RoleAssignments"; path = @@ -63,7 +63,7 @@ public RoleAssignment create(final BearerTokenTwilioRestClient client) { this.publicApiCreateRoleAssignmentRequest.toString() ); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.POST, Domains.PREVIEWIAM.toString(), path @@ -76,7 +76,7 @@ public RoleAssignment create(final BearerTokenTwilioRestClient client) { "RoleAssignment creation failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), @@ -98,8 +98,8 @@ public RoleAssignment create(final BearerTokenTwilioRestClient client) { } private void addPostParams( - final BearerTokenRequest request, - BearerTokenTwilioRestClient client + final Request request, + TwilioRestClient client ) { ObjectMapper objectMapper = client.getObjectMapper(); if (publicApiCreateRoleAssignmentRequest != null) { diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java index 43cc107708..514bacadf6 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentDeleter.java @@ -14,15 +14,15 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Deleter; +import com.twilio.base.Deleter; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.Request; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class RoleAssignmentDeleter extends Deleter { @@ -39,7 +39,7 @@ public RoleAssignmentDeleter( } @Override - public boolean delete(final BearerTokenTwilioRestClient client) { + public boolean delete(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/RoleAssignments/{RoleAssignmentSid}"; @@ -54,7 +54,7 @@ public boolean delete(final BearerTokenTwilioRestClient client) { this.pathRoleAssignmentSid.toString() ); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.DELETE, Domains.PREVIEWIAM.toString(), path @@ -67,7 +67,7 @@ public boolean delete(final BearerTokenTwilioRestClient client) { "RoleAssignment delete failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java index 05bb8e8b81..e10fca0991 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/RoleAssignmentReader.java @@ -14,17 +14,17 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Page; -import com.twilio.base.bearertoken.Reader; -import com.twilio.base.bearertoken.ResourceSet; +import com.twilio.base.Page; +import com.twilio.base.Reader; +import com.twilio.base.ResourceSet; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.Request; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class RoleAssignmentReader extends Reader { @@ -55,13 +55,13 @@ public RoleAssignmentReader setScope(final String scope) { @Override public ResourceSet read( - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { return new ResourceSet<>(this, client, firstPage(client)); } public Page firstPage( - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { String path = "/Organizations/{OrganizationSid}/RoleAssignments"; path = @@ -70,7 +70,7 @@ public Page firstPage( this.pathOrganizationSid.toString() ); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, Domains.PREVIEWIAM.toString(), path @@ -82,8 +82,8 @@ public Page firstPage( } private Page pageForRequest( - final BearerTokenTwilioRestClient client, - final BearerTokenRequest request + final TwilioRestClient client, + final Request request ) { Response response = client.request(request); @@ -92,7 +92,7 @@ private Page pageForRequest( "RoleAssignment read failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), @@ -118,9 +118,9 @@ private Page pageForRequest( @Override public Page previousPage( final Page page, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl(Domains.PREVIEWIAM.toString()) ); @@ -130,9 +130,9 @@ public Page previousPage( @Override public Page nextPage( final Page page, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, page.getNextPageUrl(Domains.PREVIEWIAM.toString()) ); @@ -142,9 +142,9 @@ public Page nextPage( @Override public Page getPage( final String targetUrl, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, targetUrl ); @@ -152,7 +152,7 @@ public Page getPage( return pageForRequest(client, request); } - private void addQueryParams(final BearerTokenRequest request) { + private void addQueryParams(final Request request) { if (pageSize != null) { request.addQueryParam("PageSize", pageSize.toString()); } diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/User.java b/src/main/java/com/twilio/rest/previewiam/organizations/User.java index 2e3a501701..94359dbbbf 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/User.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/User.java @@ -22,7 +22,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.bearertoken.Resource; +import com.twilio.base.Resource; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java index 92d390ed29..e768088a50 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserCreator.java @@ -15,15 +15,15 @@ package com.twilio.rest.previewiam.organizations; import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.bearertoken.Creator; +import com.twilio.base.Creator; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.TwilioRestClient; +import com.twilio.http.Request; import com.twilio.rest.Domains; public class UserCreator extends Creator { @@ -45,7 +45,7 @@ public UserCreator setScimUser(final User.ScimUser scimUser) { } @Override - public User create(final BearerTokenTwilioRestClient client) { + public User create(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users"; path = @@ -55,7 +55,7 @@ public User create(final BearerTokenTwilioRestClient client) { ); path = path.replace("{" + "ScimUser" + "}", this.scimUser.toString()); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.POST, Domains.PREVIEWIAM.toString(), path @@ -68,7 +68,7 @@ public User create(final BearerTokenTwilioRestClient client) { "User creation failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), @@ -87,8 +87,8 @@ public User create(final BearerTokenTwilioRestClient client) { } private void addPostParams( - final BearerTokenRequest request, - BearerTokenTwilioRestClient client + final Request request, + TwilioRestClient client ) { ObjectMapper objectMapper = client.getObjectMapper(); if (scimUser != null) { diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java index 6f44db1c69..dcb8c56787 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserDeleter.java @@ -14,15 +14,15 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Deleter; +import com.twilio.base.Deleter; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.Request; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class UserDeleter extends Deleter { @@ -39,7 +39,7 @@ public UserDeleter( } @Override - public boolean delete(final BearerTokenTwilioRestClient client) { + public boolean delete(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; path = @@ -49,7 +49,7 @@ public boolean delete(final BearerTokenTwilioRestClient client) { ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.DELETE, Domains.PREVIEWIAM.toString(), path @@ -62,7 +62,7 @@ public boolean delete(final BearerTokenTwilioRestClient client) { "User delete failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java index 3abc3e86eb..0270ac88dc 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserFetcher.java @@ -14,15 +14,15 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Fetcher; +import com.twilio.base.Fetcher; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.Request; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class UserFetcher extends Fetcher { @@ -39,7 +39,7 @@ public UserFetcher( } @Override - public User fetch(final BearerTokenTwilioRestClient client) { + public User fetch(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; path = @@ -49,7 +49,7 @@ public User fetch(final BearerTokenTwilioRestClient client) { ); path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, Domains.PREVIEWIAM.toString(), path @@ -62,7 +62,7 @@ public User fetch(final BearerTokenTwilioRestClient client) { "User fetch failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java index 2ebdb45da6..c6bb6a57eb 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserReader.java @@ -14,17 +14,17 @@ package com.twilio.rest.previewiam.organizations; -import com.twilio.base.bearertoken.Page; -import com.twilio.base.bearertoken.Reader; -import com.twilio.base.bearertoken.ResourceSet; +import com.twilio.base.Page; +import com.twilio.base.Reader; +import com.twilio.base.ResourceSet; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.Request; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class UserReader extends Reader { @@ -42,11 +42,11 @@ public UserReader setFilter(final String filter) { } @Override - public ResourceSet read(final BearerTokenTwilioRestClient client) { + public ResourceSet read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); } - public Page firstPage(final BearerTokenTwilioRestClient client) { + public Page firstPage(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users"; path = path.replace( @@ -54,7 +54,7 @@ public Page firstPage(final BearerTokenTwilioRestClient client) { this.pathOrganizationSid.toString() ); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, Domains.PREVIEWIAM.toString(), path @@ -66,8 +66,8 @@ public Page firstPage(final BearerTokenTwilioRestClient client) { } private Page pageForRequest( - final BearerTokenTwilioRestClient client, - final BearerTokenRequest request + final TwilioRestClient client, + final Request request ) { Response response = client.request(request); @@ -76,7 +76,7 @@ private Page pageForRequest( "User read failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), @@ -102,9 +102,9 @@ private Page pageForRequest( @Override public Page previousPage( final Page page, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, page.getPreviousPageUrl(Domains.PREVIEWIAM.toString()) ); @@ -114,9 +114,9 @@ public Page previousPage( @Override public Page nextPage( final Page page, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, page.getNextPageUrl(Domains.PREVIEWIAM.toString()) ); @@ -126,9 +126,9 @@ public Page nextPage( @Override public Page getPage( final String targetUrl, - final BearerTokenTwilioRestClient client + final TwilioRestClient client ) { - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.GET, targetUrl ); @@ -136,7 +136,7 @@ public Page getPage( return pageForRequest(client, request); } - private void addQueryParams(final BearerTokenRequest request) { + private void addQueryParams(final Request request) { if (filter != null) { request.addQueryParam("filter", filter); } diff --git a/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java b/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java index b68b8557f0..9b3c2a0d4b 100644 --- a/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java +++ b/src/main/java/com/twilio/rest/previewiam/organizations/UserUpdater.java @@ -15,15 +15,15 @@ package com.twilio.rest.previewiam.organizations; import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.bearertoken.Updater; +import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; import com.twilio.http.HttpMethod; import com.twilio.http.Response; -import com.twilio.http.bearertoken.BearerTokenRequest; -import com.twilio.http.bearertoken.BearerTokenTwilioRestClient; +import com.twilio.http.Request; +import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; public class UserUpdater extends Updater { @@ -54,7 +54,7 @@ public UserUpdater setIfMatch(final String ifMatch) { } @Override - public User update(final BearerTokenTwilioRestClient client) { + public User update(final TwilioRestClient client) { String path = "/Organizations/{OrganizationSid}/scim/Users/{UserSid}"; path = @@ -65,7 +65,7 @@ public User update(final BearerTokenTwilioRestClient client) { path = path.replace("{" + "UserSid" + "}", this.pathUserSid.toString()); path = path.replace("{" + "ScimUser" + "}", this.scimUser.toString()); - BearerTokenRequest request = new BearerTokenRequest( + Request request = new Request( HttpMethod.PUT, Domains.PREVIEWIAM.toString(), path @@ -79,7 +79,7 @@ public User update(final BearerTokenTwilioRestClient client) { "User update failed: Unable to connect to server" ); } else if ( - !BearerTokenTwilioRestClient.SUCCESS.test(response.getStatusCode()) + !TwilioRestClient.SUCCESS.test(response.getStatusCode()) ) { RestException restException = RestException.fromJson( response.getStream(), @@ -98,8 +98,8 @@ public User update(final BearerTokenTwilioRestClient client) { } private void addPostParams( - final BearerTokenRequest request, - BearerTokenTwilioRestClient client + final Request request, + TwilioRestClient client ) { ObjectMapper objectMapper = client.getObjectMapper(); if (scimUser != null) { @@ -107,7 +107,7 @@ private void addPostParams( } } - private void addHeaderParams(final BearerTokenRequest request) { + private void addHeaderParams(final Request request) { if (ifMatch != null) { request.addHeaderParam("If-Match", ifMatch); } diff --git a/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java index 4b3b9a50fd..ff3d62d4e3 100644 --- a/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v1/voice/NumberFetcher.java @@ -37,8 +37,7 @@ public NumberFetcher(final com.twilio.type.PhoneNumber pathNumber) { public Number fetch(final TwilioRestClient client) { String path = "/v1/Voice/Numbers/{Number}"; - path = - path.replace("{" + "Number" + "}", this.pathNumber.encode("utf-8")); + path = path.replace("{" + "Number" + "}", this.pathNumber.toString()); Request request = new Request( HttpMethod.GET, diff --git a/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java index b433b097a0..e41c589818 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/NumberFetcher.java @@ -57,7 +57,7 @@ public Number fetch(final TwilioRestClient client) { path = path.replace( "{" + "DestinationNumber" + "}", - this.pathDestinationNumber.encode("utf-8") + this.pathDestinationNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java b/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java index a0285c5f44..806d653a7b 100644 --- a/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java +++ b/src/main/java/com/twilio/rest/pricing/v2/voice/NumberFetcher.java @@ -57,7 +57,7 @@ public Number fetch(final TwilioRestClient client) { path = path.replace( "{" + "DestinationNumber" + "}", - this.pathDestinationNumber.encode("utf-8") + this.pathDestinationNumber.toString() ); Request request = new Request( diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java b/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java index 988ff069e6..db40a233aa 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java +++ b/src/main/java/com/twilio/rest/proxy/v1/service/SessionCreator.java @@ -30,8 +30,6 @@ import java.time.ZonedDateTime; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class SessionCreator extends Creator { @@ -41,7 +39,7 @@ public class SessionCreator extends Creator { private Integer ttl; private Session.Mode mode; private Session.Status status; - private List> participants; + private List participants; public SessionCreator(final String pathServiceSid) { this.pathServiceSid = pathServiceSid; @@ -72,16 +70,12 @@ public SessionCreator setStatus(final Session.Status status) { return this; } - public SessionCreator setParticipants( - final List> participants - ) { + public SessionCreator setParticipants(final List participants) { this.participants = participants; return this; } - public SessionCreator setParticipants( - final Map participants - ) { + public SessionCreator setParticipants(final Object participants) { return setParticipants(Promoter.listOfOne(participants)); } @@ -144,8 +138,11 @@ private void addPostParams(final Request request) { request.addPostParam("Status", status.toString()); } if (participants != null) { - for (Map prop : participants) { - request.addPostParam("Participants", Converter.mapToJson(prop)); + for (Object prop : participants) { + request.addPostParam( + "Participants", + Converter.objectToJson(prop) + ); } } } diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCode.java b/src/main/java/com/twilio/rest/proxy/v1/service/ShortCode.java deleted file mode 100644 index f329ccddf9..0000000000 --- a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCode.java +++ /dev/null @@ -1,236 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Proxy - * 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. - */ - -package com.twilio.rest.proxy.v1.service; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.twilio.base.Resource; -import com.twilio.converter.DateConverter; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.type.PhoneNumberCapabilities; -import java.io.IOException; -import java.io.InputStream; -import java.net.URI; -import java.time.ZonedDateTime; -import java.util.Objects; -import lombok.ToString; -import lombok.ToString; - -@JsonIgnoreProperties(ignoreUnknown = true) -@ToString -public class ShortCode extends Resource { - - private static final long serialVersionUID = 222849980654127L; - - public static ShortCodeCreator creator( - final String pathServiceSid, - final String sid - ) { - return new ShortCodeCreator(pathServiceSid, sid); - } - - public static ShortCodeDeleter deleter( - final String pathServiceSid, - final String pathSid - ) { - return new ShortCodeDeleter(pathServiceSid, pathSid); - } - - public static ShortCodeFetcher fetcher( - final String pathServiceSid, - final String pathSid - ) { - return new ShortCodeFetcher(pathServiceSid, pathSid); - } - - public static ShortCodeReader reader(final String pathServiceSid) { - return new ShortCodeReader(pathServiceSid); - } - - public static ShortCodeUpdater updater( - final String pathServiceSid, - final String pathSid - ) { - return new ShortCodeUpdater(pathServiceSid, pathSid); - } - - /** - * Converts a JSON String into a ShortCode object using the provided ObjectMapper. - * - * @param json Raw JSON String - * @param objectMapper Jackson ObjectMapper - * @return ShortCode object represented by the provided JSON - */ - public static ShortCode fromJson( - final String json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, ShortCode.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - /** - * Converts a JSON InputStream into a ShortCode object using the provided - * ObjectMapper. - * - * @param json Raw JSON InputStream - * @param objectMapper Jackson ObjectMapper - * @return ShortCode object represented by the provided JSON - */ - public static ShortCode fromJson( - final InputStream json, - final ObjectMapper objectMapper - ) { - // Convert all checked exceptions to Runtime - try { - return objectMapper.readValue(json, ShortCode.class); - } catch (final JsonMappingException | JsonParseException e) { - throw new ApiException(e.getMessage(), e); - } catch (final IOException e) { - throw new ApiConnectionException(e.getMessage(), e); - } - } - - private final String sid; - private final String accountSid; - private final String serviceSid; - private final ZonedDateTime dateCreated; - private final ZonedDateTime dateUpdated; - private final String shortCode; - private final String isoCountry; - private final PhoneNumberCapabilities capabilities; - private final URI url; - private final Boolean isReserved; - - @JsonCreator - private ShortCode( - @JsonProperty("sid") final String sid, - @JsonProperty("account_sid") final String accountSid, - @JsonProperty("service_sid") final String serviceSid, - @JsonProperty("date_created") final String dateCreated, - @JsonProperty("date_updated") final String dateUpdated, - @JsonProperty("short_code") final String shortCode, - @JsonProperty("iso_country") final String isoCountry, - @JsonProperty( - "capabilities" - ) final PhoneNumberCapabilities capabilities, - @JsonProperty("url") final URI url, - @JsonProperty("is_reserved") final Boolean isReserved - ) { - this.sid = sid; - this.accountSid = accountSid; - this.serviceSid = serviceSid; - this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); - this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); - this.shortCode = shortCode; - this.isoCountry = isoCountry; - this.capabilities = capabilities; - this.url = url; - this.isReserved = isReserved; - } - - public final String getSid() { - return this.sid; - } - - public final String getAccountSid() { - return this.accountSid; - } - - public final String getServiceSid() { - return this.serviceSid; - } - - public final ZonedDateTime getDateCreated() { - return this.dateCreated; - } - - public final ZonedDateTime getDateUpdated() { - return this.dateUpdated; - } - - public final String getShortCode() { - return this.shortCode; - } - - public final String getIsoCountry() { - return this.isoCountry; - } - - public final PhoneNumberCapabilities getCapabilities() { - return this.capabilities; - } - - public final URI getUrl() { - return this.url; - } - - public final Boolean getIsReserved() { - return this.isReserved; - } - - @Override - public boolean equals(final Object o) { - if (this == o) { - return true; - } - - if (o == null || getClass() != o.getClass()) { - return false; - } - - ShortCode other = (ShortCode) o; - - return ( - Objects.equals(sid, other.sid) && - Objects.equals(accountSid, other.accountSid) && - Objects.equals(serviceSid, other.serviceSid) && - Objects.equals(dateCreated, other.dateCreated) && - Objects.equals(dateUpdated, other.dateUpdated) && - Objects.equals(shortCode, other.shortCode) && - Objects.equals(isoCountry, other.isoCountry) && - Objects.equals(capabilities, other.capabilities) && - Objects.equals(url, other.url) && - Objects.equals(isReserved, other.isReserved) - ); - } - - @Override - public int hashCode() { - return Objects.hash( - sid, - accountSid, - serviceSid, - dateCreated, - dateUpdated, - shortCode, - isoCountry, - capabilities, - url, - isReserved - ); - } -} diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeDeleter.java b/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeDeleter.java deleted file mode 100644 index 488b8600c0..0000000000 --- a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeDeleter.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Proxy - * 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. - */ - -package com.twilio.rest.proxy.v1.service; - -import com.twilio.base.Deleter; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class ShortCodeDeleter extends Deleter { - - private String pathServiceSid; - private String pathSid; - - public ShortCodeDeleter(final String pathServiceSid, final String pathSid) { - this.pathServiceSid = pathServiceSid; - this.pathSid = pathSid; - } - - @Override - public boolean delete(final TwilioRestClient client) { - String path = "/v1/Services/{ServiceSid}/ShortCodes/{Sid}"; - - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - - Request request = new Request( - HttpMethod.DELETE, - Domains.PROXY.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "ShortCode delete failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - return response.getStatusCode() == 204; - } -} diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeFetcher.java b/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeFetcher.java deleted file mode 100644 index deeb66ca54..0000000000 --- a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeFetcher.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Proxy - * 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. - */ - -package com.twilio.rest.proxy.v1.service; - -import com.twilio.base.Fetcher; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class ShortCodeFetcher extends Fetcher { - - private String pathServiceSid; - private String pathSid; - - public ShortCodeFetcher(final String pathServiceSid, final String pathSid) { - this.pathServiceSid = pathServiceSid; - this.pathSid = pathSid; - } - - @Override - public ShortCode fetch(final TwilioRestClient client) { - String path = "/v1/Services/{ServiceSid}/ShortCodes/{Sid}"; - - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - - Request request = new Request( - HttpMethod.GET, - Domains.PROXY.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "ShortCode fetch failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return ShortCode.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } -} diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeReader.java b/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeReader.java deleted file mode 100644 index 1a88f3707d..0000000000 --- a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeReader.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Proxy - * 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. - */ - -package com.twilio.rest.proxy.v1.service; - -import com.twilio.base.Page; -import com.twilio.base.Reader; -import com.twilio.base.ResourceSet; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class ShortCodeReader extends Reader { - - private String pathServiceSid; - private Long pageSize; - - public ShortCodeReader(final String pathServiceSid) { - this.pathServiceSid = pathServiceSid; - } - - public ShortCodeReader setPageSize(final Long pageSize) { - this.pageSize = pageSize; - return this; - } - - @Override - public ResourceSet read(final TwilioRestClient client) { - return new ResourceSet<>(this, client, firstPage(client)); - } - - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Services/{ServiceSid}/ShortCodes"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - - Request request = new Request( - HttpMethod.GET, - Domains.PROXY.toString(), - path - ); - - addQueryParams(request); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - return pageForRequest(client, request); - } - - private Page pageForRequest( - final TwilioRestClient client, - final Request request - ) { - Response response = client.request(request); - - if (response == null) { - throw new ApiConnectionException( - "ShortCode read failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return Page.fromJson( - "short_codes", - response.getContent(), - ShortCode.class, - client.getObjectMapper() - ); - } - - @Override - public Page previousPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getPreviousPageUrl(Domains.PROXY.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page nextPage( - final Page page, - final TwilioRestClient client - ) { - Request request = new Request( - HttpMethod.GET, - page.getNextPageUrl(Domains.PROXY.toString()) - ); - return pageForRequest(client, request); - } - - @Override - public Page getPage( - final String targetUrl, - final TwilioRestClient client - ) { - Request request = new Request(HttpMethod.GET, targetUrl); - - return pageForRequest(client, request); - } - - private void addQueryParams(final Request request) { - if (pageSize != null) { - request.addQueryParam("PageSize", pageSize.toString()); - } - - if (getPageSize() != null) { - request.addQueryParam("PageSize", Integer.toString(getPageSize())); - } - } -} diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeUpdater.java b/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeUpdater.java deleted file mode 100644 index 6672e14a7e..0000000000 --- a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeUpdater.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * This code was generated by - * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ - * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ - * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ - * - * Twilio - Proxy - * 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. - */ - -package com.twilio.rest.proxy.v1.service; - -import com.twilio.base.Updater; -import com.twilio.constant.EnumConstants; -import com.twilio.exception.ApiConnectionException; -import com.twilio.exception.ApiException; -import com.twilio.exception.RestException; -import com.twilio.http.HttpMethod; -import com.twilio.http.Request; -import com.twilio.http.Response; -import com.twilio.http.TwilioRestClient; -import com.twilio.rest.Domains; - -public class ShortCodeUpdater extends Updater { - - private String pathServiceSid; - private String pathSid; - private Boolean isReserved; - - public ShortCodeUpdater(final String pathServiceSid, final String pathSid) { - this.pathServiceSid = pathServiceSid; - this.pathSid = pathSid; - } - - public ShortCodeUpdater setIsReserved(final Boolean isReserved) { - this.isReserved = isReserved; - return this; - } - - @Override - public ShortCode update(final TwilioRestClient client) { - String path = "/v1/Services/{ServiceSid}/ShortCodes/{Sid}"; - - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.pathSid.toString()); - - Request request = new Request( - HttpMethod.POST, - Domains.PROXY.toString(), - path - ); - request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); - addPostParams(request); - Response response = client.request(request); - if (response == null) { - throw new ApiConnectionException( - "ShortCode update failed: Unable to connect to server" - ); - } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { - RestException restException = RestException.fromJson( - response.getStream(), - client.getObjectMapper() - ); - if (restException == null) { - throw new ApiException( - "Server Error, no content", - response.getStatusCode() - ); - } - throw new ApiException(restException); - } - - return ShortCode.fromJson( - response.getStream(), - client.getObjectMapper() - ); - } - - private void addPostParams(final Request request) { - if (isReserved != null) { - request.addPostParam("IsReserved", isReserved.toString()); - } - } -} diff --git a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java index f1a225ac49..72abb9f912 100644 --- a/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java +++ b/src/main/java/com/twilio/rest/serverless/v1/service/environment/Log.java @@ -22,7 +22,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.twilio.base.Resource; import com.twilio.converter.DateConverter; -import com.twilio.converter.Promoter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import java.io.IOException; @@ -37,7 +36,7 @@ @ToString public class Log extends Resource { - private static final long serialVersionUID = 129897058125132L; + private static final long serialVersionUID = 41290346867159L; public static LogFetcher fetcher( final String pathServiceSid, @@ -105,7 +104,7 @@ public static Log fromJson( private final String deploymentSid; private final String functionSid; private final String requestSid; - private final Log.Level level; + private final String level; private final String message; private final ZonedDateTime dateCreated; private final URI url; @@ -120,7 +119,7 @@ private Log( @JsonProperty("deployment_sid") final String deploymentSid, @JsonProperty("function_sid") final String functionSid, @JsonProperty("request_sid") final String requestSid, - @JsonProperty("level") final Log.Level level, + @JsonProperty("level") final String level, @JsonProperty("message") final String message, @JsonProperty("date_created") final String dateCreated, @JsonProperty("url") final URI url @@ -171,7 +170,7 @@ public final String getRequestSid() { return this.requestSid; } - public final Log.Level getLevel() { + public final String getLevel() { return this.level; } @@ -232,25 +231,4 @@ public int hashCode() { url ); } - - public enum Level { - INFO("info"), - WARN("warn"), - ERROR("error"); - - private final String value; - - private Level(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static Level forValue(final String value) { - return Promoter.enumFromString(value, Level.values()); - } - } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java b/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java index cbd788a972..65b09c1a3c 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/EngagementCreator.java @@ -27,15 +27,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class EngagementCreator extends Creator { private String pathFlowSid; private com.twilio.type.PhoneNumber to; private com.twilio.type.PhoneNumber from; - private Map parameters; + private Object parameters; public EngagementCreator( final String pathFlowSid, @@ -65,9 +63,7 @@ public EngagementCreator setFrom(final String from) { return setFrom(Promoter.phoneNumberFromString(from)); } - public EngagementCreator setParameters( - final Map parameters - ) { + public EngagementCreator setParameters(final Object parameters) { this.parameters = parameters; return this; } @@ -77,8 +73,8 @@ public Engagement create(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Engagements"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); - path = path.replace("{" + "From" + "}", this.from.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); + path = path.replace("{" + "From" + "}", this.from.toString()); Request request = new Request( HttpMethod.POST, @@ -120,7 +116,10 @@ private void addPostParams(final Request request) { request.addPostParam("From", from.toString()); } if (parameters != null) { - request.addPostParam("Parameters", Converter.mapToJson(parameters)); + request.addPostParam( + "Parameters", + Converter.objectToJson(parameters) + ); } } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java b/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java index 89c8f288e0..bdc96dd0a3 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/ExecutionCreator.java @@ -27,15 +27,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class ExecutionCreator extends Creator { private String pathFlowSid; private com.twilio.type.PhoneNumber to; private com.twilio.type.PhoneNumber from; - private Map parameters; + private Object parameters; public ExecutionCreator( final String pathFlowSid, @@ -65,9 +63,7 @@ public ExecutionCreator setFrom(final String from) { return setFrom(Promoter.phoneNumberFromString(from)); } - public ExecutionCreator setParameters( - final Map parameters - ) { + public ExecutionCreator setParameters(final Object parameters) { this.parameters = parameters; return this; } @@ -77,8 +73,8 @@ public Execution create(final TwilioRestClient client) { String path = "/v1/Flows/{FlowSid}/Executions"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); - path = path.replace("{" + "From" + "}", this.from.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); + path = path.replace("{" + "From" + "}", this.from.toString()); Request request = new Request( HttpMethod.POST, @@ -120,7 +116,10 @@ private void addPostParams(final Request request) { request.addPostParam("From", from.toString()); } if (parameters != null) { - request.addPostParam("Parameters", Converter.mapToJson(parameters)); + request.addPostParam( + "Parameters", + Converter.objectToJson(parameters) + ); } } } diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java index a0b2dcbf54..6420719f71 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/engagement/Step.java @@ -38,7 +38,7 @@ @ToString public class Step extends Resource { - private static final long serialVersionUID = 84557375462184L; + private static final long serialVersionUID = 119488428044573L; public static StepFetcher fetcher( final String pathFlowSid, @@ -107,6 +107,7 @@ public static Step fromJson( private final String parentStepSid; private final String transitionedFrom; private final String transitionedTo; + private final String type; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; private final URI url; @@ -123,6 +124,7 @@ private Step( @JsonProperty("parent_step_sid") final String parentStepSid, @JsonProperty("transitioned_from") final String transitionedFrom, @JsonProperty("transitioned_to") final String transitionedTo, + @JsonProperty("type") final String type, @JsonProperty("date_created") final String dateCreated, @JsonProperty("date_updated") final String dateUpdated, @JsonProperty("url") final URI url, @@ -137,6 +139,7 @@ private Step( this.parentStepSid = parentStepSid; this.transitionedFrom = transitionedFrom; this.transitionedTo = transitionedTo; + this.type = type; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); this.url = url; @@ -179,6 +182,10 @@ public final String getTransitionedTo() { return this.transitionedTo; } + public final String getType() { + return this.type; + } + public final ZonedDateTime getDateCreated() { return this.dateCreated; } @@ -217,6 +224,7 @@ public boolean equals(final Object o) { Objects.equals(parentStepSid, other.parentStepSid) && Objects.equals(transitionedFrom, other.transitionedFrom) && Objects.equals(transitionedTo, other.transitionedTo) && + Objects.equals(type, other.type) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(url, other.url) && @@ -236,6 +244,7 @@ public int hashCode() { parentStepSid, transitionedFrom, transitionedTo, + type, dateCreated, dateUpdated, url, diff --git a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java index 198f6d6067..3666d1e5b5 100644 --- a/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java +++ b/src/main/java/com/twilio/rest/studio/v1/flow/execution/ExecutionStep.java @@ -38,7 +38,7 @@ @ToString public class ExecutionStep extends Resource { - private static final long serialVersionUID = 56382327963536L; + private static final long serialVersionUID = 221887175359099L; public static ExecutionStepFetcher fetcher( final String pathFlowSid, @@ -107,6 +107,7 @@ public static ExecutionStep fromJson( private final Map context; private final String transitionedFrom; private final String transitionedTo; + private final String type; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; private final URI url; @@ -123,6 +124,7 @@ private ExecutionStep( @JsonProperty("context") final Map context, @JsonProperty("transitioned_from") final String transitionedFrom, @JsonProperty("transitioned_to") final String transitionedTo, + @JsonProperty("type") final String type, @JsonProperty("date_created") final String dateCreated, @JsonProperty("date_updated") final String dateUpdated, @JsonProperty("url") final URI url, @@ -137,6 +139,7 @@ private ExecutionStep( this.context = context; this.transitionedFrom = transitionedFrom; this.transitionedTo = transitionedTo; + this.type = type; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); this.url = url; @@ -179,6 +182,10 @@ public final String getTransitionedTo() { return this.transitionedTo; } + public final String getType() { + return this.type; + } + public final ZonedDateTime getDateCreated() { return this.dateCreated; } @@ -217,6 +224,7 @@ public boolean equals(final Object o) { Objects.equals(context, other.context) && Objects.equals(transitionedFrom, other.transitionedFrom) && Objects.equals(transitionedTo, other.transitionedTo) && + Objects.equals(type, other.type) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(url, other.url) && @@ -236,6 +244,7 @@ public int hashCode() { context, transitionedFrom, transitionedTo, + type, dateCreated, dateUpdated, url, diff --git a/src/main/java/com/twilio/rest/studio/v2/Flow.java b/src/main/java/com/twilio/rest/studio/v2/Flow.java index f4f9f13fbf..989e733f30 100644 --- a/src/main/java/com/twilio/rest/studio/v2/Flow.java +++ b/src/main/java/com/twilio/rest/studio/v2/Flow.java @@ -45,7 +45,7 @@ public class Flow extends Resource { public static FlowCreator creator( final String friendlyName, final Flow.Status status, - final Map definition + final Object definition ) { return new FlowCreator(friendlyName, status, definition); } diff --git a/src/main/java/com/twilio/rest/studio/v2/FlowCreator.java b/src/main/java/com/twilio/rest/studio/v2/FlowCreator.java index 3834351da1..9ae445c987 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowCreator.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowCreator.java @@ -26,20 +26,18 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class FlowCreator extends Creator { private String friendlyName; private Flow.Status status; - private Map definition; + private Object definition; private String commitMessage; public FlowCreator( final String friendlyName, final Flow.Status status, - final Map definition + final Object definition ) { this.friendlyName = friendlyName; this.status = status; @@ -56,7 +54,7 @@ public FlowCreator setStatus(final Flow.Status status) { return this; } - public FlowCreator setDefinition(final Map definition) { + public FlowCreator setDefinition(final Object definition) { this.definition = definition; return this; } @@ -116,7 +114,10 @@ private void addPostParams(final Request request) { request.addPostParam("Status", status.toString()); } if (definition != null) { - request.addPostParam("Definition", Converter.mapToJson(definition)); + request.addPostParam( + "Definition", + Converter.objectToJson(definition) + ); } if (commitMessage != null) { request.addPostParam("CommitMessage", commitMessage); diff --git a/src/main/java/com/twilio/rest/studio/v2/FlowUpdater.java b/src/main/java/com/twilio/rest/studio/v2/FlowUpdater.java index 981e21f24e..6d625f2a21 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowUpdater.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowUpdater.java @@ -25,14 +25,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class FlowUpdater extends Updater { private String pathSid; private Flow.Status status; private String friendlyName; - private Map definition; + private Object definition; private String commitMessage; public FlowUpdater(final String pathSid, final Flow.Status status) { @@ -50,7 +49,7 @@ public FlowUpdater setFriendlyName(final String friendlyName) { return this; } - public FlowUpdater setDefinition(final Map definition) { + public FlowUpdater setDefinition(final Object definition) { this.definition = definition; return this; } @@ -104,7 +103,10 @@ private void addPostParams(final Request request) { request.addPostParam("FriendlyName", friendlyName); } if (definition != null) { - request.addPostParam("Definition", Converter.mapToJson(definition)); + request.addPostParam( + "Definition", + Converter.objectToJson(definition) + ); } if (commitMessage != null) { request.addPostParam("CommitMessage", commitMessage); diff --git a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java index f3a156394a..6eba3f66e9 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowValidate.java @@ -26,8 +26,6 @@ import com.twilio.exception.ApiException; import java.io.IOException; import java.io.InputStream; -import java.util.Map; -import java.util.Map; import java.util.Objects; import lombok.ToString; import lombok.ToString; @@ -41,7 +39,7 @@ public class FlowValidate extends Resource { public static FlowValidateUpdater updater( final String friendlyName, final FlowValidate.Status status, - final Map definition + final Object definition ) { return new FlowValidateUpdater(friendlyName, status, definition); } diff --git a/src/main/java/com/twilio/rest/studio/v2/FlowValidateUpdater.java b/src/main/java/com/twilio/rest/studio/v2/FlowValidateUpdater.java index 7c97916960..954245fd2a 100644 --- a/src/main/java/com/twilio/rest/studio/v2/FlowValidateUpdater.java +++ b/src/main/java/com/twilio/rest/studio/v2/FlowValidateUpdater.java @@ -25,19 +25,18 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class FlowValidateUpdater extends Updater { private String friendlyName; private FlowValidate.Status status; - private Map definition; + private Object definition; private String commitMessage; public FlowValidateUpdater( final String friendlyName, final FlowValidate.Status status, - final Map definition + final Object definition ) { this.friendlyName = friendlyName; this.status = status; @@ -54,9 +53,7 @@ public FlowValidateUpdater setStatus(final FlowValidate.Status status) { return this; } - public FlowValidateUpdater setDefinition( - final Map definition - ) { + public FlowValidateUpdater setDefinition(final Object definition) { this.definition = definition; return this; } @@ -119,7 +116,10 @@ private void addPostParams(final Request request) { request.addPostParam("Status", status.toString()); } if (definition != null) { - request.addPostParam("Definition", Converter.mapToJson(definition)); + request.addPostParam( + "Definition", + Converter.objectToJson(definition) + ); } if (commitMessage != null) { request.addPostParam("CommitMessage", commitMessage); diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java b/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java index df3d5c1245..df95407644 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/ExecutionCreator.java @@ -27,15 +27,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class ExecutionCreator extends Creator { private String pathFlowSid; private com.twilio.type.PhoneNumber to; private com.twilio.type.PhoneNumber from; - private Map parameters; + private Object parameters; public ExecutionCreator( final String pathFlowSid, @@ -65,9 +63,7 @@ public ExecutionCreator setFrom(final String from) { return setFrom(Promoter.phoneNumberFromString(from)); } - public ExecutionCreator setParameters( - final Map parameters - ) { + public ExecutionCreator setParameters(final Object parameters) { this.parameters = parameters; return this; } @@ -77,8 +73,8 @@ public Execution create(final TwilioRestClient client) { String path = "/v2/Flows/{FlowSid}/Executions"; path = path.replace("{" + "FlowSid" + "}", this.pathFlowSid.toString()); - path = path.replace("{" + "To" + "}", this.to.encode("utf-8")); - path = path.replace("{" + "From" + "}", this.from.encode("utf-8")); + path = path.replace("{" + "To" + "}", this.to.toString()); + path = path.replace("{" + "From" + "}", this.from.toString()); Request request = new Request( HttpMethod.POST, @@ -120,7 +116,10 @@ private void addPostParams(final Request request) { request.addPostParam("From", from.toString()); } if (parameters != null) { - request.addPostParam("Parameters", Converter.mapToJson(parameters)); + request.addPostParam( + "Parameters", + Converter.objectToJson(parameters) + ); } } } diff --git a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java index c6d8c0acce..48c1ebd0de 100644 --- a/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java +++ b/src/main/java/com/twilio/rest/studio/v2/flow/execution/ExecutionStep.java @@ -38,7 +38,7 @@ @ToString public class ExecutionStep extends Resource { - private static final long serialVersionUID = 56382327963536L; + private static final long serialVersionUID = 221887175359099L; public static ExecutionStepFetcher fetcher( final String pathFlowSid, @@ -107,6 +107,7 @@ public static ExecutionStep fromJson( private final Map context; private final String transitionedFrom; private final String transitionedTo; + private final String type; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; private final URI url; @@ -123,6 +124,7 @@ private ExecutionStep( @JsonProperty("context") final Map context, @JsonProperty("transitioned_from") final String transitionedFrom, @JsonProperty("transitioned_to") final String transitionedTo, + @JsonProperty("type") final String type, @JsonProperty("date_created") final String dateCreated, @JsonProperty("date_updated") final String dateUpdated, @JsonProperty("url") final URI url, @@ -137,6 +139,7 @@ private ExecutionStep( this.context = context; this.transitionedFrom = transitionedFrom; this.transitionedTo = transitionedTo; + this.type = type; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); this.url = url; @@ -179,6 +182,10 @@ public final String getTransitionedTo() { return this.transitionedTo; } + public final String getType() { + return this.type; + } + public final ZonedDateTime getDateCreated() { return this.dateCreated; } @@ -217,6 +224,7 @@ public boolean equals(final Object o) { Objects.equals(context, other.context) && Objects.equals(transitionedFrom, other.transitionedFrom) && Objects.equals(transitionedTo, other.transitionedTo) && + Objects.equals(type, other.type) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(url, other.url) && @@ -236,6 +244,7 @@ public int hashCode() { context, transitionedFrom, transitionedTo, + type, dateCreated, dateUpdated, url, diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java index 9b5eca36b7..3ad46deab0 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class DocumentCreator extends Creator { private String pathServiceSid; private String uniqueName; - private Map data; + private Object data; private Integer ttl; public DocumentCreator(final String pathServiceSid) { @@ -45,7 +43,7 @@ public DocumentCreator setUniqueName(final String uniqueName) { return this; } - public DocumentCreator setData(final Map data) { + public DocumentCreator setData(final Object data) { this.data = data; return this; } @@ -102,7 +100,7 @@ private void addPostParams(final Request request) { request.addPostParam("UniqueName", uniqueName); } if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (ttl != null) { request.addPostParam("Ttl", ttl.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java index 1561d4c8a2..8c4bb058d5 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/DocumentUpdater.java @@ -25,14 +25,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class DocumentUpdater extends Updater { private String pathServiceSid; private String pathSid; private String ifMatch; - private Map data; + private Object data; private Integer ttl; public DocumentUpdater(final String pathServiceSid, final String pathSid) { @@ -45,7 +44,7 @@ public DocumentUpdater setIfMatch(final String ifMatch) { return this; } - public DocumentUpdater setData(final Map data) { + public DocumentUpdater setData(final Object data) { this.data = data; return this; } @@ -101,7 +100,7 @@ public Document update(final TwilioRestClient client) { private void addPostParams(final Request request) { if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (ttl != null) { request.addPostParam("Ttl", ttl.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java index c0d70df086..00bbcafebd 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItem.java @@ -44,7 +44,7 @@ public class SyncListItem extends Resource { public static SyncListItemCreator creator( final String pathServiceSid, final String pathListSid, - final Map data + final Object data ) { return new SyncListItemCreator(pathServiceSid, pathListSid, data); } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java index 2af4101ee6..4d8ac8f192 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class SyncListItemCreator extends Creator { private String pathServiceSid; private String pathListSid; - private Map data; + private Object data; private Integer ttl; private Integer itemTtl; private Integer collectionTtl; @@ -41,14 +39,14 @@ public class SyncListItemCreator extends Creator { public SyncListItemCreator( final String pathServiceSid, final String pathListSid, - final Map data + final Object data ) { this.pathServiceSid = pathServiceSid; this.pathListSid = pathListSid; this.data = data; } - public SyncListItemCreator setData(final Map data) { + public SyncListItemCreator setData(final Object data) { this.data = data; return this; } @@ -114,7 +112,7 @@ public SyncListItem create(final TwilioRestClient client) { private void addPostParams(final Request request) { if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (ttl != null) { request.addPostParam("Ttl", ttl.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java index df538d9384..24dde562ca 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/synclist/SyncListItemUpdater.java @@ -25,7 +25,6 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class SyncListItemUpdater extends Updater { @@ -33,7 +32,7 @@ public class SyncListItemUpdater extends Updater { private String pathListSid; private Integer pathIndex; private String ifMatch; - private Map data; + private Object data; private Integer ttl; private Integer itemTtl; private Integer collectionTtl; @@ -53,7 +52,7 @@ public SyncListItemUpdater setIfMatch(final String ifMatch) { return this; } - public SyncListItemUpdater setData(final Map data) { + public SyncListItemUpdater setData(final Object data) { this.data = data; return this; } @@ -120,7 +119,7 @@ public SyncListItem update(final TwilioRestClient client) { private void addPostParams(final Request request) { if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (ttl != null) { request.addPostParam("Ttl", ttl.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java index e2c25935cf..f134d6fb0c 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItem.java @@ -45,7 +45,7 @@ public static SyncMapItemCreator creator( final String pathServiceSid, final String pathMapSid, final String key, - final Map data + final Object data ) { return new SyncMapItemCreator(pathServiceSid, pathMapSid, key, data); } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java index 095e615ca2..c85bdbfeb9 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemCreator.java @@ -26,15 +26,13 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class SyncMapItemCreator extends Creator { private String pathServiceSid; private String pathMapSid; private String key; - private Map data; + private Object data; private Integer ttl; private Integer itemTtl; private Integer collectionTtl; @@ -43,7 +41,7 @@ public SyncMapItemCreator( final String pathServiceSid, final String pathMapSid, final String key, - final Map data + final Object data ) { this.pathServiceSid = pathServiceSid; this.pathMapSid = pathMapSid; @@ -56,7 +54,7 @@ public SyncMapItemCreator setKey(final String key) { return this; } - public SyncMapItemCreator setData(final Map data) { + public SyncMapItemCreator setData(final Object data) { this.data = data; return this; } @@ -126,7 +124,7 @@ private void addPostParams(final Request request) { request.addPostParam("Key", key); } if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (ttl != null) { request.addPostParam("Ttl", ttl.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java index f9cb5af292..b0b1a151c0 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncmap/SyncMapItemUpdater.java @@ -25,7 +25,6 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class SyncMapItemUpdater extends Updater { @@ -33,7 +32,7 @@ public class SyncMapItemUpdater extends Updater { private String pathMapSid; private String pathKey; private String ifMatch; - private Map data; + private Object data; private Integer ttl; private Integer itemTtl; private Integer collectionTtl; @@ -53,7 +52,7 @@ public SyncMapItemUpdater setIfMatch(final String ifMatch) { return this; } - public SyncMapItemUpdater setData(final Map data) { + public SyncMapItemUpdater setData(final Object data) { this.data = data; return this; } @@ -120,7 +119,7 @@ public SyncMapItem update(final TwilioRestClient client) { private void addPostParams(final Request request) { if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } if (ttl != null) { request.addPostParam("Ttl", ttl.toString()); diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java index 7191f3acc2..b787e9d5a1 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessage.java @@ -40,7 +40,7 @@ public class StreamMessage extends Resource { public static StreamMessageCreator creator( final String pathServiceSid, final String pathStreamSid, - final Map data + final Object data ) { return new StreamMessageCreator(pathServiceSid, pathStreamSid, data); } diff --git a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java index 5739a6e69d..015002f303 100644 --- a/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java +++ b/src/main/java/com/twilio/rest/sync/v1/service/syncstream/StreamMessageCreator.java @@ -26,26 +26,24 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class StreamMessageCreator extends Creator { private String pathServiceSid; private String pathStreamSid; - private Map data; + private Object data; public StreamMessageCreator( final String pathServiceSid, final String pathStreamSid, - final Map data + final Object data ) { this.pathServiceSid = pathServiceSid; this.pathStreamSid = pathStreamSid; this.data = data; } - public StreamMessageCreator setData(final Map data) { + public StreamMessageCreator setData(final Object data) { this.data = data; return this; } @@ -100,7 +98,7 @@ public StreamMessage create(final TwilioRestClient client) { private void addPostParams(final Request request) { if (data != null) { - request.addPostParam("Data", Converter.mapToJson(data)); + request.addPostParam("Data", Converter.objectToJson(data)); } } } diff --git a/src/main/java/com/twilio/rest/trunking/v1/Trunk.java b/src/main/java/com/twilio/rest/trunking/v1/Trunk.java index 2d77f12579..6ddece0cab 100644 --- a/src/main/java/com/twilio/rest/trunking/v1/Trunk.java +++ b/src/main/java/com/twilio/rest/trunking/v1/Trunk.java @@ -41,7 +41,7 @@ @ToString public class Trunk extends Resource { - private static final long serialVersionUID = 225938897286327L; + private static final long serialVersionUID = 232204827569278L; public static TrunkCreator creator() { return new TrunkCreator(); @@ -117,6 +117,7 @@ public static Trunk fromJson( private final Trunk.TransferCallerId transferCallerId; private final Boolean cnamLookupEnabled; private final String authType; + private final Boolean symmetricRtpEnabled; private final List authTypeSet; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; @@ -141,6 +142,9 @@ private Trunk( ) final Trunk.TransferCallerId transferCallerId, @JsonProperty("cnam_lookup_enabled") final Boolean cnamLookupEnabled, @JsonProperty("auth_type") final String authType, + @JsonProperty( + "symmetric_rtp_enabled" + ) final Boolean symmetricRtpEnabled, @JsonProperty("auth_type_set") final List authTypeSet, @JsonProperty("date_created") final String dateCreated, @JsonProperty("date_updated") final String dateUpdated, @@ -159,6 +163,7 @@ private Trunk( this.transferCallerId = transferCallerId; this.cnamLookupEnabled = cnamLookupEnabled; this.authType = authType; + this.symmetricRtpEnabled = symmetricRtpEnabled; this.authTypeSet = authTypeSet; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); @@ -211,6 +216,10 @@ public final String getAuthType() { return this.authType; } + public final Boolean getSymmetricRtpEnabled() { + return this.symmetricRtpEnabled; + } + public final List getAuthTypeSet() { return this.authTypeSet; } @@ -262,6 +271,7 @@ public boolean equals(final Object o) { Objects.equals(transferCallerId, other.transferCallerId) && Objects.equals(cnamLookupEnabled, other.cnamLookupEnabled) && Objects.equals(authType, other.authType) && + Objects.equals(symmetricRtpEnabled, other.symmetricRtpEnabled) && Objects.equals(authTypeSet, other.authTypeSet) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && @@ -285,6 +295,7 @@ public int hashCode() { transferCallerId, cnamLookupEnabled, authType, + symmetricRtpEnabled, authTypeSet, dateCreated, dateUpdated, diff --git a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java index 35cf959970..a4413dc4c8 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/ComplianceTollfreeInquiriesCreator.java @@ -259,7 +259,7 @@ public ComplianceTollfreeInquiries create(final TwilioRestClient client) { path = path.replace( "{" + "TollfreePhoneNumber" + "}", - this.tollfreePhoneNumber.encode("utf-8") + this.tollfreePhoneNumber.toString() ); path = path.replace( diff --git a/src/main/java/com/twilio/rest/trusthub/v1/EndUserCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/EndUserCreator.java index 0be75ae9a4..aaddaa97f9 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/EndUserCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/EndUserCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class EndUserCreator extends Creator { private String friendlyName; private String type; - private Map attributes; + private Object attributes; public EndUserCreator(final String friendlyName, final String type) { this.friendlyName = friendlyName; @@ -50,7 +48,7 @@ public EndUserCreator setType(final String type) { return this; } - public EndUserCreator setAttributes(final Map attributes) { + public EndUserCreator setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -103,7 +101,10 @@ private void addPostParams(final Request request) { request.addPostParam("Type", type); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/EndUserUpdater.java b/src/main/java/com/twilio/rest/trusthub/v1/EndUserUpdater.java index 39e4de9753..479a4a4ed9 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/EndUserUpdater.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/EndUserUpdater.java @@ -25,13 +25,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class EndUserUpdater extends Updater { private String pathSid; private String friendlyName; - private Map attributes; + private Object attributes; public EndUserUpdater(final String pathSid) { this.pathSid = pathSid; @@ -42,7 +41,7 @@ public EndUserUpdater setFriendlyName(final String friendlyName) { return this; } - public EndUserUpdater setAttributes(final Map attributes) { + public EndUserUpdater setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -87,7 +86,10 @@ private void addPostParams(final Request request) { request.addPostParam("FriendlyName", friendlyName); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentCreator.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentCreator.java index 6b509fe88f..53f68a08d7 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentCreator.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentCreator.java @@ -26,14 +26,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class SupportingDocumentCreator extends Creator { private String friendlyName; private String type; - private Map attributes; + private Object attributes; public SupportingDocumentCreator( final String friendlyName, @@ -55,9 +53,7 @@ public SupportingDocumentCreator setType(final String type) { return this; } - public SupportingDocumentCreator setAttributes( - final Map attributes - ) { + public SupportingDocumentCreator setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -113,7 +109,10 @@ private void addPostParams(final Request request) { request.addPostParam("Type", type); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentUpdater.java b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentUpdater.java index 099d6f7077..ec523a8f85 100644 --- a/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentUpdater.java +++ b/src/main/java/com/twilio/rest/trusthub/v1/SupportingDocumentUpdater.java @@ -25,13 +25,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class SupportingDocumentUpdater extends Updater { private String pathSid; private String friendlyName; - private Map attributes; + private Object attributes; public SupportingDocumentUpdater(final String pathSid) { this.pathSid = pathSid; @@ -44,9 +43,7 @@ public SupportingDocumentUpdater setFriendlyName( return this; } - public SupportingDocumentUpdater setAttributes( - final Map attributes - ) { + public SupportingDocumentUpdater setAttributes(final Object attributes) { this.attributes = attributes; return this; } @@ -94,7 +91,10 @@ private void addPostParams(final Request request) { request.addPostParam("FriendlyName", friendlyName); } if (attributes != null) { - request.addPostParam("Attributes", Converter.mapToJson(attributes)); + request.addPostParam( + "Attributes", + Converter.objectToJson(attributes) + ); } } } diff --git a/src/main/java/com/twilio/rest/verify/v2/Service.java b/src/main/java/com/twilio/rest/verify/v2/Service.java index 627024b453..2692351b04 100644 --- a/src/main/java/com/twilio/rest/verify/v2/Service.java +++ b/src/main/java/com/twilio/rest/verify/v2/Service.java @@ -38,7 +38,7 @@ @ToString public class Service extends Resource { - private static final long serialVersionUID = 122585755386681L; + private static final long serialVersionUID = 189237551129366L; public static ServiceCreator creator(final String friendlyName) { return new ServiceCreator(friendlyName); @@ -118,6 +118,7 @@ public static Service fromJson( private final Map totp; private final String defaultTemplateSid; private final Map whatsapp; + private final Map passkeys; private final Boolean verifyEventSubscriptionEnabled; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; @@ -143,6 +144,7 @@ private Service( @JsonProperty("totp") final Map totp, @JsonProperty("default_template_sid") final String defaultTemplateSid, @JsonProperty("whatsapp") final Map whatsapp, + @JsonProperty("passkeys") final Map passkeys, @JsonProperty( "verify_event_subscription_enabled" ) final Boolean verifyEventSubscriptionEnabled, @@ -166,6 +168,7 @@ private Service( this.totp = totp; this.defaultTemplateSid = defaultTemplateSid; this.whatsapp = whatsapp; + this.passkeys = passkeys; this.verifyEventSubscriptionEnabled = verifyEventSubscriptionEnabled; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); @@ -233,6 +236,10 @@ public final Map getWhatsapp() { return this.whatsapp; } + public final Map getPasskeys() { + return this.passkeys; + } + public final Boolean getVerifyEventSubscriptionEnabled() { return this.verifyEventSubscriptionEnabled; } @@ -284,6 +291,7 @@ public boolean equals(final Object o) { Objects.equals(totp, other.totp) && Objects.equals(defaultTemplateSid, other.defaultTemplateSid) && Objects.equals(whatsapp, other.whatsapp) && + Objects.equals(passkeys, other.passkeys) && Objects.equals( verifyEventSubscriptionEnabled, other.verifyEventSubscriptionEnabled @@ -313,6 +321,7 @@ public int hashCode() { totp, defaultTemplateSid, whatsapp, + passkeys, verifyEventSubscriptionEnabled, dateCreated, dateUpdated, diff --git a/src/main/java/com/twilio/rest/verify/v2/ServiceCreator.java b/src/main/java/com/twilio/rest/verify/v2/ServiceCreator.java index b96a1a983a..ae9ed50518 100644 --- a/src/main/java/com/twilio/rest/verify/v2/ServiceCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/ServiceCreator.java @@ -46,6 +46,12 @@ public class ServiceCreator extends Creator { private String defaultTemplateSid; private String whatsappMsgServiceSid; private String whatsappFrom; + private String passkeysRelyingPartyId; + private String passkeysRelyingPartyName; + private String passkeysRelyingPartyOrigins; + private String passkeysAuthenticatorAttachment; + private String passkeysDiscoverableCredentials; + private String passkeysUserVerification; private Boolean verifyEventSubscriptionEnabled; public ServiceCreator(final String friendlyName) { @@ -163,6 +169,48 @@ public ServiceCreator setWhatsappFrom(final String whatsappFrom) { return this; } + public ServiceCreator setPasskeysRelyingPartyId( + final String passkeysRelyingPartyId + ) { + this.passkeysRelyingPartyId = passkeysRelyingPartyId; + return this; + } + + public ServiceCreator setPasskeysRelyingPartyName( + final String passkeysRelyingPartyName + ) { + this.passkeysRelyingPartyName = passkeysRelyingPartyName; + return this; + } + + public ServiceCreator setPasskeysRelyingPartyOrigins( + final String passkeysRelyingPartyOrigins + ) { + this.passkeysRelyingPartyOrigins = passkeysRelyingPartyOrigins; + return this; + } + + public ServiceCreator setPasskeysAuthenticatorAttachment( + final String passkeysAuthenticatorAttachment + ) { + this.passkeysAuthenticatorAttachment = passkeysAuthenticatorAttachment; + return this; + } + + public ServiceCreator setPasskeysDiscoverableCredentials( + final String passkeysDiscoverableCredentials + ) { + this.passkeysDiscoverableCredentials = passkeysDiscoverableCredentials; + return this; + } + + public ServiceCreator setPasskeysUserVerification( + final String passkeysUserVerification + ) { + this.passkeysUserVerification = passkeysUserVerification; + return this; + } + public ServiceCreator setVerifyEventSubscriptionEnabled( final Boolean verifyEventSubscriptionEnabled ) { @@ -285,6 +333,42 @@ private void addPostParams(final Request request) { if (whatsappFrom != null) { request.addPostParam("Whatsapp.From", whatsappFrom); } + if (passkeysRelyingPartyId != null) { + request.addPostParam( + "Passkeys.RelyingParty.Id", + passkeysRelyingPartyId + ); + } + if (passkeysRelyingPartyName != null) { + request.addPostParam( + "Passkeys.RelyingParty.Name", + passkeysRelyingPartyName + ); + } + if (passkeysRelyingPartyOrigins != null) { + request.addPostParam( + "Passkeys.RelyingParty.Origins", + passkeysRelyingPartyOrigins + ); + } + if (passkeysAuthenticatorAttachment != null) { + request.addPostParam( + "Passkeys.AuthenticatorAttachment", + passkeysAuthenticatorAttachment + ); + } + if (passkeysDiscoverableCredentials != null) { + request.addPostParam( + "Passkeys.DiscoverableCredentials", + passkeysDiscoverableCredentials + ); + } + if (passkeysUserVerification != null) { + request.addPostParam( + "Passkeys.UserVerification", + passkeysUserVerification + ); + } if (verifyEventSubscriptionEnabled != null) { request.addPostParam( "VerifyEventSubscriptionEnabled", diff --git a/src/main/java/com/twilio/rest/verify/v2/ServiceUpdater.java b/src/main/java/com/twilio/rest/verify/v2/ServiceUpdater.java index 87ffcc6601..52469c145f 100644 --- a/src/main/java/com/twilio/rest/verify/v2/ServiceUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/ServiceUpdater.java @@ -47,6 +47,12 @@ public class ServiceUpdater extends Updater { private String defaultTemplateSid; private String whatsappMsgServiceSid; private String whatsappFrom; + private String passkeysRelyingPartyId; + private String passkeysRelyingPartyName; + private String passkeysRelyingPartyOrigins; + private String passkeysAuthenticatorAttachment; + private String passkeysDiscoverableCredentials; + private String passkeysUserVerification; private Boolean verifyEventSubscriptionEnabled; public ServiceUpdater(final String pathSid) { @@ -164,6 +170,48 @@ public ServiceUpdater setWhatsappFrom(final String whatsappFrom) { return this; } + public ServiceUpdater setPasskeysRelyingPartyId( + final String passkeysRelyingPartyId + ) { + this.passkeysRelyingPartyId = passkeysRelyingPartyId; + return this; + } + + public ServiceUpdater setPasskeysRelyingPartyName( + final String passkeysRelyingPartyName + ) { + this.passkeysRelyingPartyName = passkeysRelyingPartyName; + return this; + } + + public ServiceUpdater setPasskeysRelyingPartyOrigins( + final String passkeysRelyingPartyOrigins + ) { + this.passkeysRelyingPartyOrigins = passkeysRelyingPartyOrigins; + return this; + } + + public ServiceUpdater setPasskeysAuthenticatorAttachment( + final String passkeysAuthenticatorAttachment + ) { + this.passkeysAuthenticatorAttachment = passkeysAuthenticatorAttachment; + return this; + } + + public ServiceUpdater setPasskeysDiscoverableCredentials( + final String passkeysDiscoverableCredentials + ) { + this.passkeysDiscoverableCredentials = passkeysDiscoverableCredentials; + return this; + } + + public ServiceUpdater setPasskeysUserVerification( + final String passkeysUserVerification + ) { + this.passkeysUserVerification = passkeysUserVerification; + return this; + } + public ServiceUpdater setVerifyEventSubscriptionEnabled( final Boolean verifyEventSubscriptionEnabled ) { @@ -282,6 +330,42 @@ private void addPostParams(final Request request) { if (whatsappFrom != null) { request.addPostParam("Whatsapp.From", whatsappFrom); } + if (passkeysRelyingPartyId != null) { + request.addPostParam( + "Passkeys.RelyingParty.Id", + passkeysRelyingPartyId + ); + } + if (passkeysRelyingPartyName != null) { + request.addPostParam( + "Passkeys.RelyingParty.Name", + passkeysRelyingPartyName + ); + } + if (passkeysRelyingPartyOrigins != null) { + request.addPostParam( + "Passkeys.RelyingParty.Origins", + passkeysRelyingPartyOrigins + ); + } + if (passkeysAuthenticatorAttachment != null) { + request.addPostParam( + "Passkeys.AuthenticatorAttachment", + passkeysAuthenticatorAttachment + ); + } + if (passkeysDiscoverableCredentials != null) { + request.addPostParam( + "Passkeys.DiscoverableCredentials", + passkeysDiscoverableCredentials + ); + } + if (passkeysUserVerification != null) { + request.addPostParam( + "Passkeys.UserVerification", + passkeysUserVerification + ); + } if (verifyEventSubscriptionEnabled != null) { request.addPostParam( "VerifyEventSubscriptionEnabled", diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java index 9058afe690..5fc710aaf4 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttempt.java @@ -246,8 +246,7 @@ public enum Channels { CALL("call"), EMAIL("email"), WHATSAPP("whatsapp"), - RBM("rbm"), - SNA("sna"); + RBM("rbm"); private final String value; diff --git a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java index 5566ca5174..925f76b700 100644 --- a/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java +++ b/src/main/java/com/twilio/rest/verify/v2/VerificationAttemptsSummary.java @@ -172,7 +172,8 @@ public enum Channels { SMS("sms"), CALL("call"), EMAIL("email"), - WHATSAPP("whatsapp"); + WHATSAPP("whatsapp"), + RBM("rbm"); private final String value; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java index d6f592d7db..2e88faa3f9 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/VerificationCreator.java @@ -26,8 +26,6 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class VerificationCreator extends Creator { @@ -41,8 +39,8 @@ public class VerificationCreator extends Creator { private String customCode; private String amount; private String payee; - private Map rateLimits; - private Map channelConfiguration; + private Object rateLimits; + private Object channelConfiguration; private String appHash; private String templateSid; private String templateCustomSubstitutions; @@ -108,15 +106,13 @@ public VerificationCreator setPayee(final String payee) { return this; } - public VerificationCreator setRateLimits( - final Map rateLimits - ) { + public VerificationCreator setRateLimits(final Object rateLimits) { this.rateLimits = rateLimits; return this; } public VerificationCreator setChannelConfiguration( - final Map channelConfiguration + final Object channelConfiguration ) { this.channelConfiguration = channelConfiguration; return this; @@ -236,12 +232,15 @@ private void addPostParams(final Request request) { request.addPostParam("Payee", payee); } if (rateLimits != null) { - request.addPostParam("RateLimits", Converter.mapToJson(rateLimits)); + request.addPostParam( + "RateLimits", + Converter.objectToJson(rateLimits) + ); } if (channelConfiguration != null) { request.addPostParam( "ChannelConfiguration", - Converter.mapToJson(channelConfiguration) + Converter.objectToJson(channelConfiguration) ); } if (appHash != null) { diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java index 0d62df7622..56940c3fa7 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/Challenge.java @@ -350,15 +350,14 @@ public static ListOrders forValue(final String value) { } } - public enum ChallengeStatuses { - PENDING("pending"), - EXPIRED("expired"), - APPROVED("approved"), - DENIED("denied"); + public enum FactorTypes { + PUSH("push"), + TOTP("totp"), + PASSKEYS("passkeys"); private final String value; - private ChallengeStatuses(final String value) { + private FactorTypes(final String value) { this.value = value; } @@ -367,18 +366,20 @@ public String toString() { } @JsonCreator - public static ChallengeStatuses forValue(final String value) { - return Promoter.enumFromString(value, ChallengeStatuses.values()); + public static FactorTypes forValue(final String value) { + return Promoter.enumFromString(value, FactorTypes.values()); } } - public enum FactorTypes { - PUSH("push"), - TOTP("totp"); + public enum ChallengeStatuses { + PENDING("pending"), + EXPIRED("expired"), + APPROVED("approved"), + DENIED("denied"); private final String value; - private FactorTypes(final String value) { + private ChallengeStatuses(final String value) { this.value = value; } @@ -387,8 +388,8 @@ public String toString() { } @JsonCreator - public static FactorTypes forValue(final String value) { - return Promoter.enumFromString(value, FactorTypes.values()); + public static ChallengeStatuses forValue(final String value) { + return Promoter.enumFromString(value, ChallengeStatuses.values()); } } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java index 5f014a389f..366f518740 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeCreator.java @@ -30,8 +30,6 @@ import java.time.ZonedDateTime; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class ChallengeCreator extends Creator { @@ -40,8 +38,8 @@ public class ChallengeCreator extends Creator { private String factorSid; private ZonedDateTime expirationDate; private String detailsMessage; - private List> detailsFields; - private Map hiddenDetails; + private List detailsFields; + private Object hiddenDetails; private String authPayload; public ChallengeCreator( @@ -71,22 +69,16 @@ public ChallengeCreator setDetailsMessage(final String detailsMessage) { return this; } - public ChallengeCreator setDetailsFields( - final List> detailsFields - ) { + public ChallengeCreator setDetailsFields(final List detailsFields) { this.detailsFields = detailsFields; return this; } - public ChallengeCreator setDetailsFields( - final Map detailsFields - ) { + public ChallengeCreator setDetailsFields(final Object detailsFields) { return setDetailsFields(Promoter.listOfOne(detailsFields)); } - public ChallengeCreator setHiddenDetails( - final Map hiddenDetails - ) { + public ChallengeCreator setHiddenDetails(final Object hiddenDetails) { this.hiddenDetails = hiddenDetails; return this; } @@ -156,17 +148,17 @@ private void addPostParams(final Request request) { request.addPostParam("Details.Message", detailsMessage); } if (detailsFields != null) { - for (Map prop : detailsFields) { + for (Object prop : detailsFields) { request.addPostParam( "Details.Fields", - Converter.mapToJson(prop) + Converter.objectToJson(prop) ); } } if (hiddenDetails != null) { request.addPostParam( "HiddenDetails", - Converter.mapToJson(hiddenDetails) + Converter.objectToJson(hiddenDetails) ); } if (authPayload != null) { diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java index 3b7fda6ef9..9870c326cc 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/ChallengeUpdater.java @@ -25,7 +25,6 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class ChallengeUpdater extends Updater { @@ -33,7 +32,7 @@ public class ChallengeUpdater extends Updater { private String pathIdentity; private String pathSid; private String authPayload; - private Map metadata; + private Object metadata; public ChallengeUpdater( final String pathServiceSid, @@ -50,7 +49,7 @@ public ChallengeUpdater setAuthPayload(final String authPayload) { return this; } - public ChallengeUpdater setMetadata(final Map metadata) { + public ChallengeUpdater setMetadata(final Object metadata) { this.metadata = metadata; return this; } @@ -106,7 +105,7 @@ private void addPostParams(final Request request) { request.addPostParam("AuthPayload", authPayload); } if (metadata != null) { - request.addPostParam("Metadata", Converter.mapToJson(metadata)); + request.addPostParam("Metadata", Converter.objectToJson(metadata)); } } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java index edeafe8f4e..0cf56cea25 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/Factor.java @@ -262,7 +262,8 @@ public int hashCode() { public enum FactorTypes { PUSH("push"), - TOTP("totp"); + TOTP("totp"), + PASSKEYS("passkeys"); private final String value; diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java index 308d23c721..a8677d589d 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactor.java @@ -39,7 +39,7 @@ @ToString public class NewFactor extends Resource { - private static final long serialVersionUID = 115808224888150L; + private static final long serialVersionUID = 255981174125852L; public static NewFactorCreator creator( final String pathServiceSid, @@ -104,6 +104,7 @@ public static NewFactor fromJson( private final String entitySid; private final String identity; private final Map binding; + private final Map options; private final ZonedDateTime dateCreated; private final ZonedDateTime dateUpdated; private final String friendlyName; @@ -121,6 +122,7 @@ private NewFactor( @JsonProperty("entity_sid") final String entitySid, @JsonProperty("identity") final String identity, @JsonProperty("binding") final Map binding, + @JsonProperty("options") final Map options, @JsonProperty("date_created") final String dateCreated, @JsonProperty("date_updated") final String dateUpdated, @JsonProperty("friendly_name") final String friendlyName, @@ -136,6 +138,7 @@ private NewFactor( this.entitySid = entitySid; this.identity = identity; this.binding = binding; + this.options = options; this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); this.friendlyName = friendlyName; @@ -170,6 +173,10 @@ public final Map getBinding() { return this.binding; } + public final Map getOptions() { + return this.options; + } + public final ZonedDateTime getDateCreated() { return this.dateCreated; } @@ -221,6 +228,7 @@ public boolean equals(final Object o) { Objects.equals(entitySid, other.entitySid) && Objects.equals(identity, other.identity) && Objects.equals(binding, other.binding) && + Objects.equals(options, other.options) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(friendlyName, other.friendlyName) && @@ -241,6 +249,7 @@ public int hashCode() { entitySid, identity, binding, + options, dateCreated, dateUpdated, friendlyName, @@ -252,26 +261,6 @@ public int hashCode() { ); } - public enum FactorTypes { - PUSH("push"), - TOTP("totp"); - - private final String value; - - private FactorTypes(final String value) { - this.value = value; - } - - public String toString() { - return value; - } - - @JsonCreator - public static FactorTypes forValue(final String value) { - return Promoter.enumFromString(value, FactorTypes.values()); - } - } - public enum FactorStatuses { UNVERIFIED("unverified"), VERIFIED("verified"); @@ -336,4 +325,25 @@ public static NotificationPlatforms forValue(final String value) { ); } } + + public enum FactorTypes { + PUSH("push"), + TOTP("totp"), + PASSKEYS("passkeys"); + + private final String value; + + private FactorTypes(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static FactorTypes forValue(final String value) { + return Promoter.enumFromString(value, FactorTypes.values()); + } + } } diff --git a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java index 3221e50770..6f4e2f5409 100644 --- a/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java +++ b/src/main/java/com/twilio/rest/verify/v2/service/entity/NewFactorCreator.java @@ -26,8 +26,6 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; -import java.util.Map; public class NewFactorCreator extends Creator { @@ -46,7 +44,7 @@ public class NewFactorCreator extends Creator { private Integer configSkew; private Integer configCodeLength; private NewFactor.TotpAlgorithms configAlg; - private Map metadata; + private Object metadata; public NewFactorCreator( final String pathServiceSid, @@ -135,7 +133,7 @@ public NewFactorCreator setConfigAlg( return this; } - public NewFactorCreator setMetadata(final Map metadata) { + public NewFactorCreator setMetadata(final Object metadata) { this.metadata = metadata; return this; } @@ -241,7 +239,7 @@ private void addPostParams(final Request request) { request.addPostParam("Config.Alg", configAlg.toString()); } if (metadata != null) { - request.addPostParam("Metadata", Converter.mapToJson(metadata)); + request.addPostParam("Metadata", Converter.objectToJson(metadata)); } } } diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionCreator.java b/src/main/java/com/twilio/rest/video/v1/CompositionCreator.java index 3c579d6781..f162cd921c 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionCreator.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionCreator.java @@ -31,13 +31,11 @@ import java.net.URI; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class CompositionCreator extends Creator { private String roomSid; - private Map videoLayout; + private Object videoLayout; private List audioSources; private List audioSourcesExcluded; private String resolution; @@ -55,9 +53,7 @@ public CompositionCreator setRoomSid(final String roomSid) { return this; } - public CompositionCreator setVideoLayout( - final Map videoLayout - ) { + public CompositionCreator setVideoLayout(final Object videoLayout) { this.videoLayout = videoLayout; return this; } @@ -162,7 +158,7 @@ private void addPostParams(final Request request) { if (videoLayout != null) { request.addPostParam( "VideoLayout", - Converter.mapToJson(videoLayout) + Converter.objectToJson(videoLayout) ); } if (audioSources != null) { diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionHookCreator.java b/src/main/java/com/twilio/rest/video/v1/CompositionHookCreator.java index 356fac4185..627d5ef831 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionHookCreator.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionHookCreator.java @@ -31,14 +31,12 @@ import java.net.URI; import java.util.List; import java.util.List; -import java.util.Map; -import java.util.Map; public class CompositionHookCreator extends Creator { private String friendlyName; private Boolean enabled; - private Map videoLayout; + private Object videoLayout; private List audioSources; private List audioSourcesExcluded; private String resolution; @@ -61,9 +59,7 @@ public CompositionHookCreator setEnabled(final Boolean enabled) { return this; } - public CompositionHookCreator setVideoLayout( - final Map videoLayout - ) { + public CompositionHookCreator setVideoLayout(final Object videoLayout) { this.videoLayout = videoLayout; return this; } @@ -181,7 +177,7 @@ private void addPostParams(final Request request) { if (videoLayout != null) { request.addPostParam( "VideoLayout", - Converter.mapToJson(videoLayout) + Converter.objectToJson(videoLayout) ); } if (audioSources != null) { diff --git a/src/main/java/com/twilio/rest/video/v1/CompositionHookUpdater.java b/src/main/java/com/twilio/rest/video/v1/CompositionHookUpdater.java index 90c84daa88..7fe754444a 100644 --- a/src/main/java/com/twilio/rest/video/v1/CompositionHookUpdater.java +++ b/src/main/java/com/twilio/rest/video/v1/CompositionHookUpdater.java @@ -28,14 +28,13 @@ import com.twilio.rest.Domains; import java.net.URI; import java.util.List; -import java.util.Map; public class CompositionHookUpdater extends Updater { private String pathSid; private String friendlyName; private Boolean enabled; - private Map videoLayout; + private Object videoLayout; private List audioSources; private List audioSourcesExcluded; private Boolean trim; @@ -62,9 +61,7 @@ public CompositionHookUpdater setEnabled(final Boolean enabled) { return this; } - public CompositionHookUpdater setVideoLayout( - final Map videoLayout - ) { + public CompositionHookUpdater setVideoLayout(final Object videoLayout) { this.videoLayout = videoLayout; return this; } @@ -183,7 +180,7 @@ private void addPostParams(final Request request) { if (videoLayout != null) { request.addPostParam( "VideoLayout", - Converter.mapToJson(videoLayout) + Converter.objectToJson(videoLayout) ); } if (audioSources != null) { diff --git a/src/main/java/com/twilio/rest/video/v1/RoomCreator.java b/src/main/java/com/twilio/rest/video/v1/RoomCreator.java index 01acec6599..fae39d57e0 100644 --- a/src/main/java/com/twilio/rest/video/v1/RoomCreator.java +++ b/src/main/java/com/twilio/rest/video/v1/RoomCreator.java @@ -46,7 +46,7 @@ public class RoomCreator extends Creator { private Boolean transcribeParticipantsOnConnect; private List videoCodecs; private String mediaRegion; - private Map recordingRules; + private Object recordingRules; private Map transcriptionsConfiguration; private Boolean audioOnly; private Integer maxParticipantDuration; @@ -120,9 +120,7 @@ public RoomCreator setMediaRegion(final String mediaRegion) { return this; } - public RoomCreator setRecordingRules( - final Map recordingRules - ) { + public RoomCreator setRecordingRules(final Object recordingRules) { this.recordingRules = recordingRules; return this; } @@ -239,7 +237,7 @@ private void addPostParams(final Request request) { if (recordingRules != null) { request.addPostParam( "RecordingRules", - Converter.mapToJson(recordingRules) + Converter.objectToJson(recordingRules) ); } if (transcriptionsConfiguration != null) { diff --git a/src/main/java/com/twilio/rest/video/v1/room/RecordingRulesUpdater.java b/src/main/java/com/twilio/rest/video/v1/room/RecordingRulesUpdater.java index 4a726e6315..e4a8477092 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/RecordingRulesUpdater.java +++ b/src/main/java/com/twilio/rest/video/v1/room/RecordingRulesUpdater.java @@ -25,18 +25,17 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class RecordingRulesUpdater extends Updater { private String pathRoomSid; - private Map rules; + private Object rules; public RecordingRulesUpdater(final String pathRoomSid) { this.pathRoomSid = pathRoomSid; } - public RecordingRulesUpdater setRules(final Map rules) { + public RecordingRulesUpdater setRules(final Object rules) { this.rules = rules; return this; } @@ -81,7 +80,7 @@ public RecordingRules update(final TwilioRestClient client) { private void addPostParams(final Request request) { if (rules != null) { - request.addPostParam("Rules", Converter.mapToJson(rules)); + request.addPostParam("Rules", Converter.objectToJson(rules)); } } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java b/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java new file mode 100644 index 0000000000..ed27576b7e --- /dev/null +++ b/src/main/java/com/twilio/rest/video/v1/room/Transcriptions.java @@ -0,0 +1,256 @@ +/* + * This code was generated by + * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ + * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ + * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ + * + * Twilio - Video + * 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. + */ + +package com.twilio.rest.video.v1.room; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.twilio.base.Resource; +import com.twilio.converter.DateConverter; +import com.twilio.converter.Promoter; +import com.twilio.exception.ApiConnectionException; +import com.twilio.exception.ApiException; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.time.ZonedDateTime; +import java.util.Map; +import java.util.Map; +import java.util.Objects; +import lombok.ToString; +import lombok.ToString; + +@JsonIgnoreProperties(ignoreUnknown = true) +@ToString +public class Transcriptions extends Resource { + + private static final long serialVersionUID = 69820289152110L; + + public static TranscriptionsCreator creator(final String pathRoomSid) { + return new TranscriptionsCreator(pathRoomSid); + } + + public static TranscriptionsFetcher fetcher( + final String pathRoomSid, + final String pathTtid + ) { + return new TranscriptionsFetcher(pathRoomSid, pathTtid); + } + + public static TranscriptionsReader reader(final String pathRoomSid) { + return new TranscriptionsReader(pathRoomSid); + } + + public static TranscriptionsUpdater updater( + final String pathRoomSid, + final String pathTtid + ) { + return new TranscriptionsUpdater(pathRoomSid, pathTtid); + } + + /** + * Converts a JSON String into a Transcriptions object using the provided ObjectMapper. + * + * @param json Raw JSON String + * @param objectMapper Jackson ObjectMapper + * @return Transcriptions object represented by the provided JSON + */ + public static Transcriptions fromJson( + final String json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Transcriptions.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + /** + * Converts a JSON InputStream into a Transcriptions object using the provided + * ObjectMapper. + * + * @param json Raw JSON InputStream + * @param objectMapper Jackson ObjectMapper + * @return Transcriptions object represented by the provided JSON + */ + public static Transcriptions fromJson( + final InputStream json, + final ObjectMapper objectMapper + ) { + // Convert all checked exceptions to Runtime + try { + return objectMapper.readValue(json, Transcriptions.class); + } catch (final JsonMappingException | JsonParseException e) { + throw new ApiException(e.getMessage(), e); + } catch (final IOException e) { + throw new ApiConnectionException(e.getMessage(), e); + } + } + + private final String ttid; + private final String accountSid; + private final String roomSid; + private final Transcriptions.Status status; + private final ZonedDateTime dateCreated; + private final ZonedDateTime dateUpdated; + private final ZonedDateTime startTime; + private final ZonedDateTime endTime; + private final Integer duration; + private final URI url; + private final Map configuration; + + @JsonCreator + private Transcriptions( + @JsonProperty("ttid") final String ttid, + @JsonProperty("account_sid") final String accountSid, + @JsonProperty("room_sid") final String roomSid, + @JsonProperty("status") final Transcriptions.Status status, + @JsonProperty("date_created") final String dateCreated, + @JsonProperty("date_updated") final String dateUpdated, + @JsonProperty("start_time") final String startTime, + @JsonProperty("end_time") final String endTime, + @JsonProperty("duration") final Integer duration, + @JsonProperty("url") final URI url, + @JsonProperty("configuration") final Map configuration + ) { + this.ttid = ttid; + this.accountSid = accountSid; + this.roomSid = roomSid; + this.status = status; + this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated); + this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated); + this.startTime = DateConverter.iso8601DateTimeFromString(startTime); + this.endTime = DateConverter.iso8601DateTimeFromString(endTime); + this.duration = duration; + this.url = url; + this.configuration = configuration; + } + + public final String getTtid() { + return this.ttid; + } + + public final String getAccountSid() { + return this.accountSid; + } + + public final String getRoomSid() { + return this.roomSid; + } + + public final Transcriptions.Status getStatus() { + return this.status; + } + + public final ZonedDateTime getDateCreated() { + return this.dateCreated; + } + + public final ZonedDateTime getDateUpdated() { + return this.dateUpdated; + } + + public final ZonedDateTime getStartTime() { + return this.startTime; + } + + public final ZonedDateTime getEndTime() { + return this.endTime; + } + + public final Integer getDuration() { + return this.duration; + } + + public final URI getUrl() { + return this.url; + } + + public final Map getConfiguration() { + return this.configuration; + } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + + if (o == null || getClass() != o.getClass()) { + return false; + } + + Transcriptions other = (Transcriptions) o; + + return ( + Objects.equals(ttid, other.ttid) && + Objects.equals(accountSid, other.accountSid) && + Objects.equals(roomSid, other.roomSid) && + Objects.equals(status, other.status) && + Objects.equals(dateCreated, other.dateCreated) && + Objects.equals(dateUpdated, other.dateUpdated) && + Objects.equals(startTime, other.startTime) && + Objects.equals(endTime, other.endTime) && + Objects.equals(duration, other.duration) && + Objects.equals(url, other.url) && + Objects.equals(configuration, other.configuration) + ); + } + + @Override + public int hashCode() { + return Objects.hash( + ttid, + accountSid, + roomSid, + status, + dateCreated, + dateUpdated, + startTime, + endTime, + duration, + url, + configuration + ); + } + + public enum Status { + STARTED("started"), + STOPPED("stopped"), + FAILED("failed"); + + private final String value; + + private Status(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + + @JsonCreator + public static Status forValue(final String value) { + return Promoter.enumFromString(value, Status.values()); + } + } +} diff --git a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeCreator.java b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsCreator.java similarity index 63% rename from src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeCreator.java rename to src/main/java/com/twilio/rest/video/v1/room/TranscriptionsCreator.java index 534da26b49..92947f94ea 100644 --- a/src/main/java/com/twilio/rest/proxy/v1/service/ShortCodeCreator.java +++ b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsCreator.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Proxy + * Twilio - Video * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,10 +12,12 @@ * Do not edit the class manually. */ -package com.twilio.rest.proxy.v1.service; +package com.twilio.rest.video.v1.room; import com.twilio.base.Creator; import com.twilio.constant.EnumConstants; +import com.twilio.converter.Converter; +import com.twilio.converter.Converter; import com.twilio.exception.ApiConnectionException; import com.twilio.exception.ApiException; import com.twilio.exception.RestException; @@ -24,36 +26,34 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; +import java.util.Map; +import java.util.Map; -public class ShortCodeCreator extends Creator { +public class TranscriptionsCreator extends Creator { - private String pathServiceSid; - private String sid; + private String pathRoomSid; + private Map configuration; - public ShortCodeCreator(final String pathServiceSid, final String sid) { - this.pathServiceSid = pathServiceSid; - this.sid = sid; + public TranscriptionsCreator(final String pathRoomSid) { + this.pathRoomSid = pathRoomSid; } - public ShortCodeCreator setSid(final String sid) { - this.sid = sid; + public TranscriptionsCreator setConfiguration( + final Map configuration + ) { + this.configuration = configuration; return this; } @Override - public ShortCode create(final TwilioRestClient client) { - String path = "/v1/Services/{ServiceSid}/ShortCodes"; + public Transcriptions create(final TwilioRestClient client) { + String path = "/v1/Rooms/{RoomSid}/Transcriptions"; - path = - path.replace( - "{" + "ServiceSid" + "}", - this.pathServiceSid.toString() - ); - path = path.replace("{" + "Sid" + "}", this.sid.toString()); + path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); Request request = new Request( HttpMethod.POST, - Domains.PROXY.toString(), + Domains.VIDEO.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -61,7 +61,7 @@ public ShortCode create(final TwilioRestClient client) { Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "ShortCode creation failed: Unable to connect to server" + "Transcriptions creation failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -77,15 +77,18 @@ public ShortCode create(final TwilioRestClient client) { throw new ApiException(restException); } - return ShortCode.fromJson( + return Transcriptions.fromJson( response.getStream(), client.getObjectMapper() ); } private void addPostParams(final Request request) { - if (sid != null) { - request.addPostParam("Sid", sid); + if (configuration != null) { + request.addPostParam( + "Configuration", + Converter.mapToJson(configuration) + ); } } } diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretFetcher.java b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsFetcher.java similarity index 69% rename from src/main/java/com/twilio/rest/microvisor/v1/AccountSecretFetcher.java rename to src/main/java/com/twilio/rest/video/v1/room/TranscriptionsFetcher.java index 78b58fca72..b1a311a59e 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretFetcher.java +++ b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsFetcher.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Video * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1; +package com.twilio.rest.video.v1.room; import com.twilio.base.Fetcher; import com.twilio.constant.EnumConstants; @@ -25,23 +25,29 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class AccountSecretFetcher extends Fetcher { +public class TranscriptionsFetcher extends Fetcher { - private String pathKey; + private String pathRoomSid; + private String pathTtid; - public AccountSecretFetcher(final String pathKey) { - this.pathKey = pathKey; + public TranscriptionsFetcher( + final String pathRoomSid, + final String pathTtid + ) { + this.pathRoomSid = pathRoomSid; + this.pathTtid = pathTtid; } @Override - public AccountSecret fetch(final TwilioRestClient client) { - String path = "/v1/Secrets/{Key}"; + public Transcriptions fetch(final TwilioRestClient client) { + String path = "/v1/Rooms/{RoomSid}/Transcriptions/{Ttid}"; - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); + path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); + path = path.replace("{" + "Ttid" + "}", this.pathTtid.toString()); Request request = new Request( HttpMethod.GET, - Domains.MICROVISOR.toString(), + Domains.VIDEO.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -49,7 +55,7 @@ public AccountSecret fetch(final TwilioRestClient client) { if (response == null) { throw new ApiConnectionException( - "AccountSecret fetch failed: Unable to connect to server" + "Transcriptions fetch failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -65,7 +71,7 @@ public AccountSecret fetch(final TwilioRestClient client) { throw new ApiException(restException); } - return AccountSecret.fromJson( + return Transcriptions.fromJson( response.getStream(), client.getObjectMapper() ); diff --git a/src/main/java/com/twilio/rest/microvisor/v1/DeviceReader.java b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsReader.java similarity index 72% rename from src/main/java/com/twilio/rest/microvisor/v1/DeviceReader.java rename to src/main/java/com/twilio/rest/video/v1/room/TranscriptionsReader.java index 28cec8e051..32ee246d4a 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/DeviceReader.java +++ b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsReader.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Video * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1; +package com.twilio.rest.video.v1.room; import com.twilio.base.Page; import com.twilio.base.Reader; @@ -27,28 +27,32 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class DeviceReader extends Reader { +public class TranscriptionsReader extends Reader { + private String pathRoomSid; private Long pageSize; - public DeviceReader() {} + public TranscriptionsReader(final String pathRoomSid) { + this.pathRoomSid = pathRoomSid; + } - public DeviceReader setPageSize(final Long pageSize) { + public TranscriptionsReader setPageSize(final Long pageSize) { this.pageSize = pageSize; return this; } @Override - public ResourceSet read(final TwilioRestClient client) { + public ResourceSet read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); } - public Page firstPage(final TwilioRestClient client) { - String path = "/v1/Devices"; + public Page firstPage(final TwilioRestClient client) { + String path = "/v1/Rooms/{RoomSid}/Transcriptions"; + path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); Request request = new Request( HttpMethod.GET, - Domains.MICROVISOR.toString(), + Domains.VIDEO.toString(), path ); @@ -57,7 +61,7 @@ public Page firstPage(final TwilioRestClient client) { return pageForRequest(client, request); } - private Page pageForRequest( + private Page pageForRequest( final TwilioRestClient client, final Request request ) { @@ -65,7 +69,7 @@ private Page pageForRequest( if (response == null) { throw new ApiConnectionException( - "Device read failed: Unable to connect to server" + "Transcriptions read failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -82,39 +86,39 @@ private Page pageForRequest( } return Page.fromJson( - "devices", + "transcriptions", response.getContent(), - Device.class, + Transcriptions.class, client.getObjectMapper() ); } @Override - public Page previousPage( - final Page page, + public Page previousPage( + final Page page, final TwilioRestClient client ) { Request request = new Request( HttpMethod.GET, - page.getPreviousPageUrl(Domains.MICROVISOR.toString()) + page.getPreviousPageUrl(Domains.VIDEO.toString()) ); return pageForRequest(client, request); } @Override - public Page nextPage( - final Page page, + public Page nextPage( + final Page page, final TwilioRestClient client ) { Request request = new Request( HttpMethod.GET, - page.getNextPageUrl(Domains.MICROVISOR.toString()) + page.getNextPageUrl(Domains.VIDEO.toString()) ); return pageForRequest(client, request); } @Override - public Page getPage( + public Page getPage( final String targetUrl, final TwilioRestClient client ) { diff --git a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretUpdater.java b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsUpdater.java similarity index 64% rename from src/main/java/com/twilio/rest/microvisor/v1/AccountSecretUpdater.java rename to src/main/java/com/twilio/rest/video/v1/room/TranscriptionsUpdater.java index fc4e3c61eb..ff6487e71d 100644 --- a/src/main/java/com/twilio/rest/microvisor/v1/AccountSecretUpdater.java +++ b/src/main/java/com/twilio/rest/video/v1/room/TranscriptionsUpdater.java @@ -4,7 +4,7 @@ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ * - * Twilio - Microvisor + * Twilio - Video * This is the public Twilio REST API. * * NOTE: This class is auto generated by OpenAPI Generator. @@ -12,7 +12,7 @@ * Do not edit the class manually. */ -package com.twilio.rest.microvisor.v1; +package com.twilio.rest.video.v1.room; import com.twilio.base.Updater; import com.twilio.constant.EnumConstants; @@ -25,31 +25,35 @@ import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -public class AccountSecretUpdater extends Updater { +public class TranscriptionsUpdater extends Updater { - private String pathKey; - private String value; + private String pathRoomSid; + private String pathTtid; + private Transcriptions.Status status; - public AccountSecretUpdater(final String pathKey, final String value) { - this.pathKey = pathKey; - this.value = value; + public TranscriptionsUpdater( + final String pathRoomSid, + final String pathTtid + ) { + this.pathRoomSid = pathRoomSid; + this.pathTtid = pathTtid; } - public AccountSecretUpdater setValue(final String value) { - this.value = value; + public TranscriptionsUpdater setStatus(final Transcriptions.Status status) { + this.status = status; return this; } @Override - public AccountSecret update(final TwilioRestClient client) { - String path = "/v1/Secrets/{Key}"; + public Transcriptions update(final TwilioRestClient client) { + String path = "/v1/Rooms/{RoomSid}/Transcriptions/{Ttid}"; - path = path.replace("{" + "Key" + "}", this.pathKey.toString()); - path = path.replace("{" + "Value" + "}", this.value.toString()); + path = path.replace("{" + "RoomSid" + "}", this.pathRoomSid.toString()); + path = path.replace("{" + "Ttid" + "}", this.pathTtid.toString()); Request request = new Request( HttpMethod.POST, - Domains.MICROVISOR.toString(), + Domains.VIDEO.toString(), path ); request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); @@ -57,7 +61,7 @@ public AccountSecret update(final TwilioRestClient client) { Response response = client.request(request); if (response == null) { throw new ApiConnectionException( - "AccountSecret update failed: Unable to connect to server" + "Transcriptions update failed: Unable to connect to server" ); } else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) { RestException restException = RestException.fromJson( @@ -73,15 +77,15 @@ public AccountSecret update(final TwilioRestClient client) { throw new ApiException(restException); } - return AccountSecret.fromJson( + return Transcriptions.fromJson( response.getStream(), client.getObjectMapper() ); } private void addPostParams(final Request request) { - if (value != null) { - request.addPostParam("Value", value); + if (status != null) { + request.addPostParam("Status", status.toString()); } } } diff --git a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java index 6878b5373b..f33515b655 100644 --- a/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java +++ b/src/main/java/com/twilio/rest/video/v1/room/participant/SubscribeRulesUpdater.java @@ -25,13 +25,12 @@ import com.twilio.http.Response; import com.twilio.http.TwilioRestClient; import com.twilio.rest.Domains; -import java.util.Map; public class SubscribeRulesUpdater extends Updater { private String pathRoomSid; private String pathParticipantSid; - private Map rules; + private Object rules; public SubscribeRulesUpdater( final String pathRoomSid, @@ -41,7 +40,7 @@ public SubscribeRulesUpdater( this.pathParticipantSid = pathParticipantSid; } - public SubscribeRulesUpdater setRules(final Map rules) { + public SubscribeRulesUpdater setRules(final Object rules) { this.rules = rules; return this; } @@ -92,7 +91,7 @@ public SubscribeRules update(final TwilioRestClient client) { private void addPostParams(final Request request) { if (rules != null) { - request.addPostParam("Rules", Converter.mapToJson(rules)); + request.addPostParam("Rules", Converter.objectToJson(rules)); } } } diff --git a/src/main/java/com/twilio/security/RequestValidator.java b/src/main/java/com/twilio/security/RequestValidator.java index 336291fcad..a7b7f1d3c4 100644 --- a/src/main/java/com/twilio/security/RequestValidator.java +++ b/src/main/java/com/twilio/security/RequestValidator.java @@ -1,8 +1,6 @@ package com.twilio.security; import org.apache.commons.codec.binary.Hex; -import org.apache.http.NameValuePair; -import org.apache.http.client.utils.URLEncodedUtils; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; @@ -14,6 +12,8 @@ import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.*; +import org.apache.hc.core5.http.NameValuePair; +import org.apache.hc.core5.net.URLEncodedUtils; public class RequestValidator { @@ -31,7 +31,7 @@ public boolean validate(String url, Map params, String expectedS String signatureWithPort = getValidationSignature(addPort(url), params); String signatureWithoutPort = getValidationSignature(removePort(url), params); // If either url produces a valid signature, we accept the request as valid - return secureCompare(signatureWithPort, expectedSignature) || + return secureCompare(signatureWithPort, expectedSignature) || secureCompare(signatureWithoutPort, expectedSignature); } @@ -49,9 +49,8 @@ public boolean validate(String url, String body, String expectedSignature) throw if (bodySHA256 != null) { return validate(url, empty, expectedSignature) && validateBody(body, bodySHA256.getValue()); - } else { - return false; } + return false; } public boolean validateBody(String body, String expectedSHA) { @@ -120,7 +119,7 @@ private String removePort(String url) { return url; } } - + private String addPort(String url) { try { URI parsedUrl = new URI(url); @@ -139,7 +138,7 @@ private String updatePort(URI url, int newPort) { return new URI( url.getScheme(), url.getUserInfo(), - url.getHost(), + url.getHost(), newPort, url.getPath(), url.getQuery(), diff --git a/src/main/java/com/twilio/twiml/voice/Dial.java b/src/main/java/com/twilio/twiml/voice/Dial.java index 0314d5ec65..27eeda82c8 100644 --- a/src/main/java/com/twilio/twiml/voice/Dial.java +++ b/src/main/java/com/twilio/twiml/voice/Dial.java @@ -801,6 +801,15 @@ public Builder application(Application application) { return this; } + /** + * Add a child {@code } element + */ + @JacksonXmlProperty(isAttribute = false, localName = "WhatsApp") + public Builder whatsApp(WhatsApp whatsApp) { + this.children.add(whatsApp); + return this; + } + /** * Create and return resulting {@code } element */ diff --git a/src/main/java/com/twilio/twiml/voice/Say.java b/src/main/java/com/twilio/twiml/voice/Say.java index 094000e5a7..c317fe078e 100644 --- a/src/main/java/com/twilio/twiml/voice/Say.java +++ b/src/main/java/com/twilio/twiml/voice/Say.java @@ -31,6 +31,14 @@ public enum Voice { GOOGLE_AM_ET_STANDARD_B("Google.am-ET-Standard-B"), GOOGLE_AM_ET_WAVENET_A("Google.am-ET-Wavenet-A"), GOOGLE_AM_ET_WAVENET_B("Google.am-ET-Wavenet-B"), + GOOGLE_AR_XA_CHIRP3_HD_AOEDE("Google.ar-XA-Chirp3-HD-Aoede"), + GOOGLE_AR_XA_CHIRP3_HD_CHARON("Google.ar-XA-Chirp3-HD-Charon"), + GOOGLE_AR_XA_CHIRP3_HD_FENRIR("Google.ar-XA-Chirp3-HD-Fenrir"), + GOOGLE_AR_XA_CHIRP3_HD_KORE("Google.ar-XA-Chirp3-HD-Kore"), + GOOGLE_AR_XA_CHIRP3_HD_LEDA("Google.ar-XA-Chirp3-HD-Leda"), + GOOGLE_AR_XA_CHIRP3_HD_ORUS("Google.ar-XA-Chirp3-HD-Orus"), + GOOGLE_AR_XA_CHIRP3_HD_PUCK("Google.ar-XA-Chirp3-HD-Puck"), + GOOGLE_AR_XA_CHIRP3_HD_ZEPHYR("Google.ar-XA-Chirp3-HD-Zephyr"), GOOGLE_AR_XA_STANDARD_A("Google.ar-XA-Standard-A"), GOOGLE_AR_XA_STANDARD_B("Google.ar-XA-Standard-B"), GOOGLE_AR_XA_STANDARD_C("Google.ar-XA-Standard-C"), @@ -40,11 +48,33 @@ public enum Voice { GOOGLE_AR_XA_WAVENET_C("Google.ar-XA-Wavenet-C"), GOOGLE_AR_XA_WAVENET_D("Google.ar-XA-Wavenet-D"), GOOGLE_BG_BG_STANDARD_A("Google.bg-BG-Standard-A"), + GOOGLE_BG_BG_STANDARD_B("Google.bg-BG-Standard-B"), + GOOGLE_BN_IN_CHIRP3_HD_AOEDE("Google.bn-IN-Chirp3-HD-Aoede"), + GOOGLE_BN_IN_CHIRP3_HD_CHARON("Google.bn-IN-Chirp3-HD-Charon"), + GOOGLE_BN_IN_CHIRP3_HD_FENRIR("Google.bn-IN-Chirp3-HD-Fenrir"), + GOOGLE_BN_IN_CHIRP3_HD_KORE("Google.bn-IN-Chirp3-HD-Kore"), + GOOGLE_BN_IN_CHIRP3_HD_LEDA("Google.bn-IN-Chirp3-HD-Leda"), + GOOGLE_BN_IN_CHIRP3_HD_ORUS("Google.bn-IN-Chirp3-HD-Orus"), + GOOGLE_BN_IN_CHIRP3_HD_PUCK("Google.bn-IN-Chirp3-HD-Puck"), + GOOGLE_BN_IN_CHIRP3_HD_ZEPHYR("Google.bn-IN-Chirp3-HD-Zephyr"), + GOOGLE_BN_IN_STANDARD_A("Google.bn-IN-Standard-A"), + GOOGLE_BN_IN_STANDARD_B("Google.bn-IN-Standard-B"), GOOGLE_BN_IN_STANDARD_C("Google.bn-IN-Standard-C"), GOOGLE_BN_IN_STANDARD_D("Google.bn-IN-Standard-D"), + GOOGLE_BN_IN_WAVENET_A("Google.bn-IN-Wavenet-A"), + GOOGLE_BN_IN_WAVENET_B("Google.bn-IN-Wavenet-B"), GOOGLE_BN_IN_WAVENET_C("Google.bn-IN-Wavenet-C"), GOOGLE_BN_IN_WAVENET_D("Google.bn-IN-Wavenet-D"), GOOGLE_CA_ES_STANDARD_A("Google.ca-ES-Standard-A"), + GOOGLE_CA_ES_STANDARD_B("Google.ca-ES-Standard-B"), + GOOGLE_CMN_CN_CHIRP3_HD_AOEDE("Google.cmn-CN-Chirp3-HD-Aoede"), + GOOGLE_CMN_CN_CHIRP3_HD_CHARON("Google.cmn-CN-Chirp3-HD-Charon"), + GOOGLE_CMN_CN_CHIRP3_HD_FENRIR("Google.cmn-CN-Chirp3-HD-Fenrir"), + GOOGLE_CMN_CN_CHIRP3_HD_KORE("Google.cmn-CN-Chirp3-HD-Kore"), + GOOGLE_CMN_CN_CHIRP3_HD_LEDA("Google.cmn-CN-Chirp3-HD-Leda"), + GOOGLE_CMN_CN_CHIRP3_HD_ORUS("Google.cmn-CN-Chirp3-HD-Orus"), + GOOGLE_CMN_CN_CHIRP3_HD_PUCK("Google.cmn-CN-Chirp3-HD-Puck"), + GOOGLE_CMN_CN_CHIRP3_HD_ZEPHYR("Google.cmn-CN-Chirp3-HD-Zephyr"), GOOGLE_CMN_CN_STANDARD_A("Google.cmn-CN-Standard-A"), GOOGLE_CMN_CN_STANDARD_B("Google.cmn-CN-Standard-B"), GOOGLE_CMN_CN_STANDARD_C("Google.cmn-CN-Standard-C"), @@ -60,36 +90,66 @@ public enum Voice { GOOGLE_CMN_TW_WAVENET_B("Google.cmn-TW-Wavenet-B"), GOOGLE_CMN_TW_WAVENET_C("Google.cmn-TW-Wavenet-C"), GOOGLE_CS_CZ_STANDARD_A("Google.cs-CZ-Standard-A"), + GOOGLE_CS_CZ_STANDARD_B("Google.cs-CZ-Standard-B"), GOOGLE_CS_CZ_WAVENET_A("Google.cs-CZ-Wavenet-A"), + GOOGLE_CS_CZ_WAVENET_B("Google.cs-CZ-Wavenet-B"), GOOGLE_DA_DK_NEURAL2_D("Google.da-DK-Neural2-D"), GOOGLE_DA_DK_NEURAL2_F("Google.da-DK-Neural2-F"), GOOGLE_DA_DK_STANDARD_A("Google.da-DK-Standard-A"), GOOGLE_DA_DK_STANDARD_C("Google.da-DK-Standard-C"), GOOGLE_DA_DK_STANDARD_D("Google.da-DK-Standard-D"), GOOGLE_DA_DK_STANDARD_E("Google.da-DK-Standard-E"), + GOOGLE_DA_DK_STANDARD_F("Google.da-DK-Standard-F"), + GOOGLE_DA_DK_STANDARD_G("Google.da-DK-Standard-G"), GOOGLE_DA_DK_WAVENET_A("Google.da-DK-Wavenet-A"), GOOGLE_DA_DK_WAVENET_C("Google.da-DK-Wavenet-C"), GOOGLE_DA_DK_WAVENET_D("Google.da-DK-Wavenet-D"), GOOGLE_DA_DK_WAVENET_E("Google.da-DK-Wavenet-E"), + GOOGLE_DA_DK_WAVENET_F("Google.da-DK-Wavenet-F"), + GOOGLE_DA_DK_WAVENET_G("Google.da-DK-Wavenet-G"), + GOOGLE_DE_DE_CHIRP3_HD_AOEDE("Google.de-DE-Chirp3-HD-Aoede"), + GOOGLE_DE_DE_CHIRP3_HD_CHARON("Google.de-DE-Chirp3-HD-Charon"), + GOOGLE_DE_DE_CHIRP3_HD_FENRIR("Google.de-DE-Chirp3-HD-Fenrir"), + GOOGLE_DE_DE_CHIRP3_HD_KORE("Google.de-DE-Chirp3-HD-Kore"), + GOOGLE_DE_DE_CHIRP3_HD_LEDA("Google.de-DE-Chirp3-HD-Leda"), + GOOGLE_DE_DE_CHIRP3_HD_ORUS("Google.de-DE-Chirp3-HD-Orus"), + GOOGLE_DE_DE_CHIRP3_HD_PUCK("Google.de-DE-Chirp3-HD-Puck"), + GOOGLE_DE_DE_CHIRP3_HD_ZEPHYR("Google.de-DE-Chirp3-HD-Zephyr"), GOOGLE_DE_DE_NEURAL2_A("Google.de-DE-Neural2-A"), GOOGLE_DE_DE_NEURAL2_B("Google.de-DE-Neural2-B"), GOOGLE_DE_DE_NEURAL2_C("Google.de-DE-Neural2-C"), GOOGLE_DE_DE_NEURAL2_D("Google.de-DE-Neural2-D"), GOOGLE_DE_DE_NEURAL2_F("Google.de-DE-Neural2-F"), + GOOGLE_DE_DE_NEURAL2_G("Google.de-DE-Neural2-G"), + GOOGLE_DE_DE_NEURAL2_H("Google.de-DE-Neural2-H"), GOOGLE_DE_DE_STANDARD_A("Google.de-DE-Standard-A"), GOOGLE_DE_DE_STANDARD_B("Google.de-DE-Standard-B"), GOOGLE_DE_DE_STANDARD_C("Google.de-DE-Standard-C"), GOOGLE_DE_DE_STANDARD_D("Google.de-DE-Standard-D"), GOOGLE_DE_DE_STANDARD_E("Google.de-DE-Standard-E"), GOOGLE_DE_DE_STANDARD_F("Google.de-DE-Standard-F"), + GOOGLE_DE_DE_STANDARD_G("Google.de-DE-Standard-G"), + GOOGLE_DE_DE_STANDARD_H("Google.de-DE-Standard-H"), GOOGLE_DE_DE_WAVENET_A("Google.de-DE-Wavenet-A"), GOOGLE_DE_DE_WAVENET_B("Google.de-DE-Wavenet-B"), GOOGLE_DE_DE_WAVENET_C("Google.de-DE-Wavenet-C"), GOOGLE_DE_DE_WAVENET_D("Google.de-DE-Wavenet-D"), GOOGLE_DE_DE_WAVENET_E("Google.de-DE-Wavenet-E"), GOOGLE_DE_DE_WAVENET_F("Google.de-DE-Wavenet-F"), + GOOGLE_DE_DE_WAVENET_G("Google.de-DE-Wavenet-G"), + GOOGLE_DE_DE_WAVENET_H("Google.de-DE-Wavenet-H"), GOOGLE_EL_GR_STANDARD_A("Google.el-GR-Standard-A"), + GOOGLE_EL_GR_STANDARD_B("Google.el-GR-Standard-B"), GOOGLE_EL_GR_WAVENET_A("Google.el-GR-Wavenet-A"), + GOOGLE_EL_GR_WAVENET_B("Google.el-GR-Wavenet-B"), + GOOGLE_EN_AU_CHIRP3_HD_AOEDE("Google.en-AU-Chirp3-HD-Aoede"), + GOOGLE_EN_AU_CHIRP3_HD_CHARON("Google.en-AU-Chirp3-HD-Charon"), + GOOGLE_EN_AU_CHIRP3_HD_FENRIR("Google.en-AU-Chirp3-HD-Fenrir"), + GOOGLE_EN_AU_CHIRP3_HD_KORE("Google.en-AU-Chirp3-HD-Kore"), + GOOGLE_EN_AU_CHIRP3_HD_LEDA("Google.en-AU-Chirp3-HD-Leda"), + GOOGLE_EN_AU_CHIRP3_HD_ORUS("Google.en-AU-Chirp3-HD-Orus"), + GOOGLE_EN_AU_CHIRP3_HD_PUCK("Google.en-AU-Chirp3-HD-Puck"), + GOOGLE_EN_AU_CHIRP3_HD_ZEPHYR("Google.en-AU-Chirp3-HD-Zephyr"), GOOGLE_EN_AU_NEURAL2_A("Google.en-AU-Neural2-A"), GOOGLE_EN_AU_NEURAL2_B("Google.en-AU-Neural2-B"), GOOGLE_EN_AU_NEURAL2_C("Google.en-AU-Neural2-C"), @@ -102,21 +162,43 @@ public enum Voice { GOOGLE_EN_AU_WAVENET_B("Google.en-AU-Wavenet-B"), GOOGLE_EN_AU_WAVENET_C("Google.en-AU-Wavenet-C"), GOOGLE_EN_AU_WAVENET_D("Google.en-AU-Wavenet-D"), + GOOGLE_EN_GB_CHIRP3_HD_AOEDE("Google.en-GB-Chirp3-HD-Aoede"), + GOOGLE_EN_GB_CHIRP3_HD_CHARON("Google.en-GB-Chirp3-HD-Charon"), + GOOGLE_EN_GB_CHIRP3_HD_FENRIR("Google.en-GB-Chirp3-HD-Fenrir"), + GOOGLE_EN_GB_CHIRP3_HD_KORE("Google.en-GB-Chirp3-HD-Kore"), + GOOGLE_EN_GB_CHIRP3_HD_LEDA("Google.en-GB-Chirp3-HD-Leda"), + GOOGLE_EN_GB_CHIRP3_HD_ORUS("Google.en-GB-Chirp3-HD-Orus"), + GOOGLE_EN_GB_CHIRP3_HD_PUCK("Google.en-GB-Chirp3-HD-Puck"), + GOOGLE_EN_GB_CHIRP3_HD_ZEPHYR("Google.en-GB-Chirp3-HD-Zephyr"), GOOGLE_EN_GB_NEURAL2_A("Google.en-GB-Neural2-A"), GOOGLE_EN_GB_NEURAL2_B("Google.en-GB-Neural2-B"), GOOGLE_EN_GB_NEURAL2_C("Google.en-GB-Neural2-C"), GOOGLE_EN_GB_NEURAL2_D("Google.en-GB-Neural2-D"), GOOGLE_EN_GB_NEURAL2_F("Google.en-GB-Neural2-F"), + GOOGLE_EN_GB_NEURAL2_N("Google.en-GB-Neural2-N"), + GOOGLE_EN_GB_NEURAL2_O("Google.en-GB-Neural2-O"), GOOGLE_EN_GB_STANDARD_A("Google.en-GB-Standard-A"), GOOGLE_EN_GB_STANDARD_B("Google.en-GB-Standard-B"), GOOGLE_EN_GB_STANDARD_C("Google.en-GB-Standard-C"), GOOGLE_EN_GB_STANDARD_D("Google.en-GB-Standard-D"), GOOGLE_EN_GB_STANDARD_F("Google.en-GB-Standard-F"), + GOOGLE_EN_GB_STANDARD_N("Google.en-GB-Standard-N"), + GOOGLE_EN_GB_STANDARD_O("Google.en-GB-Standard-O"), GOOGLE_EN_GB_WAVENET_A("Google.en-GB-Wavenet-A"), GOOGLE_EN_GB_WAVENET_B("Google.en-GB-Wavenet-B"), GOOGLE_EN_GB_WAVENET_C("Google.en-GB-Wavenet-C"), GOOGLE_EN_GB_WAVENET_D("Google.en-GB-Wavenet-D"), GOOGLE_EN_GB_WAVENET_F("Google.en-GB-Wavenet-F"), + GOOGLE_EN_GB_WAVENET_N("Google.en-GB-Wavenet-N"), + GOOGLE_EN_GB_WAVENET_O("Google.en-GB-Wavenet-O"), + GOOGLE_EN_IN_CHIRP3_HD_AOEDE("Google.en-IN-Chirp3-HD-Aoede"), + GOOGLE_EN_IN_CHIRP3_HD_CHARON("Google.en-IN-Chirp3-HD-Charon"), + GOOGLE_EN_IN_CHIRP3_HD_FENRIR("Google.en-IN-Chirp3-HD-Fenrir"), + GOOGLE_EN_IN_CHIRP3_HD_KORE("Google.en-IN-Chirp3-HD-Kore"), + GOOGLE_EN_IN_CHIRP3_HD_LEDA("Google.en-IN-Chirp3-HD-Leda"), + GOOGLE_EN_IN_CHIRP3_HD_ORUS("Google.en-IN-Chirp3-HD-Orus"), + GOOGLE_EN_IN_CHIRP3_HD_PUCK("Google.en-IN-Chirp3-HD-Puck"), + GOOGLE_EN_IN_CHIRP3_HD_ZEPHYR("Google.en-IN-Chirp3-HD-Zephyr"), GOOGLE_EN_IN_NEURAL2_A("Google.en-IN-Neural2-A"), GOOGLE_EN_IN_NEURAL2_B("Google.en-IN-Neural2-B"), GOOGLE_EN_IN_NEURAL2_C("Google.en-IN-Neural2-C"), @@ -125,10 +207,22 @@ public enum Voice { GOOGLE_EN_IN_STANDARD_B("Google.en-IN-Standard-B"), GOOGLE_EN_IN_STANDARD_C("Google.en-IN-Standard-C"), GOOGLE_EN_IN_STANDARD_D("Google.en-IN-Standard-D"), + GOOGLE_EN_IN_STANDARD_E("Google.en-IN-Standard-E"), + GOOGLE_EN_IN_STANDARD_F("Google.en-IN-Standard-F"), GOOGLE_EN_IN_WAVENET_A("Google.en-IN-Wavenet-A"), GOOGLE_EN_IN_WAVENET_B("Google.en-IN-Wavenet-B"), GOOGLE_EN_IN_WAVENET_C("Google.en-IN-Wavenet-C"), GOOGLE_EN_IN_WAVENET_D("Google.en-IN-Wavenet-D"), + GOOGLE_EN_IN_WAVENET_E("Google.en-IN-Wavenet-E"), + GOOGLE_EN_IN_WAVENET_F("Google.en-IN-Wavenet-F"), + GOOGLE_EN_US_CHIRP3_HD_AOEDE("Google.en-US-Chirp3-HD-Aoede"), + GOOGLE_EN_US_CHIRP3_HD_CHARON("Google.en-US-Chirp3-HD-Charon"), + GOOGLE_EN_US_CHIRP3_HD_FENRIR("Google.en-US-Chirp3-HD-Fenrir"), + GOOGLE_EN_US_CHIRP3_HD_KORE("Google.en-US-Chirp3-HD-Kore"), + GOOGLE_EN_US_CHIRP3_HD_LEDA("Google.en-US-Chirp3-HD-Leda"), + GOOGLE_EN_US_CHIRP3_HD_ORUS("Google.en-US-Chirp3-HD-Orus"), + GOOGLE_EN_US_CHIRP3_HD_PUCK("Google.en-US-Chirp3-HD-Puck"), + GOOGLE_EN_US_CHIRP3_HD_ZEPHYR("Google.en-US-Chirp3-HD-Zephyr"), GOOGLE_EN_US_NEURAL2_A("Google.en-US-Neural2-A"), GOOGLE_EN_US_NEURAL2_C("Google.en-US-Neural2-C"), GOOGLE_EN_US_NEURAL2_D("Google.en-US-Neural2-D"), @@ -158,18 +252,45 @@ public enum Voice { GOOGLE_EN_US_WAVENET_H("Google.en-US-Wavenet-H"), GOOGLE_EN_US_WAVENET_I("Google.en-US-Wavenet-I"), GOOGLE_EN_US_WAVENET_J("Google.en-US-Wavenet-J"), + GOOGLE_ES_ES_CHIRP3_HD_AOEDE("Google.es-ES-Chirp3-HD-Aoede"), + GOOGLE_ES_ES_CHIRP3_HD_CHARON("Google.es-ES-Chirp3-HD-Charon"), + GOOGLE_ES_ES_CHIRP3_HD_FENRIR("Google.es-ES-Chirp3-HD-Fenrir"), + GOOGLE_ES_ES_CHIRP3_HD_KORE("Google.es-ES-Chirp3-HD-Kore"), + GOOGLE_ES_ES_CHIRP3_HD_LEDA("Google.es-ES-Chirp3-HD-Leda"), + GOOGLE_ES_ES_CHIRP3_HD_ORUS("Google.es-ES-Chirp3-HD-Orus"), + GOOGLE_ES_ES_CHIRP3_HD_PUCK("Google.es-ES-Chirp3-HD-Puck"), + GOOGLE_ES_ES_CHIRP3_HD_ZEPHYR("Google.es-ES-Chirp3-HD-Zephyr"), GOOGLE_ES_ES_NEURAL2_A("Google.es-ES-Neural2-A"), GOOGLE_ES_ES_NEURAL2_B("Google.es-ES-Neural2-B"), GOOGLE_ES_ES_NEURAL2_C("Google.es-ES-Neural2-C"), GOOGLE_ES_ES_NEURAL2_D("Google.es-ES-Neural2-D"), GOOGLE_ES_ES_NEURAL2_E("Google.es-ES-Neural2-E"), GOOGLE_ES_ES_NEURAL2_F("Google.es-ES-Neural2-F"), + GOOGLE_ES_ES_NEURAL2_G("Google.es-ES-Neural2-G"), + GOOGLE_ES_ES_NEURAL2_H("Google.es-ES-Neural2-H"), + GOOGLE_ES_ES_STANDARD_A("Google.es-ES-Standard-A"), GOOGLE_ES_ES_STANDARD_B("Google.es-ES-Standard-B"), GOOGLE_ES_ES_STANDARD_C("Google.es-ES-Standard-C"), GOOGLE_ES_ES_STANDARD_D("Google.es-ES-Standard-D"), + GOOGLE_ES_ES_STANDARD_E("Google.es-ES-Standard-E"), + GOOGLE_ES_ES_STANDARD_F("Google.es-ES-Standard-F"), + GOOGLE_ES_ES_STANDARD_G("Google.es-ES-Standard-G"), + GOOGLE_ES_ES_STANDARD_H("Google.es-ES-Standard-H"), GOOGLE_ES_ES_WAVENET_B("Google.es-ES-Wavenet-B"), GOOGLE_ES_ES_WAVENET_C("Google.es-ES-Wavenet-C"), GOOGLE_ES_ES_WAVENET_D("Google.es-ES-Wavenet-D"), + GOOGLE_ES_ES_WAVENET_E("Google.es-ES-Wavenet-E"), + GOOGLE_ES_ES_WAVENET_F("Google.es-ES-Wavenet-F"), + GOOGLE_ES_ES_WAVENET_G("Google.es-ES-Wavenet-G"), + GOOGLE_ES_ES_WAVENET_H("Google.es-ES-Wavenet-H"), + GOOGLE_ES_US_CHIRP3_HD_AOEDE("Google.es-US-Chirp3-HD-Aoede"), + GOOGLE_ES_US_CHIRP3_HD_CHARON("Google.es-US-Chirp3-HD-Charon"), + GOOGLE_ES_US_CHIRP3_HD_FENRIR("Google.es-US-Chirp3-HD-Fenrir"), + GOOGLE_ES_US_CHIRP3_HD_KORE("Google.es-US-Chirp3-HD-Kore"), + GOOGLE_ES_US_CHIRP3_HD_LEDA("Google.es-US-Chirp3-HD-Leda"), + GOOGLE_ES_US_CHIRP3_HD_ORUS("Google.es-US-Chirp3-HD-Orus"), + GOOGLE_ES_US_CHIRP3_HD_PUCK("Google.es-US-Chirp3-HD-Puck"), + GOOGLE_ES_US_CHIRP3_HD_ZEPHYR("Google.es-US-Chirp3-HD-Zephyr"), GOOGLE_ES_US_NEURAL2_A("Google.es-US-Neural2-A"), GOOGLE_ES_US_NEURAL2_B("Google.es-US-Neural2-B"), GOOGLE_ES_US_NEURAL2_C("Google.es-US-Neural2-C"), @@ -180,8 +301,13 @@ public enum Voice { GOOGLE_ES_US_WAVENET_B("Google.es-US-Wavenet-B"), GOOGLE_ES_US_WAVENET_C("Google.es-US-Wavenet-C"), GOOGLE_EU_ES_STANDARD_A("Google.eu-ES-Standard-A"), + GOOGLE_EU_ES_STANDARD_B("Google.eu-ES-Standard-B"), GOOGLE_FI_FI_STANDARD_A("Google.fi-FI-Standard-A"), + GOOGLE_FI_FI_STANDARD_B("Google.fi-FI-Standard-B"), GOOGLE_FI_FI_WAVENET_A("Google.fi-FI-Wavenet-A"), + GOOGLE_FI_FI_WAVENET_B("Google.fi-FI-Wavenet-B"), + GOOGLE_FIL_PH_NEURAL2_A("Google.fil-ph-Neural2-A"), + GOOGLE_FIL_PH_NEURAL2_D("Google.fil-ph-Neural2-D"), GOOGLE_FIL_PH_STANDARD_A("Google.fil-PH-Standard-A"), GOOGLE_FIL_PH_STANDARD_B("Google.fil-PH-Standard-B"), GOOGLE_FIL_PH_STANDARD_C("Google.fil-PH-Standard-C"), @@ -190,8 +316,14 @@ public enum Voice { GOOGLE_FIL_PH_WAVENET_B("Google.fil-PH-Wavenet-B"), GOOGLE_FIL_PH_WAVENET_C("Google.fil-PH-Wavenet-C"), GOOGLE_FIL_PH_WAVENET_D("Google.fil-PH-Wavenet-D"), - GOOGLE_FIL_PH_NEURAL2_A("Google.fil-ph-Neural2-A"), - GOOGLE_FIL_PH_NEURAL2_D("Google.fil-ph-Neural2-D"), + GOOGLE_FR_CA_CHIRP3_HD_AOEDE("Google.fr-CA-Chirp3-HD-Aoede"), + GOOGLE_FR_CA_CHIRP3_HD_CHARON("Google.fr-CA-Chirp3-HD-Charon"), + GOOGLE_FR_CA_CHIRP3_HD_FENRIR("Google.fr-CA-Chirp3-HD-Fenrir"), + GOOGLE_FR_CA_CHIRP3_HD_KORE("Google.fr-CA-Chirp3-HD-Kore"), + GOOGLE_FR_CA_CHIRP3_HD_LEDA("Google.fr-CA-Chirp3-HD-Leda"), + GOOGLE_FR_CA_CHIRP3_HD_ORUS("Google.fr-CA-Chirp3-HD-Orus"), + GOOGLE_FR_CA_CHIRP3_HD_PUCK("Google.fr-CA-Chirp3-HD-Puck"), + GOOGLE_FR_CA_CHIRP3_HD_ZEPHYR("Google.fr-CA-Chirp3-HD-Zephyr"), GOOGLE_FR_CA_NEURAL2_A("Google.fr-CA-Neural2-A"), GOOGLE_FR_CA_NEURAL2_B("Google.fr-CA-Neural2-B"), GOOGLE_FR_CA_NEURAL2_C("Google.fr-CA-Neural2-C"), @@ -204,24 +336,51 @@ public enum Voice { GOOGLE_FR_CA_WAVENET_B("Google.fr-CA-Wavenet-B"), GOOGLE_FR_CA_WAVENET_C("Google.fr-CA-Wavenet-C"), GOOGLE_FR_CA_WAVENET_D("Google.fr-CA-Wavenet-D"), + GOOGLE_FR_FR_CHIRP3_HD_AOEDE("Google.fr-FR-Chirp3-HD-Aoede"), + GOOGLE_FR_FR_CHIRP3_HD_CHARON("Google.fr-FR-Chirp3-HD-Charon"), + GOOGLE_FR_FR_CHIRP3_HD_FENRIR("Google.fr-FR-Chirp3-HD-Fenrir"), + GOOGLE_FR_FR_CHIRP3_HD_KORE("Google.fr-FR-Chirp3-HD-Kore"), + GOOGLE_FR_FR_CHIRP3_HD_LEDA("Google.fr-FR-Chirp3-HD-Leda"), + GOOGLE_FR_FR_CHIRP3_HD_ORUS("Google.fr-FR-Chirp3-HD-Orus"), + GOOGLE_FR_FR_CHIRP3_HD_PUCK("Google.fr-FR-Chirp3-HD-Puck"), + GOOGLE_FR_FR_CHIRP3_HD_ZEPHYR("Google.fr-FR-Chirp3-HD-Zephyr"), GOOGLE_FR_FR_NEURAL2_A("Google.fr-FR-Neural2-A"), GOOGLE_FR_FR_NEURAL2_B("Google.fr-FR-Neural2-B"), GOOGLE_FR_FR_NEURAL2_C("Google.fr-FR-Neural2-C"), GOOGLE_FR_FR_NEURAL2_D("Google.fr-FR-Neural2-D"), GOOGLE_FR_FR_NEURAL2_E("Google.fr-FR-Neural2-E"), + GOOGLE_FR_FR_NEURAL2_F("Google.fr-FR-Neural2-F"), + GOOGLE_FR_FR_NEURAL2_G("Google.fr-FR-Neural2-G"), GOOGLE_FR_FR_STANDARD_A("Google.fr-FR-Standard-A"), GOOGLE_FR_FR_STANDARD_B("Google.fr-FR-Standard-B"), GOOGLE_FR_FR_STANDARD_C("Google.fr-FR-Standard-C"), GOOGLE_FR_FR_STANDARD_D("Google.fr-FR-Standard-D"), GOOGLE_FR_FR_STANDARD_E("Google.fr-FR-Standard-E"), + GOOGLE_FR_FR_STANDARD_F("Google.fr-FR-Standard-F"), + GOOGLE_FR_FR_STANDARD_G("Google.fr-FR-Standard-G"), GOOGLE_FR_FR_WAVENET_A("Google.fr-FR-Wavenet-A"), GOOGLE_FR_FR_WAVENET_B("Google.fr-FR-Wavenet-B"), GOOGLE_FR_FR_WAVENET_C("Google.fr-FR-Wavenet-C"), GOOGLE_FR_FR_WAVENET_D("Google.fr-FR-Wavenet-D"), GOOGLE_FR_FR_WAVENET_E("Google.fr-FR-Wavenet-E"), + GOOGLE_FR_FR_WAVENET_F("Google.fr-FR-Wavenet-F"), + GOOGLE_FR_FR_WAVENET_G("Google.fr-FR-Wavenet-G"), GOOGLE_GL_ES_STANDARD_A("Google.gl-ES-Standard-A"), + GOOGLE_GL_ES_STANDARD_B("Google.gl-ES-Standard-B"), + GOOGLE_GU_IN_CHIRP3_HD_AOEDE("Google.gu-IN-Chirp3-HD-Aoede"), + GOOGLE_GU_IN_CHIRP3_HD_CHARON("Google.gu-IN-Chirp3-HD-Charon"), + GOOGLE_GU_IN_CHIRP3_HD_FENRIR("Google.gu-IN-Chirp3-HD-Fenrir"), + GOOGLE_GU_IN_CHIRP3_HD_KORE("Google.gu-IN-Chirp3-HD-Kore"), + GOOGLE_GU_IN_CHIRP3_HD_LEDA("Google.gu-IN-Chirp3-HD-Leda"), + GOOGLE_GU_IN_CHIRP3_HD_ORUS("Google.gu-IN-Chirp3-HD-Orus"), + GOOGLE_GU_IN_CHIRP3_HD_PUCK("Google.gu-IN-Chirp3-HD-Puck"), + GOOGLE_GU_IN_CHIRP3_HD_ZEPHYR("Google.gu-IN-Chirp3-HD-Zephyr"), + GOOGLE_GU_IN_STANDARD_A("Google.gu-IN-Standard-A"), + GOOGLE_GU_IN_STANDARD_B("Google.gu-IN-Standard-B"), GOOGLE_GU_IN_STANDARD_C("Google.gu-IN-Standard-C"), GOOGLE_GU_IN_STANDARD_D("Google.gu-IN-Standard-D"), + GOOGLE_GU_IN_WAVENET_A("Google.gu-IN-Wavenet-A"), + GOOGLE_GU_IN_WAVENET_B("Google.gu-IN-Wavenet-B"), GOOGLE_GU_IN_WAVENET_C("Google.gu-IN-Wavenet-C"), GOOGLE_GU_IN_WAVENET_D("Google.gu-IN-Wavenet-D"), GOOGLE_HE_IL_STANDARD_A("Google.he-IL-Standard-A"), @@ -232,6 +391,14 @@ public enum Voice { GOOGLE_HE_IL_WAVENET_B("Google.he-IL-Wavenet-B"), GOOGLE_HE_IL_WAVENET_C("Google.he-IL-Wavenet-C"), GOOGLE_HE_IL_WAVENET_D("Google.he-IL-Wavenet-D"), + GOOGLE_HI_IN_CHIRP3_HD_AOEDE("Google.hi-IN-Chirp3-HD-Aoede"), + GOOGLE_HI_IN_CHIRP3_HD_CHARON("Google.hi-IN-Chirp3-HD-Charon"), + GOOGLE_HI_IN_CHIRP3_HD_FENRIR("Google.hi-IN-Chirp3-HD-Fenrir"), + GOOGLE_HI_IN_CHIRP3_HD_KORE("Google.hi-IN-Chirp3-HD-Kore"), + GOOGLE_HI_IN_CHIRP3_HD_LEDA("Google.hi-IN-Chirp3-HD-Leda"), + GOOGLE_HI_IN_CHIRP3_HD_ORUS("Google.hi-IN-Chirp3-HD-Orus"), + GOOGLE_HI_IN_CHIRP3_HD_PUCK("Google.hi-IN-Chirp3-HD-Puck"), + GOOGLE_HI_IN_CHIRP3_HD_ZEPHYR("Google.hi-IN-Chirp3-HD-Zephyr"), GOOGLE_HI_IN_NEURAL2_A("Google.hi-IN-Neural2-A"), GOOGLE_HI_IN_NEURAL2_B("Google.hi-IN-Neural2-B"), GOOGLE_HI_IN_NEURAL2_C("Google.hi-IN-Neural2-C"), @@ -240,12 +407,25 @@ public enum Voice { GOOGLE_HI_IN_STANDARD_B("Google.hi-IN-Standard-B"), GOOGLE_HI_IN_STANDARD_C("Google.hi-IN-Standard-C"), GOOGLE_HI_IN_STANDARD_D("Google.hi-IN-Standard-D"), + GOOGLE_HI_IN_STANDARD_E("Google.hi-IN-Standard-E"), + GOOGLE_HI_IN_STANDARD_F("Google.hi-IN-Standard-F"), GOOGLE_HI_IN_WAVENET_A("Google.hi-IN-Wavenet-A"), GOOGLE_HI_IN_WAVENET_B("Google.hi-IN-Wavenet-B"), GOOGLE_HI_IN_WAVENET_C("Google.hi-IN-Wavenet-C"), GOOGLE_HI_IN_WAVENET_D("Google.hi-IN-Wavenet-D"), + GOOGLE_HI_IN_WAVENET_E("Google.hi-IN-Wavenet-E"), + GOOGLE_HI_IN_WAVENET_F("Google.hi-IN-Wavenet-F"), GOOGLE_HU_HU_STANDARD_A("Google.hu-HU-Standard-A"), + GOOGLE_HU_HU_STANDARD_B("Google.hu-HU-Standard-B"), GOOGLE_HU_HU_WAVENET_A("Google.hu-HU-Wavenet-A"), + GOOGLE_ID_ID_CHIRP3_HD_AOEDE("Google.id-ID-Chirp3-HD-Aoede"), + GOOGLE_ID_ID_CHIRP3_HD_CHARON("Google.id-ID-Chirp3-HD-Charon"), + GOOGLE_ID_ID_CHIRP3_HD_FENRIR("Google.id-ID-Chirp3-HD-Fenrir"), + GOOGLE_ID_ID_CHIRP3_HD_KORE("Google.id-ID-Chirp3-HD-Kore"), + GOOGLE_ID_ID_CHIRP3_HD_LEDA("Google.id-ID-Chirp3-HD-Leda"), + GOOGLE_ID_ID_CHIRP3_HD_ORUS("Google.id-ID-Chirp3-HD-Orus"), + GOOGLE_ID_ID_CHIRP3_HD_PUCK("Google.id-ID-Chirp3-HD-Puck"), + GOOGLE_ID_ID_CHIRP3_HD_ZEPHYR("Google.id-ID-Chirp3-HD-Zephyr"), GOOGLE_ID_ID_STANDARD_A("Google.id-ID-Standard-A"), GOOGLE_ID_ID_STANDARD_B("Google.id-ID-Standard-B"), GOOGLE_ID_ID_STANDARD_C("Google.id-ID-Standard-C"), @@ -255,14 +435,38 @@ public enum Voice { GOOGLE_ID_ID_WAVENET_C("Google.id-ID-Wavenet-C"), GOOGLE_ID_ID_WAVENET_D("Google.id-ID-Wavenet-D"), GOOGLE_IS_IS_STANDARD_A("Google.is-IS-Standard-A"), + GOOGLE_IS_IS_STANDARD_B("Google.is-IS-Standard-B"), + GOOGLE_IT_IT_CHIRP3_HD_AOEDE("Google.it-IT-Chirp3-HD-Aoede"), + GOOGLE_IT_IT_CHIRP3_HD_CHARON("Google.it-IT-Chirp3-HD-Charon"), + GOOGLE_IT_IT_CHIRP3_HD_FENRIR("Google.it-IT-Chirp3-HD-Fenrir"), + GOOGLE_IT_IT_CHIRP3_HD_KORE("Google.it-IT-Chirp3-HD-Kore"), + GOOGLE_IT_IT_CHIRP3_HD_LEDA("Google.it-IT-Chirp3-HD-Leda"), + GOOGLE_IT_IT_CHIRP3_HD_ORUS("Google.it-IT-Chirp3-HD-Orus"), + GOOGLE_IT_IT_CHIRP3_HD_PUCK("Google.it-IT-Chirp3-HD-Puck"), + GOOGLE_IT_IT_CHIRP3_HD_ZEPHYR("Google.it-IT-Chirp3-HD-Zephyr"), GOOGLE_IT_IT_NEURAL2_A("Google.it-IT-Neural2-A"), GOOGLE_IT_IT_NEURAL2_C("Google.it-IT-Neural2-C"), + GOOGLE_IT_IT_NEURAL2_F("Google.it-IT-Neural2-F"), + GOOGLE_IT_IT_STANDARD_A("Google.it-IT-Standard-A"), GOOGLE_IT_IT_STANDARD_B("Google.it-IT-Standard-B"), GOOGLE_IT_IT_STANDARD_C("Google.it-IT-Standard-C"), GOOGLE_IT_IT_STANDARD_D("Google.it-IT-Standard-D"), + GOOGLE_IT_IT_STANDARD_E("Google.it-IT-Standard-E"), + GOOGLE_IT_IT_STANDARD_F("Google.it-IT-Standard-F"), + GOOGLE_IT_IT_WAVENET_A("Google.it-IT-Wavenet-A"), GOOGLE_IT_IT_WAVENET_B("Google.it-IT-Wavenet-B"), GOOGLE_IT_IT_WAVENET_C("Google.it-IT-Wavenet-C"), GOOGLE_IT_IT_WAVENET_D("Google.it-IT-Wavenet-D"), + GOOGLE_IT_IT_WAVENET_E("Google.it-IT-Wavenet-E"), + GOOGLE_IT_IT_WAVENET_F("Google.it-IT-Wavenet-F"), + GOOGLE_JA_JP_CHIRP3_HD_AOEDE("Google.ja-JP-Chirp3-HD-Aoede"), + GOOGLE_JA_JP_CHIRP3_HD_CHARON("Google.ja-JP-Chirp3-HD-Charon"), + GOOGLE_JA_JP_CHIRP3_HD_FENRIR("Google.ja-JP-Chirp3-HD-Fenrir"), + GOOGLE_JA_JP_CHIRP3_HD_KORE("Google.ja-JP-Chirp3-HD-Kore"), + GOOGLE_JA_JP_CHIRP3_HD_LEDA("Google.ja-JP-Chirp3-HD-Leda"), + GOOGLE_JA_JP_CHIRP3_HD_ORUS("Google.ja-JP-Chirp3-HD-Orus"), + GOOGLE_JA_JP_CHIRP3_HD_PUCK("Google.ja-JP-Chirp3-HD-Puck"), + GOOGLE_JA_JP_CHIRP3_HD_ZEPHYR("Google.ja-JP-Chirp3-HD-Zephyr"), GOOGLE_JA_JP_NEURAL2_B("Google.ja-JP-Neural2-B"), GOOGLE_JA_JP_NEURAL2_C("Google.ja-JP-Neural2-C"), GOOGLE_JA_JP_NEURAL2_D("Google.ja-JP-Neural2-D"), @@ -274,10 +478,30 @@ public enum Voice { GOOGLE_JA_JP_WAVENET_B("Google.ja-JP-Wavenet-B"), GOOGLE_JA_JP_WAVENET_C("Google.ja-JP-Wavenet-C"), GOOGLE_JA_JP_WAVENET_D("Google.ja-JP-Wavenet-D"), + GOOGLE_KN_IN_CHIRP3_HD_AOEDE("Google.kn-IN-Chirp3-HD-Aoede"), + GOOGLE_KN_IN_CHIRP3_HD_CHARON("Google.kn-IN-Chirp3-HD-Charon"), + GOOGLE_KN_IN_CHIRP3_HD_FENRIR("Google.kn-IN-Chirp3-HD-Fenrir"), + GOOGLE_KN_IN_CHIRP3_HD_KORE("Google.kn-IN-Chirp3-HD-Kore"), + GOOGLE_KN_IN_CHIRP3_HD_LEDA("Google.kn-IN-Chirp3-HD-Leda"), + GOOGLE_KN_IN_CHIRP3_HD_ORUS("Google.kn-IN-Chirp3-HD-Orus"), + GOOGLE_KN_IN_CHIRP3_HD_PUCK("Google.kn-IN-Chirp3-HD-Puck"), + GOOGLE_KN_IN_CHIRP3_HD_ZEPHYR("Google.kn-IN-Chirp3-HD-Zephyr"), + GOOGLE_KN_IN_STANDARD_A("Google.kn-IN-Standard-A"), + GOOGLE_KN_IN_STANDARD_B("Google.kn-IN-Standard-B"), GOOGLE_KN_IN_STANDARD_C("Google.kn-IN-Standard-C"), GOOGLE_KN_IN_STANDARD_D("Google.kn-IN-Standard-D"), + GOOGLE_KN_IN_WAVENET_A("Google.kn-IN-Wavenet-A"), + GOOGLE_KN_IN_WAVENET_B("Google.kn-IN-Wavenet-B"), GOOGLE_KN_IN_WAVENET_C("Google.kn-IN-Wavenet-C"), GOOGLE_KN_IN_WAVENET_D("Google.kn-IN-Wavenet-D"), + GOOGLE_KO_KR_CHIRP3_HD_AOEDE("Google.ko-KR-Chirp3-HD-Aoede"), + GOOGLE_KO_KR_CHIRP3_HD_CHARON("Google.ko-KR-Chirp3-HD-Charon"), + GOOGLE_KO_KR_CHIRP3_HD_FENRIR("Google.ko-KR-Chirp3-HD-Fenrir"), + GOOGLE_KO_KR_CHIRP3_HD_KORE("Google.ko-KR-Chirp3-HD-Kore"), + GOOGLE_KO_KR_CHIRP3_HD_LEDA("Google.ko-KR-Chirp3-HD-Leda"), + GOOGLE_KO_KR_CHIRP3_HD_ORUS("Google.ko-KR-Chirp3-HD-Orus"), + GOOGLE_KO_KR_CHIRP3_HD_PUCK("Google.ko-KR-Chirp3-HD-Puck"), + GOOGLE_KO_KR_CHIRP3_HD_ZEPHYR("Google.ko-KR-Chirp3-HD-Zephyr"), GOOGLE_KO_KR_NEURAL2_A("Google.ko-KR-Neural2-A"), GOOGLE_KO_KR_NEURAL2_B("Google.ko-KR-Neural2-B"), GOOGLE_KO_KR_NEURAL2_C("Google.ko-KR-Neural2-C"), @@ -290,9 +514,33 @@ public enum Voice { GOOGLE_KO_KR_WAVENET_C("Google.ko-KR-Wavenet-C"), GOOGLE_KO_KR_WAVENET_D("Google.ko-KR-Wavenet-D"), GOOGLE_LT_LT_STANDARD_A("Google.lt-LT-Standard-A"), + GOOGLE_LT_LT_STANDARD_B("Google.lt-LT-Standard-B"), GOOGLE_LV_LV_STANDARD_A("Google.lv-LV-Standard-A"), + GOOGLE_LV_LV_STANDARD_B("Google.lv-LV-Standard-B"), + GOOGLE_ML_IN_CHIRP3_HD_AOEDE("Google.ml-IN-Chirp3-HD-Aoede"), + GOOGLE_ML_IN_CHIRP3_HD_CHARON("Google.ml-IN-Chirp3-HD-Charon"), + GOOGLE_ML_IN_CHIRP3_HD_FENRIR("Google.ml-IN-Chirp3-HD-Fenrir"), + GOOGLE_ML_IN_CHIRP3_HD_KORE("Google.ml-IN-Chirp3-HD-Kore"), + GOOGLE_ML_IN_CHIRP3_HD_LEDA("Google.ml-IN-Chirp3-HD-Leda"), + GOOGLE_ML_IN_CHIRP3_HD_ORUS("Google.ml-IN-Chirp3-HD-Orus"), + GOOGLE_ML_IN_CHIRP3_HD_PUCK("Google.ml-IN-Chirp3-HD-Puck"), + GOOGLE_ML_IN_CHIRP3_HD_ZEPHYR("Google.ml-IN-Chirp3-HD-Zephyr"), + GOOGLE_ML_IN_STANDARD_A("Google.ml-IN-Standard-A"), + GOOGLE_ML_IN_STANDARD_B("Google.ml-IN-Standard-B"), + GOOGLE_ML_IN_STANDARD_C("Google.ml-IN-Standard-C"), + GOOGLE_ML_IN_STANDARD_D("Google.ml-IN-Standard-D"), + GOOGLE_ML_IN_WAVENET_A("Google.ml-IN-Wavenet-A"), + GOOGLE_ML_IN_WAVENET_B("Google.ml-IN-Wavenet-B"), GOOGLE_ML_IN_WAVENET_C("Google.ml-IN-Wavenet-C"), GOOGLE_ML_IN_WAVENET_D("Google.ml-IN-Wavenet-D"), + GOOGLE_MR_IN_CHIRP3_HD_AOEDE("Google.mr-IN-Chirp3-HD-Aoede"), + GOOGLE_MR_IN_CHIRP3_HD_CHARON("Google.mr-IN-Chirp3-HD-Charon"), + GOOGLE_MR_IN_CHIRP3_HD_FENRIR("Google.mr-IN-Chirp3-HD-Fenrir"), + GOOGLE_MR_IN_CHIRP3_HD_KORE("Google.mr-IN-Chirp3-HD-Kore"), + GOOGLE_MR_IN_CHIRP3_HD_LEDA("Google.mr-IN-Chirp3-HD-Leda"), + GOOGLE_MR_IN_CHIRP3_HD_ORUS("Google.mr-IN-Chirp3-HD-Orus"), + GOOGLE_MR_IN_CHIRP3_HD_PUCK("Google.mr-IN-Chirp3-HD-Puck"), + GOOGLE_MR_IN_CHIRP3_HD_ZEPHYR("Google.mr-IN-Chirp3-HD-Zephyr"), GOOGLE_MR_IN_STANDARD_A("Google.mr-IN-Standard-A"), GOOGLE_MR_IN_STANDARD_B("Google.mr-IN-Standard-B"), GOOGLE_MR_IN_STANDARD_C("Google.mr-IN-Standard-C"), @@ -312,25 +560,45 @@ public enum Voice { GOOGLE_NB_NO_STANDARD_C("Google.nb-NO-Standard-C"), GOOGLE_NB_NO_STANDARD_D("Google.nb-NO-Standard-D"), GOOGLE_NB_NO_STANDARD_E("Google.nb-NO-Standard-E"), + GOOGLE_NB_NO_STANDARD_F("Google.nb-NO-Standard-F"), + GOOGLE_NB_NO_STANDARD_G("Google.nb-NO-Standard-G"), GOOGLE_NB_NO_WAVENET_A("Google.nb-NO-Wavenet-A"), GOOGLE_NB_NO_WAVENET_B("Google.nb-NO-Wavenet-B"), GOOGLE_NB_NO_WAVENET_C("Google.nb-NO-Wavenet-C"), GOOGLE_NB_NO_WAVENET_D("Google.nb-NO-Wavenet-D"), GOOGLE_NB_NO_WAVENET_E("Google.nb-NO-Wavenet-E"), + GOOGLE_NB_NO_WAVENET_F("Google.nb-NO-Wavenet-F"), + GOOGLE_NB_NO_WAVENET_G("Google.nb-NO-Wavenet-G"), GOOGLE_NL_BE_STANDARD_A("Google.nl-BE-Standard-A"), GOOGLE_NL_BE_STANDARD_B("Google.nl-BE-Standard-B"), + GOOGLE_NL_BE_STANDARD_C("Google.nl-BE-Standard-C"), + GOOGLE_NL_BE_STANDARD_D("Google.nl-BE-Standard-D"), GOOGLE_NL_BE_WAVENET_A("Google.nl-BE-Wavenet-A"), GOOGLE_NL_BE_WAVENET_B("Google.nl-BE-Wavenet-B"), + GOOGLE_NL_BE_WAVENET_C("Google.nl-BE-Wavenet-C"), + GOOGLE_NL_BE_WAVENET_D("Google.nl-BE-Wavenet-D"), + GOOGLE_NL_NL_CHIRP3_HD_AOEDE("Google.nl-NL-Chirp3-HD-Aoede"), + GOOGLE_NL_NL_CHIRP3_HD_CHARON("Google.nl-NL-Chirp3-HD-Charon"), + GOOGLE_NL_NL_CHIRP3_HD_FENRIR("Google.nl-NL-Chirp3-HD-Fenrir"), + GOOGLE_NL_NL_CHIRP3_HD_KORE("Google.nl-NL-Chirp3-HD-Kore"), + GOOGLE_NL_NL_CHIRP3_HD_LEDA("Google.nl-NL-Chirp3-HD-Leda"), + GOOGLE_NL_NL_CHIRP3_HD_ORUS("Google.nl-NL-Chirp3-HD-Orus"), + GOOGLE_NL_NL_CHIRP3_HD_PUCK("Google.nl-NL-Chirp3-HD-Puck"), + GOOGLE_NL_NL_CHIRP3_HD_ZEPHYR("Google.nl-NL-Chirp3-HD-Zephyr"), GOOGLE_NL_NL_STANDARD_A("Google.nl-NL-Standard-A"), GOOGLE_NL_NL_STANDARD_B("Google.nl-NL-Standard-B"), GOOGLE_NL_NL_STANDARD_C("Google.nl-NL-Standard-C"), GOOGLE_NL_NL_STANDARD_D("Google.nl-NL-Standard-D"), GOOGLE_NL_NL_STANDARD_E("Google.nl-NL-Standard-E"), + GOOGLE_NL_NL_STANDARD_F("Google.nl-NL-Standard-F"), + GOOGLE_NL_NL_STANDARD_G("Google.nl-NL-Standard-G"), GOOGLE_NL_NL_WAVENET_A("Google.nl-NL-Wavenet-A"), GOOGLE_NL_NL_WAVENET_B("Google.nl-NL-Wavenet-B"), GOOGLE_NL_NL_WAVENET_C("Google.nl-NL-Wavenet-C"), GOOGLE_NL_NL_WAVENET_D("Google.nl-NL-Wavenet-D"), GOOGLE_NL_NL_WAVENET_E("Google.nl-NL-Wavenet-E"), + GOOGLE_NL_NL_WAVENET_F("Google.nl-NL-Wavenet-F"), + GOOGLE_NL_NL_WAVENET_G("Google.nl-NL-Wavenet-G"), GOOGLE_PA_IN_STANDARD_A("Google.pa-IN-Standard-A"), GOOGLE_PA_IN_STANDARD_B("Google.pa-IN-Standard-B"), GOOGLE_PA_IN_STANDARD_C("Google.pa-IN-Standard-C"), @@ -339,35 +607,73 @@ public enum Voice { GOOGLE_PA_IN_WAVENET_B("Google.pa-IN-Wavenet-B"), GOOGLE_PA_IN_WAVENET_C("Google.pa-IN-Wavenet-C"), GOOGLE_PA_IN_WAVENET_D("Google.pa-IN-Wavenet-D"), + GOOGLE_PL_PL_CHIRP3_HD_AOEDE("Google.pl-PL-Chirp3-HD-Aoede"), + GOOGLE_PL_PL_CHIRP3_HD_CHARON("Google.pl-PL-Chirp3-HD-Charon"), + GOOGLE_PL_PL_CHIRP3_HD_FENRIR("Google.pl-PL-Chirp3-HD-Fenrir"), + GOOGLE_PL_PL_CHIRP3_HD_KORE("Google.pl-PL-Chirp3-HD-Kore"), + GOOGLE_PL_PL_CHIRP3_HD_LEDA("Google.pl-PL-Chirp3-HD-Leda"), + GOOGLE_PL_PL_CHIRP3_HD_ORUS("Google.pl-PL-Chirp3-HD-Orus"), + GOOGLE_PL_PL_CHIRP3_HD_PUCK("Google.pl-PL-Chirp3-HD-Puck"), + GOOGLE_PL_PL_CHIRP3_HD_ZEPHYR("Google.pl-PL-Chirp3-HD-Zephyr"), GOOGLE_PL_PL_STANDARD_A("Google.pl-PL-Standard-A"), GOOGLE_PL_PL_STANDARD_B("Google.pl-PL-Standard-B"), GOOGLE_PL_PL_STANDARD_C("Google.pl-PL-Standard-C"), GOOGLE_PL_PL_STANDARD_D("Google.pl-PL-Standard-D"), GOOGLE_PL_PL_STANDARD_E("Google.pl-PL-Standard-E"), + GOOGLE_PL_PL_STANDARD_F("Google.pl-PL-Standard-F"), + GOOGLE_PL_PL_STANDARD_G("Google.pl-PL-Standard-G"), GOOGLE_PL_PL_WAVENET_A("Google.pl-PL-Wavenet-A"), GOOGLE_PL_PL_WAVENET_B("Google.pl-PL-Wavenet-B"), GOOGLE_PL_PL_WAVENET_C("Google.pl-PL-Wavenet-C"), GOOGLE_PL_PL_WAVENET_D("Google.pl-PL-Wavenet-D"), GOOGLE_PL_PL_WAVENET_E("Google.pl-PL-Wavenet-E"), + GOOGLE_PL_PL_WAVENET_F("Google.pl-PL-Wavenet-F"), + GOOGLE_PL_PL_WAVENET_G("Google.pl-PL-Wavenet-G"), + GOOGLE_PT_BR_CHIRP3_HD_AOEDE("Google.pt-BR-Chirp3-HD-Aoede"), + GOOGLE_PT_BR_CHIRP3_HD_CHARON("Google.pt-BR-Chirp3-HD-Charon"), + GOOGLE_PT_BR_CHIRP3_HD_FENRIR("Google.pt-BR-Chirp3-HD-Fenrir"), + GOOGLE_PT_BR_CHIRP3_HD_KORE("Google.pt-BR-Chirp3-HD-Kore"), + GOOGLE_PT_BR_CHIRP3_HD_LEDA("Google.pt-BR-Chirp3-HD-Leda"), + GOOGLE_PT_BR_CHIRP3_HD_ORUS("Google.pt-BR-Chirp3-HD-Orus"), + GOOGLE_PT_BR_CHIRP3_HD_PUCK("Google.pt-BR-Chirp3-HD-Puck"), + GOOGLE_PT_BR_CHIRP3_HD_ZEPHYR("Google.pt-BR-Chirp3-HD-Zephyr"), GOOGLE_PT_BR_NEURAL2_A("Google.pt-BR-Neural2-A"), GOOGLE_PT_BR_NEURAL2_B("Google.pt-BR-Neural2-B"), GOOGLE_PT_BR_NEURAL2_C("Google.pt-BR-Neural2-C"), GOOGLE_PT_BR_STANDARD_A("Google.pt-BR-Standard-A"), GOOGLE_PT_BR_STANDARD_B("Google.pt-BR-Standard-B"), GOOGLE_PT_BR_STANDARD_C("Google.pt-BR-Standard-C"), + GOOGLE_PT_BR_STANDARD_D("Google.pt-BR-Standard-D"), + GOOGLE_PT_BR_STANDARD_E("Google.pt-BR-Standard-E"), GOOGLE_PT_BR_WAVENET_A("Google.pt-BR-Wavenet-A"), GOOGLE_PT_BR_WAVENET_B("Google.pt-BR-Wavenet-B"), GOOGLE_PT_BR_WAVENET_C("Google.pt-BR-Wavenet-C"), + GOOGLE_PT_BR_WAVENET_D("Google.pt-BR-Wavenet-D"), + GOOGLE_PT_BR_WAVENET_E("Google.pt-BR-Wavenet-E"), GOOGLE_PT_PT_STANDARD_A("Google.pt-PT-Standard-A"), GOOGLE_PT_PT_STANDARD_B("Google.pt-PT-Standard-B"), GOOGLE_PT_PT_STANDARD_C("Google.pt-PT-Standard-C"), GOOGLE_PT_PT_STANDARD_D("Google.pt-PT-Standard-D"), + GOOGLE_PT_PT_STANDARD_E("Google.pt-PT-Standard-E"), + GOOGLE_PT_PT_STANDARD_F("Google.pt-PT-Standard-F"), GOOGLE_PT_PT_WAVENET_A("Google.pt-PT-Wavenet-A"), GOOGLE_PT_PT_WAVENET_B("Google.pt-PT-Wavenet-B"), GOOGLE_PT_PT_WAVENET_C("Google.pt-PT-Wavenet-C"), GOOGLE_PT_PT_WAVENET_D("Google.pt-PT-Wavenet-D"), + GOOGLE_PT_PT_WAVENET_E("Google.pt-PT-Wavenet-E"), + GOOGLE_PT_PT_WAVENET_F("Google.pt-PT-Wavenet-F"), GOOGLE_RO_RO_STANDARD_A("Google.ro-RO-Standard-A"), + GOOGLE_RO_RO_STANDARD_B("Google.ro-RO-Standard-B"), GOOGLE_RO_RO_WAVENET_A("Google.ro-RO-Wavenet-A"), + GOOGLE_RO_RO_WAVENET_B("Google.ro-RO-Wavenet-B"), + GOOGLE_RU_RU_CHIRP3_HD_AOEDE("Google.ru-RU-Chirp3-HD-Aoede"), + GOOGLE_RU_RU_CHIRP3_HD_CHARON("Google.ru-RU-Chirp3-HD-Charon"), + GOOGLE_RU_RU_CHIRP3_HD_FENRIR("Google.ru-RU-Chirp3-HD-Fenrir"), + GOOGLE_RU_RU_CHIRP3_HD_KORE("Google.ru-RU-Chirp3-HD-Kore"), + GOOGLE_RU_RU_CHIRP3_HD_LEDA("Google.ru-RU-Chirp3-HD-Leda"), + GOOGLE_RU_RU_CHIRP3_HD_ORUS("Google.ru-RU-Chirp3-HD-Orus"), + GOOGLE_RU_RU_CHIRP3_HD_PUCK("Google.ru-RU-Chirp3-HD-Puck"), + GOOGLE_RU_RU_CHIRP3_HD_ZEPHYR("Google.ru-RU-Chirp3-HD-Zephyr"), GOOGLE_RU_RU_STANDARD_A("Google.ru-RU-Standard-A"), GOOGLE_RU_RU_STANDARD_B("Google.ru-RU-Standard-B"), GOOGLE_RU_RU_STANDARD_C("Google.ru-RU-Standard-C"), @@ -379,18 +685,32 @@ public enum Voice { GOOGLE_RU_RU_WAVENET_D("Google.ru-RU-Wavenet-D"), GOOGLE_RU_RU_WAVENET_E("Google.ru-RU-Wavenet-E"), GOOGLE_SK_SK_STANDARD_A("Google.sk-SK-Standard-A"), + GOOGLE_SK_SK_STANDARD_B("Google.sk-SK-Standard-B"), GOOGLE_SK_SK_WAVENET_A("Google.sk-SK-Wavenet-A"), + GOOGLE_SK_SK_WAVENET_B("Google.sk-SK-Wavenet-B"), GOOGLE_SR_RS_STANDARD_A("Google.sr-RS-Standard-A"), GOOGLE_SV_SE_STANDARD_A("Google.sv-SE-Standard-A"), GOOGLE_SV_SE_STANDARD_B("Google.sv-SE-Standard-B"), GOOGLE_SV_SE_STANDARD_C("Google.sv-SE-Standard-C"), GOOGLE_SV_SE_STANDARD_D("Google.sv-SE-Standard-D"), GOOGLE_SV_SE_STANDARD_E("Google.sv-SE-Standard-E"), + GOOGLE_SV_SE_STANDARD_F("Google.sv-SE-Standard-F"), + GOOGLE_SV_SE_STANDARD_G("Google.sv-SE-Standard-G"), GOOGLE_SV_SE_WAVENET_A("Google.sv-SE-Wavenet-A"), GOOGLE_SV_SE_WAVENET_B("Google.sv-SE-Wavenet-B"), GOOGLE_SV_SE_WAVENET_C("Google.sv-SE-Wavenet-C"), GOOGLE_SV_SE_WAVENET_D("Google.sv-SE-Wavenet-D"), GOOGLE_SV_SE_WAVENET_E("Google.sv-SE-Wavenet-E"), + GOOGLE_SV_SE_WAVENET_F("Google.sv-SE-Wavenet-F"), + GOOGLE_SV_SE_WAVENET_G("Google.sv-SE-Wavenet-G"), + GOOGLE_TA_IN_CHIRP3_HD_AOEDE("Google.ta-IN-Chirp3-HD-Aoede"), + GOOGLE_TA_IN_CHIRP3_HD_CHARON("Google.ta-IN-Chirp3-HD-Charon"), + GOOGLE_TA_IN_CHIRP3_HD_FENRIR("Google.ta-IN-Chirp3-HD-Fenrir"), + GOOGLE_TA_IN_CHIRP3_HD_KORE("Google.ta-IN-Chirp3-HD-Kore"), + GOOGLE_TA_IN_CHIRP3_HD_LEDA("Google.ta-IN-Chirp3-HD-Leda"), + GOOGLE_TA_IN_CHIRP3_HD_ORUS("Google.ta-IN-Chirp3-HD-Orus"), + GOOGLE_TA_IN_CHIRP3_HD_PUCK("Google.ta-IN-Chirp3-HD-Puck"), + GOOGLE_TA_IN_CHIRP3_HD_ZEPHYR("Google.ta-IN-Chirp3-HD-Zephyr"), GOOGLE_TA_IN_STANDARD_A("Google.ta-IN-Standard-A"), GOOGLE_TA_IN_STANDARD_B("Google.ta-IN-Standard-B"), GOOGLE_TA_IN_STANDARD_C("Google.ta-IN-Standard-C"), @@ -399,10 +719,36 @@ public enum Voice { GOOGLE_TA_IN_WAVENET_B("Google.ta-IN-Wavenet-B"), GOOGLE_TA_IN_WAVENET_C("Google.ta-IN-Wavenet-C"), GOOGLE_TA_IN_WAVENET_D("Google.ta-IN-Wavenet-D"), + GOOGLE_TE_IN_CHIRP3_HD_AOEDE("Google.te-IN-Chirp3-HD-Aoede"), + GOOGLE_TE_IN_CHIRP3_HD_CHARON("Google.te-IN-Chirp3-HD-Charon"), + GOOGLE_TE_IN_CHIRP3_HD_FENRIR("Google.te-IN-Chirp3-HD-Fenrir"), + GOOGLE_TE_IN_CHIRP3_HD_KORE("Google.te-IN-Chirp3-HD-Kore"), + GOOGLE_TE_IN_CHIRP3_HD_LEDA("Google.te-IN-Chirp3-HD-Leda"), + GOOGLE_TE_IN_CHIRP3_HD_ORUS("Google.te-IN-Chirp3-HD-Orus"), + GOOGLE_TE_IN_CHIRP3_HD_PUCK("Google.te-IN-Chirp3-HD-Puck"), + GOOGLE_TE_IN_CHIRP3_HD_ZEPHYR("Google.te-IN-Chirp3-HD-Zephyr"), GOOGLE_TE_IN_STANDARD_A("Google.te-IN-Standard-A"), GOOGLE_TE_IN_STANDARD_B("Google.te-IN-Standard-B"), + GOOGLE_TE_IN_STANDARD_C("Google.te-IN-Standard-C"), + GOOGLE_TE_IN_STANDARD_D("Google.te-IN-Standard-D"), + GOOGLE_TH_TH_CHIRP3_HD_AOEDE("Google.th-TH-Chirp3-HD-Aoede"), + GOOGLE_TH_TH_CHIRP3_HD_CHARON("Google.th-TH-Chirp3-HD-Charon"), + GOOGLE_TH_TH_CHIRP3_HD_FENRIR("Google.th-TH-Chirp3-HD-Fenrir"), + GOOGLE_TH_TH_CHIRP3_HD_KORE("Google.th-TH-Chirp3-HD-Kore"), + GOOGLE_TH_TH_CHIRP3_HD_LEDA("Google.th-TH-Chirp3-HD-Leda"), + GOOGLE_TH_TH_CHIRP3_HD_ORUS("Google.th-TH-Chirp3-HD-Orus"), + GOOGLE_TH_TH_CHIRP3_HD_PUCK("Google.th-TH-Chirp3-HD-Puck"), + GOOGLE_TH_TH_CHIRP3_HD_ZEPHYR("Google.th-TH-Chirp3-HD-Zephyr"), GOOGLE_TH_TH_NEURAL2_C("Google.th-TH-Neural2-C"), GOOGLE_TH_TH_STANDARD_A("Google.th-TH-Standard-A"), + GOOGLE_TR_TR_CHIRP3_HD_AOEDE("Google.tr-TR-Chirp3-HD-Aoede"), + GOOGLE_TR_TR_CHIRP3_HD_CHARON("Google.tr-TR-Chirp3-HD-Charon"), + GOOGLE_TR_TR_CHIRP3_HD_FENRIR("Google.tr-TR-Chirp3-HD-Fenrir"), + GOOGLE_TR_TR_CHIRP3_HD_KORE("Google.tr-TR-Chirp3-HD-Kore"), + GOOGLE_TR_TR_CHIRP3_HD_LEDA("Google.tr-TR-Chirp3-HD-Leda"), + GOOGLE_TR_TR_CHIRP3_HD_ORUS("Google.tr-TR-Chirp3-HD-Orus"), + GOOGLE_TR_TR_CHIRP3_HD_PUCK("Google.tr-TR-Chirp3-HD-Puck"), + GOOGLE_TR_TR_CHIRP3_HD_ZEPHYR("Google.tr-TR-Chirp3-HD-Zephyr"), GOOGLE_TR_TR_STANDARD_A("Google.tr-TR-Standard-A"), GOOGLE_TR_TR_STANDARD_B("Google.tr-TR-Standard-B"), GOOGLE_TR_TR_STANDARD_C("Google.tr-TR-Standard-C"), @@ -415,6 +761,14 @@ public enum Voice { GOOGLE_TR_TR_WAVENET_E("Google.tr-TR-Wavenet-E"), GOOGLE_UK_UA_STANDARD_A("Google.uk-UA-Standard-A"), GOOGLE_UK_UA_WAVENET_A("Google.uk-UA-Wavenet-A"), + GOOGLE_VI_VN_CHIRP3_HD_AOEDE("Google.vi-VN-Chirp3-HD-Aoede"), + GOOGLE_VI_VN_CHIRP3_HD_CHARON("Google.vi-VN-Chirp3-HD-Charon"), + GOOGLE_VI_VN_CHIRP3_HD_FENRIR("Google.vi-VN-Chirp3-HD-Fenrir"), + GOOGLE_VI_VN_CHIRP3_HD_KORE("Google.vi-VN-Chirp3-HD-Kore"), + GOOGLE_VI_VN_CHIRP3_HD_LEDA("Google.vi-VN-Chirp3-HD-Leda"), + GOOGLE_VI_VN_CHIRP3_HD_ORUS("Google.vi-VN-Chirp3-HD-Orus"), + GOOGLE_VI_VN_CHIRP3_HD_PUCK("Google.vi-VN-Chirp3-HD-Puck"), + GOOGLE_VI_VN_CHIRP3_HD_ZEPHYR("Google.vi-VN-Chirp3-HD-Zephyr"), GOOGLE_VI_VN_NEURAL2_A("Google.vi-VN-Neural2-A"), GOOGLE_VI_VN_NEURAL2_D("Google.vi-VN-Neural2-D"), GOOGLE_VI_VN_STANDARD_A("Google.vi-VN-Standard-A"), @@ -459,6 +813,7 @@ public enum Voice { POLLY_JUSTIN("Polly.Justin"), POLLY_KARL("Polly.Karl"), POLLY_KENDRA("Polly.Kendra"), + POLLY_KEVIN("Polly.Kevin"), POLLY_KIMBERLY("Polly.Kimberly"), POLLY_LEA("Polly.Lea"), POLLY_LIV("Polly.Liv"), @@ -498,6 +853,7 @@ public enum Voice { POLLY_AYANDA_NEURAL("Polly.Ayanda-Neural"), POLLY_BIANCA_NEURAL("Polly.Bianca-Neural"), POLLY_BRIAN_NEURAL("Polly.Brian-Neural"), + POLLY_BURCU_NEURAL("Polly.Burcu-Neural"), POLLY_CAMILA_NEURAL("Polly.Camila-Neural"), POLLY_DANIEL_NEURAL("Polly.Daniel-Neural"), POLLY_DANIELLE_NEURAL("Polly.Danielle-Neural"), @@ -541,12 +897,32 @@ public enum Voice { POLLY_STEPHEN_NEURAL("Polly.Stephen-Neural"), POLLY_SUVI_NEURAL("Polly.Suvi-Neural"), POLLY_TAKUMI_NEURAL("Polly.Takumi-Neural"), - POLLY_TOMOKO_NEURAL("Polly.Tomoko-Neural"), POLLY_THIAGO_NEURAL("Polly.Thiago-Neural"), + POLLY_TOMOKO_NEURAL("Polly.Tomoko-Neural"), POLLY_VICKI_NEURAL("Polly.Vicki-Neural"), POLLY_VITORIA_NEURAL("Polly.Vitoria-Neural"), POLLY_ZAYD_NEURAL("Polly.Zayd-Neural"), - POLLY_ZHIYU_NEURAL("Polly.Zhiyu-Neural"); + POLLY_ZHIYU_NEURAL("Polly.Zhiyu-Neural"), + POLLY_AMY_GENERATIVE("Polly.Amy-Generative"), + POLLY_ANDRES_GENERATIVE("Polly.Andres-Generative"), + POLLY_AYANDA_GENERATIVE("Polly.Ayanda-Generative"), + POLLY_BIANCA_GENERATIVE("Polly.Bianca-Generative"), + POLLY_DANIEL_GENERATIVE("Polly.Daniel-Generative"), + POLLY_DANIELLE_GENERATIVE("Polly.Danielle-Generative"), + POLLY_JOANNA_GENERATIVE("Polly.Joanna-Generative"), + POLLY_KAJAL_GENERATIVE("Polly.Kajal-Generative"), + POLLY_LEA_GENERATIVE("Polly.Lea-Generative"), + POLLY_LUCIA_GENERATIVE("Polly.Lucia-Generative"), + POLLY_LUPE_GENERATIVE("Polly.Lupe-Generative"), + POLLY_MATTHEW_GENERATIVE("Polly.Matthew-Generative"), + POLLY_MÍA_GENERATIVE("Polly.Mía-Generative"), + POLLY_OLIVIA_GENERATIVE("Polly.Olivia-Generative"), + POLLY_PEDRO_GENERATIVE("Polly.Pedro-Generative"), + POLLY_RÉMI_GENERATIVE("Polly.Rémi-Generative"), + POLLY_RUTH_GENERATIVE("Polly.Ruth-Generative"), + POLLY_SERGIO_GENERATIVE("Polly.Sergio-Generative"), + POLLY_STEPHEN_GENERATIVE("Polly.Stephen-Generative"), + POLLY_VICKI_GENERATIVE("Polly.Vicki-Generative"); private final String value; diff --git a/src/main/java/com/twilio/twiml/voice/WhatsApp.java b/src/main/java/com/twilio/twiml/voice/WhatsApp.java new file mode 100644 index 0000000000..1556ead3c4 --- /dev/null +++ b/src/main/java/com/twilio/twiml/voice/WhatsApp.java @@ -0,0 +1,299 @@ +/** + * This code was generated by + * \ / _ _ _| _ _ + * | (_)\/(_)(_|\/| |(/_ v1.0.0 + * / / + */ + +package com.twilio.twiml.voice; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; +import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; +import com.twilio.converter.Promoter; +import com.twilio.http.HttpMethod; +import com.twilio.twiml.TwiML; +import com.twilio.twiml.TwiMLException; + +import java.net.URI; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +/** + * TwiML wrapper for {@code } + */ +@JsonDeserialize(builder = WhatsApp.Builder.class) +public class WhatsApp extends TwiML { + public enum Event { + INITIATED("initiated"), + RINGING("ringing"), + ANSWERED("answered"), + COMPLETED("completed"); + + private final String value; + + private Event(final String value) { + this.value = value; + } + + public String toString() { + return value; + } + } + + private final URI url; + private final HttpMethod method; + private final List statusCallbackEvent; + private final URI statusCallback; + private final HttpMethod statusCallbackMethod; + private final com.twilio.type.PhoneNumber phoneNumber; + + /** + * For XML Serialization/Deserialization + */ + private WhatsApp() { + this(new Builder((com.twilio.type.PhoneNumber) null)); + } + + /** + * Create a new {@code } element + */ + private WhatsApp(Builder b) { + super("WhatsApp", b); + this.url = b.url; + this.method = b.method; + this.statusCallbackEvent = b.statusCallbackEvent; + this.statusCallback = b.statusCallback; + this.statusCallbackMethod = b.statusCallbackMethod; + this.phoneNumber = b.phoneNumber; + } + + /** + * The body of the TwiML element + * + * @return Element body as a string if present else null + */ + protected String getElementBody() { + return this.getPhoneNumber() == null ? null : this.getPhoneNumber().toString(); + } + + /** + * Attributes to set on the generated XML element + * + * @return A Map of attribute keys to values + */ + protected Map getElementAttributes() { + // Preserve order of attributes + Map attrs = new HashMap<>(); + + if (this.getUrl() != null) { + attrs.put("url", this.getUrl().toString()); + } + if (this.getMethod() != null) { + attrs.put("method", this.getMethod().toString()); + } + if (this.getStatusCallbackEvents() != null) { + attrs.put("statusCallbackEvent", this.getStatusCallbackEventsAsString()); + } + if (this.getStatusCallback() != null) { + attrs.put("statusCallback", this.getStatusCallback().toString()); + } + if (this.getStatusCallbackMethod() != null) { + attrs.put("statusCallbackMethod", this.getStatusCallbackMethod().toString()); + } + + return attrs; + } + + /** + * TwiML URL + * + * @return TwiML URL + */ + public URI getUrl() { + return url; + } + + /** + * TwiML URL Method + * + * @return TwiML URL Method + */ + public HttpMethod getMethod() { + return method; + } + + /** + * Events to trigger status callback + * + * @return Events to trigger status callback + */ + public List getStatusCallbackEvents() { + return statusCallbackEvent; + } + + protected String getStatusCallbackEventsAsString() { + StringBuilder sb = new StringBuilder(); + Iterator iter = this.getStatusCallbackEvents().iterator(); + while (iter.hasNext()) { + sb.append(iter.next().toString()); + if (iter.hasNext()) { + sb.append(" "); + } + } + return sb.toString(); + } + + /** + * Status Callback URL + * + * @return Status Callback URL + */ + public URI getStatusCallback() { + return statusCallback; + } + + /** + * Status Callback URL Method + * + * @return Status Callback URL Method + */ + public HttpMethod getStatusCallbackMethod() { + return statusCallbackMethod; + } + + /** + * WhatsApp Phone Number to dial + * + * @return WhatsApp Phone Number to dial + */ + public com.twilio.type.PhoneNumber getPhoneNumber() { + return phoneNumber; + } + + /** + * Create a new {@code } element + */ + @JsonPOJOBuilder(withPrefix = "") + public static class Builder extends TwiML.Builder { + /** + * Create and return a {@code } from an XML string + */ + public static Builder fromXml(final String xml) throws TwiMLException { + try { + return OBJECT_MAPPER.readValue(xml, Builder.class); + } catch (final JsonProcessingException jpe) { + throw new TwiMLException( + "Failed to deserialize a WhatsApp.Builder from the provided XML string: " + jpe.getMessage()); + } catch (final Exception e) { + throw new TwiMLException("Unhandled exception: " + e.getMessage()); + } + } + + private URI url; + private HttpMethod method; + private List statusCallbackEvent; + private URI statusCallback; + private HttpMethod statusCallbackMethod; + private com.twilio.type.PhoneNumber phoneNumber; + + /** + * Create a {@code } with phoneNumber + */ + public Builder(com.twilio.type.PhoneNumber phoneNumber) { + this.phoneNumber = phoneNumber; + } + + /** + * Create a {@code } with phoneNumber + */ + public Builder(String phoneNumber) { + this.phoneNumber = Promoter.phoneNumberFromString(phoneNumber); + } + + /** + * Create a {@code } (for XML deserialization) + */ + private Builder() { + } + + /** + * TwiML URL + */ + @JacksonXmlProperty(isAttribute = true, localName = "url") + public Builder url(URI url) { + this.url = url; + return this; + } + + /** + * TwiML URL + */ + public Builder url(String url) { + this.url = Promoter.uriFromString(url); + return this; + } + + /** + * TwiML URL Method + */ + @JacksonXmlProperty(isAttribute = true, localName = "method") + public Builder method(HttpMethod method) { + this.method = method; + return this; + } + + /** + * Events to trigger status callback + */ + @JacksonXmlProperty(isAttribute = true, localName = "statusCallbackEvent") + public Builder statusCallbackEvents(List statusCallbackEvent) { + this.statusCallbackEvent = statusCallbackEvent; + return this; + } + + /** + * Events to trigger status callback + */ + public Builder statusCallbackEvents(WhatsApp.Event statusCallbackEvent) { + this.statusCallbackEvent = Promoter.listOfOne(statusCallbackEvent); + return this; + } + + /** + * Status Callback URL + */ + @JacksonXmlProperty(isAttribute = true, localName = "statusCallback") + public Builder statusCallback(URI statusCallback) { + this.statusCallback = statusCallback; + return this; + } + + /** + * Status Callback URL + */ + public Builder statusCallback(String statusCallback) { + this.statusCallback = Promoter.uriFromString(statusCallback); + return this; + } + + /** + * Status Callback URL Method + */ + @JacksonXmlProperty(isAttribute = true, localName = "statusCallbackMethod") + public Builder statusCallbackMethod(HttpMethod statusCallbackMethod) { + this.statusCallbackMethod = statusCallbackMethod; + return this; + } + + /** + * Create and return resulting {@code } element + */ + public WhatsApp build() { + return new WhatsApp(this); + } + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/ClusterTest.java b/src/test/java/com/twilio/ClusterTest.java index 328609a1c5..e21df98c3a 100644 --- a/src/test/java/com/twilio/ClusterTest.java +++ b/src/test/java/com/twilio/ClusterTest.java @@ -1,10 +1,12 @@ package com.twilio; +import com.twilio.auth_strategy.TokenAuthStrategy; import com.twilio.base.Page; -import com.twilio.base.bearertoken.ResourceSet; -import com.twilio.credential.ClientCredentialProvider; +import com.twilio.base.ResourceSet; import com.twilio.http.CustomHttpClient; import com.twilio.http.TwilioRestClient; +import com.twilio.http.bearertoken.OrgsTokenManager; +import com.twilio.http.bearertoken.TokenManager; import com.twilio.rest.api.v2010.account.IncomingPhoneNumber; import com.twilio.rest.api.v2010.account.IncomingPhoneNumberReader; import com.twilio.rest.api.v2010.account.Message; @@ -16,6 +18,7 @@ import org.hamcrest.CoreMatchers; import org.junit.Assume; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import java.util.ArrayList; @@ -38,7 +41,7 @@ public class ClusterTest { String clientSecret; String messageSid; TwilioRestClient customRestClient; - + String accountSid; @Before @@ -56,12 +59,11 @@ public void setUp() { orgsClientId = System.getenv("TWILIO_ORGS_CLIENT_ID"); orgsClientSecret = System.getenv("TWILIO_ORGS_CLIENT_SECRET"); organisationSid = System.getenv("TWILIO_ORG_SID"); - TwilioOrgsTokenAuth.init(grantType, orgsClientId, orgsClientSecret); clientId = System.getenv("TWILIO_CLIENT_ID"); clientSecret = System.getenv("TWILIO_CLIENT_SECRET"); messageSid = System.getenv("TWILIO_MESSAGE_SID"); - + // CustomHttpClient customRestClient = new TwilioRestClient.Builder(apiKey, secret).accountSid(accountSid).httpClient(new CustomHttpClient()).build(); } @@ -117,7 +119,7 @@ public void testListParams() { sinkConfiguration.put("destination", "http://example.org/webhook"); sinkConfiguration.put("method", "post"); sinkConfiguration.put("batch_events",false); - List> types = new ArrayList<>(); + List types = new ArrayList<>(); Map types1 = new HashMap<>(); Map types2 = new HashMap<>(); types1.put("type", "com.twilio.messaging.message.delivered"); @@ -139,19 +141,25 @@ public void testListParams() { @Test public void testOrgsApi(){ + //Twilio.init(new OrgsClientCredentialProvider(orgsClientId, orgsClientSecret)); + + TokenManager tokenManager = new OrgsTokenManager("client_credentials", orgsClientId, orgsClientSecret); + TokenAuthStrategy tokenAuthStrategy = new TokenAuthStrategy(tokenManager); + TwilioRestClient client = new TwilioRestClient.Builder(tokenAuthStrategy) + .build(); //Fetching the account information - ResourceSet accountSet = Account.reader(organisationSid).read(); + ResourceSet accountSet = Account.reader(organisationSid).read(client); String accountSid = accountSet.iterator().next().getAccountSid(); assertNotNull(accountSid); //Fetching specific account - Account account = Account.fetcher(organisationSid, accountSid).fetch(); + Account account = Account.fetcher(organisationSid, accountSid).fetch(client); assertNotNull(account.getAccountSid()); //Fetching users of this organisation ResourceSet - userSet = com.twilio.rest.previewiam.organizations.User.reader(organisationSid).read(); + userSet = com.twilio.rest.previewiam.organizations.User.reader(organisationSid).read(client); assertNotNull(userSet); String userId = userSet.iterator().next().getId().toString(); assertNotNull(userId); @@ -175,7 +183,7 @@ public void testMultiPartFormData() { // @Test // public void testPublicOAuthFetchMessage() { // Twilio.init(new ClientCredentialProvider(clientId, clientSecret), accountSid); -// // Fetching an existing message; if this test fails, the SID might be deleted, +// // Fetching an existing message; if this test fails, the SID might be deleted, // // in that case, change TWILIO_MESSAGE_SID in twilio-java repo env variables // Message message = Message.fetcher(messageSid).fetch(); // assertNotNull(message); diff --git a/src/test/java/com/twilio/TwilioTest.java b/src/test/java/com/twilio/TwilioTest.java index 550f2d491f..f6f3fd3a20 100644 --- a/src/test/java/com/twilio/TwilioTest.java +++ b/src/test/java/com/twilio/TwilioTest.java @@ -47,7 +47,7 @@ public static String serialize(List list) { @Before public void init() { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); } @Test diff --git a/src/test/java/com/twilio/base/ReaderTest.java b/src/test/java/com/twilio/base/ReaderTest.java index ebc34675fb..0b34e65eba 100644 --- a/src/test/java/com/twilio/base/ReaderTest.java +++ b/src/test/java/com/twilio/base/ReaderTest.java @@ -23,7 +23,7 @@ public class ReaderTest { @Before public void init() { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); } @Test diff --git a/src/test/java/com/twilio/base/ResourceSetIterationTest.java b/src/test/java/com/twilio/base/ResourceSetIterationTest.java new file mode 100644 index 0000000000..5d3fdc494c --- /dev/null +++ b/src/test/java/com/twilio/base/ResourceSetIterationTest.java @@ -0,0 +1,148 @@ +package com.twilio.base; + +import com.twilio.http.TwilioRestClient; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; + +import static org.mockito.Mockito.when; + +// Simple test resource for testing ResourceSet iteration +class TestResource extends Resource { + private final String id; + + public TestResource(String id) { + this.id = id; + } + + public String getId() { + return id; + } +} + +// Simple test reader for testing ResourceSet iteration +class TestReader extends Reader { + @Override + public ResourceSet read(TwilioRestClient client) { + return null; // Not needed for our test + } + + @Override + public Page firstPage(TwilioRestClient client) { + return null; // Not needed for our test + } + + @Override + public Page previousPage(Page page, TwilioRestClient client) { + return null; // Not needed for our test + } + + @Override + public Page nextPage(Page page, TwilioRestClient client) { + return null; // Not needed for our test + } + + @Override + public Page getPage(String targetUrl, TwilioRestClient client) { + return null; // Not needed for our test + } +} + +public class ResourceSetIterationTest { + + @Mock + TwilioRestClient client; + + @Mock + Page page; + + @Before + public void init() { + MockitoAnnotations.openMocks(this); + } + + @Test + public void testResourceSetCanBeIteratedMultipleTimes() { + // Setup mock data with concrete objects + TestResource resource1 = new TestResource("resource1"); + TestResource resource2 = new TestResource("resource2"); + List resources = Arrays.asList(resource1, resource2); + + when(page.getRecords()).thenReturn(resources); + when(page.getPageSize()).thenReturn(2); + when(page.hasNextPage()).thenReturn(false); + + Reader reader = new TestReader().limit(2); + ResourceSet resourceSet = new ResourceSet<>(reader, client, page); + + // First iteration - should work + List firstIterationResults = new ArrayList<>(); + for (TestResource resource : resourceSet) { + firstIterationResults.add(resource.getId()); + } + Assert.assertEquals(2, firstIterationResults.size()); + Assert.assertEquals("resource1", firstIterationResults.get(0)); + Assert.assertEquals("resource2", firstIterationResults.get(1)); + + // Second iteration - should also work and return the same results + List secondIterationResults = new ArrayList<>(); + for (TestResource resource : resourceSet) { + secondIterationResults.add(resource.getId()); + } + Assert.assertEquals("Second iteration should return same number of elements", 2, secondIterationResults.size()); + Assert.assertEquals("resource1", secondIterationResults.get(0)); + Assert.assertEquals("resource2", secondIterationResults.get(1)); + + // Third iteration using explicit iterator - should also work + List thirdIterationResults = new ArrayList<>(); + for (Iterator it = resourceSet.iterator(); it.hasNext(); ) { + TestResource resource = it.next(); + thirdIterationResults.add(resource.getId()); + } + Assert.assertEquals("Third iteration should return same number of elements", 2, thirdIterationResults.size()); + Assert.assertEquals("resource1", thirdIterationResults.get(0)); + Assert.assertEquals("resource2", thirdIterationResults.get(1)); + } + + @Test + public void testResourceSetWithLimitCanBeIteratedMultipleTimes() { + // Setup mock data with more resources than the limit + TestResource resource1 = new TestResource("resource1"); + TestResource resource2 = new TestResource("resource2"); + TestResource resource3 = new TestResource("resource3"); + List resources = Arrays.asList(resource1, resource2, resource3); + + when(page.getRecords()).thenReturn(resources); + when(page.getPageSize()).thenReturn(3); + when(page.hasNextPage()).thenReturn(false); + + // Set limit to 2, so only first 2 should be returned + Reader reader = new TestReader().limit(2); + ResourceSet resourceSet = new ResourceSet<>(reader, client, page); + + // First iteration - should only return 2 elements due to limit + List firstIterationResults = new ArrayList<>(); + for (TestResource resource : resourceSet) { + firstIterationResults.add(resource.getId()); + } + Assert.assertEquals("First iteration should respect limit", 2, firstIterationResults.size()); + Assert.assertEquals("resource1", firstIterationResults.get(0)); + Assert.assertEquals("resource2", firstIterationResults.get(1)); + + // Second iteration - should also respect limit and return same results + List secondIterationResults = new ArrayList<>(); + for (TestResource resource : resourceSet) { + secondIterationResults.add(resource.getId()); + } + Assert.assertEquals("Second iteration should respect limit", 2, secondIterationResults.size()); + Assert.assertEquals("resource1", secondIterationResults.get(0)); + Assert.assertEquals("resource2", secondIterationResults.get(1)); + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java b/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java new file mode 100644 index 0000000000..4051e0c195 --- /dev/null +++ b/src/test/java/com/twilio/converter/ISO8601DeserializerTest.java @@ -0,0 +1,65 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import org.junit.Assert; +import org.junit.Test; +import org.mockito.Mockito; + +import java.io.IOException; +import java.time.ZonedDateTime; + +public class ISO8601DeserializerTest { + + @Test + public void testDeserializeValidDateTime() throws IOException { + // Arrange + String validDateTime = "2023-10-01T12:34:56Z"; + ZonedDateTime expectedDateTime = ZonedDateTime.parse(validDateTime); + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(validDateTime); + + ISO8601Deserializer deserializer = new ISO8601Deserializer(); + + // Act + ZonedDateTime result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertEquals(expectedDateTime, result); + } + + @Test + public void testDeserializeInvalidDateTime() throws IOException { + // Arrange + String invalidDateTime = "invalid-date-time"; + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + Mockito.when(mockParser.getText()).thenReturn(invalidDateTime); + ISO8601Deserializer deserializer = new ISO8601Deserializer(); + + // Act + ZonedDateTime result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertNull(result); + } + + @Test + public void testDeserializeNullDateTime() throws IOException { + // Arrange + String invalidDateTime = null; + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + Mockito.when(mockParser.getText()).thenReturn(invalidDateTime); + ISO8601Deserializer deserializer = new ISO8601Deserializer(); + + // Act + ZonedDateTime result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertNull(result); + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java b/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java new file mode 100644 index 0000000000..e290550ec3 --- /dev/null +++ b/src/test/java/com/twilio/converter/LocalDateDeserializerTest.java @@ -0,0 +1,71 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import org.junit.Assert; +import org.junit.Test; +import org.mockito.Mockito; + +import java.io.IOException; +import java.time.LocalDate; + +public class LocalDateDeserializerTest { + + @Test + public void testDeserializeValidDate() throws IOException { + // Arrange + String validDate = "2023-10-01"; + LocalDate expectedDate = LocalDate.parse(validDate); + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(validDate); + + LocalDateDeserializer deserializer = new LocalDateDeserializer(); + + // Act + LocalDate result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertEquals(expectedDate, result); + } + + @Test + public void testDeserializeInvalidDate() throws IOException { + // Arrange + String invalidDate = "invalid-date"; + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(invalidDate); + + LocalDateDeserializer deserializer = new LocalDateDeserializer(); + + // Act + LocalDate result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertNull(result); + } + + @Test + public void testDeserializeEmptyDate() throws IOException { + // Arrange + String emptyDate = ""; + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(emptyDate); + + LocalDateDeserializer deserializer = new LocalDateDeserializer(); + + // Act + LocalDate result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertNull(result); + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java b/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java new file mode 100644 index 0000000000..dacee0cac1 --- /dev/null +++ b/src/test/java/com/twilio/converter/RFC2822DeserializerTest.java @@ -0,0 +1,71 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import org.junit.Assert; +import org.junit.Test; +import org.mockito.Mockito; + +import java.io.IOException; +import java.time.ZonedDateTime; + +public class RFC2822DeserializerTest { + + @Test + public void testDeserializeValidDateTime() throws IOException { + // Arrange + String validDateTime = "Wed, 23 Jul 2025 06:18:51 +0000"; + ZonedDateTime expectedDateTime = DateConverter.rfc2822DateTimeFromString(validDateTime); + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(validDateTime); + + RFC2822Deserializer deserializer = new RFC2822Deserializer(); + + // Act + ZonedDateTime result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertEquals(expectedDateTime, result); + } + + @Test + public void testDeserializeInvalidDateTime() throws IOException { + // Arrange + String invalidDateTime = "invalid-date-time"; + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(invalidDateTime); + + RFC2822Deserializer deserializer = new RFC2822Deserializer(); + + // Act + ZonedDateTime result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertNull(result); + } + + @Test + public void testDeserializeEmptyDateTime() throws IOException { + // Arrange + String emptyDateTime = ""; + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.getText()).thenReturn(emptyDateTime); + + RFC2822Deserializer deserializer = new RFC2822Deserializer(); + + // Act + ZonedDateTime result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertNull(result); + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/converter/SerializerTest.java b/src/test/java/com/twilio/converter/SerializerTest.java new file mode 100644 index 0000000000..7f949e8dac --- /dev/null +++ b/src/test/java/com/twilio/converter/SerializerTest.java @@ -0,0 +1,252 @@ +package com.twilio.converter; + +import com.twilio.constant.EnumConstants.ParameterType; +import com.twilio.http.HttpMethod; +import com.twilio.http.Request; +import com.twilio.rest.Domains; +import org.junit.Test; +import org.mockito.Mockito; + +import java.time.LocalDate; +import java.time.ZonedDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.*; + +public class SerializerTest { + + public Request buildRequest() { + String path = "/2010-04-01/Accounts.json"; + Request request = new Request(HttpMethod.POST, Domains.API.toString(), path); + return request; + } + + @Test + public void testToStringWithString() { + Request request = buildRequest(); + Serializer.toString(request, "key", "value", ParameterType.QUERY); + assertEquals("value", request.getQueryParams().get("key").get(0)); + } + + // String value test with new line character + @Test + public void testToStringWithStringNewLine() { + Request request = buildRequest(); + Serializer.toString(request, "key", "Hello \n World", ParameterType.URLENCODED); + assertNotEquals("Hello \\n World", request.getPostParams().get("key").get(0)); + assertEquals("Hello \n World", request.getPostParams().get("key").get(0)); + } + + @Test + public void testToStringWithStringSpecialCharacters() { + Request request = buildRequest(); + Serializer.toString(request, "key", "Hello@World#2023!", ParameterType.QUERY); + assertEquals("Hello@World#2023!", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithInt32() { + Request request = buildRequest(); + Serializer.toString(request, "key", 32, ParameterType.HEADER); + assertEquals("32", request.getHeaderParams().get("key").get(0)); + } + + @Test + public void testToStringWithInt64() { + Request request = buildRequest(); + Serializer.toString(request, "key", 64L, ParameterType.QUERY); + assertEquals("64", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithFloat() { + Request request = buildRequest(); + Float value = 3.14f; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("3.14", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithFloatPrimitive() { + Request request = buildRequest(); + float value = 3.14f; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("3.14", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithLong() { + Request request = buildRequest(); + Long value = 123456789L; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("123456789", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithLongPrimitive() { + Request request = buildRequest(); + long value = 123456789L; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("123456789", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithBoolean() { + Request request = buildRequest(); + Boolean value = true; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("true", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithBooleanPrimitive() { + Request request = buildRequest(); + boolean value = false; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("false", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithInteger() { + Request request = buildRequest(); + Serializer.toString(request, "key", Integer.valueOf(42), ParameterType.QUERY); + assertEquals("42", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithIntegerPrimitive() { + Request request = buildRequest(); + int value = 42; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("42", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithDouble() { + Request request = buildRequest(); + Double value = 3.14159; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("3.14159", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithDoublePrimitive() { + Request request = buildRequest(); + double value = 3.14159; + Serializer.toString(request, "key", value, ParameterType.QUERY); + assertEquals("3.14159", request.getQueryParams().get("key").get(0)); + } + + @Test + public void testToStringWithArray() { + Request request = buildRequest(); + List values = Arrays.asList("value1", "value2", "value3"); + for (String value: values) { + Serializer.toString(request, "arrayKey", value, ParameterType.QUERY); + } + Serializer.toString(request, "key", "value", ParameterType.QUERY); + assertEquals(2, request.getQueryParams().size()); // 2 keys present + assertEquals(3, request.getQueryParams().get("arrayKey").size()); + assertEquals(1, request.getQueryParams().get("key").size()); + } + + @Test + public void testToStringWithHashMapStringObject() { + Request request = buildRequest(); + Map map = new HashMap<>(); + map.put("key1", "value1"); + map.put("key2", 123); + map.put("key3", true); + + Serializer.toString(request, "mapKey", map, ParameterType.QUERY); + assertEquals("{\"key1\":\"value1\",\"key2\":123,\"key3\":true}", request.getQueryParams().get("mapKey").get(0)); + } + + @Test + public void testToStringWithHashMapStringString() { + Request request = buildRequest(); + Map map = new HashMap<>(); + map.put("key1", "value1"); + map.put("key2", "value2"); + + Serializer.toString(request, "mapKey", map, ParameterType.QUERY); + assertEquals("{\"key1\":\"value1\",\"key2\":\"value2\"}", request.getQueryParams().get("mapKey").get(0)); + } + + @Test + public void testToStringWithLocalDate() { + Request request = buildRequest(); + LocalDate date = LocalDate.of(2025, 7, 1); + LocalDate dateBefore = null; + LocalDate dateAfter = null; + + Serializer.toString(request, "dateKey", date, dateBefore, dateAfter); + assertEquals("2025-07-01", request.getQueryParams().get("dateKey").get(0)); + } + + @Test + public void testToStringWithLocalDateRange() { + Request request = buildRequest(); + LocalDate date = null; + LocalDate dateBefore = LocalDate.of(2025, 7, 5); + LocalDate dateAfter = LocalDate.of(2025, 7, 1); + + Serializer.toString(request, "dateKey", date, dateBefore, dateAfter); + assertEquals("2025-07-01", request.getQueryParams().get("dateKey>").get(0)); + assertEquals("2025-07-05", request.getQueryParams().get("dateKey<").get(0)); + } + + @Test + public void testToStringWithLocalDateRangeBeforeNull() { + Request request = buildRequest(); + LocalDate date = null; + LocalDate dateBefore = null; + LocalDate dateAfter = LocalDate.of(2025, 7, 1); + + Serializer.toString(request, "dateKey", date, dateBefore, dateAfter); + assertNull(request.getQueryParams().get("dateKey<")); + assertEquals("2025-07-01", request.getQueryParams().get("dateKey>").get(0)); + } + + @Test + public void testToStringWithLocalDateRangeAfterNull() { + Request request = buildRequest(); + LocalDate date = null; + LocalDate dateBefore = LocalDate.of(2025, 7, 5); + LocalDate dateAfter = null; + + Serializer.toString(request, "dateKey", date, dateBefore, dateAfter); + assertNull(request.getQueryParams().get("dateKey>")); + assertEquals("2025-07-05", request.getQueryParams().get("dateKey<").get(0)); + } + + @Test + public void testToStringWithZonedDateTime() { + Request request = buildRequest(); + ZonedDateTime date = ZonedDateTime.parse("2025-07-01T10:15:30+05:00"); + ZonedDateTime dateBefore = null; + ZonedDateTime dateAfter = null; + + Serializer.toString(request, "dateTimeKey", date, dateBefore, dateAfter); + assertEquals("2025-07-01T10:15:30", request.getQueryParams().get("dateTimeKey").get(0)); + } + + @Test + public void testToStringWithZonedDateTimeRange() { + Request request = buildRequest(); + ZonedDateTime date = null; + ZonedDateTime dateBefore = ZonedDateTime.parse("2025-07-05T10:15:30+02:00"); + ZonedDateTime dateAfter = ZonedDateTime.parse("2025-07-01T10:15:30+02:00"); + + Serializer.toString(request, "dateTimeKey", date, dateBefore, dateAfter); + // Note the time difference. + assertEquals("2025-07-01T08:15:30", request.getQueryParams().get("dateTimeKey>").get(0)); + assertEquals("2025-07-05T08:15:30", request.getQueryParams().get("dateTimeKey<").get(0)); + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java b/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java new file mode 100644 index 0000000000..186bc51948 --- /dev/null +++ b/src/test/java/com/twilio/converter/ZonedDateTimeListDeserializerTest.java @@ -0,0 +1,90 @@ +package com.twilio.converter; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import org.junit.Assert; +import org.junit.Test; +import org.mockito.Mockito; + +import java.io.IOException; +import java.time.ZonedDateTime; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class ZonedDateTimeListDeserializerTest { + + @Test + public void testDeserializeValidDateTimeList() throws IOException { + // Arrange + List validDateTimes = Arrays.asList( + "Tue, 03 Oct 2023 14:28:00 +0000", + "Wed, 04 Oct 2023 10:15:30 +0000" + ); + List expectedDates = Arrays.asList( + DateConverter.rfc2822DateTimeFromString(validDateTimes.get(0)), + DateConverter.rfc2822DateTimeFromString(validDateTimes.get(1)) + ); + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.readValueAs(Mockito.>>any())) + .thenReturn(validDateTimes); + + ZonedDateTimeListDeserializer deserializer = new ZonedDateTimeListDeserializer(); + + // Act + List result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertEquals(expectedDates, result); + } + + @Test + public void testDeserializeInvalidDateTimeList() throws IOException { + // Arrange + List mixedDateTimes = Arrays.asList( + "Tue, 03 Oct 2023 14:28:00 +0000", + "invalid-date-time" + ); + List expectedDates = Collections.singletonList( + DateConverter.rfc2822DateTimeFromString(mixedDateTimes.get(0)) + ); + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.readValueAs(Mockito.>>any())) + .thenReturn(mixedDateTimes); + + ZonedDateTimeListDeserializer deserializer = new ZonedDateTimeListDeserializer(); + + // Act + List result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertEquals(expectedDates, result); + } + + @Test + public void testDeserializeEmptyDateTimeList() throws IOException { + // Arrange + List emptyDateTimes = Collections.emptyList(); + + JsonParser mockParser = Mockito.mock(JsonParser.class); + DeserializationContext mockContext = Mockito.mock(DeserializationContext.class); + + Mockito.when(mockParser.readValueAs(Mockito.>>any())) + .thenReturn(emptyDateTimes); + + ZonedDateTimeListDeserializer deserializer = new ZonedDateTimeListDeserializer(); + + // Act + List result = deserializer.deserialize(mockParser, mockContext); + + // Assert + Assert.assertTrue(result.isEmpty()); + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/http/CustomHttpClient.java b/src/test/java/com/twilio/http/CustomHttpClient.java index ecd6bfb14e..e8c99c6db1 100644 --- a/src/test/java/com/twilio/http/CustomHttpClient.java +++ b/src/test/java/com/twilio/http/CustomHttpClient.java @@ -1,21 +1,25 @@ package com.twilio.http; import com.twilio.exception.ApiException; -import org.apache.http.HttpEntity; -import org.apache.http.HttpHeaders; -import org.apache.http.HttpResponse; -import org.apache.http.HttpVersion; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.client.utils.HttpClientUtils; -import org.apache.http.entity.BufferedHttpEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.mime.MultipartEntityBuilder; -import org.apache.http.entity.mime.content.StringBody; + import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; +import org.apache.hc.client5.http.classic.methods.HttpDelete; +import org.apache.hc.client5.http.classic.methods.HttpGet; +import org.apache.hc.client5.http.classic.methods.HttpPatch; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.apache.hc.client5.http.classic.methods.HttpUriRequestBase; +import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; +import org.apache.hc.client5.http.entity.mime.StringBody; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.core5.http.ContentType; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.http.HttpVersion; +import org.apache.hc.core5.http.io.entity.BufferedHttpEntity; public class CustomHttpClient extends NetworkHttpClient { @@ -26,20 +30,18 @@ public CustomHttpClient() { @Override public Response makeRequest(Request request) { HttpMethod method = request.getMethod(); - RequestBuilder builder = RequestBuilder.create(method.toString()) - .setUri(request.constructURL().toString()) - .setVersion(HttpVersion.HTTP_1_1) - .setCharset(StandardCharsets.UTF_8); + HttpUriRequestBase httpUriRequestBase = createHttpUriRequestBase(request); + httpUriRequestBase.setVersion(HttpVersion.HTTP_1_1); if (request instanceof Request) { Request basicRequest = (Request) request; if (basicRequest.requiresAuthentication()) { - builder.addHeader(HttpHeaders.AUTHORIZATION, basicRequest.getAuthString()); + httpUriRequestBase.addHeader(HttpHeaders.AUTHORIZATION, basicRequest.getAuthString()); } } for (Map.Entry> entry : request.getHeaderParams().entrySet()) { for (String value : entry.getValue()) { - builder.addHeader(entry.getKey(), value); + httpUriRequestBase.addHeader(entry.getKey(), value); } } MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create(); @@ -48,23 +50,21 @@ public Response makeRequest(Request request) { multipartEntityBuilder.addPart(entry.getKey(), new StringBody(value, ContentType.TEXT_PLAIN)); } } - builder.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions(), true)); - builder.setEntity(multipartEntityBuilder.build()); - HttpResponse response = null; + httpUriRequestBase.addHeader(HttpHeaders.USER_AGENT, HttpUtility.getUserAgentString(request.getUserAgentExtensions(), true)); + httpUriRequestBase.setEntity(multipartEntityBuilder.build()); + CloseableHttpResponse response = null; try { - response = client.execute(builder.build()); + response = client.execute(httpUriRequestBase); HttpEntity entity = response.getEntity(); return new Response( // Consume the entire HTTP response before returning the stream entity == null ? null : new BufferedHttpEntity(entity).getContent(), - response.getStatusLine().getStatusCode(), - response.getAllHeaders() + response.getCode(), + response.getHeaders() ); } catch (IOException e) { throw new ApiException(e.getMessage(), e); - } finally { - HttpClientUtils.closeQuietly(response); } } } diff --git a/src/test/java/com/twilio/http/HttpClientTest.java b/src/test/java/com/twilio/http/HttpClientTest.java new file mode 100644 index 0000000000..be7bf31fb7 --- /dev/null +++ b/src/test/java/com/twilio/http/HttpClientTest.java @@ -0,0 +1,208 @@ +package com.twilio.http; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.nio.file.Path; +import java.nio.file.Paths; + +import org.apache.hc.core5.http.ContentType; +import org.junit.Before; +import org.junit.Test; + +public class HttpClientTest { + + private TestHttpClient client; + + @Before + public void setup() { + client = new TestHttpClient(); + } + + @Test + public void testGetContentTypePdf() { + Path path = Paths.get("document.pdf"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("application/pdf", contentType.getMimeType()); + } + + @Test + public void testGetContentTypeJpg() { + Path path = Paths.get("image.jpg"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("image/jpeg", contentType.getMimeType()); + } + + @Test + public void testGetContentTypeJpeg() { + Path path = Paths.get("image.jpeg"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("image/jpeg", contentType.getMimeType()); + } + + @Test + public void testGetContentTypePng() { + Path path = Paths.get("image.png"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("image/png", contentType.getMimeType()); + } + + @Test + public void testGetContentTypeDefaultForUnknown() { + Path path = Paths.get("file.unknown"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("application/octet-stream", contentType.getMimeType()); + } + + @Test + public void testGetContentTypeCaseInsensitive() { + Path path = Paths.get("image.PNG"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("image/png", contentType.getMimeType()); + } + + @Test + public void testGetContentTypeWithPathAndDots() { + Path path = Paths.get("/path/to/my.file.pdf"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("application/pdf", contentType.getMimeType()); + } + + @Test + public void testGetContentTypeWithoutExtension() { + Path path = Paths.get("noextension"); + ContentType contentType = HttpClient.getContentType(path); + assertEquals("application/octet-stream", contentType.getMimeType()); + } + + @Test + public void testShouldRetryWithNullResponse() { + assertTrue(client.shouldRetry(null, new int[]{HttpClient.ANY_500})); + } + + @Test + public void testShouldRetryWithSpecificStatusCode() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(429); + + assertTrue(client.shouldRetry(response, new int[]{429})); + assertFalse(client.shouldRetry(response, new int[]{503})); + } + + @Test + public void testShouldRetryWithAny100StatusCode() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(100); + + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_100})); + + when(response.getStatusCode()).thenReturn(199); + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_100})); + + when(response.getStatusCode()).thenReturn(200); + assertFalse(client.shouldRetry(response, new int[]{HttpClient.ANY_100})); + } + + @Test + public void testShouldRetryWithAny200StatusCode() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(200); + + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_200})); + + when(response.getStatusCode()).thenReturn(299); + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_200})); + + when(response.getStatusCode()).thenReturn(300); + assertFalse(client.shouldRetry(response, new int[]{HttpClient.ANY_200})); + } + + @Test + public void testShouldRetryWithAny300StatusCode() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(300); + + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_300})); + + when(response.getStatusCode()).thenReturn(399); + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_300})); + + when(response.getStatusCode()).thenReturn(400); + assertFalse(client.shouldRetry(response, new int[]{HttpClient.ANY_300})); + } + + @Test + public void testShouldRetryWithAny400StatusCode() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(400); + + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_400})); + + when(response.getStatusCode()).thenReturn(499); + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_400})); + + when(response.getStatusCode()).thenReturn(500); + assertFalse(client.shouldRetry(response, new int[]{HttpClient.ANY_400})); + } + + @Test + public void testShouldRetryWithAny500StatusCode() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(500); + + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_500})); + + when(response.getStatusCode()).thenReturn(599); + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_500})); + + when(response.getStatusCode()).thenReturn(600); + assertFalse(client.shouldRetry(response, new int[]{HttpClient.ANY_500})); + } + + @Test + public void testShouldRetryWithMultipleRetryCodes() { + Response response = mock(Response.class); + when(response.getStatusCode()).thenReturn(429); + + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_500, 429})); + + when(response.getStatusCode()).thenReturn(503); + assertTrue(client.shouldRetry(response, new int[]{HttpClient.ANY_500, 429})); + + when(response.getStatusCode()).thenReturn(200); + assertFalse(client.shouldRetry(response, new int[]{HttpClient.ANY_500, 429})); + } + + @Test + public void testShouldRetryWithDefaultRetryCodes() { + Response response = mock(Response.class); + + when(response.getStatusCode()).thenReturn(500); + assertTrue(client.shouldRetry(response, HttpClient.RETRY_CODES)); + + when(response.getStatusCode()).thenReturn(503); + assertTrue(client.shouldRetry(response, HttpClient.RETRY_CODES)); + + when(response.getStatusCode()).thenReturn(200); + assertFalse(client.shouldRetry(response, HttpClient.RETRY_CODES)); + + when(response.getStatusCode()).thenReturn(400); + assertFalse(client.shouldRetry(response, HttpClient.RETRY_CODES)); + } + + // Test HttpClient subclass to expose protected method for testing + private static class TestHttpClient extends HttpClient { + @Override + public Response makeRequest(Request request) { + return null; // Not needed for testing + } + + @Override + public boolean shouldRetry(Response response, int[] retryCodes) { + return super.shouldRetry(response, retryCodes); + } + } +} \ No newline at end of file diff --git a/src/test/java/com/twilio/http/IRequestTest.java b/src/test/java/com/twilio/http/IRequestTest.java new file mode 100644 index 0000000000..1e1e6103af --- /dev/null +++ b/src/test/java/com/twilio/http/IRequestTest.java @@ -0,0 +1,138 @@ +package com.twilio.http; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import com.twilio.http.IRequest.FormParameters; +import com.twilio.http.IRequest.FormParameters.Type; +import java.util.ArrayList; +import java.util.List; +import org.junit.Test; + +public class IRequestTest { + + @Test + public void testAddTextFormParameter() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + request.addFormParameter("name", Type.TEXT, "John Doe"); + + List params = request.getFormParameters(); + assertEquals(1, params.size()); + + FormParameters param = params.get(0); + assertEquals("name", param.getName()); + assertEquals(Type.TEXT, param.getType()); + assertEquals("John Doe", param.getValue()); + } + + @Test + public void testAddFileFormParameter() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + String filePath = "/path/to/file.jpg"; + request.addFormParameter("file", Type.FILE, filePath); + + List params = request.getFormParameters(); + assertEquals(1, params.size()); + + FormParameters param = params.get(0); + assertEquals("file", param.getName()); + assertEquals(Type.FILE, param.getType()); + assertEquals(filePath, param.getValue()); + } + + @Test + public void testAddMultipleFormParameters() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + request.addFormParameter("name", Type.TEXT, "John Doe"); + request.addFormParameter("email", Type.TEXT, "john@example.com"); + request.addFormParameter("file", Type.FILE, "/path/to/file.jpg"); + + List params = request.getFormParameters(); + assertEquals(3, params.size()); + + // Verify parameters were added in the correct order + assertEquals("name", params.get(0).getName()); + assertEquals("email", params.get(1).getName()); + assertEquals("file", params.get(2).getName()); + } + + @Test + public void testSetFormParameters() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + + List paramsList = new ArrayList<>(); + paramsList.add(new FormParameters("name", Type.TEXT, "John Doe")); + paramsList.add(new FormParameters("file", Type.FILE, "/path/to/file.jpg")); + + request.setFormParameters(paramsList); + + List params = request.getFormParameters(); + assertEquals(2, params.size()); + + assertEquals("name", params.get(0).getName()); + assertEquals(Type.TEXT, params.get(0).getType()); + assertEquals("John Doe", params.get(0).getValue()); + + assertEquals("file", params.get(1).getName()); + assertEquals(Type.FILE, params.get(1).getType()); + assertEquals("/path/to/file.jpg", params.get(1).getValue()); + } + + @Test + public void testSetFormParametersAppends() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + request.addFormParameter("existing", Type.TEXT, "Existing Value"); + + List additionalParams = new ArrayList<>(); + additionalParams.add(new FormParameters("new", Type.TEXT, "New Value")); + + request.setFormParameters(additionalParams); + + List params = request.getFormParameters(); + assertEquals(2, params.size()); + + assertEquals("existing", params.get(0).getName()); + assertEquals("new", params.get(1).getName()); + } + + @Test + public void testSetFormParametersNull() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + + try { + request.setFormParameters(null); + fail("Should have thrown IllegalArgumentException"); + } catch (IllegalArgumentException e) { + assertEquals("Form parameters cannot be null", e.getMessage()); + } + } + + @Test + public void testFormParametersInitializedInConstructor() { + IRequest request = new IRequest(HttpMethod.POST, "http://example.com"); + + List params = request.getFormParameters(); + assertNotNull("FormParameters should be initialized", params); + assertTrue("FormParameters should be empty initially", params.isEmpty()); + } + + @Test + public void testFormParametersDomainConstructor() { + IRequest request = new IRequest(HttpMethod.POST, "api", "/v1/resource"); + + List params = request.getFormParameters(); + assertNotNull("FormParameters should be initialized", params); + assertTrue("FormParameters should be empty initially", params.isEmpty()); + } + + @Test + public void testFormParametersRegionConstructor() { + IRequest request = new IRequest(HttpMethod.POST, "api", "/v1/resource", "us1"); + + List params = request.getFormParameters(); + assertNotNull("FormParameters should be initialized", params); + assertTrue("FormParameters should be empty initially", params.isEmpty()); + } +} diff --git a/src/test/java/com/twilio/http/NetworkHttpClientTest.java b/src/test/java/com/twilio/http/NetworkHttpClientTest.java index ee5c9050f4..21c457c921 100644 --- a/src/test/java/com/twilio/http/NetworkHttpClientTest.java +++ b/src/test/java/com/twilio/http/NetworkHttpClientTest.java @@ -2,28 +2,42 @@ import com.twilio.constant.EnumConstants; import com.twilio.exception.ApiConnectionException; -import org.apache.http.HttpEntity; -import org.apache.http.StatusLine; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; +import com.twilio.http.IRequest.FormParameters; +import com.twilio.http.IRequest.FormParameters.Type; +import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TemporaryFolder; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.Spy; import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static org.junit.Assert.*; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.*; public class NetworkHttpClientTest { + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + private NetworkHttpClient client; @Mock @@ -42,15 +56,15 @@ public class NetworkHttpClientTest { private CloseableHttpResponse mockResponse; @Mock - private StatusLine mockStatusLine; + private HttpEntity mockEntity; @Mock - private HttpEntity mockEntity; + private MultipartEntityBuilder mockMultipartEntityBuilder; @Before public void setUp() { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); doReturn(mockClient).when(mockBuilder).build(); client = new NetworkHttpClient(mockBuilder); } @@ -72,9 +86,8 @@ private void setup( when(mockEntity.isRepeatable()).thenReturn(true); when(mockEntity.getContentLength()).thenReturn(1L); when(mockEntity.getContent()).thenReturn(stream); - when(mockResponse.getStatusLine()).thenReturn(mockStatusLine); when(mockResponse.getEntity()).thenReturn(mockEntity); - when(mockStatusLine.getStatusCode()).thenReturn(statusCode); + when(mockResponse.getCode()).thenReturn(statusCode); } @@ -182,4 +195,183 @@ public void testErrorResponse() throws IOException { assertEquals(resp.getStatusCode(), 404); assertEquals(resp.getContent(), "womp"); } + + @Test + public void testMultipartFormDataWithTextOnly() throws IOException { + // Mock setup + setup(201, "success", HttpMethod.POST, false); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.MULTIPART_FORM_DATA); + + // Create test form parameters + List formParameters = new ArrayList<>(); + formParameters.add(new FormParameters("name", Type.TEXT, "John Doe")); + formParameters.add(new FormParameters("email", Type.TEXT, "john@example.com")); + when(mockRequest.getFormParameters()).thenReturn(formParameters); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(201, response.getStatusCode()); + assertEquals("success", response.getContent()); + + } + + @Test + public void testMultipartFormDataWithFile() throws IOException { + // Create a temporary file for testing + File testFile = temporaryFolder.newFile("test.jpg"); + try (FileWriter writer = new FileWriter(testFile)) { + writer.write("test image data"); + } + + // Mock setup + setup(201, "success", HttpMethod.POST, false); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.MULTIPART_FORM_DATA); + + // Create test form parameters + List formParameters = new ArrayList<>(); + formParameters.add(new FormParameters("file", Type.FILE, testFile.getAbsolutePath())); + when(mockRequest.getFormParameters()).thenReturn(formParameters); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.MULTIPART_FORM_DATA); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(201, response.getStatusCode()); + assertEquals("success", response.getContent()); + } + + @Test + public void testMultipartFormDataWithMixedContent() throws IOException { + // Create a temporary file for testing + File testFile = temporaryFolder.newFile("test.pdf"); + try (FileWriter writer = new FileWriter(testFile)) { + writer.write("test pdf data"); + } + + // Mock setup + setup(201, "success", HttpMethod.POST, false); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.MULTIPART_FORM_DATA); + + // Create test form parameters with both text and file + List formParameters = new ArrayList<>(); + formParameters.add(new FormParameters("name", Type.TEXT, "John Doe")); + formParameters.add(new FormParameters("file", Type.FILE, testFile.getAbsolutePath())); + when(mockRequest.getFormParameters()).thenReturn(formParameters); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.MULTIPART_FORM_DATA); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(201, response.getStatusCode()); + assertEquals("success", response.getContent()); + } + + @Test + public void testPutMethod() throws IOException { + // Mock setup for PUT request + setup(200, "updated", HttpMethod.PUT, false); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(200, response.getStatusCode()); + assertEquals("updated", response.getContent()); + } + + @Test + public void testPutMethodWithBody() throws IOException { + // Mock setup for PUT request with a JSON body + setup(200, "updated", HttpMethod.PUT, false); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.JSON); + String jsonBody = "{\"name\":\"New Name\",\"active\":true}"; + when(mockRequest.getBody()).thenReturn(jsonBody); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(200, response.getStatusCode()); + assertEquals("updated", response.getContent()); + + } + + @Test + public void testPatchMethod() throws IOException { + // Mock setup for PATCH request + setup(200, "patched", HttpMethod.PATCH, false); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(200, response.getStatusCode()); + assertEquals("patched", response.getContent()); + } + + @Test + public void testPatchMethodWithJsonBody() throws IOException { + // Mock setup for PATCH request with a JSON body + setup(200, "patched", HttpMethod.PATCH, false); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.JSON); + String jsonBody = "{\"status\":\"active\"}"; + when(mockRequest.getBody()).thenReturn(jsonBody); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify + assertEquals(200, response.getStatusCode()); + assertEquals("patched", response.getContent()); + } + + + @Test + public void testFormUrlEncodedMultipleParameters() throws IOException { + // Mock setup + setup(201, "created", HttpMethod.POST, false); + + // Set up multiple parameters + Map> postParams = new HashMap<>(); + postParams.put("name", Arrays.asList("John Doe")); + postParams.put("email", Arrays.asList("john@example.com")); + postParams.put("age", Arrays.asList("30")); + postParams.put("tags", Arrays.asList("customer", "premium")); + when(mockRequest.getPostParams()).thenReturn(postParams); + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify response + assertEquals(201, response.getStatusCode()); + assertEquals("created", response.getContent()); + } + + @Test + public void testRequestWithMultipleHeaders() throws IOException { + // Mock setup for POST request + setup(201, "created", HttpMethod.POST, false); + + // Set up multiple header parameters + Map> headerParams = new HashMap<>(); + headerParams.put("X-Custom-Header", Arrays.asList("CustomValue")); + headerParams.put("Accept-Language", Arrays.asList("en-US")); + headerParams.put("Cache-Control", Arrays.asList("no-cache")); + headerParams.put("X-Request-ID", Arrays.asList("abc123")); + when(mockRequest.getHeaderParams()).thenReturn(headerParams); + + + // Make the request + Response response = client.makeRequest(mockRequest); + + // Verify response + assertEquals(201, response.getStatusCode()); + assertEquals("created", response.getContent()); + + } + } diff --git a/src/test/java/com/twilio/http/ResponseTest.java b/src/test/java/com/twilio/http/ResponseTest.java index ca9b64bc31..a3b1a3e86e 100644 --- a/src/test/java/com/twilio/http/ResponseTest.java +++ b/src/test/java/com/twilio/http/ResponseTest.java @@ -3,7 +3,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; -import org.mockito.runners.MockitoJUnitRunner; +import org.mockito.junit.MockitoJUnitRunner; import java.io.InputStream; diff --git a/src/test/java/com/twilio/http/TwilioRestClientTest.java b/src/test/java/com/twilio/http/TwilioRestClientTest.java index f2bdfc466d..05cbcd389b 100644 --- a/src/test/java/com/twilio/http/TwilioRestClientTest.java +++ b/src/test/java/com/twilio/http/TwilioRestClientTest.java @@ -34,7 +34,7 @@ public class TwilioRestClientTest { @Before public void setUp() throws Exception { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); twilioRestClient = new TwilioRestClient(new TwilioRestClient.Builder("AC123", "AUTH TOKEN").httpClient(httpClient)); } diff --git a/src/test/java/com/twilio/http/ValidationClientTest.java b/src/test/java/com/twilio/http/ValidationClientTest.java index 3415786a65..c3781ecf09 100644 --- a/src/test/java/com/twilio/http/ValidationClientTest.java +++ b/src/test/java/com/twilio/http/ValidationClientTest.java @@ -1,6 +1,10 @@ package com.twilio.http; import com.twilio.constant.EnumConstants; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import org.junit.Test; import java.security.KeyPair; @@ -15,6 +19,10 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import java.io.IOException; + +import com.twilio.exception.ApiException; + public class ValidationClientTest { @Test public void testHttpGet() throws Exception { @@ -32,6 +40,18 @@ public void testHttpPut() throws Exception { exerciseHttpMethod(HttpMethod.PUT); } + @Test + public void testHttpPatch() throws Exception { + exerciseHttpMethod(HttpMethod.PATCH); + testContentType(HttpMethod.PATCH); + } + + @Test + public void testHttpDelete() throws Exception { + exerciseHttpMethod(HttpMethod.DELETE); + } + + private void exerciseHttpMethod(final HttpMethod httpMethod) throws Exception { final KeyPair keyPair = generateKeyPair(); final MockWebServer server = new MockWebServer(); @@ -78,4 +98,111 @@ private static KeyPair generateKeyPair() throws Exception { keyPairGenerator.initialize(2048); return keyPairGenerator.generateKeyPair(); } + + @Test + public void testFormUrlEncodedMultipleParameters() throws Exception { + // Set up the test environment + final KeyPair keyPair = generateKeyPair(); + final MockWebServer server = new MockWebServer(); + server.enqueue(new MockResponse().setBody("success")); + + final String path = "/resource"; + final HttpUrl url = server.url(path); + final ValidationClient client = new ValidationClient( + "AC123456789", + "CR987654321", + "signing-key-123", + keyPair.getPrivate() + ); + + // Create the request with form parameters + final Request request = new Request(HttpMethod.POST, url.url().toString()); + request.setContentType(EnumConstants.ContentType.FORM_URLENCODED); + + // Add multiple form parameters, including one with multiple values + Map> postParams = new HashMap<>(); + postParams.put("name", Arrays.asList("John Doe")); + postParams.put("email", Arrays.asList("john.doe@example.com")); + postParams.put("phone", Arrays.asList("+12125551234")); + postParams.put("tags", Arrays.asList("customer", "premium", "enterprise")); // Multiple values + postParams.put("status", Arrays.asList("active")); + + // Add the parameters to the request + for (Map.Entry> entry : postParams.entrySet()) { + for (String value : entry.getValue()) { + request.addPostParam(entry.getKey(), value); + } + } + + // Make the request + final Response response = client.makeRequest(request); + + // Verify response + assertEquals(200, response.getStatusCode()); + assertEquals("success", response.getContent()); + } + + @Test + public void testRequestWithMultipleHeaders() throws Exception { + // Set up the test environment + final KeyPair keyPair = generateKeyPair(); + final MockWebServer server = new MockWebServer(); + server.enqueue(new MockResponse().setBody("success")); + + final String path = "/resource"; + final HttpUrl url = server.url(path); + final ValidationClient client = new ValidationClient( + "AC123456789", + "CR987654321", + "signing-key-123", + keyPair.getPrivate() + ); + + // Create the request with custom headers + final Request request = new Request(HttpMethod.GET, url.url().toString()); + + // Add multiple custom headers + request.addHeaderParam("X-Custom-Header", "CustomValue"); + request.addHeaderParam("Accept-Language", "en-US"); + request.addHeaderParam("Cache-Control", "no-cache"); + + // Add a header with multiple values + request.addHeaderParam("Accept", "application/json"); + request.addHeaderParam("Accept", "application/xml"); + + // Add header with special characters + request.addHeaderParam("X-Special-Chars", "value with spaces, commas; and special chars"); + + // Make the request + final Response response = client.makeRequest(request); + + // Verify response + assertEquals(200, response.getStatusCode()); + assertEquals("success", response.getContent()); + } + + @Test(expected = ApiException.class) + public void testIOExceptionHandling() throws Exception { + // Set up a key pair for validation + final KeyPair keyPair = generateKeyPair(); + + // Create a server that will immediately close the connection + final MockWebServer server = new MockWebServer(); + + // Force the server to shut down before making the request + server.shutdown(); + + // Create a request to the closed server which will cause IOException + final HttpUrl url = server.url("/resource"); + final ValidationClient client = new ValidationClient( + "AC123456789", + "CR987654321", + "signing-key-123", + keyPair.getPrivate() + ); + final Request request = new Request(HttpMethod.GET, url.url().toString()); + + // This should throw an ApiException wrapping the IOException + client.makeRequest(request); + } } diff --git a/src/test/java/com/twilio/http/noauth/NoAuthNetworkHttpClientTest.java b/src/test/java/com/twilio/http/noauth/NoAuthNetworkHttpClientTest.java new file mode 100644 index 0000000000..5007a8cb31 --- /dev/null +++ b/src/test/java/com/twilio/http/noauth/NoAuthNetworkHttpClientTest.java @@ -0,0 +1,162 @@ +package com.twilio.http.noauth; + +import com.twilio.constant.EnumConstants; +import com.twilio.exception.ApiException; +import com.twilio.http.HttpMethod; +import com.twilio.http.Response; +import org.apache.hc.client5.http.config.RequestConfig; +import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; +import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClientBuilder; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.io.SocketConfig; +import org.apache.hc.core5.util.Timeout; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; +import org.mockito.Spy; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +public class NoAuthNetworkHttpClientTest { + + private NoAuthNetworkHttpClient client; + + @Mock + private NoAuthRequest mockRequest; + + @Spy + private HttpClientBuilder mockBuilder; + + @Mock + private CloseableHttpClient mockClient; + + @Mock + private CloseableHttpResponse mockResponse; + + @Mock + private HttpEntity mockEntity; + + @Before + public void setUp() { + MockitoAnnotations.openMocks(this); + doReturn(mockClient).when(mockBuilder).build(); + client = new NoAuthNetworkHttpClient(); + } + + private void setup( + final int statusCode, + final String content, + final HttpMethod method + ) throws IOException { + final InputStream stream = new ByteArrayInputStream(content.getBytes("UTF-8")); + + when(mockRequest.getMethod()).thenReturn(method); + when(mockRequest.constructURL()).thenReturn(new URL("http://foo.com/hello")); + when(mockRequest.getContentType()).thenReturn(EnumConstants.ContentType.FORM_URLENCODED); + when(mockClient.execute(any())).thenReturn(mockResponse); + when(mockEntity.isRepeatable()).thenReturn(true); + when(mockEntity.getContentLength()).thenReturn(1L); + when(mockEntity.getContent()).thenReturn(stream); + when(mockResponse.getEntity()).thenReturn(mockEntity); + when(mockResponse.getCode()).thenReturn(statusCode); + } + + + @Test + public void testReliableRequest() { + NoAuthRequest request = mock(NoAuthRequest.class); + when(request.getMethod()).thenReturn(HttpMethod.GET); + + NoAuthNetworkHttpClient clientSpy = spy(client); + doReturn(new Response("", 204)).when(clientSpy).makeRequest(request); + + clientSpy.reliableRequest(request); + + assertNotNull(clientSpy.getLastRequest()); + assertNotNull(clientSpy.getLastResponse()); + } + + @Test + public void testShouldRetry() { + Response resp = new Response("error", 500); + boolean shouldRetry = client.shouldRetry(resp, new int[]{500}); + assertEquals(true, shouldRetry); + + resp = new Response("success", 200); + shouldRetry = client.shouldRetry(resp, new int[]{500}); + assertEquals(false, shouldRetry); + + shouldRetry = client.shouldRetry(null, new int[]{500}); + assertEquals(true, shouldRetry); + } + + @Test + public void testDefaultConstructor() throws IOException { + // Create client using default constructor + NoAuthNetworkHttpClient defaultClient = new NoAuthNetworkHttpClient(); + + // Setup mock NoAuthRequest + NoAuthRequest request = mock(NoAuthRequest.class); + when(request.getMethod()).thenReturn(HttpMethod.GET); + when(request.constructURL()).thenReturn(new URL("http://example.com")); + when(request.getHeaderParams()).thenReturn(new HashMap<>()); + + // This test verifies that the default constructor creates a functional client + // We can't directly test the internals, but we can verify the client was constructed + // without exceptions and has the expected type + assertNotNull(defaultClient); + assertEquals(NoAuthNetworkHttpClient.class, defaultClient.getClass()); + } + + @Test + public void testRequestConfigConstructor() { + // Create a custom RequestConfig + RequestConfig customConfig = RequestConfig.custom() + .setConnectTimeout(Timeout.ofMilliseconds(5000)) + .build(); + + // Create client with custom RequestConfig + NoAuthNetworkHttpClient configClient = new NoAuthNetworkHttpClient(customConfig); + + // Verify client was created successfully + assertNotNull(configClient); + assertEquals(NoAuthNetworkHttpClient.class, configClient.getClass()); + } + + @Test + public void testRequestAndSocketConfigConstructor() { + // Create custom configs + RequestConfig customRequestConfig = RequestConfig.custom() + .setConnectTimeout(Timeout.ofMilliseconds(5000)) + .build(); + + SocketConfig customSocketConfig = SocketConfig.custom() + .setSoTimeout(Timeout.ofMilliseconds(5000)) + .build(); + + // Create client with both custom configs + NoAuthNetworkHttpClient fullConfigClient = new NoAuthNetworkHttpClient(customRequestConfig, customSocketConfig); + + // Verify client was created successfully + assertNotNull(fullConfigClient); + assertEquals(NoAuthNetworkHttpClient.class, fullConfigClient.getClass()); + } +} diff --git a/src/test/java/com/twilio/jwt/validation/RequestCanonicalizerTest.java b/src/test/java/com/twilio/jwt/validation/RequestCanonicalizerTest.java index 0042b32709..c484b9a795 100644 --- a/src/test/java/com/twilio/jwt/validation/RequestCanonicalizerTest.java +++ b/src/test/java/com/twilio/jwt/validation/RequestCanonicalizerTest.java @@ -1,8 +1,8 @@ package com.twilio.jwt.validation; import com.twilio.exception.InvalidRequestException; -import org.apache.http.Header; -import org.apache.http.message.BasicHeader; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.message.BasicHeader; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java b/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java index fc312b256d..1cd4c29bd4 100644 --- a/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java +++ b/src/test/java/com/twilio/jwt/validation/ValidationTokenTest.java @@ -6,12 +6,15 @@ import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import io.jsonwebtoken.security.InvalidKeyException; -import io.jsonwebtoken.security.Keys; -import org.apache.http.*; -import org.apache.http.client.protocol.HttpClientContext; -import org.apache.http.message.BasicHeader; -import org.apache.http.message.BasicHttpRequest; +import org.apache.hc.client5.http.classic.methods.HttpPost; +import org.apache.hc.client5.http.protocol.HttpClientContext; +import org.apache.hc.core5.http.Header; +import org.apache.hc.core5.http.HttpEntity; +import org.apache.hc.core5.http.HttpRequest; +import org.apache.hc.core5.http.message.BasicHeader; +import org.apache.hc.core5.http.message.BasicHttpRequest; +import org.apache.hc.core5.http.message.RequestLine; +import org.apache.hc.core5.net.URIAuthority; import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -59,14 +62,14 @@ public class ValidationTokenTest { private RequestLine requestLine; @Mock - private HttpEntityEnclosingRequest requestWithEntity; + private HttpPost requestWithEntity; @Mock private HttpEntity entity; @Before public void setup() throws Exception { - MockitoAnnotations.initMocks(this); + MockitoAnnotations.openMocks(this); headers = new Header[2]; headers[0] = new BasicHeader("host", "api.twilio.com"); headers[1] = new BasicHeader("authorization", "foobar"); @@ -146,10 +149,10 @@ public void testTokenInvalidAlgorithms() throws IOException { @Test public void testTokenFromHttpRequest() throws IOException { - when(request.getRequestLine()).thenReturn(requestLine); when(requestLine.getMethod()).thenReturn("POST"); when(requestLine.getUri()).thenReturn("/Messages?PageSize=5&Limit=10"); - when(request.getAllHeaders()).thenReturn(headers); + when(request.getHeaders()).thenReturn(headers); + when(request.getRequestUri()).thenReturn("/Messages?PageSize=5&Limit=10"); Jwt jwt = ValidationToken.fromHttpRequest(ACCOUNT_SID, CREDENTIAL_SID, SIGNING_KEY_SID, privateKey, request, SIGNED_HEADERS); @@ -157,35 +160,35 @@ public void testTokenFromHttpRequest() throws IOException { this.validateToken(claims); Assert.assertEquals("authorization;host", claims.get("hrh")); - Assert.assertEquals("712fbbec9dcb4fe58ed8caecf925d2fe10889f5d3f4b48e748157a4a1113697d", claims.get("rqh")); + Assert.assertEquals("96d94b3c5b14c8f0e04a708332006c68c5b0c2c6cc25db5d0fb3d017cdf7f4ff", claims.get("rqh")); } @Test public void testTokenFromEntityRequest() throws IOException { - when(requestWithEntity.getRequestLine()).thenReturn(requestLine); - when(requestWithEntity.getAllHeaders()).thenReturn(headers); + when(requestWithEntity.getHeaders()).thenReturn(headers); when(requestWithEntity.getEntity()).thenReturn(entity); when(entity.getContent()).thenReturn( new ByteArrayInputStream("testbody".getBytes(StandardCharsets.UTF_8))); when(requestLine.getMethod()).thenReturn("POST"); when(requestLine.getUri()).thenReturn("/Messages"); + when(requestWithEntity.getRequestUri()).thenReturn("/Messages?PageSize=5&Limit=10"); Jwt jwt = ValidationToken.fromHttpRequest(ACCOUNT_SID, CREDENTIAL_SID, SIGNING_KEY_SID, privateKey, requestWithEntity, SIGNED_HEADERS); Claims claims = getClaimFromJwtToken(jwt); this.validateToken(claims); Assert.assertEquals("authorization;host", claims.get("hrh")); - Assert.assertEquals("bd792c967c20d546c738b94068f5f72758a10d26c12979677501e1eefe58c65a", claims.get("rqh")); + Assert.assertEquals("9871e786e0c77406cc78090b694593c3479a9215890c42981b4f8d5923d9511b", claims.get("rqh")); } @Test public void testTokenFromHttpRequestWithHostPort() throws IOException { headers[0] = new BasicHeader("host", "api.twilio.com:443"); - when(request.getRequestLine()).thenReturn(requestLine); when(requestLine.getMethod()).thenReturn("GET"); when(requestLine.getUri()).thenReturn("/Messages?PageSize=5&Limit=10"); - when(request.getAllHeaders()).thenReturn(headers); + when(request.getHeaders()).thenReturn(headers); + when(request.getRequestUri()).thenReturn("/Messages?PageSize=5&Limit=10"); Jwt jwt = ValidationToken.fromHttpRequest(ACCOUNT_SID, CREDENTIAL_SID, SIGNING_KEY_SID, privateKey, request, SIGNED_HEADERS); Claims claims = getClaimFromJwtToken(jwt); @@ -193,7 +196,7 @@ public void testTokenFromHttpRequestWithHostPort() throws IOException { this.validateToken(claims); Assert.assertEquals("authorization;host", claims.get("hrh")); - Assert.assertEquals("4b3d2666845a38f00259a5231a08765bb2d12564bc4469fd5b2816204c588967", claims.get("rqh")); + Assert.assertEquals("96d94b3c5b14c8f0e04a708332006c68c5b0c2c6cc25db5d0fb3d017cdf7f4ff", claims.get("rqh")); } @Test @@ -208,7 +211,7 @@ public void testMultithreadedValidations() throws InterruptedException, Executio futures.add(service.submit(new Runnable() { public void run() { try { - i.process(getBasicRequest(), new HttpClientContext()); + i.process(getBasicRequest(), null, new HttpClientContext()); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); @@ -226,7 +229,8 @@ private BasicHttpRequest getBasicRequest() { return new BasicHttpRequest( "GET", "/some-url?with=params", - new ProtocolVersion("HTTP", 1, 1) + new URIAuthority("api.twilio.com:443"), + "" ); } diff --git a/src/test/java/com/twilio/security/RequestValidatorTest.java b/src/test/java/com/twilio/security/RequestValidatorTest.java index a97418277c..78fcdbdebd 100644 --- a/src/test/java/com/twilio/security/RequestValidatorTest.java +++ b/src/test/java/com/twilio/security/RequestValidatorTest.java @@ -101,10 +101,10 @@ public void testValidateRemovesPortHttp() { public void testValidateAddsPortHttps() { String expectedSignature = "kvajT1Ptam85bY51eRf/AJRuM3w="; // hash of https uri with port 443 boolean isValid = validator.validate(url, params, expectedSignature); - + Assert.assertTrue("Validator did not add port 443 to https url", isValid); } - + @Test public void testValidateAddsPortHttp() { String url = this.url.replace("https", "http"); @@ -114,4 +114,181 @@ public void testValidateAddsPortHttp() { Assert.assertTrue("Validator did not add port 80 to http url", isValid); } + + @Test + public void testValidateWithEmptyParams() { + // Test with no form parameters - empty map + Map emptyParams = new HashMap<>(); + String expectedSignature = "zYQTYrRWXE7LtzbG4PfP7/bkkGo="; // hash of URL only + boolean isValid = validator.validate(url, emptyParams, expectedSignature); + + Assert.assertTrue("Validation should succeed with empty parameters", isValid); + } + + @Test + public void testValidateWithNullParams() { + // Test with null parameters + String expectedSignature = "zYQTYrRWXE7LtzbG4PfP7/bkkGo="; // hash of URL only + boolean isValid = validator.validate(url, (Map) null, expectedSignature); + + Assert.assertTrue("Validation should succeed with null parameters", isValid); + } + + @Test + public void testValidateWithNoQueryParams() { + // Test with URL that has no query parameters + String urlNoQuery = "https://mycompany.com/myapp.php"; + String expectedSignature = "1xaxFBvyzXYvWplzNOSs28HWO94="; + boolean isValid = validator.validate(urlNoQuery, params, expectedSignature); + + Assert.assertTrue("Validation should succeed with URL without query parameters", isValid); + } + + @Test + public void testValidateIgnoresNonTwilioQueryParams() { + // Test that non-Twilio query parameters in the URL are included in signature generation + // (they are NOT ignored - they're part of the URL that gets signed) + String urlWithExtraParams = "https://mycompany.com/myapp.php?foo=1&bar=2&type=thiswontbeusedinthesignaturegeneratorandsoshouldbeignored"; + String expectedSignature = "hYkNsTBttoNGkyCS0p+wWmQoRTg="; + boolean isValid = validator.validate(urlWithExtraParams, params, expectedSignature); + + Assert.assertTrue("Validation should succeed - query params are part of URL signature", isValid); + } + + @Test + public void testValidateWithUrlEncodedQueryParams() { + // Test with URL encoded query parameters + String urlEncoded = "https://mycompany.com/myapp.php?foo=hello%20world&bar=test%2Bvalue"; + String expectedSignature = "er2tvAP1Wx+iuTTE2BPgvEaN1cs="; + boolean isValid = validator.validate(urlEncoded, params, expectedSignature); + + Assert.assertTrue("Validation should succeed with URL encoded query parameters", isValid); + } + + @Test + public void testValidateWithSpecialCharactersInParams() { + // Test with special characters in parameter values + Map specialParams = new HashMap<>(); + specialParams.put("Message", "Hello & goodbye! @#$%^*()"); + specialParams.put("From", "+1 (415) 867-5309"); + specialParams.put("Special", "unicode: ñáéíóú"); + + String expectedSignature = "dCPiR4WtQ6QFN6pJh81CtlCcWLQ="; + boolean isValid = validator.validate(url, specialParams, expectedSignature); + + Assert.assertTrue("Validation should succeed with special characters in parameters", isValid); + } + + @Test + public void testValidateWithEmptyParameterValues() { + // Test with empty string parameter values + Map emptyValueParams = new HashMap<>(); + emptyValueParams.put("Digits", ""); + emptyValueParams.put("CallSid", "CA1234567890ABCDE"); + emptyValueParams.put("EmptyParam", ""); + + String expectedSignature = "9HHp/OqQMEwdrVebHDdA/+tqjX8="; + boolean isValid = validator.validate(url, emptyValueParams, expectedSignature); + + Assert.assertTrue("Validation should succeed with empty parameter values", isValid); + } + + @Test + public void testValidateWithNullParameterValues() { + // Test with null parameter values (treated as empty strings) + Map nullValueParams = new HashMap<>(); + nullValueParams.put("Digits", null); + nullValueParams.put("CallSid", "CA1234567890ABCDE"); + nullValueParams.put("NullParam", null); + + String expectedSignature = "L9lTTwIlxM1xGAtLRwhOSZggRhM="; + boolean isValid = validator.validate(url, nullValueParams, expectedSignature); + + Assert.assertTrue("Validation should succeed with null parameter values", isValid); + } + + @Test + public void testValidateParameterKeySorting() { + // Test that parameter keys are properly sorted alphabetically + Map unsortedParams = new HashMap<>(); + unsortedParams.put("Zebra", "last"); + unsortedParams.put("Alpha", "first"); + unsortedParams.put("Beta", "second"); + unsortedParams.put("Gamma", "third"); + + String expectedSignature = "enveUe73ZTVLAekHxez3Qx6JuuQ="; + boolean isValid = validator.validate(url, unsortedParams, expectedSignature); + + Assert.assertTrue("Validation should succeed with alphabetically sorted parameters", isValid); + } + + @Test + public void testValidateWithInternationalCharactersInUrl() { + // Test with international characters in URL + String intlUrl = "https://mycompany.com/webhook/España?año=2023"; + String expectedSignature = "G/Hx6mqqnjUNlPAoi2Sp9bGst0g="; + boolean isValid = validator.validate(intlUrl, params, expectedSignature); + + Assert.assertTrue("Validation should succeed with international characters in URL", isValid); + } + + @Test + public void testValidateWithCaseSensitiveParameterKeys() { + // Test that parameter keys are case sensitive + Map caseParams = new HashMap<>(); + caseParams.put("callSid", "lowercase"); + caseParams.put("CallSid", "uppercase"); // Different from callSid + caseParams.put("CALLSID", "allcaps"); + + String expectedSignature = "jDK7WKT8wiNrwggd4ceTv4e1MJ4="; + boolean isValid = validator.validate(url, caseParams, expectedSignature); + + Assert.assertTrue("Validation should succeed with case-sensitive parameter keys", isValid); + } + + @Test + public void testValidateWithMalformedUrlStillWorks() { + // Test that validation handles URLs gracefully even with unusual formatting + String malformedUrl = "https://mycompany.com:443//myapp.php?foo=1&bar=2"; + String expectedSignature = "A9lH3u16NjyiiM/+wylw5rirFUs="; // Signature for the malformed URL as-is + boolean isValid = validator.validate(malformedUrl, params, expectedSignature); + + Assert.assertTrue("Validation should handle malformed URLs gracefully", isValid); + } + + @Test + public void testValidateWithDifferentProtocols() { + // Test validation with different protocols + String httpUrl = url.replace("https", "http"); + String expectedSignature = "0ZXoZLH/DfblKGATFgpif+LLRf4="; + boolean isValid = validator.validate(httpUrl, params, expectedSignature); + + Assert.assertTrue("Validation should work with HTTP protocol", isValid); + } + + @Test + public void testValidateFailsWithWrongSignature() { + // Test that validation properly fails with incorrect signature + String wrongSignature = "IncorrectSignatureValue123="; + boolean isValid = validator.validate(url, params, wrongSignature); + + Assert.assertFalse("Validation should fail with incorrect signature", isValid); + } + + @Test + public void testValidateFailsWithNullSignature() { + // Test that validation properly fails with null signature + boolean isValid = validator.validate(url, params, null); + + Assert.assertFalse("Validation should fail with null signature", isValid); + } + + @Test + public void testValidateFailsWithEmptySignature() { + // Test that validation properly fails with empty signature + boolean isValid = validator.validate(url, params, ""); + + Assert.assertFalse("Validation should fail with empty signature", isValid); + } + } diff --git a/src/test/java/com/twilio/twiml/voice/DialTest.java b/src/test/java/com/twilio/twiml/voice/DialTest.java index df5e2d3b31..8d6da7c853 100644 --- a/src/test/java/com/twilio/twiml/voice/DialTest.java +++ b/src/test/java/com/twilio/twiml/voice/DialTest.java @@ -167,6 +167,14 @@ public void testElementWithChildren() { .copyParentTo(true) .build()); + builder.whatsApp(new WhatsApp.Builder(new com.twilio.type.PhoneNumber("+15017122661")) + .url(URI.create("https://example.com")) + .method(HttpMethod.GET) + .statusCallbackEvents(Promoter.listOfOne(WhatsApp.Event.INITIATED)) + .statusCallback(URI.create("https://example.com")) + .statusCallbackMethod(HttpMethod.GET) + .build()); + Dial elem = builder.build(); Assert.assertEquals( @@ -179,6 +187,7 @@ public void testElementWithChildren() { "DEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + "https://example.com" + "application_sid" + + "+15017122661" + "", elem.toXml() ); @@ -379,6 +388,14 @@ public void testXmlChildrenDeserialization() { .copyParentTo(true) .build()); + builder.whatsApp(new WhatsApp.Builder(new com.twilio.type.PhoneNumber("+15017122661")) + .url(URI.create("https://example.com")) + .method(HttpMethod.GET) + .statusCallbackEvents(Promoter.listOfOne(WhatsApp.Event.INITIATED)) + .statusCallback(URI.create("https://example.com")) + .statusCallbackMethod(HttpMethod.GET) + .build()); + final Dial elem = builder.build(); Assert.assertEquals( @@ -390,6 +407,7 @@ public void testXmlChildrenDeserialization() { "DEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + "https://example.com" + "application_sid" + + "+15017122661" + "").build().toXml(), elem.toXml() ); diff --git a/src/test/java/com/twilio/twiml/voice/WhatsAppTest.java b/src/test/java/com/twilio/twiml/voice/WhatsAppTest.java new file mode 100644 index 0000000000..4c6b47bfa1 --- /dev/null +++ b/src/test/java/com/twilio/twiml/voice/WhatsAppTest.java @@ -0,0 +1,54 @@ +/** + * This code was generated by + * \ / _ _ _| _ _ + * | (_)\/(_)(_|\/| |(/_ v1.0.0 + * / / + */ + +package com.twilio.twiml.voice; + +import com.twilio.converter.Promoter; +import com.twilio.http.HttpMethod; +import org.junit.Assert; +import org.junit.Test; + +import java.net.URI; +import java.util.List; + +/** + * Test class for {@link WhatsApp} + */ +public class WhatsAppTest { + @Test + public void testElementWithParams() { + WhatsApp elem = new WhatsApp.Builder(new com.twilio.type.PhoneNumber("+15017122661")) + .url(URI.create("https://example.com")) + .method(HttpMethod.GET) + .statusCallbackEvents(Promoter.listOfOne(WhatsApp.Event.INITIATED)) + .statusCallback(URI.create("https://example.com")) + .statusCallbackMethod(HttpMethod.GET) + .build(); + + Assert.assertEquals( + "" + + "+15017122661", + elem.toXml() + ); + } + + @Test + public void testXmlAttributesDeserialization() { + final WhatsApp elem = new WhatsApp.Builder(new com.twilio.type.PhoneNumber("+15017122661")) + .url(URI.create("https://example.com")) + .method(HttpMethod.GET) + .statusCallbackEvents(Promoter.listOfOne(WhatsApp.Event.INITIATED)) + .statusCallback(URI.create("https://example.com")) + .statusCallbackMethod(HttpMethod.GET) + .build(); + + Assert.assertEquals( + WhatsApp.Builder.fromXml("+15017122661").build().toXml(), + elem.toXml() + ); + } +} \ No newline at end of file