Skip to content

Commit b41b3a2

Browse files
committed
[Librarian] Regenerated @ 1565ca6ea5fc25da35893aea0bc70b60053b86b8 d990df451c3b8033c98bd3ead6be1f25b41b05b9
1 parent b53a830 commit b41b3a2

File tree

18 files changed

+201
-152
lines changed

18 files changed

+201
-152
lines changed

CHANGES.md

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

4+
[2025-03-11] Version 10.7.0
5+
---------------------------
6+
**Library - Chore**
7+
- [PR #839](https://github.com/twilio/twilio-java/pull/839): MVR Release Preparation. Thanks to [@manisha1997](https://github.com/manisha1997)!
8+
- [PR #841](https://github.com/twilio/twilio-java/pull/841): update upgrade doc. Thanks to [@manisha1997](https://github.com/manisha1997)!
9+
- [PR #840](https://github.com/twilio/twilio-java/pull/840): add version. Thanks to [@manisha1997](https://github.com/manisha1997)!
10+
- [PR #838](https://github.com/twilio/twilio-java/pull/838): Add domain and noauth base classes. Thanks to [@sbansla](https://github.com/sbansla)!
11+
- [PR #837](https://github.com/twilio/twilio-java/pull/837): enable java test. Thanks to [@manisha1997](https://github.com/manisha1997)!
12+
13+
**Api**
14+
- Add the missing `emergency_enabled` field for `Address Service` endpoints
15+
16+
**Messaging**
17+
- Add missing enums for A2P and TF
18+
19+
**Numbers**
20+
- add missing enum values to hosted_number_order_status
21+
22+
**Twiml**
23+
- Convert Twiml Attribute `speechModel` of type enum to string **(breaking change)**
24+
25+
426
[2025-02-20] Version 10.6.10
527
----------------------------
628
**Library - Chore**

src/main/java/com/twilio/Domains.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,8 @@
1212

1313
public enum Domains {
1414
ACCOUNTS("accounts"),
15-
AI("ai"),
1615
API("api"),
1716
ASSISTANTS("assistants"),
18-
ASSISTANTSADMINAPIUS1("assistants.admin-api.us1"),
1917
BULKEXPORTS("bulkexports"),
2018
CHAT("chat"),
2119
CONTENT("content"),
@@ -25,23 +23,18 @@ public enum Domains {
2523
FRONTLINEAPI("frontline-api"),
2624
PREVIEWIAM("preview-iam"),
2725
IAM("iam"),
28-
IDENTITY("identity"),
2926
INSIGHTS("insights"),
3027
INTELLIGENCE("intelligence"),
3128
IPMESSAGING("ip-messaging"),
3229
LOOKUPS("lookups"),
33-
LOOKUPSADMINAPIUS1("lookups.admin-api.us1"),
3430
MARKETPLACE("marketplace"),
3531
MESSAGING("messaging"),
3632
MICROVISOR("microvisor"),
3733
MONITOR("monitor"),
38-
MPI("mpi"),
3934
NOTIFY("notify"),
4035
NUMBERS("numbers"),
4136
OAUTH("oauth"),
42-
PARTNERS("partners"),
4337
PREVIEW("preview"),
44-
PREVIEWMESSAGING("preview.messaging"),
4538
PRICING("pricing"),
4639
PROXY("proxy"),
4740
ROUTES("routes"),
@@ -58,7 +51,7 @@ public enum Domains {
5851
WIRELESS("wireless");
5952

6053
private final String value;
61-
54+
6255
private Domains(final String value) {
6356
this.value = value;
6457
}

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class AddressReader extends Reader<Address> {
3232
private String pathAccountSid;
3333
private String customerName;
3434
private String friendlyName;
35+
private Boolean emergencyEnabled;
3536
private String isoCountry;
3637
private Long pageSize;
3738

@@ -51,6 +52,11 @@ public AddressReader setFriendlyName(final String friendlyName) {
5152
return this;
5253
}
5354

55+
public AddressReader setEmergencyEnabled(final Boolean emergencyEnabled) {
56+
this.emergencyEnabled = emergencyEnabled;
57+
return this;
58+
}
59+
5460
public AddressReader setIsoCountry(final String isoCountry) {
5561
this.isoCountry = isoCountry;
5662
return this;
@@ -162,6 +168,12 @@ private void addQueryParams(final Request request) {
162168
if (friendlyName != null) {
163169
request.addQueryParam("FriendlyName", friendlyName);
164170
}
171+
if (emergencyEnabled != null) {
172+
request.addQueryParam(
173+
"EmergencyEnabled",
174+
emergencyEnabled.toString()
175+
);
176+
}
165177
if (isoCountry != null) {
166178
request.addQueryParam("IsoCountry", isoCountry);
167179
}

src/main/java/com/twilio/rest/conversations/v1/AddressConfiguration.java

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,14 @@ public int hashCode() {
225225
);
226226
}
227227

228-
public enum Type {
229-
SMS("sms"),
230-
WHATSAPP("whatsapp"),
231-
MESSENGER("messenger"),
232-
GBM("gbm"),
233-
EMAIL("email"),
234-
RCS("rcs"),
235-
APPLE("apple");
228+
public enum AutoCreationType {
229+
WEBHOOK("webhook"),
230+
STUDIO("studio"),
231+
DEFAULT("default");
236232

237233
private final String value;
238234

239-
private Type(final String value) {
235+
private AutoCreationType(final String value) {
240236
this.value = value;
241237
}
242238

@@ -245,19 +241,18 @@ public String toString() {
245241
}
246242

247243
@JsonCreator
248-
public static Type forValue(final String value) {
249-
return Promoter.enumFromString(value, Type.values());
244+
public static AutoCreationType forValue(final String value) {
245+
return Promoter.enumFromString(value, AutoCreationType.values());
250246
}
251247
}
252248

253-
public enum AutoCreationType {
254-
WEBHOOK("webhook"),
255-
STUDIO("studio"),
256-
DEFAULT("default");
249+
public enum Method {
250+
GET("GET"),
251+
POST("POST");
257252

258253
private final String value;
259254

260-
private AutoCreationType(final String value) {
255+
private Method(final String value) {
261256
this.value = value;
262257
}
263258

@@ -266,18 +261,24 @@ public String toString() {
266261
}
267262

268263
@JsonCreator
269-
public static AutoCreationType forValue(final String value) {
270-
return Promoter.enumFromString(value, AutoCreationType.values());
264+
public static Method forValue(final String value) {
265+
return Promoter.enumFromString(value, Method.values());
271266
}
272267
}
273268

274-
public enum Method {
275-
GET("GET"),
276-
POST("POST");
269+
public enum Type {
270+
SMS("sms"),
271+
WHATSAPP("whatsapp"),
272+
MESSENGER("messenger"),
273+
GBM("gbm"),
274+
EMAIL("email"),
275+
RCS("rcs"),
276+
APPLE("apple"),
277+
CHAT("chat");
277278

278279
private final String value;
279280

280-
private Method(final String value) {
281+
private Type(final String value) {
281282
this.value = value;
282283
}
283284

@@ -286,8 +287,8 @@ public String toString() {
286287
}
287288

288289
@JsonCreator
289-
public static Method forValue(final String value) {
290-
return Promoter.enumFromString(value, Method.values());
290+
public static Type forValue(final String value) {
291+
return Promoter.enumFromString(value, Type.values());
291292
}
292293
}
293294
}

src/main/java/com/twilio/rest/events/v1/Sink.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ public int hashCode() {
226226
public enum SinkType {
227227
KINESIS("kinesis"),
228228
WEBHOOK("webhook"),
229-
SEGMENT("segment");
229+
SEGMENT("segment"),
230+
EMAIL("email");
230231

231232
private final String value;
232233

src/main/java/com/twilio/rest/iam/v1/Key.java renamed to src/main/java/com/twilio/rest/iam/v1/NewApiKey.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,28 @@
3636

3737
@JsonIgnoreProperties(ignoreUnknown = true)
3838
@ToString
39-
public class Key extends Resource {
39+
public class NewApiKey extends Resource {
4040

4141
private static final long serialVersionUID = 217181042856619L;
4242

43-
public static KeyCreator creator(final String accountSid) {
44-
return new KeyCreator(accountSid);
43+
public static NewApiKeyCreator creator(final String accountSid) {
44+
return new NewApiKeyCreator(accountSid);
4545
}
4646

4747
/**
48-
* Converts a JSON String into a Key object using the provided ObjectMapper.
48+
* Converts a JSON String into a NewApiKey object using the provided ObjectMapper.
4949
*
5050
* @param json Raw JSON String
5151
* @param objectMapper Jackson ObjectMapper
52-
* @return Key object represented by the provided JSON
52+
* @return NewApiKey object represented by the provided JSON
5353
*/
54-
public static Key fromJson(
54+
public static NewApiKey fromJson(
5555
final String json,
5656
final ObjectMapper objectMapper
5757
) {
5858
// Convert all checked exceptions to Runtime
5959
try {
60-
return objectMapper.readValue(json, Key.class);
60+
return objectMapper.readValue(json, NewApiKey.class);
6161
} catch (final JsonMappingException | JsonParseException e) {
6262
throw new ApiException(e.getMessage(), e);
6363
} catch (final IOException e) {
@@ -66,20 +66,20 @@ public static Key fromJson(
6666
}
6767

6868
/**
69-
* Converts a JSON InputStream into a Key object using the provided
69+
* Converts a JSON InputStream into a NewApiKey object using the provided
7070
* ObjectMapper.
7171
*
7272
* @param json Raw JSON InputStream
7373
* @param objectMapper Jackson ObjectMapper
74-
* @return Key object represented by the provided JSON
74+
* @return NewApiKey object represented by the provided JSON
7575
*/
76-
public static Key fromJson(
76+
public static NewApiKey fromJson(
7777
final InputStream json,
7878
final ObjectMapper objectMapper
7979
) {
8080
// Convert all checked exceptions to Runtime
8181
try {
82-
return objectMapper.readValue(json, Key.class);
82+
return objectMapper.readValue(json, NewApiKey.class);
8383
} catch (final JsonMappingException | JsonParseException e) {
8484
throw new ApiException(e.getMessage(), e);
8585
} catch (final IOException e) {
@@ -95,7 +95,7 @@ public static Key fromJson(
9595
private final Map<String, Object> policy;
9696

9797
@JsonCreator
98-
private Key(
98+
private NewApiKey(
9999
@JsonProperty("sid") final String sid,
100100
@JsonProperty("friendly_name") final String friendlyName,
101101
@JsonProperty("date_created") final String dateCreated,
@@ -145,7 +145,7 @@ public boolean equals(final Object o) {
145145
return false;
146146
}
147147

148-
Key other = (Key) o;
148+
NewApiKey other = (NewApiKey) o;
149149

150150
return (
151151
Objects.equals(sid, other.sid) &&

src/main/java/com/twilio/rest/iam/v1/KeyCreator.java renamed to src/main/java/com/twilio/rest/iam/v1/NewApiKeyCreator.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@
2929
import java.util.Map;
3030
import java.util.Map;
3131

32-
public class KeyCreator extends Creator<Key> {
32+
public class NewApiKeyCreator extends Creator<NewApiKey> {
3333

3434
private String accountSid;
3535
private String friendlyName;
36-
private Key.Keytype keyType;
36+
private NewApiKey.Keytype keyType;
3737
private Map<String, Object> policy;
3838

39-
public KeyCreator(final String accountSid) {
39+
public NewApiKeyCreator(final String accountSid) {
4040
this.accountSid = accountSid;
4141
}
4242

43-
public KeyCreator setAccountSid(final String accountSid) {
43+
public NewApiKeyCreator setAccountSid(final String accountSid) {
4444
this.accountSid = accountSid;
4545
return this;
4646
}
4747

48-
public KeyCreator setFriendlyName(final String friendlyName) {
48+
public NewApiKeyCreator setFriendlyName(final String friendlyName) {
4949
this.friendlyName = friendlyName;
5050
return this;
5151
}
5252

53-
public KeyCreator setKeyType(final Key.Keytype keyType) {
53+
public NewApiKeyCreator setKeyType(final NewApiKey.Keytype keyType) {
5454
this.keyType = keyType;
5555
return this;
5656
}
5757

58-
public KeyCreator setPolicy(final Map<String, Object> policy) {
58+
public NewApiKeyCreator setPolicy(final Map<String, Object> policy) {
5959
this.policy = policy;
6060
return this;
6161
}
6262

6363
@Override
64-
public Key create(final TwilioRestClient client) {
64+
public NewApiKey create(final TwilioRestClient client) {
6565
String path = "/v1/Keys";
6666

6767
path =
@@ -77,7 +77,7 @@ public Key create(final TwilioRestClient client) {
7777
Response response = client.request(request);
7878
if (response == null) {
7979
throw new ApiConnectionException(
80-
"Key creation failed: Unable to connect to server"
80+
"NewApiKey creation failed: Unable to connect to server"
8181
);
8282
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
8383
RestException restException = RestException.fromJson(
@@ -93,7 +93,10 @@ public Key create(final TwilioRestClient client) {
9393
throw new ApiException(restException);
9494
}
9595

96-
return Key.fromJson(response.getStream(), client.getObjectMapper());
96+
return NewApiKey.fromJson(
97+
response.getStream(),
98+
client.getObjectMapper()
99+
);
97100
}
98101

99102
private void addPostParams(final Request request) {

0 commit comments

Comments
 (0)