Skip to content

Commit

Permalink
[Librarian] Regenerated @ fdad267944635962308083659322c23f28226702
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Sep 8, 2021
1 parent 82f2422 commit 4f66d20
Show file tree
Hide file tree
Showing 16 changed files with 578 additions and 45 deletions.
18 changes: 18 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
twilio-java changelog
=====================

[2021-09-08] Version 8.19.1
---------------------------
**Library - Fix**
- [PR #644](https://github.com/twilio/twilio-java/pull/644): deploy issues. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!

**Api**
- Revert adding `siprec` resource
- Add `siprec` resource

**Messaging**
- Add 'mock' as an optional field to brand_registration api
- Add 'mock' as an optional field to us_app_to_person api
- Adds more Use Cases in us_app_to_person_usecase api transaction and updates us_app_to_person_usecase docs

**Verify**
- Verify List Templates API endpoint added.


[2021-08-25] Version 8.19.0
---------------------------
**Library - Chore**
Expand Down
38 changes: 25 additions & 13 deletions src/main/java/com/twilio/rest/insights/v1/CallSummariesReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public class CallSummariesReader extends Reader<CallSummaries> {
private Boolean hasTag;
private String startTime;
private String endTime;
private List<String> callType;
private List<String> callState;
private CallSummaries.CallDirection direction;
private List<CallSummaries.CallType> callType;
private List<CallSummaries.CallState> callState;
private List<CallSummaries.CallDirection> direction;
private CallSummaries.ProcessingStateRequest processingState;
private CallSummaries.SortBy sortBy;
private String subaccount;
Expand Down Expand Up @@ -229,7 +229,7 @@ public CallSummariesReader setEndTime(final String endTime) {
* @param callType The call_type
* @return this
*/
public CallSummariesReader setCallType(final List<String> callType) {
public CallSummariesReader setCallType(final List<CallSummaries.CallType> callType) {
this.callType = callType;
return this;
}
Expand All @@ -240,7 +240,7 @@ public CallSummariesReader setCallType(final List<String> callType) {
* @param callType The call_type
* @return this
*/
public CallSummariesReader setCallType(final String callType) {
public CallSummariesReader setCallType(final CallSummaries.CallType callType) {
return setCallType(Promoter.listOfOne(callType));
}

Expand All @@ -250,7 +250,7 @@ public CallSummariesReader setCallType(final String callType) {
* @param callState The call_state
* @return this
*/
public CallSummariesReader setCallState(final List<String> callState) {
public CallSummariesReader setCallState(final List<CallSummaries.CallState> callState) {
this.callState = callState;
return this;
}
Expand All @@ -261,7 +261,7 @@ public CallSummariesReader setCallState(final List<String> callState) {
* @param callState The call_state
* @return this
*/
public CallSummariesReader setCallState(final String callState) {
public CallSummariesReader setCallState(final CallSummaries.CallState callState) {
return setCallState(Promoter.listOfOne(callState));
}

Expand All @@ -271,11 +271,21 @@ public CallSummariesReader setCallState(final String callState) {
* @param direction The direction
* @return this
*/
public CallSummariesReader setDirection(final CallSummaries.CallDirection direction) {
public CallSummariesReader setDirection(final List<CallSummaries.CallDirection> direction) {
this.direction = direction;
return this;
}

/**
* The direction.
*
* @param direction The direction
* @return this
*/
public CallSummariesReader setDirection(final CallSummaries.CallDirection direction) {
return setDirection(Promoter.listOfOne(direction));
}

/**
* The processing_state.
*
Expand Down Expand Up @@ -493,19 +503,21 @@ private void addQueryParams(final Request request) {
}

if (callType != null) {
for (String prop : callType) {
request.addQueryParam("CallType", prop);
for (CallSummaries.CallType prop : callType) {
request.addQueryParam("CallType", prop.toString());
}
}

if (callState != null) {
for (String prop : callState) {
request.addQueryParam("CallState", prop);
for (CallSummaries.CallState prop : callState) {
request.addQueryParam("CallState", prop.toString());
}
}

if (direction != null) {
request.addQueryParam("Direction", direction.toString());
for (CallSummaries.CallDirection prop : direction) {
request.addQueryParam("Direction", prop.toString());
}
}

if (processingState != null) {
Expand Down
27 changes: 23 additions & 4 deletions src/main/java/com/twilio/rest/messaging/v1/BrandRegistration.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class BrandRegistration extends Resource {
private static final long serialVersionUID = 22690009711624L;
private static final long serialVersionUID = 5353915230753L;

public enum Status {
PENDING("PENDING"),
Expand Down Expand Up @@ -149,6 +149,7 @@ public static BrandRegistration fromJson(final InputStream json, final ObjectMap
private final String failureReason;
private final URI url;
private final Integer brandScore;
private final Boolean mock;

@JsonCreator
private BrandRegistration(@JsonProperty("sid")
Expand All @@ -174,7 +175,9 @@ private BrandRegistration(@JsonProperty("sid")
@JsonProperty("url")
final URI url,
@JsonProperty("brand_score")
final Integer brandScore) {
final Integer brandScore,
@JsonProperty("mock")
final Boolean mock) {
this.sid = sid;
this.accountSid = accountSid;
this.customerProfileBundleSid = customerProfileBundleSid;
Expand All @@ -187,6 +190,7 @@ private BrandRegistration(@JsonProperty("sid")
this.failureReason = failureReason;
this.url = url;
this.brandScore = brandScore;
this.mock = mock;
}

/**
Expand Down Expand Up @@ -297,6 +301,19 @@ public final Integer getBrandScore() {
return this.brandScore;
}

/**
* Returns A boolean that specifies whether brand should be a mock or not. If
* true, brand will be registered as a mock brand. Defaults to false if no value
* is provided..
*
* @return A boolean that specifies whether brand should be a mock or not. If
* true, brand will be registered as a mock brand. Defaults to false if
* no value is provided.
*/
public final Boolean getMock() {
return this.mock;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand All @@ -320,7 +337,8 @@ public boolean equals(final Object o) {
Objects.equals(tcrId, other.tcrId) &&
Objects.equals(failureReason, other.failureReason) &&
Objects.equals(url, other.url) &&
Objects.equals(brandScore, other.brandScore);
Objects.equals(brandScore, other.brandScore) &&
Objects.equals(mock, other.mock);
}

@Override
Expand All @@ -336,6 +354,7 @@ public int hashCode() {
tcrId,
failureReason,
url,
brandScore);
brandScore,
mock);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class BrandRegistrationCreator extends Creator<BrandRegistration> {
private final String customerProfileBundleSid;
private final String a2PProfileBundleSid;
private String brandType;
private Boolean mock;

/**
* Construct a new BrandRegistrationCreator.
Expand All @@ -50,6 +51,21 @@ public BrandRegistrationCreator setBrandType(final String brandType) {
return this;
}

/**
* A boolean that specifies whether brand should be a mock or not. If true,
* brand will be registered as a mock brand. Defaults to false if no value is
* provided..
*
* @param mock A boolean that specifies whether brand should be a mock or not.
* If true, brand will be registered as a mock brand. Defaults to
* false if no value is provided.
* @return this
*/
public BrandRegistrationCreator setMock(final Boolean mock) {
this.mock = mock;
return this;
}

/**
* Make the request to the Twilio API to perform the create.
*
Expand Down Expand Up @@ -98,5 +114,9 @@ private void addPostParams(final Request request) {
if (brandType != null) {
request.addPostParam("BrandType", brandType);
}

if (mock != null) {
request.addPostParam("Mock", mock.toString());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
@ToString
public class UsAppToPerson extends Resource {
private static final long serialVersionUID = 131982293842514L;
private static final long serialVersionUID = 156924875301398L;

/**
* Create a UsAppToPersonCreator to execute create.
Expand Down Expand Up @@ -161,6 +161,7 @@ public static UsAppToPerson fromJson(final InputStream json, final ObjectMapper
private final ZonedDateTime dateCreated;
private final ZonedDateTime dateUpdated;
private final URI url;
private final Boolean mock;

@JsonCreator
private UsAppToPerson(@JsonProperty("sid")
Expand Down Expand Up @@ -194,7 +195,9 @@ private UsAppToPerson(@JsonProperty("sid")
@JsonProperty("date_updated")
final String dateUpdated,
@JsonProperty("url")
final URI url) {
final URI url,
@JsonProperty("mock")
final Boolean mock) {
this.sid = sid;
this.accountSid = accountSid;
this.brandRegistrationSid = brandRegistrationSid;
Expand All @@ -211,6 +214,7 @@ private UsAppToPerson(@JsonProperty("sid")
this.dateCreated = DateConverter.iso8601DateTimeFromString(dateCreated);
this.dateUpdated = DateConverter.iso8601DateTimeFromString(dateUpdated);
this.url = url;
this.mock = mock;
}

/**
Expand Down Expand Up @@ -360,6 +364,15 @@ public final URI getUrl() {
return this.url;
}

/**
* Returns A boolean that specifies whether campaign is a mock or not..
*
* @return A boolean that specifies whether campaign is a mock or not.
*/
public final Boolean getMock() {
return this.mock;
}

@Override
public boolean equals(final Object o) {
if (this == o) {
Expand Down Expand Up @@ -387,7 +400,8 @@ public boolean equals(final Object o) {
Objects.equals(rateLimits, other.rateLimits) &&
Objects.equals(dateCreated, other.dateCreated) &&
Objects.equals(dateUpdated, other.dateUpdated) &&
Objects.equals(url, other.url);
Objects.equals(url, other.url) &&
Objects.equals(mock, other.mock);
}

@Override
Expand All @@ -407,6 +421,7 @@ public int hashCode() {
rateLimits,
dateCreated,
dateUpdated,
url);
url,
mock);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ public WorkspaceCreator setEventsFilter(final String eventsFilter) {

/**
* Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or
* `false` to disable it. The default is `false`. Multi-tasking allows Workers
* to handle multiple Tasks simultaneously. When enabled (`true`), each Worker
* can receive parallel reservations up to the per-channel maximums defined in
* the Workers section. Otherwise, each Worker will only receive a new
* reservation when the previous task is completed. Learn more at <a
* `false` to disable it. However, all workspaces should be created as
* multi-tasking. The default is `true`. Multi-tasking allows Workers to handle
* multiple Tasks simultaneously. When enabled (`true`), each Worker can receive
* parallel reservations up to the per-channel maximums defined in the Workers
* section. In single-tasking mode (legacy mode), each Worker will only receive
* a new reservation when the previous task is completed. Learn more at <a
* href="https://www.twilio.com/docs/taskrouter/multitasking">Multitasking</a>..
*
* @param multiTaskEnabled Whether multi-tasking is enabled
Expand Down
18 changes: 11 additions & 7 deletions src/main/java/com/twilio/rest/taskrouter/v1/WorkspaceUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ public WorkspaceUpdater setFriendlyName(final String friendlyName) {

/**
* Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or
* `false` to disable it. The default is `false`. Multi-tasking allows Workers
* to handle multiple Tasks simultaneously. When enabled (`true`), each Worker
* can receive parallel reservations up to the per-channel maximums defined in
* the Workers section. Otherwise, each Worker will only receive a new
* reservation when the previous task is completed. Learn more at <a
* `false` to disable it. However, all workspaces should be maintained as
* multi-tasking. There is no default when omitting this parameter. A
* multi-tasking Workspace can't be updated to single-tasking unless it is not a
* Flex Project and another (legacy) single-tasking Workspace exists.
* Multi-tasking allows Workers to handle multiple Tasks simultaneously. In
* multi-tasking mode, each Worker can receive parallel reservations up to the
* per-channel maximums defined in the Workers section. In single-tasking mode
* (legacy mode), each Worker will only receive a new reservation when the
* previous task is completed. Learn more at <a
* href="https://www.twilio.com/docs/taskrouter/multitasking">Multitasking</a>..
*
* @param multiTaskEnabled Whether multi-tasking is enabled
Expand All @@ -137,8 +141,8 @@ public WorkspaceUpdater setTimeoutActivitySid(final String timeoutActivitySid) {

/**
* The type of TaskQueue to prioritize when Workers are receiving Tasks from
* both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`.
* For more information, see <a
* both types of TaskQueues. Can be: `LIFO` or `FIFO`. For more information, see
* <a
* href="https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo">Queue
* Ordering</a>..
*
Expand Down
Loading

0 comments on commit 4f66d20

Please sign in to comment.