8000 [Librarian] Regenerated @ 5eb406c4977c9f6976e6053cb5b581056f541a59 · twilio/twilio-java@baeba21 · GitHub
[go: up one dir, main page]

Skip to content

Commit baeba21

Browse files
committed
[Librarian] Regenerated @ 5eb406c4977c9f6976e6053cb5b581056f541a59
1 parent 89d80b5 commit baeba21

File tree

10 files changed

+679
-2
lines changed

10 files changed

+679
-2
lines changed

CHANGES.md

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

4+
[2023-11-06] Version 9.14.1
5+
---------------------------
6+
**Flex**
7+
- Adding `provisioning_status` for Email Manager
8+
9+
**Intelligence**
10+
- Add text-generation operator (for example conversation summary) results to existing OperatorResults collection.
11+
12+
**Messaging**
13+
- Add DELETE support to Tollfree Verification resource
14+
15+
**Serverless**
16+
- Add node18 as a valid Build runtime
17+
18+
**Verify**
19+
- Update Verify TOTP maturity to GA.
20+
21+
422
[2023-10-19] Version 9.14.0
523
---------------------------
624
**Library - Chore**
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.converter.Promoter;
25+
import com.twilio.exception.ApiConnectionException;
26+
import com.twilio.exception.ApiException;
27+
import java.io.IOException;
28+
import java.io.InputStream;
29+
import java.net.URI;
30+
import java.util.Objects;
31+
import lombok.ToString;
32+
import lombok.ToString;
33+
34+
@JsonIgnoreProperties(ignoreUnknown = true)
35+
@ToString
36+
public class ProvisioningStatus extends Resource {
37+
38+
private static final long serialVersionUID = 116877818354472L;
39+
40+
public static ProvisioningStatusFetcher fetcher() {
41+
return new ProvisioningStatusFetcher();
42+
}
43+
44+
/**
45+
* Converts a JSON String into a ProvisioningStatus object using the provided ObjectMapper.
46+
*
47+
* @param json Raw JSON String
48+
* @param objectMapper Jackson ObjectMapper
49+
* @return ProvisioningStatus object represented by the provided JSON
50+
*/
51+
public static ProvisioningStatus fromJson(
52+
final String json,
53+
final ObjectMapper objectMapper
54+
) {
55+
// Convert all checked exceptions to Runtime
56+
try {
57+
return objectMapper.readValue(json, ProvisioningStatus.class);
58+
} catch (final JsonMappingException | JsonParseException e) {
59+
throw new ApiException(e.getMessage(), e);
60+
} catch (final IOException e) {
61+
throw new ApiConnectionException(e.getMessage(), e);
62+
}
63+
}
64+
65+
/**
66+
* Converts a JSON InputStream into a ProvisioningStatus object using the provided
67+
* ObjectMapper.
68+
*
69+
* @param json Raw JSON InputStream
70+
* @param objectMapper Jackson ObjectMapper
71+
* @return ProvisioningStatus object represented by the provided JSON
72+
*/
73+
public static ProvisioningStatus fromJson(
74+
final InputStream json,
75+
final ObjectMapper objectMapper
76+
) {
77+
// Convert all checked exceptions to Runtime
78+
try {
79+
return objectMapper.readValue(json, ProvisioningStatus.class);
80+
} catch (final JsonMappingException | JsonParseException e) {
81+
throw new ApiException(e.getMessage(), e);
82+
} catch (final IOException e) {
83+
throw new ApiConnectionException(e.getMessage(), e);
84+
}
85+
}
86+
87+
public enum Status {
88+
ACTIVE("active"),
89+
IN_PROGRESS("in-progress"),
90+
NOT_CONFIGURED("not-configured"),
91+
FAILED("failed");
92+
93+
private final String value;
94+
95+
private Status(final String value) {
96+
this.value = value;
97+
}
98+
99+
public String toString() {
100+
return value;
101+
}
102+
103+
@JsonCreator
104+
public static Status forValue(final String value) {
105+
return Promoter.enumFromString(value, Status.values());
106+
}
107+
}
108+
109+
private final ProvisioningStatus.Status status;
110+
private final URI url;
111+
112+
@JsonCreator
113+
private ProvisioningStatus(
114+
@JsonProperty("status") final ProvisioningStatus.Status status,
115+
@JsonProperty("url") final URI url
116+
) {
117+
this.status = status;
118+
this.url = url;
119+
}
120+
121+
public final ProvisioningStatus.Status getStatus() {
122+
return this.status;
123+
}
124+
125+
public final URI getUrl() {
126+
return this.url;
127+
}
128+
129+
@Override
130+
public boolean equals(final Object o) {
131+
if (this == o) {
132+
return true;
133+
}
134+
135+
if (o == null || getClass() != o.getClass()) {
136+
return false;
137+
}
138+
139+
ProvisioningStatus other = (ProvisioningStatus) o;
140+
141+
return (
142+
Objects.equals(status, other.status) &&
143+
Objects.equals(url, other.url)
144+
);
145+
}
146+
147+
@Override
148+
public int hashCode() {
149+
return Objects.hash(status, url);
150+
}
151+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.Fetcher;
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+
public class ProvisioningStatusFetcher extends Fetcher<ProvisioningStatus> {
28+
29+
public ProvisioningStatusFetcher() {}
30+
31+
@Override
32+
public ProvisioningStatus fetch(final TwilioRestClient client) {
33+
String path = "/v1/account/provision/status";
34+
35+
Request request = new Request(
36+
HttpMethod.GET,
37+
Domains.FLEXAPI.toString(),
38+
path
39+
);
40+
Response response = client.request(request);
41+
42+
if (response == null) {
43+
throw new ApiConnectionException(
44+
"ProvisioningStatus fetch failed: Unable to connect to server"
45+
);
46+
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
47+
RestException restException = RestException.fromJson(
48+
response.getStream(),
49+
client.getObjectMapper()
50+
);
51+
if (restException == null) {
52+
throw new ApiException(
53+
"Server Error, no content",
54+
response.getStatusCode()
55+
);
56+
}
57+
throw new ApiException(restException);
58+
}
59+
60+
return ProvisioningStatus.fromJson(
61+
response.getStream(),
62+
client.getObjectMapper()
63+
);
64+
}
65+
}

src/main/java/com/twilio/rest/intelligence/v2/transcript/OperatorResult.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
@ToString
4040
public class OperatorResult extends Resource {
4141

42-
private static final long serialVersionUID = 126254553573605L;
42+
private static final long serialVersionUID = 197278046028453L;
4343

4444
public static OperatorResultFetcher fetcher(
4545
final String pathTranscriptSid,
@@ -130,6 +130,7 @@ public static OperatorType forValue(final String value) {
130130
private final BigDecimal predictedProbability;
131131
private final Map<String, Object> labelProbabilities;
132132
private final Map<String, Object> extractResults;
133+
private final Map<String, Object> textGenerationResults;
133134
private final String transcriptSid;
134135
private final URI url;
135136

@@ -159,6 +160,10 @@ private OperatorResult(
159160
String,
160161
Object
161162
> extractResults,
163+
@JsonProperty("text_generation_results") final Map<
164+
String,
165+
Object
166+
> textGenerationResults,
162167
@JsonProperty("transcript_sid") final String transcriptSid,
163168
@JsonProperty("url") final URI url
164169
) {
@@ -174,6 +179,7 @@ private OperatorResult(
174179
this.predictedProbability = predictedProbability;
175180
this.labelProbabilities = labelProbabilities;
176181
this.extractResults = extractResults;
182+
this.textGenerationResults = textGenerationResults;
177183
this.transcriptSid = transcriptSid;
178184
this.url = url;
179185
}
@@ -226,6 +232,10 @@ public final Map<String, Object> getExtractResults() {
226232
return this.extractResults;
227233
}
228234

235+
public final Map<String, Object> getTextGenerationResults() {
236+
return this.textGenerationResults;
237+
}
238+
229239
public final String getTranscriptSid() {
230240
return this.transcriptSid;
231241
}
@@ -259,6 +269,10 @@ public boolean equals(final Object o) {
259269
Objects.equals(predictedProbability, other.predictedProbability) &&
260270
Objects.equals(labelProbabilities, other.labelProbabilities) &&
261271
Objects.equals(extractResults, other.extractResults) &&
272+
Objects.equals(
273+
textGenerationResults,
274+
other.textGenerationResults
275+
) &&
262276
Objects.equals(transcriptSid, other.transcriptSid) &&
263277
Objects.equals(url, other.url)
264278
);
@@ -279,6 +293,7 @@ public int hashCode() {
279293
predictedProbability,
280294
labelProbabilities,
281295
extractResults,
296+
textGenerationResults,
282297
transcriptSid,
283298
url
284299
);

src/main/java/com/twilio/rest/messaging/v1/TollfreeVerification.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ public static TollfreeVerificationCreator creator(
6868
);
6969
}
7070

71+
public static TollfreeVerificationDeleter deleter(final String pathSid) {
72+
return new TollfreeVerificationDeleter(pathSid);
73+
}
74+
7175
public static TollfreeVerificationFetcher fetcher(final String pathSid) {
7276
return new TollfreeVerificationFetcher(pathSid);
7377
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* This code was generated by
3+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
*
7+
* Twilio - Messaging
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.messaging.v1;
16+
17+
import com.twilio.base.Deleter;
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+
public class TollfreeVerificationDeleter extends Deleter<TollfreeVerification> {
28+
29+
private String pathSid;
30+
31+
public TollfreeVerificationDeleter(final String pathSid) {
32+
this.pathSid = pathSid;
33+
}
34+
35+
@Override
36+
public boolean delete(final TwilioRestClient client) {
37+
String path = "/v1/Tollfree/Verifications/{Sid}";
38+
39+
path = path.replace("{" + "Sid" + "}", this.pathSid.toString());
40+
41+
Request request = new Request(
42+
HttpMethod.DELETE,
43+
Domains.MESSAGING.toString(),
44+
path
45+
);
46+
Response response = client.request(request);
47+
48+
if (response == null) {
49+
throw new ApiConnectionException(
50+
"TollfreeVerification delete failed: Unable to connect to server"
51+
);
52+
} else if (!TwilioRestClient.SUCCESS.test(response.getStatusCode())) {
53+
RestException restException = RestException.fromJson(
54+
response.getStream(),
55+
client.getObjectMapper()
56+
);
57+
if (restException == null) {
58+
throw new ApiException(
59+
"Server Error, no content",
60+
response.getStatusCode()
61+
);
62+
}
63+
throw new ApiException(restException);
64+
}
65+
return response.getStatusCode() == 204;
66+
}
67+
}

src/main/java/com/twilio/rest/serverless/v1/service/Build.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public enum Runtime {
112112
NODE10("node10"),
113113
NODE12("node12"),
114114
NODE14("node14"),
115-
NODE16("node16");
115+
NODE16("node16"),
116+
NODE18("node18");
116117

117118
private final String value;
118119

0 commit comments

Comments
 (0)
0