Skip to content

Commit 53b22eb

Browse files
committed
[Librarian] Regenerated @ 6b85410bb6ecf3aa579d1fa442c7bb74c62cf6f0 ae4a12dded508a988aeaca39721be27984e9aeeb
1 parent 2c34f6c commit 53b22eb

File tree

7 files changed

+672
-2
lines changed

7 files changed

+672
-2
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+
[2025-02-11] Version 10.6.9
5+
---------------------------
6+
**Api**
7+
- Change downstream url and change media type for file `base/api/v2010/validation_request.json`.
8+
9+
**Intelligence**
10+
- Add json_results for Generative JSON operator results
11+
12+
**Messaging**
13+
- Add DestinationAlphaSender API to support Country-Specific Alpha Senders
14+
15+
**Video**
16+
- Change codec type from enum to case-insensitive enum in recording and room_recording apis
17+
18+
419
[2025-01-28] Version 10.6.8
520
---------------------------
621
**Library - Fix**

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

Lines changed: 13 additions & 2 deletions
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 = 197278046028453L;
42+
private static final long serialVersionUID = 110796815402135L;
4343

4444
public static OperatorResultFetcher fetcher(
4545
final String pathTranscriptSid,
@@ -108,6 +108,7 @@ public static OperatorResult fromJson(
108108
private final Map<String, Object> labelProbabilities;
109109
private final Map<String, Object> extractResults;
110110
private final Map<String, Object> textGenerationResults;
111+
private final Map<String, Object> jsonResults;
111112
private final String transcriptSid;
112113
private final URI url;
113114

@@ -141,6 +142,7 @@ private OperatorResult(
141142
String,
142143
Object
143144
> textGenerationResults,
145+
@JsonProperty("json_results") final Map<String, Object> jsonResults,
144146
@JsonProperty("transcript_sid") final String transcriptSid,
145147
@JsonProperty("url") final URI url
146148
) {
@@ -157,6 +159,7 @@ private OperatorResult(
157159
this.labelProbabilities = labelProbabilities;
158160
this.extractResults = extractResults;
159161
this.textGenerationResults = textGenerationResults;
162+
this.jsonResults = jsonResults;
160163
this.transcriptSid = transcriptSid;
161164
this.url = url;
162165
}
@@ -213,6 +216,10 @@ public final Map<String, Object> getTextGenerationResults() {
213216
return this.textGenerationResults;
214217
}
215218

219+
public final Map<String, Object> getJsonResults() {
220+
return this.jsonResults;
221+
}
222+
216223
public final String getTranscriptSid() {
217224
return this.transcriptSid;
218225
}
@@ -250,6 +257,7 @@ public boolean equals(final Object o) {
250257
textGenerationResults,
251258
other.textGenerationResults
252259
) &&
260+
Objects.equals(jsonResults, other.jsonResults) &&
253261
Objects.equals(transcriptSid, other.transcriptSid) &&
254262
Objects.equals(url, other.url)
255263
);
@@ -271,6 +279,7 @@ public int hashCode() {
271279
labelProbabilities,
272280
extractResults,
273281
textGenerationResults,
282+
jsonResults,
274283
transcriptSid,
275284
url
276285
);
@@ -281,7 +290,9 @@ public enum OperatorType {
281290
UTTERANCE_CLASSIFY("utterance_classify"),
282291
EXTRACT("extract"),
283292
EXTRACT_NORMALIZE("extract_normalize"),
284-
PII_EXTRACT("pii_extract");
293+
PII_EXTRACT("pii_extract"),
294+
TEXT_GENERATION("text_generation"),
295+
JSON("json");
285296

286297
private final String value;
287298

Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
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.service;
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.DateConverter;
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.time.ZonedDateTime;
31+
import java.util.List;
32+
import java.util.Objects;
33+
import lombok.ToString;
34+
import lombok.ToString;
35+
36+
@JsonIgnoreProperties(ignoreUnknown = true)
37+
@ToString
38+
public class DestinationAlphaSender extends Resource {
39+
40+
private static final long serialVersionUID = 148729356404048L;
41+
42+
public static DestinationAlphaSenderCreator creator(
43+
final String pathServiceSid,
44+
final String alphaSender
45+
) {
46+
return new DestinationAlphaSenderCreator(pathServiceSid, alphaSender);
47+
}
48+
49+
public static DestinationAlphaSenderDeleter deleter(
50+
final String pathServiceSid,
51+
final String pathSid
52+
) {
53+
return new DestinationAlphaSenderDeleter(pathServiceSid, pathSid);
54+
}
55+
56+
public static DestinationAlphaSenderFetcher fetcher(
57+
final String pathServiceSid,
58+
final String pathSid
59+
) {
60+
return new DestinationAlphaSenderFetcher(pathServiceSid, pathSid);
61+
}
62+
63+
public static DestinationAlphaSenderReader reader(
64+
final String pathServiceSid
65+
) {
66+
return new DestinationAlphaSenderReader(pathServiceSid);
67+
}
68+
69+
/**
70+
* Converts a JSON String into a DestinationAlphaSender object using the provided ObjectMapper.
71+
*
72+
* @param json Raw JSON String
73+
* @param objectMapper Jackson ObjectMapper
74+
* @return DestinationAlphaSender object represented by the provided JSON
75+
*/
76+
public static DestinationAlphaSender fromJson(
77+
final String json,
78+
final ObjectMapper objectMapper
79+
) {
80+
// Convert all checked exceptions to Runtime
81+
try {
82+
return objectMapper.readValue(json, DestinationAlphaSender.class);
83+
} catch (final JsonMappingException | JsonParseException e) {
84+
throw new ApiException(e.getMessage(), e);
85+
} catch (final IOException e) {
86+
throw new ApiConnectionException(e.getMessage(), e);
87+
}
88+
}
89+
90+
/**
91+
* Converts a JSON InputStream into a DestinationAlphaSender object using the provided
92+
* ObjectMapper.
93+
*
94+
* @param json Raw JSON InputStream
95+
* @param objectMapper Jackson ObjectMapper
96+
* @return DestinationAlphaSender object represented by the provided JSON
97+
*/
98+
public static DestinationAlphaSender fromJson(
99+
final InputStream json,
100+
final ObjectMapper objectMapper
101+
) {
102+
// Convert all checked exceptions to Runtime
103+
try {
104+
return objectMapper.readValue(json, DestinationAlphaSender.class);
105+
} catch (final JsonMappingException | JsonParseException e) {
106+
throw new ApiException(e.getMessage(), e);
107+
} catch (final IOException e) {
108+
throw new ApiConnectionException(e.getMessage(), e);
109+
}
110+
}
111+
112+
private final String sid;
113+
private final String accountSid;
114+
private final String serviceSid;
115+
private final ZonedDateTime dateCreated;
116+
private final ZonedDateTime dateUpdated;
117+
private final String alphaSender;
118+
private final List<String> capabilities;
119+
private final URI url;
120+
private final String isoCountryCode;
121+
122+
@JsonCreator
123+
private DestinationAlphaSender(
124+
@JsonProperty("sid") final String sid,
125+
@JsonProperty("account_sid") final String accountSid,
126+
@JsonProperty("service_sid") final String serviceSid,
127+
@JsonProperty("date_created") final String dateCreated,
128+
@JsonProperty("date_updated") final String dateUpdated,
129+
@JsonProperty("alpha_sender") final String alphaSender,
130+
@JsonProperty("capabilities") final List<String> capabilities,
131+
@JsonProperty("url") final URI url,
132+
@JsonProperty("iso_country_code") final String isoCountryCode
133+
) {
134+
this.sid = sid;
135+
this.accountSid = accountSid;
136+
this.serviceSid = serviceSid;
137+
this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated);
138+
this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated);
139+
this.alphaSender = alphaSender;
140+
this.capabilities = capabilities;
141+
this.url = url;
142+
this.isoCountryCode = isoCountryCode;
143+
}
144+
145+
public final String getSid() {
146+
return this.sid;
147+
}
148+
149+
public final String getAccountSid() {
150+
return this.accountSid;
151+
}
152+
153+
public final String getServiceSid() {
154+
return this.serviceSid;
155+
}
156+
157+
public final ZonedDateTime getDateCreated() {
158+
return this.dateCreated;
159+
}
160+
161+
public final ZonedDateTime getDateUpdated() {
162+
return this.dateUpdated;
163+
}
164+
165+
public final String getAlphaSender() {
166+
return this.alphaSender;
167+
}
168+
169+
public final List<String> getCapabilities() {
170+
return this.capabilities;
171+
}
172+
173+
public final URI getUrl() {
174+
return this.url;
175+
}
176+
177+
public final String getIsoCountryCode() {
178+
return this.isoCountryCode;
179+
}
180+
181+
@Override
182+
public boolean equals(final Object o) {
183+
if (this == o) {
184+
return true;
185+
}
186+
187+
if (o == null || getClass() != o.getClass()) {
188+
return false;
189+
}
190+
191+
DestinationAlphaSender other = (DestinationAlphaSender) o;
192+
193+
return (
194+
Objects.equals(sid, other.sid) &&
195+
Objects.equals(accountSid, other.accountSid) &&
196+
Objects.equals(serviceSid, other.serviceSid) &&
197+
Objects.equals(dateCreated, other.dateCreated) &&
198+
Objects.equals(dateUpdated, other.dateUpdated) &&
199+
Objects.equals(alphaSender, other.alphaSender) &&
200+
Objects.equals(capabilities, other.capabilities) &&
201+
Objects.equals(url, other.url) &&
202+
Objects.equals(isoCountryCode, other.isoCountryCode)
203+
);
204+
}
205+
206+
@Override
207+
public int hashCode() {
208+
return Objects.hash(
209+
sid,
210+
accountSid,
211+
serviceSid,
212+
dateCreated,
213+
dateUpdated,
214+
alphaSender,
215+
capabilities,
216+
url,
217+
isoCountryCode
218+
);
219+
}
220+
}

0 commit comments

Comments
 (0)