Skip to content

Commit b0079ca

Browse files
committed
Regenerate libraries with latest definitions
1 parent 512c292 commit b0079ca

File tree

17 files changed

+131
-90
lines changed

17 files changed

+131
-90
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
public enum Domains {
1111
API("api"),
12-
IPMESSAGING("ip-messaging"),
1312
CHAT("ip-messaging"),
13+
IPMESSAGING("ip-messaging"),
1414
LOOKUPS("lookups"),
1515
MONITOR("monitor"),
1616
NOTIFY("notify"),

src/main/java/com/twilio/rest/chat/v1/service/Role.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,13 @@ public static RoleReader read(final String serviceSid) {
124124
*
125125
* @param serviceSid The service_sid
126126
* @param sid The sid
127-
* @param friendlyName The friendly_name
128127
* @param permission The permission
129128
* @return RoleUpdater capable of executing the update
130129
*/
131130
public static RoleUpdater update(final String serviceSid,
132131
final String sid,
133-
final String friendlyName,
134132
final List<String> permission) {
135-
return new RoleUpdater(serviceSid, sid, friendlyName, permission);
133+
return new RoleUpdater(serviceSid, sid, permission);
136134
}
137135

138136
/**

src/main/java/com/twilio/rest/chat/v1/service/RoleUpdater.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,20 @@
2222
public class RoleUpdater extends Updater<Role> {
2323
private final String serviceSid;
2424
private final String sid;
25-
private final String friendlyName;
2625
private final List<String> permission;
2726

2827
/**
2928
* Construct a new RoleUpdater.
3029
*
3130
* @param serviceSid The service_sid
3231
* @param sid The sid
33-
* @param friendlyName The friendly_name
3432
* @param permission The permission
3533
*/
3634
public RoleUpdater(final String serviceSid,
3735
final String sid,
38-
final String friendlyName,
3936
final List<String> permission) {
4037
this.serviceSid = serviceSid;
4138
this.sid = sid;
42-
this.friendlyName = friendlyName;
4339
this.permission = permission;
4440
}
4541

@@ -88,10 +84,6 @@ public Role execute(final TwilioRestClient client) {
8884
* @param request Request to add post params to
8985
*/
9086
private void addPostParams(final Request request) {
91-
if (friendlyName != null) {
92-
request.addPostParam("FriendlyName", friendlyName);
93-
}
94-
9587
if (permission != null) {
9688
for (String prop : permission) {
9789
request.addPostParam("Permission", prop);

src/main/java/com/twilio/rest/ipmessaging/v1/service/Role.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,13 @@ public static RoleReader read(final String serviceSid) {
124124
*
125125
* @param serviceSid The service_sid
126126
* @param sid The sid
127-
* @param friendlyName The friendly_name
128127
* @param permission The permission
129128
* @return RoleUpdater capable of executing the update
130129
*/
131130
public static RoleUpdater update(final String serviceSid,
132131
final String sid,
133-
final String friendlyName,
134132
final List<String> permission) {
135-
return new RoleUpdater(serviceSid, sid, friendlyName, permission);
133+
return new RoleUpdater(serviceSid, sid, permission);
136134
}
137135

138136
/**

src/main/java/com/twilio/rest/ipmessaging/v1/service/RoleUpdater.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,20 @@
2222
public class RoleUpdater extends Updater<Role> {
2323
private final String serviceSid;
2424
private final String sid;
25-
private final String friendlyName;
2625
private final List<String> permission;
2726

2827
/**
2928
* Construct a new RoleUpdater.
3029
*
3130
* @param serviceSid The service_sid
3231
* @param sid The sid
33-
* @param friendlyName The friendly_name
3432
* @param permission The permission
3533
*/
3634
public RoleUpdater(final String serviceSid,
3735
final String sid,
38-
final String friendlyName,
3936
final List<String> permission) {
4037
this.serviceSid = serviceSid;
4138
this.sid = sid;
42-
this.friendlyName = friendlyName;
4339
this.permission = permission;
4440
}
4541

@@ -88,10 +84,6 @@ public Role execute(final TwilioRestClient client) {
8884
* @param request Request to add post params to
8985
*/
9086
private void addPostParams(final Request request) {
91-
if (friendlyName != null) {
92-
request.addPostParam("FriendlyName", friendlyName);
93-
}
94-
9587
if (permission != null) {
9688
for (String prop : permission) {
9789
request.addPostParam("Permission", prop);

src/main/java/com/twilio/rest/preview/sync/Service.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
@JsonIgnoreProperties(ignoreUnknown = true)
3636
public class Service extends Resource {
37-
private static final long serialVersionUID = 154659581230608L;
37+
private static final long serialVersionUID = 19874426997483L;
3838

3939
/**
4040
* Create a ServiceFetcher to execute fetch.
@@ -128,6 +128,7 @@ public static Service fromJson(final InputStream json, final ObjectMapper object
128128
private final DateTime dateUpdated;
129129
private final URI url;
130130
private final URI webhookUrl;
131+
private final Boolean reachabilityWebhooksEnabled;
131132
private final Map<String, String> links;
132133

133134
@JsonCreator
@@ -145,6 +146,8 @@ private Service(@JsonProperty("sid")
145146
final URI url,
146147
@JsonProperty("webhook_url")
147148
final URI webhookUrl,
149+
@JsonProperty("reachability_webhooks_enabled")
150+
final Boolean reachabilityWebhooksEnabled,
148151
@JsonProperty("links")
149152
final Map<String, String> links) {
150153
this.sid = sid;
@@ -154,6 +157,7 @@ private Service(@JsonProperty("sid")
154157
this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated);
155158
this.url = url;
156159
this.webhookUrl = webhookUrl;
160+
this.reachabilityWebhooksEnabled = reachabilityWebhooksEnabled;
157161
this.links = links;
158162
}
159163

@@ -220,6 +224,15 @@ public final URI getWebhookUrl() {
220224
return this.webhookUrl;
221225
}
222226

227+
/**
228+
* Returns The The reachability_webhooks_enabled.
229+
*
230+
* @return The reachability_webhooks_enabled
231+
*/
232+
public final Boolean getReachabilityWebhooksEnabled() {
233+
return this.reachabilityWebhooksEnabled;
234+
}
235+
223236
/**
224237
* Returns The The links.
225238
*
@@ -248,6 +261,7 @@ public boolean equals(final Object o) {
248261
Objects.equals(dateUpdated, other.dateUpdated) &&
249262
Objects.equals(url, other.url) &&
250263
Objects.equals(webhookUrl, other.webhookUrl) &&
264+
Objects.equals(reachabilityWebhooksEnabled, other.reachabilityWebhooksEnabled) &&
251265
Objects.equals(links, other.links);
252266
}
253267

@@ -260,6 +274,7 @@ public int hashCode() {
260274
dateUpdated,
261275
url,
262276
webhookUrl,
277+
reachabilityWebhooksEnabled,
263278
links);
264279
}
265280

@@ -273,6 +288,7 @@ public String toString() {
273288
.add("dateUpdated", dateUpdated)
274289
.add("url", url)
275290
.add("webhookUrl", webhookUrl)
291+
.add("reachabilityWebhooksEnabled", reachabilityWebhooksEnabled)
276292
.add("links", links)
277293
.toString();
278294
}

src/main/java/com/twilio/rest/preview/sync/ServiceCreator.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
public class ServiceCreator extends Creator<Service> {
2424
private String friendlyName;
2525
private URI webhookUrl;
26+
private Boolean reachabilityWebhooksEnabled;
2627

2728
/**
2829
* The friendly_name.
@@ -56,6 +57,17 @@ public ServiceCreator setWebhookUrl(final String webhookUrl) {
5657
return setWebhookUrl(Promoter.uriFromString(webhookUrl));
5758
}
5859

60+
/**
61+
* The reachability_webhooks_enabled.
62+
*
63+
* @param reachabilityWebhooksEnabled The reachability_webhooks_enabled
64+
* @return this
65+
*/
66+
public ServiceCreator setReachabilityWebhooksEnabled(final Boolean reachabilityWebhooksEnabled) {
67+
this.reachabilityWebhooksEnabled = reachabilityWebhooksEnabled;
68+
return this;
69+
}
70+
5971
/**
6072
* Make the request to the Twilio API to perform the create.
6173
*
@@ -108,5 +120,9 @@ private void addPostParams(final Request request) {
108120
if (webhookUrl != null) {
109121
request.addPostParam("WebhookUrl", webhookUrl.toString());
110122
}
123+
124+
if (reachabilityWebhooksEnabled != null) {
125+
request.addPostParam("ReachabilityWebhooksEnabled", reachabilityWebhooksEnabled.toString());
126+
}
111127
}
112128
}

src/main/java/com/twilio/rest/preview/sync/ServiceUpdater.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class ServiceUpdater extends Updater<Service> {
2424
private final String sid;
2525
private URI webhookUrl;
2626
private String friendlyName;
27+
private Boolean reachabilityWebhooksEnabled;
2728

2829
/**
2930
* Construct a new ServiceUpdater.
@@ -66,6 +67,17 @@ public ServiceUpdater setFriendlyName(final String friendlyName) {
6667
return this;
6768
}
6869

70+
/**
71+
* The reachability_webhooks_enabled.
72+
*
73+
* @param reachabilityWebhooksEnabled The reachability_webhooks_enabled
74+
* @return this
75+
*/
76+
public ServiceUpdater setReachabilityWebhooksEnabled(final Boolean reachabilityWebhooksEnabled) {
77+
this.reachabilityWebhooksEnabled = reachabilityWebhooksEnabled;
78+
return this;
79+
}
80+
6981
/**
7082
* Make the request to the Twilio API to perform the update.
7183
*
@@ -118,5 +130,9 @@ private void addPostParams(final Request request) {
118130
if (friendlyName != null) {
119131
request.addPostParam("FriendlyName", friendlyName);
120132
}
133+
134+
if (reachabilityWebhooksEnabled != null) {
135+
request.addPostParam("ReachabilityWebhooksEnabled", reachabilityWebhooksEnabled.toString());
136+
}
121137
}
122138
}

src/main/java/com/twilio/rest/preview/wireless/DeviceUpdater.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class DeviceUpdater extends Updater<Device> {
2626
private String callbackMethod;
2727
private URI callbackUrl;
2828
private String friendlyName;
29+
private String ratePlan;
2930
private String simIdentifier;
3031
private String status;
3132
private String commandsCallbackMethod;
@@ -94,6 +95,17 @@ public DeviceUpdater setFriendlyName(final String friendlyName) {
9495
return this;
9596
}
9697

98+
/**
99+
* The rate_plan.
100+
*
101+
* @param ratePlan The rate_plan
102+
* @return this
103+
*/
104+
public DeviceUpdater setRatePlan(final String ratePlan) {
105+
this.ratePlan = ratePlan;
106+
return this;
107+
}
108+
97109
/**
98110
* The sim_identifier.
99111
*
@@ -209,6 +221,10 @@ private void addPostParams(final Request request) {
209221
request.addPostParam("FriendlyName", friendlyName);
210222
}
211223

224+
if (ratePlan != null) {
225+
request.addPostParam("RatePlan", ratePlan.toString());
226+
}
227+
212228
if (simIdentifier != null) {
213229
request.addPostParam("SimIdentifier", simIdentifier);
214230
}

src/main/java/com/twilio/twiml/Gather.java

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
package com.twilio.twiml;
22

3+
import com.google.common.collect.Lists;
4+
35
import javax.xml.bind.annotation.XmlAttribute;
46
import javax.xml.bind.annotation.XmlElement;
7+
import javax.xml.bind.annotation.XmlElements;
58
import javax.xml.bind.annotation.XmlRootElement;
9+
import java.util.List;
610

711
/**
812
* TwiML wrapper for @see https://www.twilio.com/docs/api/twiml/gather.
@@ -25,14 +29,13 @@ public class Gather extends TwiML {
2529
@XmlAttribute
2630
private final String finishOnKey;
2731

28-
@XmlElement(name = "Say")
29-
private final Say say;
30-
31-
@XmlElement(name = "Play")
32-
private final Play play;
33-
34-
@XmlElement(name = "Pause")
35-
private final Pause pause;
32+
@SuppressWarnings("checkstyle:indentation")
33+
@XmlElements({
34+
@XmlElement(name = "Say", type = Say.class),
35+
@XmlElement(name = "Play", type = Play.class),
36+
@XmlElement(name = "Pause", type = Pause.class)
37+
})
38+
private final List<TwiML> actions;
3639

3740
// For XML Serialization
3841
private Gather() {
@@ -45,9 +48,7 @@ private Gather(Builder b) {
4548
this.action = b.action;
4649
this.method = b.method;
4750
this.finishOnKey = b.finishOnKey;
48-
this.say = b.say;
49-
this.play = b.play;
50-
this.pause = b.pause;
51+
this.actions = Lists.newArrayList(b.actions);
5152
}
5253

5354
public Integer getTimeout() {
@@ -70,16 +71,8 @@ public String getFinishOnKey() {
7071
return finishOnKey;
7172
}
7273

73-
public Say getSay() {
74-
return say;
75-
}
76-
77-
public Play getPlay() {
78-
return play;
79-
}
80-
81-
public Pause getPause() {
82-
return pause;
74+
public List<TwiML> getActions() {
75+
return actions;
8376
}
8477

8578
public static class Builder {
@@ -88,9 +81,7 @@ public static class Builder {
8881
private String action;
8982
private Method method;
9083
private String finishOnKey;
91-
private Say say;
92-
private Play play;
93-
private Pause pause;
84+
private List<TwiML> actions = Lists.newArrayList();
9485

9586
public Builder timeout(int timeout) {
9687
this.timeout = timeout;
@@ -118,17 +109,17 @@ public Builder finishOnKey(String finishOnKey) {
118109
}
119110

120111
public Builder say(Say say) {
121-
this.say = say;
112+
this.actions.add(say);
122113
return this;
123114
}
124115

125116
public Builder play(Play play) {
126-
this.play = play;
117+
this.actions.add(play);
127118
return this;
128119
}
129120

130121
public Builder pause(Pause pause) {
131-
this.pause = pause;
122+
this.actions.add(pause);
132123
return this;
133124
}
134125

0 commit comments

Comments
 (0)