Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6860,6 +6860,13 @@ components:
phoneNumbers:
- "+19196104423"
- "+19196104424"
rcsAgentRequestExample:
summary: Number Lookup Request with Custom RCS Agent
value:
phoneNumbers:
- "+19196104423"
- "+19196104424"
rcsAgent: MyCustomRcsAgent
lookupAcceptedExample:
summary: Numbers Lookup Accepted
value:
Expand Down Expand Up @@ -8236,6 +8243,8 @@ components:
$ref: "#/components/examples/singleNumberRequestExample"
multipleNumberRequestExample:
$ref: "#/components/examples/multipleNumberRequestExample"
rcsAgentRequestExample:
$ref: "#/components/examples/rcsAgentRequestExample"
schema:
$ref: "#/components/schemas/syncLookupRequest"
description: Synchronous phone number lookup request.
Expand Down Expand Up @@ -14452,6 +14461,14 @@ components:
maximum: 100
minimum: 1
type: array
rcsAgent:
description: |-
Override the default RCS sender/agent ID used when checking RCS capabilities.
When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default.
Must be 1–40 characters and contain only letters, digits, underscores, or hyphens.
example: MyCustomRcsAgent
pattern: "^[A-Za-z0-9_-]{1,40}$"
type: string
required:
- phoneNumbers
type: object
Expand Down
22 changes: 22 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5759,6 +5759,19 @@ components:
items:
type: string
pattern: ^\+[1-9]\d{1,14}$
rcsAgent:
type: string
description: >-
Override the default RCS sender/agent ID used when checking RCS
capabilities.

When provided, this value is used as the `sender` in the RCS
capability-check request instead of the account default.

Must be 1–40 characters and contain only letters, digits,
underscores, or hyphens.
pattern: ^[A-Za-z0-9_-]{1,40}$
example: MyCustomRcsAgent
required:
- phoneNumbers
asyncLookupRequest:
Expand Down Expand Up @@ -8758,6 +8771,13 @@ components:
phoneNumbers:
- '+19196104423'
- '+19196104424'
rcsAgentRequestExample:
summary: Number Lookup Request with Custom RCS Agent
value:
phoneNumbers:
- '+19196104423'
- '+19196104424'
rcsAgent: MyCustomRcsAgent
lookupAcceptedExample:
summary: Numbers Lookup Accepted
value:
Expand Down Expand Up @@ -9518,6 +9538,8 @@ components:
$ref: '#/components/examples/singleNumberRequestExample'
multipleNumberRequestExample:
$ref: '#/components/examples/multipleNumberRequestExample'
rcsAgentRequestExample:
$ref: '#/components/examples/rcsAgentRequestExample'
createAsyncBulkLookupRequest:
description: Asynchronous bulk phone number lookup request.
required: true
Expand Down
1 change: 1 addition & 0 deletions docs/SyncLookupRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**phoneNumbers** | **List<String>** | Telephone numbers in E.164 format. | |
|**rcsAgent** | **String** | Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. | [optional] |



35 changes: 32 additions & 3 deletions src/main/java/com/bandwidth/sdk/model/SyncLookupRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public class SyncLookupRequest {
@javax.annotation.Nonnull
private List<String> phoneNumbers = new ArrayList<>();

public static final String SERIALIZED_NAME_RCS_AGENT = "rcsAgent";
@SerializedName(SERIALIZED_NAME_RCS_AGENT)
@javax.annotation.Nullable
private String rcsAgent;

public SyncLookupRequest() {
}

Expand Down Expand Up @@ -88,6 +93,25 @@ public void setPhoneNumbers(@javax.annotation.Nonnull List<String> phoneNumbers)
this.phoneNumbers = phoneNumbers;
}


public SyncLookupRequest rcsAgent(@javax.annotation.Nullable String rcsAgent) {
this.rcsAgent = rcsAgent;
return this;
}

/**
* Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the &#x60;sender&#x60; in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens.
* @return rcsAgent
*/
@javax.annotation.Nullable
public String getRcsAgent() {
return rcsAgent;
}

public void setRcsAgent(@javax.annotation.Nullable String rcsAgent) {
this.rcsAgent = rcsAgent;
}

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
Expand Down Expand Up @@ -143,20 +167,22 @@ public boolean equals(Object o) {
return false;
}
SyncLookupRequest syncLookupRequest = (SyncLookupRequest) o;
return Objects.equals(this.phoneNumbers, syncLookupRequest.phoneNumbers)&&
return Objects.equals(this.phoneNumbers, syncLookupRequest.phoneNumbers) &&
Objects.equals(this.rcsAgent, syncLookupRequest.rcsAgent)&&
Objects.equals(this.additionalProperties, syncLookupRequest.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(phoneNumbers, additionalProperties);
return Objects.hash(phoneNumbers, rcsAgent, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SyncLookupRequest {\n");
sb.append(" phoneNumbers: ").append(toIndentedString(phoneNumbers)).append("\n");
sb.append(" rcsAgent: ").append(toIndentedString(rcsAgent)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
sb.append("}");
return sb.toString();
Expand All @@ -179,7 +205,7 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("phoneNumbers"));
openapiFields = new HashSet<String>(Arrays.asList("phoneNumbers", "rcsAgent"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(Arrays.asList("phoneNumbers"));
Expand Down Expand Up @@ -211,6 +237,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
} else if (!jsonObj.get("phoneNumbers").isJsonArray()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString()));
}
if ((jsonObj.get("rcsAgent") != null && !jsonObj.get("rcsAgent").isJsonNull()) && !jsonObj.get("rcsAgent").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rcsAgent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rcsAgent").toString()));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public void createAsyncBulkLookupTest() throws ApiException {
@Test
public void createSyncLookupTest() throws ApiException {
SyncLookupRequest syncLookupRequest = new SyncLookupRequest()
.phoneNumbers(Arrays.asList("+1234567890", "+1987654321"));
.phoneNumbers(Arrays.asList("+1234567890", "+1987654321"))
.rcsAgent("TestAgent");
ApiResponse<CreateSyncLookupResponse> response = api.createSyncLookupWithHttpInfo(BW_ACCOUNT_ID, syncLookupRequest);
assertThat(response.getStatusCode(), is(200));
assertThat(response.getData(), instanceOf(CreateSyncLookupResponse.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/
public class SyncLookupRequestTest {
private final SyncLookupRequest model = new SyncLookupRequest()
.phoneNumbers(new ArrayList<String>(Arrays.asList("+1234567890", "+1987654321")));
.phoneNumbers(new ArrayList<String>(Arrays.asList("+1234567890", "+1987654321")))
.rcsAgent("TestAgent");

/**
* Model tests for SyncLookupRequest
Expand All @@ -47,4 +48,12 @@ public void phoneNumbersTest() {
assertThat(model.getPhoneNumbers(), instanceOf(List.class));
}

/**
* Test the property 'rcsAgent'
*/
@Test
public void rcsAgentTest() {
assertThat(model.getRcsAgent(), instanceOf(String.class));
}

}
Loading