8000 [Librarian] Regenerated @ a72b955e51d75514f3c944c81b9db17278cfad69 · twilio/twilio-java@77737bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 77737bc

Browse files
committed
[Librarian] Regenerated @ a72b955e51d75514f3c944c81b9db17278cfad69
1 parent 5d92f46 commit 77737bc

33 files changed

+2377
-46
lines changed

CHANGES.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
twilio-java changelog
22
=====================
33

4+
[2023-01-25] Version 9.2.2
5+
--------------------------
6+
**Api**
7+
- Add `public_application_connect_enabled` param to Application resource
8+
9+
**Messaging**
10+
- Add new tollfree verification API property (ExternalReferenceId)]
11+
12+
**Verify**
13+
- Add `device_ip` parameter and channel `auto` for sna/sms orchestration
14+
15+
**Twiml**
16+
- Add support for `<Application>` noun and `<ApplicationSid>` noun, nested `<Parameter>` to `<Hangup>` and `<Leave>` verb
17+
18+
419
[2023-01-11] Version 9.2.1
520
--------------------------
621
**Conversations**

src/main/java/com/twilio/rest/api/v2010/account/Application.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@JsonIgnoreProperties(ignoreUnknown = true)
4242
@ToString
4343
public class Application extends Resource {
44-
private static final long serialVersionUID = 64877918712545L;
44+
private static final long serialVersionUID = 38146741905668L;
4545

4646
public static ApplicationCreator creator(){
4747
return new ApplicationCreator();
@@ -135,6 +135,7 @@ public static Application fromJson(final InputStream json, final ObjectMapper ob
135135
private final URI voiceFallbackUrl;
136136
private final HttpMethod voiceMethod;
137137
private final URI voiceUrl;
138+
private final Boolean publicApplicationConnectEnabled;
138139

139140
@JsonCreator
140141
private Application(
@@ -196,7 +197,10 @@ private Application(
196197
final HttpMethod voiceMethod,
197198

198199
@JsonProperty("voice_url")
199-
final URI voiceUrl
200+
final URI voiceUrl,
201+
202+
@JsonProperty("public_application_connect_enabled")
203+
final Boolean publicApplicationConnectEnabled
200204
) {
201205
this.accountSid = accountSid;
202206
this.apiVersion = apiVersion;
@@ -218,6 +222,7 @@ private Application(
218222
this.voiceFallbackUrl = voiceFallbackUrl;
219223
this.voiceMethod = voiceMethod;
220224
this.voiceUrl = voiceUrl;
225+
this.publicApplicationConnectEnabled = publicApplicationConnectEnabled;
221226
}
222227

223228
public final String getAccountSid() {
@@ -280,6 +285,9 @@ public final HttpMethod getVoiceMethod() {
280285
public final URI getVoiceUrl() {
281286
return this.voiceUrl;
282287
}
288+
public final Boolean getPublicApplicationConnectEnabled() {
289+
return this.publicApplicationConnectEnabled;
290+
}
283291

284292
@Override
285293
public boolean equals(final Object o) {
@@ -293,12 +301,12 @@ public boolean equals(final Object o) {
293301

294302
Application other = (Application) o;
295303

296-
return Objects.equals(accountSid, other.accountSid) && Objects.equals(apiVersion, other.apiVersion) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(friendlyName, other.friendlyName) && Objects.equals(messageStatusCallback, other.messageStatusCallback) && Objects.equals(sid, other.sid) && Objects.equals(smsFallbackMethod, other.smsFallbackMethod) && Objects.equals(smsFallbackUrl, other.smsFallbackUrl) && Objects.equals(smsMethod, other.smsMethod) && Objects.equals(smsStatusCallback, other.smsStatusCallback) && Objects.equals(smsUrl, other.smsUrl) && Objects.equals(statusCallback, other.statusCallback) && Objects.equals(statusCallbackMethod, other.statusCallbackMethod) && Objects.equals(uri, other.uri) && Objects.equals(voiceCallerIdLookup, other.voiceCallerIdLookup) && Objects.equals(voiceFallbackMethod, other.voiceFallbackMethod) && Objects.equals(voiceFallbackUrl, other.voiceFallbackUrl) && Objects.equals(voiceMethod, other.voiceMethod) && Objects.equals(voiceUrl, other.voiceUrl) ;
304+
return Objects.equals(accountSid, other.accountSid) && Objects.equals(apiVersion, other.apiVersion) && Objects.equals(dateCreated, other.dateCreated) && Objects.equals(dateUpdated, other.dateUpdated) && Objects.equals(friendlyName, other.friendlyName) && Objects.equals(messageStatusCallback, other.messageStatusCallback) && Objects.equals(sid, other.sid) && Objects.equals(smsFallbackMethod, other.smsFallbackMethod) && Objects.equals(smsFallbackUrl, other.smsFallbackUrl) && Objects.equals(smsMethod, other.smsMethod) && Objects.equals(smsStatusCallback, other.smsStatusCallback) && Objects.equals(smsUrl, other.smsUrl) && Objects.equals(statusCallback, other.statusCallback) && Objects.equals(statusCallbackMethod, other.statusCallbackMethod) && Objects.equals(uri, other.uri) && Objects.equals(voiceCallerIdLookup, other.voiceCallerIdLookup) && Objects.equals(voiceFallbackMethod, other.voiceFallbackMethod) && Objects.equals(voiceFallbackUrl, other.voiceFallbackUrl) && Objects.equals(voiceMethod, other.voiceMethod) && Objects.equals(voiceUrl, other.voiceUrl) && Objects.equals(publicApplicationConnectEnabled, other.publicApplicationConnectEnabled) ;
297305
}
298306

299307
@Override
300308
public int hashCode() {
301-
return Objects.hash(accountSid, apiVersion, dateCreated, dateUpdated, friendlyName, messageStatusCallback, sid, smsFallbackMethod, smsFallbackUrl, smsMethod, smsStatusCallback, smsUrl, statusCallback, statusCallbackMethod, uri, voiceCallerIdLookup, voiceFallbackMethod, voiceFallbackUrl, voiceMethod, voiceUrl);
309+
return Objects.hash(accountSid, apiVersion, dateCreated, dateUpdated, friendlyName, messageStatusCallback, sid, smsFallbackMethod, smsFallbackUrl, smsMethod, smsStatusCallback, smsUrl, statusCallback, statusCallbackMethod, uri, voiceCallerIdLookup, voiceFallbackMethod, voiceFallbackUrl, voiceMethod, voiceUrl, publicApplicationConnectEnabled);
302310
}
303311

304312
}

src/main/java/com/twilio/rest/api/v2010/account/ApplicationCreator.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class ApplicationCreator extends Creator<Application>{
4747
private URI smsStatusCallback;
4848
private URI messageStatusCallback;
4949
private String friendlyName;
50+
private Boolean publicApplicationConnectEnabled;
5051

5152
public ApplicationCreator() {
5253
}
@@ -142,6 +143,10 @@ public ApplicationCreator setFriendlyName(final String friendlyName){
142143
this.friendlyName = friendlyName;
143144
return this;
144145
}
146+
public ApplicationCreator setPublicApplicationConnectEnabled(final Boolean publicApplicationConnectEnabled){
147+
this.publicApplicationConnectEnabled = publicApplicationConnectEnabled;
148+
return this;
149+
}
145150

146151
@Override
147152
public Application create(final TwilioRestClient client){
@@ -230,5 +235,9 @@ private void addPostParams(final Request request) {
230235
request.addPostParam("FriendlyName", friendlyName);
231236

232237
}
238+
if (publicApplicationConnectEnabled != null) {
239+
request.addPostParam("PublicApplicationConnectEnabled", publicApplicationConnectEnabled.toString());
240+
241+
}
233242
}
234243
}

src/main/java/com/twilio/rest/api/v2010/account/ApplicationUpdater.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public class ApplicationUpdater extends Updater<Application>{
4747
private HttpMethod smsFallbackMethod;
4848
private URI smsStatusCallback;
4949
private URI messageStatusCallback;
50+
private Boolean publicApplicationConnectEnabled;
5051

5152
public ApplicationUpdater(final String pathSid){
5253
this.pathSid = pathSid;
@@ -144,6 +145,10 @@ public ApplicationUpdater setMessageStatusCallback(final URI messageStatusCallba
144145
public ApplicationUpdater setMessageStatusCallback(final String messageStatusCallback){
145146
return setMessageStatusCallback(Promoter.uriFromString(messageStatusCallback));
146147
}
148+
public ApplicationUpdater setPublicApplicationConnectEnabled(final Boolean publicApplicationConnectEnabled){
149+
this.publicApplicationConnectEnabled = publicApplicationConnectEnabled;
150+
return this;
151+
}
147152

148153
@Override
149154
public Application update(final TwilioRestClient client){
@@ -233,5 +238,9 @@ private void addPostParams(final Request request) {
233238
request.addPostParam("MessageStatusCallback", messageStatusCallback.toString());
234239

235240
}
241+
if (publicApplicationConnectEnabled != null) {
242+
request.addPostParam("PublicApplicationConnectEnabled", publicApplicationConnectEnabled.toString());
243+
244+
}
236245
}
237246
}
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* Twilio - Flex
8+
* This is the public Twilio REST API.
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator.
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
package com.twilio.rest.flexapi.v1;
16+
17+
import com.fasterxml.jackson.annotation.JsonCreator;
18+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19+
import com.fasterxml.jackson.annotation.JsonProperty;
20+
import com.fasterxml.jackson.core.JsonParseException;
21+
import com.fasterxml.jackson.databind.JsonMappingException;
22+
import com.fasterxml.jackson.databind.ObjectMapper;
23+
import com.twilio.base.Resource;
24+
import com.twilio.exception.ApiConnectionException;
25+
26+
import com.twilio.exception.ApiException;
27+
28+
import lombok.ToString;
29+
30+
import java.io.IOException;
31+
import java.io.InputStream;
32+
import java.net.URI;
33+
34+
import java.util.Objects;
35+
36+
37+
38+
@JsonIgnoreProperties(ignoreUnknown = true)
39+
@ToString
40+
public class InsightsQuestionnairesCategory extends Resource {
41+
private static final long serialVersionUID = 172423270393381L;
42+
43+
public static InsightsQuestionnairesCategoryCreator creator(final String name){
44+
return new InsightsQuestionnairesCategoryCreator(name);
45+
}
46+
47+
public static InsightsQuestionnairesCategoryDeleter deleter(final String pathCategoryId){
48+
return new InsightsQuestionnairesCategoryDeleter(pathCategoryId);
49+
}
50+
51+
public static InsightsQuestionnairesCategoryUpdater updater(final String pathCategoryId, final String name){
52+
return new InsightsQuestionnairesCategoryUpdater(pathCategoryId, name);
53+
}
54+
55+
/**
56+
* Converts a JSON String into a InsightsQuestionnairesCategory object using the provided ObjectMapper.
57+
*
58+
* @param json Raw JSON String
59+
* @param objectMapper Jackson ObjectMapper
60+
* @return InsightsQuestionnairesCategory object represented by the provided JSON
61+
*/
62+
public static InsightsQuestionnairesCategory fromJson(final String json, final ObjectMapper objectMapper) {
63+
// Convert all checked exceptions to Runtime
64+
try {
65+
return objectMapper.readValue(json, InsightsQuestionnairesCategory.class);
66+
} catch (final JsonMappingException | JsonParseException e) {
67+
throw new ApiException(e.getMessage(), e);
68+
} catch (final IOException e) {
69+
throw new ApiConnectionException(e.getMessage(), e);
70+
}
71+
}
72+
73+
/**
74+
* Converts a JSON InputStream into a InsightsQuestionnairesCategory object using the provided
75+
* ObjectMapper.
76+
*
77+
* @param json Raw JSON InputStream
78+
* @param objectMapper Jackson ObjectMapper
79+
* @return InsightsQuestionnairesCategory object represented by the provided JSON
80+
*/
81+
public static InsightsQuestionnairesCategory fromJson(final InputStream json, final ObjectMapper objectMapper) {
82+
// Convert all checked exceptions to Runtime
83+
try {
84+
return objectMapper.readValue(json, InsightsQuestionnairesCategory.class);
85+
} catch (final JsonMappingException | JsonParseException e) {
86+
throw new ApiException(e.getMessage(), e);
87+
} catch (final IOException e) {
88+
throw new ApiConnectionException(e.getMessage(), e);
89+
}
90+
}
91+
92+
private final String accountSid;
93+
private final String categoryId;
94+
private final String name;
95+
private final URI url;
96+
97+
@JsonCreator
98+
private InsightsQuestionnairesCategory(
99+
@JsonProperty("account_sid")
100+
final String accountSid,
101+
102+
@JsonProperty("category_id")
103+
final String categoryId,
104+
105+
@JsonProperty("name")
106+
final String name,
107+
108+
@JsonProperty("url")
109+
final URI url
110+
) {
111+
this.accountSid = accountSid;
112+
this.categoryId = categoryId;
113+
this.name = name;
114+
this.url = url;
115+
}
116+
117+
public final String getAccountSid() {
118+
return this.accountSid;
119+
}
120+
public final String getCategoryId() {
121+
return this.categoryId;
122+
}
123+
public final String getName() {
124+
return this.name;
125+
}
126+
public final URI getUrl() {
127+
return this.url;
128+
}
129+
130+
@Override
131+
public boolean equals(final Object o) {
132+
if (this==o) {
133+
return true;
134+
}
135+
136+
if (o == null || getClass() != o.getClass()) {
137+
return false;
138+
}
139+
140+
InsightsQuestionnairesCategory other = (InsightsQuestionnairesCategory) o;
141+
142+
return Objects.equals(accountSid, other.accountSid) && Objects.equals(categoryId, other.categoryId) && Objects.equals(name, other.name) && Objects.equals(url, other.url) ;
143+
}
144+
145+
@Override
146+
public int hashCode() {
147+
return Objects.hash(accountSid, categoryId, name, url);
148+
}
149+
150+
}
151+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* Twilio - Flex
8+
* This is the public Twilio REST API.
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator.
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
package com.twilio.rest.flexapi.v1;
16+
17+
import com.twilio.base.Creator;
18+
import com.twilio.exception.ApiConnectionException;
19+
import com.twilio.exception.ApiException;
20+
import com.twilio.exception.RestException;
21+
import com.twilio.http.HttpMethod;
22+
import com.twilio.http.Request;
23+
import com.twilio.http.Response;
24+
import com.twilio.http.TwilioRestClient;
25+
import com.twilio.rest.Domains;
26+
27+
28+
29+
30+
public class InsightsQuestionnairesCategoryCreator extends Creator<InsightsQuestionnairesCategory>{
31+
private String name;
32+
private String token;
33+
34+
public InsightsQuestionnairesCategoryCreator(final String name) {
35+
this.name = name;
36+
}
37+
38+
public InsightsQuestionnairesCategoryCreator setName(final String name){
39+
this.name = name;
40+
return this;
41+
}
42+
public InsightsQuestionnairesCategoryCreator setToken(final String token){
43+
this.token = token;
44+
return this;
45+
}
46+
47+
@Override
48+
public InsightsQuestionnairesCategory create(final TwilioRestClient client){
49+
String path = "/v1/Insights/QM/Categories";
50+
51+
path = path.replace("{"+"Name"+"}", this.name.toString());
52+
53+
Request request = new Request(
54+
HttpMethod.POST,
55+
Domains.FLEXAPI.toString(),
56+
path
57+
);
58+
addPostParams(request);
59+
addHeaderParams(request);
60+
Response response = client.request(request);
61+
if (response == null) {
62+
throw new ApiConnectionException("InsightsQuestionnairesCategory creation failed: Unable to connect to server");
63+
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
64+
RestException restException = RestException.fromJson(response.getStream(), client.getObjectMapper());
65+
if (restException == null) {
66+
throw new ApiException("Server Error, no content");
67+
}
68+
throw new ApiException(restException);
69+
}
70+
71+
return InsightsQuestionnairesCategory.fromJson(response.getStream(), client.getObjectMapper());
72+
}
73+
private void addPostParams(final Request request) {
74+
if (name != null) {
75+
request.addPostParam("Name", name);
76+
77+
}
78+
}
79+
private void addHeaderParams(final Request request) {
80+
if (token != null) {
81+
request.addHeaderParam("Token", token);
82+
83+
}
84+
}
85+
}

0 commit comments

Comments
 (0)
0