diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 763a5cf0..760512b5 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -36,15 +36,15 @@ jobs: strategy: matrix: os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] - java-version: ["11", "17", "21"] + java-version: ["11", "17", "21", "25"] distribution: ["zulu", "temurin"] fail-fast: false steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: ${{ matrix.distribution }} java-version: ${{ matrix.java-version }} diff --git a/.gitignore b/.gitignore index 3ef06f40..891c9710 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,8 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +*.prefs + # build files **/target target diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a1c64a70..52345def 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -205,6 +205,10 @@ src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java src/main/java/com/bandwidth/sdk/auth/Authentication.java src/main/java/com/bandwidth/sdk/auth/HttpBasicAuth.java src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java +src/main/java/com/bandwidth/sdk/auth/OAuth.java +src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java +src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java +src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java src/main/java/com/bandwidth/sdk/model/AccountStatistics.java src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 758bb9c8..971ecb25 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.10.0 +7.16.0 diff --git a/README.md b/README.md index 12354201..65c1ed97 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Bandwidth - API version: 1.0.0 - - Generator version: 7.10.0 + - Generator version: 7.16.0 Bandwidth's Communication APIs @@ -98,6 +98,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call @@ -341,6 +345,14 @@ Authentication schemes defined for the API: - **Type**: HTTP basic authentication + +### OAuth2 + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: N/A + ## Recommendation diff --git a/api/openapi.yaml b/api/openapi.yaml index a85e5348..fa2dfa31 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -11,6 +11,7 @@ servers: - url: / security: - Basic: [] +- OAuth2: [] tags: - name: Messages - name: Media @@ -53,7 +54,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/media' + $ref: "#/components/schemas/media" type: array description: OK headers: @@ -67,49 +68,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden "404": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found "406": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Acceptable "415": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type "429": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error summary: List Media tags: @@ -154,49 +155,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden "404": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found "406": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Acceptable "415": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type "429": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error summary: Delete Media tags: @@ -238,49 +239,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden "404": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found "406": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Acceptable "415": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type "429": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error summary: Get Media tags: @@ -335,7 +336,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/uploadMediaRequest' + $ref: "#/components/requestBodies/uploadMediaRequest" responses: "204": description: No Content @@ -343,49 +344,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden "404": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found "406": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Acceptable "415": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type "429": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error summary: Upload Media tags: @@ -454,7 +455,7 @@ paths: name: messageStatus required: false schema: - $ref: '#/components/schemas/messageStatusEnum' + $ref: "#/components/schemas/messageStatusEnum" style: form - description: The direction of the message. One of INBOUND OUTBOUND. explode: true @@ -462,7 +463,7 @@ paths: name: messageDirection required: false schema: - $ref: '#/components/schemas/listMessageDirectionEnum' + $ref: "#/components/schemas/listMessageDirectionEnum" style: form - description: The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need @@ -481,7 +482,7 @@ paths: name: messageType required: false schema: - $ref: '#/components/schemas/messageTypeEnum' + $ref: "#/components/schemas/messageTypeEnum" style: form - description: The error code of the message. example: 9902 @@ -548,7 +549,7 @@ paths: name: product required: false schema: - $ref: '#/components/schemas/productTypeEnum' + $ref: "#/components/schemas/productTypeEnum" style: form - description: Location Id associated with the message. example: 123ABC @@ -682,49 +683,49 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/messagesList' + $ref: "#/components/schemas/messagesList" description: OK "400": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden "404": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found "415": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type "429": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error summary: List Messages tags: @@ -734,7 +735,7 @@ paths: post: callbacks: statusCallback: - $ref: '#/components/callbacks/statusCallback' + $ref: "#/components/callbacks/statusCallback" description: Endpoint for sending text messages and picture messages using V2 messaging. operationId: createMessage @@ -749,67 +750,67 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/createMessageRequest' + $ref: "#/components/requestBodies/createMessageRequest" responses: "202": content: application/json: schema: - $ref: '#/components/schemas/message' + $ref: "#/components/schemas/message" description: Accepted "400": content: application/json: schema: - $ref: '#/components/schemas/createMessageRequestError' + $ref: "#/components/schemas/createMessageRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden "404": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found "405": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Method Not Allowed "406": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Acceptable "415": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type "429": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error summary: Create Message tags: @@ -824,7 +825,7 @@ paths: post: callbacks: statusCallback: - $ref: '#/components/callbacks/statusCallback' + $ref: "#/components/callbacks/statusCallback" description: Endpoint for sending Multi-Channel messages. operationId: createMultiChannelMessage parameters: @@ -838,13 +839,13 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/createMultiChannelMessageRequest' + $ref: "#/components/requestBodies/createMultiChannelMessageRequest" responses: "202": content: application/json: schema: - $ref: '#/components/schemas/createMultiChannelMessageResponse' + $ref: "#/components/schemas/createMultiChannelMessageResponse" description: Accepted "400": content: @@ -859,7 +860,7 @@ paths: source: field: "channelList[0].from" schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Bad Request "401": content: @@ -872,7 +873,7 @@ paths: description: Authentication Failed source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unauthorized "403": content: @@ -885,7 +886,7 @@ paths: description: Access Denied source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Forbidden "404": content: @@ -898,7 +899,7 @@ paths: description: Resource not found. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Not Found "405": content: @@ -911,7 +912,7 @@ paths: description: Method 'PUT' not supported for this resource. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Method Not Allowed "406": description: Not Acceptable @@ -928,7 +929,7 @@ paths: source: header: Content-Type schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unsupported Media Type "429": content: @@ -942,7 +943,7 @@ paths: Please retry later. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Too Many Requests "500": content: @@ -955,14 +956,14 @@ paths: description: Internal server error. No further information available source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Internal Server Error summary: Create Multi-Channel Message tags: - Multi-Channel x-badges: - name: Beta - color: '#076EA8' + color: "#076EA8" x-content-type: application/json x-accepts: - application/json @@ -1064,7 +1065,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" type: array description: OK "400": @@ -1072,63 +1073,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1142,9 +1143,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Calls tags: @@ -1170,16 +1171,16 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/createCallRequest' + $ref: "#/components/requestBodies/createCallRequest" responses: "201": content: application/json: examples: createCall Response: - $ref: '#/components/examples/createCallResponseExample' + $ref: "#/components/examples/createCallResponseExample" schema: - $ref: '#/components/schemas/createCallResponse' + $ref: "#/components/schemas/createCallResponse" description: Created headers: Location: @@ -1193,63 +1194,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1263,9 +1264,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Create Call tags: @@ -1307,70 +1308,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1384,9 +1385,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Call State Information tags: @@ -1417,7 +1418,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateCallRequest' + $ref: "#/components/requestBodies/updateCallRequest" responses: "200": description: OK @@ -1426,72 +1427,72 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "409": content: application/json: examples: conflictErrorExample: - $ref: '#/components/examples/voiceConflictErrorExample' + $ref: "#/components/examples/voiceConflictErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Conflict "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1505,9 +1506,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Update Call tags: @@ -1542,7 +1543,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateCallBxmlRequest' + $ref: "#/components/requestBodies/updateCallBxmlRequest" responses: "204": description: Call BXML was successfully replaced. @@ -1551,72 +1552,72 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "409": content: application/json: examples: conflictErrorExample: - $ref: '#/components/examples/voiceConflictErrorExample' + $ref: "#/components/examples/voiceConflictErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Conflict "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1630,9 +1631,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Update Call BXML tags: @@ -1719,10 +1720,10 @@ paths: application/json: examples: listConferences Response: - $ref: '#/components/examples/listConferencesResponseExample' + $ref: "#/components/examples/listConferencesResponseExample" schema: items: - $ref: '#/components/schemas/conference' + $ref: "#/components/schemas/conference" type: array description: OK "400": @@ -1730,63 +1731,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1800,9 +1801,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Conferences tags: @@ -1840,70 +1841,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/conference' + $ref: "#/components/schemas/conference" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -1917,9 +1918,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Conference Information tags: @@ -1949,7 +1950,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateConferenceRequest' + $ref: "#/components/requestBodies/updateConferenceRequest" responses: "204": description: Conference was successfully modified. @@ -1958,63 +1959,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2028,9 +2029,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Update Conference tags: @@ -2065,7 +2066,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateConferenceBxmlRequest' + $ref: "#/components/requestBodies/updateConferenceBxmlRequest" responses: "204": description: Conference successfully modified. @@ -2074,63 +2075,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2144,9 +2145,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Update Conference BXML tags: @@ -2194,70 +2195,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/conferenceMember' + $ref: "#/components/schemas/conferenceMember" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2271,9 +2272,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Conference Member tags: @@ -2312,7 +2313,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateConferenceMemberRequest' + $ref: "#/components/requestBodies/updateConferenceMemberRequest" responses: "204": description: Conference member was successfully modified. @@ -2321,63 +2322,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2391,9 +2392,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Update Conference Member tags: @@ -2434,7 +2435,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" type: array description: OK "400": @@ -2442,63 +2443,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2512,9 +2513,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Conference Recordings tags: @@ -2561,70 +2562,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2638,9 +2639,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Conference Recording Information tags: @@ -2699,63 +2700,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2769,9 +2770,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Download Conference Recording tags: @@ -2845,7 +2846,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" type: array description: OK "400": @@ -2853,63 +2854,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -2923,9 +2924,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Call Recordings tags: @@ -2959,7 +2960,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/updateCallRecordingRequest' + $ref: "#/components/requestBodies/updateCallRecordingRequest" responses: "200": description: OK @@ -2968,63 +2969,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3038,9 +3039,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Update Recording tags: @@ -3082,7 +3083,7 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" type: array description: OK "400": @@ -3090,63 +3091,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3160,9 +3161,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: List Call Recordings tags: @@ -3215,63 +3216,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3285,9 +3286,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Delete Recording tags: @@ -3330,70 +3331,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3407,9 +3408,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Call Recording tags: @@ -3459,63 +3460,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3529,9 +3530,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Delete Recording Media tags: @@ -3586,63 +3587,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3656,9 +3657,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Download Recording tags: @@ -3713,63 +3714,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3783,9 +3784,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Delete Transcription tags: @@ -3832,70 +3833,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/recordingTranscriptions' + $ref: "#/components/schemas/recordingTranscriptions" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -3909,9 +3910,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Transcription tags: @@ -3953,7 +3954,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/transcribeRecordingRequest' + $ref: "#/components/requestBodies/transcribeRecordingRequest" responses: "204": description: Transcription was successfully requested. @@ -3962,63 +3963,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -4032,9 +4033,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Create Transcription Request tags: @@ -4064,70 +4065,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/accountStatistics' + $ref: "#/components/schemas/accountStatistics" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -4141,9 +4142,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Account Statistics tags: @@ -4181,70 +4182,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/callTranscriptionMetadataList' + $ref: "#/components/schemas/callTranscriptionMetadataList" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -4258,9 +4259,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: List Real-time Transcriptions tags: @@ -4313,63 +4314,63 @@ paths: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -4383,9 +4384,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Delete Real-time Transcription tags: @@ -4429,70 +4430,70 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/callTranscriptionResponse' + $ref: "#/components/schemas/callTranscriptionResponse" description: OK "400": content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request "401": content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized "403": content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden "404": content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found "405": content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed "415": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type "429": content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -4506,9 +4507,9 @@ paths: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error summary: Get Real-time Transcription tags: @@ -4533,37 +4534,37 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/codeRequest' + $ref: "#/components/requestBodies/codeRequest" responses: "200": content: application/json: schema: - $ref: '#/components/schemas/voiceCodeResponse' + $ref: "#/components/schemas/voiceCodeResponse" description: OK "400": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/mfaUnauthorizedRequestError' + $ref: "#/components/schemas/mfaUnauthorizedRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/mfaForbiddenRequestError' + $ref: "#/components/schemas/mfaForbiddenRequestError" description: Forbidden "500": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Internal Server Error summary: Voice Authentication Code tags: @@ -4589,37 +4590,37 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/codeRequest' + $ref: "#/components/requestBodies/codeRequest" responses: "200": content: application/json: schema: - $ref: '#/components/schemas/messagingCodeResponse' + $ref: "#/components/schemas/messagingCodeResponse" description: OK "400": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/mfaUnauthorizedRequestError' + $ref: "#/components/schemas/mfaUnauthorizedRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/mfaForbiddenRequestError' + $ref: "#/components/schemas/mfaForbiddenRequestError" description: Forbidden "500": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Internal Server Error summary: Messaging Authentication Code tags: @@ -4645,43 +4646,43 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/codeVerify' + $ref: "#/components/requestBodies/codeVerify" responses: "200": content: application/json: schema: - $ref: '#/components/schemas/verifyCodeResponse' + $ref: "#/components/schemas/verifyCodeResponse" description: OK "400": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Bad Request "401": content: application/json: schema: - $ref: '#/components/schemas/mfaUnauthorizedRequestError' + $ref: "#/components/schemas/mfaUnauthorizedRequestError" description: Unauthorized "403": content: application/json: schema: - $ref: '#/components/schemas/mfaForbiddenRequestError' + $ref: "#/components/schemas/mfaForbiddenRequestError" description: Forbidden "429": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Too Many Requests "500": content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Internal Server Error summary: Verify Authentication Code tags: @@ -4707,16 +4708,16 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/createLookupRequest' + $ref: "#/components/requestBodies/createLookupRequest" responses: "202": content: application/json: examples: lookupResponseExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: '#/components/schemas/createLookupResponse' + $ref: "#/components/schemas/createLookupResponse" description: Accepted "400": content: @@ -4727,7 +4728,7 @@ paths: value: message: "Some tns do not match e164 format: 1234" schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Bad Request "401": content: @@ -4738,7 +4739,7 @@ paths: value: message: Unauthorized schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unauthorized "403": content: @@ -4753,7 +4754,7 @@ paths: requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Forbidden "415": content: @@ -4764,7 +4765,7 @@ paths: value: message: Content-Type must be application/json. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unsupported Media Type "429": content: @@ -4775,7 +4776,7 @@ paths: value: message: Too many requests. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Too Many Requests "500": content: @@ -4786,7 +4787,7 @@ paths: value: message: Request has not been passed further. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Internal Server Error summary: Create Lookup tags: @@ -4826,19 +4827,19 @@ paths: application/json: examples: lookupInProgressExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" lookupFailedExample: - $ref: '#/components/examples/lookupFailedExample' + $ref: "#/components/examples/lookupFailedExample" lookupSingleNumberCompleteExample: - $ref: '#/components/examples/lookupSingleNumberCompleteExample' + $ref: "#/components/examples/lookupSingleNumberCompleteExample" lookupMultipleNumbersCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersCompleteExample" lookupMultipleNumbersPartialCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersPartialCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersPartialCompleteExample" lookupSingleNumberCompleteNoInfoExample: - $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' + $ref: "#/components/examples/lookupSingleNumberCompleteNoInfoExample" schema: - $ref: '#/components/schemas/lookupStatus' + $ref: "#/components/schemas/lookupStatus" description: OK "400": content: @@ -4849,7 +4850,7 @@ paths: value: message: "Some tns do not match e164 format: 1234" schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Bad Request "401": content: @@ -4860,7 +4861,7 @@ paths: value: message: Unauthorized schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unauthorized "403": content: @@ -4875,7 +4876,7 @@ paths: requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Forbidden "404": description: Not Found @@ -4888,7 +4889,7 @@ paths: value: message: Too many requests. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Too Many Requests "500": content: @@ -4899,7 +4900,7 @@ paths: value: message: Request has not been passed further. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Internal Server Error summary: Get Lookup Request Status tags: @@ -4913,7 +4914,7 @@ paths: post: callbacks: tfVerificationStatus: - $ref: '#/components/callbacks/tfVerificationStatus' + $ref: "#/components/callbacks/tfVerificationStatus" description: Submit a request for verification of a toll-free phone number. operationId: requestTollFreeVerification parameters: @@ -4927,7 +4928,7 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/requestTollFreeVerificationRequest' + $ref: "#/components/requestBodies/requestTollFreeVerificationRequest" responses: "202": description: Accepted @@ -4942,7 +4943,7 @@ paths: address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -4951,7 +4952,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -4960,7 +4961,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "405": content: @@ -4969,7 +4970,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -4978,7 +4979,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -4987,7 +4988,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -4996,7 +4997,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Request Toll-Free Verification tags: @@ -5028,7 +5029,7 @@ paths: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple responses: "204": @@ -5040,7 +5041,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5049,7 +5050,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5058,7 +5059,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5067,7 +5068,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5076,7 +5077,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5085,7 +5086,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5094,7 +5095,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5103,7 +5104,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Delete a Toll-Free Verification Submission tags: @@ -5132,14 +5133,14 @@ paths: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/tfvStatus' + $ref: "#/components/schemas/tfvStatus" description: OK "400": content: @@ -5148,7 +5149,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5157,7 +5158,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5166,7 +5167,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5175,7 +5176,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5184,7 +5185,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5193,7 +5194,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5202,7 +5203,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5211,7 +5212,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Get Toll-Free Verification Status tags: @@ -5221,7 +5222,7 @@ paths: put: callbacks: tfVerificationStatus: - $ref: '#/components/callbacks/tfVerificationStatus' + $ref: "#/components/callbacks/tfVerificationStatus" description: |- Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). @@ -5243,10 +5244,10 @@ paths: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple requestBody: - $ref: '#/components/requestBodies/updateTollFreeVerificationRequestRequest' + $ref: "#/components/requestBodies/updateTollFreeVerificationRequestRequest" responses: "202": description: Accepted @@ -5261,7 +5262,7 @@ paths: address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5270,7 +5271,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5279,7 +5280,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "405": content: @@ -5288,7 +5289,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5297,7 +5298,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5306,7 +5307,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5315,7 +5316,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Update Toll-Free Verification Request tags: @@ -5347,7 +5348,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionsListBody' + $ref: "#/components/schemas/webhookSubscriptionsListBody" description: OK "400": content: @@ -5360,7 +5361,7 @@ paths: address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5369,7 +5370,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5378,7 +5379,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "405": content: @@ -5387,7 +5388,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5396,7 +5397,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5405,7 +5406,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5414,7 +5415,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: List Webhook Subscriptions tags: @@ -5438,13 +5439,13 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/webhookSubscriptionRequest' + $ref: "#/components/requestBodies/webhookSubscriptionRequest" responses: "201": content: application/json: schema: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" description: Created "400": content: @@ -5453,7 +5454,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5462,7 +5463,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5471,7 +5472,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5480,7 +5481,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5489,7 +5490,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5498,7 +5499,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5507,7 +5508,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5516,7 +5517,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Create Webhook Subscription tags: @@ -5560,7 +5561,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5569,7 +5570,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5578,7 +5579,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5587,7 +5588,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5596,7 +5597,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5605,7 +5606,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5614,7 +5615,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5623,7 +5624,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Delete Webhook Subscription tags: @@ -5654,13 +5655,13 @@ paths: type: string style: simple requestBody: - $ref: '#/components/requestBodies/webhookSubscriptionRequest' + $ref: "#/components/requestBodies/webhookSubscriptionRequest" responses: "200": content: application/json: schema: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" description: OK "400": content: @@ -5669,7 +5670,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5678,7 +5679,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5687,7 +5688,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5696,7 +5697,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5705,7 +5706,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5714,7 +5715,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5723,7 +5724,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5732,7 +5733,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: Update Webhook Subscription tags: @@ -5752,7 +5753,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/useCases' + $ref: "#/components/schemas/useCases" description: OK "400": content: @@ -5761,7 +5762,7 @@ paths: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5770,7 +5771,7 @@ paths: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5779,7 +5780,7 @@ paths: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5788,7 +5789,7 @@ paths: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5797,7 +5798,7 @@ paths: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5806,7 +5807,7 @@ paths: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5815,7 +5816,7 @@ paths: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5824,7 +5825,7 @@ paths: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: List Toll-Free Use Cases tags: @@ -5844,11 +5845,11 @@ components: application/json: examples: smsMessageReceivedCallback: - $ref: '#/components/examples/smsMessageReceivedCallbackExample' + $ref: "#/components/examples/smsMessageReceivedCallbackExample" mmsMessageReceivedCallback: - $ref: '#/components/examples/mmsMessageReceivedCallbackExample' + $ref: "#/components/examples/mmsMessageReceivedCallbackExample" schema: - $ref: '#/components/schemas/inboundCallback' + $ref: "#/components/schemas/inboundCallback" description: "

This Inbound Message Webhook is an envelope containing\ \ either a received (MO) message to your \nmessage-enabled Bandwidth\ \ telephone number or a multichannel client's response to a suggestion\ @@ -5872,17 +5873,17 @@ components: application/json: examples: messageSendingCallback: - $ref: '#/components/examples/messageSendingCallbackExample' + $ref: "#/components/examples/messageSendingCallbackExample" smsMessageDeliveredCallback: - $ref: '#/components/examples/smsMessageDeliveredCallbackExample' + $ref: "#/components/examples/smsMessageDeliveredCallbackExample" mmsMessageDeliveredCallback: - $ref: '#/components/examples/mmsMessageDeliveredCallbackExample' + $ref: "#/components/examples/mmsMessageDeliveredCallbackExample" groupMmsMessageDeliveredCallback: - $ref: '#/components/examples/groupMmsMessageDeliveredCallbackExample' + $ref: "#/components/examples/groupMmsMessageDeliveredCallbackExample" messageFailedCallback: - $ref: '#/components/examples/messageFailedCallbackExample' + $ref: "#/components/examples/messageFailedCallbackExample" schema: - $ref: '#/components/schemas/statusCallback' + $ref: "#/components/schemas/statusCallback" description: |-

This Outbound Message Webhook is an envelope containing status information regarding a message sent (MT) from your message-enabled Bandwidth telephone number. @@ -5914,7 +5915,7 @@ components: type: string style: simple requestBody: - $ref: '#/components/requestBodies/verificationWebhookRequest' + $ref: "#/components/requestBodies/verificationWebhookRequest" responses: "204": description: No Content @@ -5925,7 +5926,7 @@ components: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request "401": content: @@ -5934,7 +5935,7 @@ components: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized "403": content: @@ -5943,7 +5944,7 @@ components: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden "404": content: @@ -5952,7 +5953,7 @@ components: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. "405": content: @@ -5961,7 +5962,7 @@ components: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed "429": content: @@ -5970,7 +5971,7 @@ components: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests "500": content: @@ -5979,7 +5980,7 @@ components: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error "503": content: @@ -5988,7 +5989,7 @@ components: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable summary: TFV status updates sent to customer's webhook URL. examples: @@ -6399,7 +6400,7 @@ components: name: messageStatus required: false schema: - $ref: '#/components/schemas/messageStatusEnum' + $ref: "#/components/schemas/messageStatusEnum" style: form messageDirection: description: The direction of the message. One of INBOUND OUTBOUND. @@ -6408,7 +6409,7 @@ components: name: messageDirection required: false schema: - $ref: '#/components/schemas/listMessageDirectionEnum' + $ref: "#/components/schemas/listMessageDirectionEnum" style: form carrierName: description: The name of the carrier used for this message. Possible values @@ -6429,7 +6430,7 @@ components: name: messageType required: false schema: - $ref: '#/components/schemas/messageTypeEnum' + $ref: "#/components/schemas/messageTypeEnum" style: form errorCode: description: The error code of the message. @@ -6503,7 +6504,7 @@ components: name: product required: false schema: - $ref: '#/components/schemas/productTypeEnum' + $ref: "#/components/schemas/productTypeEnum" style: form location: description: Location Id associated with the message. @@ -6858,7 +6859,7 @@ components: name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" style: simple webhookSubscriptionIdPathParam: description: Webhook subscription ID @@ -6875,13 +6876,13 @@ components: content: application/json: schema: - $ref: '#/components/schemas/messageRequest' + $ref: "#/components/schemas/messageRequest" required: true createMultiChannelMessageRequest: content: application/json: schema: - $ref: '#/components/schemas/multiChannelMessageRequest' + $ref: "#/components/schemas/multiChannelMessageRequest" required: true uploadMediaRequest: content: @@ -7082,14 +7083,14 @@ components: content: application/json: schema: - $ref: '#/components/schemas/createCall' + $ref: "#/components/schemas/createCall" description: JSON object containing information to create an outbound call required: true updateCallRequest: content: application/json: schema: - $ref: '#/components/schemas/updateCall' + $ref: "#/components/schemas/updateCall" description: JSON object containing information to redirect an existing call to a new BXML document required: true @@ -7119,19 +7120,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/updateCallRecording' + $ref: "#/components/schemas/updateCallRecording" required: true transcribeRecordingRequest: content: application/json: schema: - $ref: '#/components/schemas/transcribeRecording' + $ref: "#/components/schemas/transcribeRecording" required: true updateConferenceRequest: content: application/json: schema: - $ref: '#/components/schemas/updateConference' + $ref: "#/components/schemas/updateConference" required: true updateConferenceBxmlRequest: content: @@ -7152,20 +7153,20 @@ components: content: application/json: schema: - $ref: '#/components/schemas/updateConferenceMember' + $ref: "#/components/schemas/updateConferenceMember" required: true codeRequest: content: application/json: schema: - $ref: '#/components/schemas/codeRequest' + $ref: "#/components/schemas/codeRequest" description: MFA code request body. required: true codeVerify: content: application/json: schema: - $ref: '#/components/schemas/verifyCodeRequest' + $ref: "#/components/schemas/verifyCodeRequest" description: MFA code verify request body. required: true createLookupRequest: @@ -7173,25 +7174,25 @@ components: application/json: examples: singleNumberRequestExample: - $ref: '#/components/examples/singleNumberRequestExample' + $ref: "#/components/examples/singleNumberRequestExample" multipleNumberRequestExample: - $ref: '#/components/examples/multipleNumberRequestExample' + $ref: "#/components/examples/multipleNumberRequestExample" schema: - $ref: '#/components/schemas/lookupRequest' + $ref: "#/components/schemas/lookupRequest" description: Phone number lookup request. required: true requestTollFreeVerificationRequest: content: application/json: schema: - $ref: '#/components/schemas/verificationRequest' + $ref: "#/components/schemas/verificationRequest" description: Request for verification of a toll-free phone number. required: true updateTollFreeVerificationRequestRequest: content: application/json: schema: - $ref: '#/components/schemas/tfvSubmissionWrapper' + $ref: "#/components/schemas/tfvSubmissionWrapper" description: Update a request for verification of a toll-free phone number. required: true verificationWebhookRequest: @@ -7199,17 +7200,17 @@ components: application/json: schema: oneOf: - - $ref: '#/components/schemas/verificationWebhook' - - $ref: '#/components/schemas/verificationDenialWebhook' - - $ref: '#/components/schemas/failureWebhook' - - $ref: '#/components/schemas/blockedWebhook' + - $ref: "#/components/schemas/verificationWebhook" + - $ref: "#/components/schemas/verificationDenialWebhook" + - $ref: "#/components/schemas/failureWebhook" + - $ref: "#/components/schemas/blockedWebhook" description: Verification callback status of a toll-free phone number. required: true webhookSubscriptionRequest: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionRequestSchema' + $ref: "#/components/schemas/webhookSubscriptionRequestSchema" description: Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. required: true @@ -7218,19 +7219,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/message' + $ref: "#/components/schemas/message" description: Accepted createMultiChannelMessageResponse: content: application/json: schema: - $ref: '#/components/schemas/createMultiChannelMessageResponse' + $ref: "#/components/schemas/createMultiChannelMessageResponse" description: Accepted listMessagesResponse: content: application/json: schema: - $ref: '#/components/schemas/messagesList' + $ref: "#/components/schemas/messagesList" description: OK getMediaResponse: content: @@ -7245,7 +7246,7 @@ components: application/json: schema: items: - $ref: '#/components/schemas/media' + $ref: "#/components/schemas/media" type: array description: OK headers: @@ -7259,61 +7260,61 @@ components: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Bad Request messagingNotAcceptableError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Acceptable createMessageBadRequestError: content: application/json: schema: - $ref: '#/components/schemas/createMessageRequestError' + $ref: "#/components/schemas/createMessageRequestError" description: Bad Request messagingUnauthorizedError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unauthorized messagingForbiddenError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Forbidden messagingNotFoundError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Not Found messagingMethodNotAllowedError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Method Not Allowed messagingInvalidMediaTypeError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Unsupported Media Type messagingTooManyRequestsError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Too Many Requests messagingInternalServerError: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" description: Internal Server Error multiChannelBadRequestError: content: @@ -7328,7 +7329,7 @@ components: source: field: "channelList[0].from" schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Bad Request multiChannelNotAcceptableError: description: Not Acceptable @@ -7343,7 +7344,7 @@ components: description: Authentication Failed source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unauthorized multiChannelForbiddenError: content: @@ -7356,7 +7357,7 @@ components: description: Access Denied source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Forbidden multiChannelNotFoundError: content: @@ -7369,7 +7370,7 @@ components: description: Resource not found. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Not Found multiChannelMethodNotAllowedError: content: @@ -7382,7 +7383,7 @@ components: description: Method 'PUT' not supported for this resource. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Method Not Allowed multiChannelInvalidMediaTypeError: content: @@ -7397,7 +7398,7 @@ components: source: header: Content-Type schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Unsupported Media Type multiChannelTooManyRequestsError: content: @@ -7411,7 +7412,7 @@ components: retry later. source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Too Many Requests multiChannelInternalServerError: content: @@ -7424,16 +7425,16 @@ components: description: Internal server error. No further information available source: {} schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" description: Internal Server Error createCallResponse: content: application/json: examples: createCall Response: - $ref: '#/components/examples/createCallResponseExample' + $ref: "#/components/examples/createCallResponseExample" schema: - $ref: '#/components/schemas/createCallResponse' + $ref: "#/components/schemas/createCallResponse" description: Created headers: Location: @@ -7446,7 +7447,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" description: OK updateCallResponse: description: OK @@ -7455,14 +7456,14 @@ components: application/json: schema: items: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" type: array description: OK getStatisticsResponse: content: application/json: schema: - $ref: '#/components/schemas/accountStatistics' + $ref: "#/components/schemas/accountStatistics" description: OK updateRecordingResponse: description: OK @@ -7471,14 +7472,14 @@ components: application/json: schema: items: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" type: array description: OK getCallRecordingResponse: content: application/json: schema: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" description: OK downloadRecordingMediaResponse: content: @@ -7495,19 +7496,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/recordingTranscriptions' + $ref: "#/components/schemas/recordingTranscriptions" description: OK listTranscriptionsResponse: content: application/json: schema: - $ref: '#/components/schemas/callTranscriptionMetadataList' + $ref: "#/components/schemas/callTranscriptionMetadataList" description: OK getCallTranscriptionResponse: content: application/json: schema: - $ref: '#/components/schemas/callTranscriptionResponse' + $ref: "#/components/schemas/callTranscriptionResponse" description: OK deleteCallTranscriptionResponse: description: No Content @@ -7516,109 +7517,109 @@ components: application/json: examples: listConferences Response: - $ref: '#/components/examples/listConferencesResponseExample' + $ref: "#/components/examples/listConferencesResponseExample" schema: items: - $ref: '#/components/schemas/conference' + $ref: "#/components/schemas/conference" type: array description: OK getConferenceResponse: content: application/json: schema: - $ref: '#/components/schemas/conference' + $ref: "#/components/schemas/conference" description: OK getConferenceMemberResponse: content: application/json: schema: - $ref: '#/components/schemas/conferenceMember' + $ref: "#/components/schemas/conferenceMember" description: OK listConferenceRecordingsResponse: content: application/json: schema: items: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" type: array description: OK getConferenceRecordingResponse: content: application/json: schema: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" description: OK voiceBadRequestError: content: application/json: examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Bad Request voiceUnauthorizedError: content: application/json: examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unauthorized voiceForbiddenError: content: application/json: examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Forbidden voiceNotFoundError: content: application/json: examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Not Found voiceNotAllowedError: content: application/json: examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Method Not Allowed voiceConflictError: content: application/json: examples: conflictErrorExample: - $ref: '#/components/examples/voiceConflictErrorExample' + $ref: "#/components/examples/voiceConflictErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Conflict voiceUnsupportedMediaTypeError: content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Unsupported Media Type voiceTooManyRequestsError: content: application/json: examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Too Many Requests headers: Retry-After: @@ -7632,85 +7633,85 @@ components: application/json: examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" description: Internal Server Error voiceCodeResponse: content: application/json: schema: - $ref: '#/components/schemas/voiceCodeResponse' + $ref: "#/components/schemas/voiceCodeResponse" description: OK messagingCodeResponse: content: application/json: schema: - $ref: '#/components/schemas/messagingCodeResponse' + $ref: "#/components/schemas/messagingCodeResponse" description: OK verifyCodeResponse: content: application/json: schema: - $ref: '#/components/schemas/verifyCodeResponse' + $ref: "#/components/schemas/verifyCodeResponse" description: OK mfaBadRequestError: content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Bad Request mfaUnauthorizedError: content: application/json: schema: - $ref: '#/components/schemas/mfaUnauthorizedRequestError' + $ref: "#/components/schemas/mfaUnauthorizedRequestError" description: Unauthorized mfaForbiddenError: content: application/json: schema: - $ref: '#/components/schemas/mfaForbiddenRequestError' + $ref: "#/components/schemas/mfaForbiddenRequestError" description: Forbidden mfaTooManyRequestsError: content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Too Many Requests mfaInternalServerError: content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" description: Internal Server Error createLookupResponse: content: application/json: examples: lookupResponseExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" schema: - $ref: '#/components/schemas/createLookupResponse' + $ref: "#/components/schemas/createLookupResponse" description: Accepted getLookupResponse: content: application/json: examples: lookupInProgressExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" lookupFailedExample: - $ref: '#/components/examples/lookupFailedExample' + $ref: "#/components/examples/lookupFailedExample" lookupSingleNumberCompleteExample: - $ref: '#/components/examples/lookupSingleNumberCompleteExample' + $ref: "#/components/examples/lookupSingleNumberCompleteExample" lookupMultipleNumbersCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersCompleteExample" lookupMultipleNumbersPartialCompleteExample: - $ref: '#/components/examples/lookupMultipleNumbersPartialCompleteExample' + $ref: "#/components/examples/lookupMultipleNumbersPartialCompleteExample" lookupSingleNumberCompleteNoInfoExample: - $ref: '#/components/examples/lookupSingleNumberCompleteNoInfoExample' + $ref: "#/components/examples/lookupSingleNumberCompleteNoInfoExample" schema: - $ref: '#/components/schemas/lookupStatus' + $ref: "#/components/schemas/lookupStatus" description: OK tnLookupBadRequestError: content: @@ -7721,7 +7722,7 @@ components: value: message: "Some tns do not match e164 format: 1234" schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Bad Request tnLookupUnauthorizedError: content: @@ -7732,7 +7733,7 @@ components: value: message: Unauthorized schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unauthorized tnLookupForbiddenError: content: @@ -7747,7 +7748,7 @@ components: of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic Y2tvZloPTGhHgywYIzGlcGVlcGvvcGovYTIGIt==' schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Forbidden tnLookupMediaTypeError: content: @@ -7758,7 +7759,7 @@ components: value: message: Content-Type must be application/json. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Unsupported Media Type tnLookupNotFoundError: description: Not Found @@ -7771,7 +7772,7 @@ components: value: message: Too many requests. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Too Many Requests tnLookupInternalServerError: content: @@ -7782,37 +7783,37 @@ components: value: message: Request has not been passed further. schema: - $ref: '#/components/schemas/tnLookupRequestError' + $ref: "#/components/schemas/tnLookupRequestError" description: Internal Server Error getTollFreeVerificationStatusResponse: content: application/json: schema: - $ref: '#/components/schemas/tfvStatus' + $ref: "#/components/schemas/tfvStatus" description: OK listWebhookSubscriptionsResponse: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionsListBody' + $ref: "#/components/schemas/webhookSubscriptionsListBody" description: OK createWebhookSubscriptionResponse: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" description: Created updateWebhookSubscriptionResponse: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" description: OK listTollFreeUseCasesResponse: content: application/json: schema: - $ref: '#/components/schemas/useCases' + $ref: "#/components/schemas/useCases" description: OK tfvBadRequestResponse: content: @@ -7821,7 +7822,7 @@ components: description: Cannot process request. type: bad request schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request noContentResponse: description: No Content @@ -7835,7 +7836,7 @@ components: businessContactEmail: Business contact email is not a valid email address. optInWorkflowImageURLs: Entries must be a valid array of objects. schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Bad Request tfvUnauthorizedResponse: content: @@ -7844,7 +7845,7 @@ components: description: Client is providing incorrect or invalid credentials. type: unauthorized schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Unauthorized tfvForbiddenResponse: content: @@ -7853,7 +7854,7 @@ components: description: Client is not authorized for the action. type: forbidden schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Forbidden tfvNotFoundResponse: content: @@ -7862,7 +7863,7 @@ components: description: Cannot find the requested resource. type: Not Found schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Cannot find the requested resource. tfvNotAllowedResponse: content: @@ -7871,7 +7872,7 @@ components: description: Method is not allowed. type: Method Not Allowed schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Method Not Allowed tfvTooManyRequestsResponse: content: @@ -7880,7 +7881,7 @@ components: description: Throttling error. Too many requests. type: Too Many Requests schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Too Many Requests tfvServerErrorResponse: content: @@ -7889,7 +7890,7 @@ components: description: Internal Server Error. type: Internal Server Error schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Internal Server Error tfvServiceUnavailableResponse: content: @@ -7898,7 +7899,7 @@ components: description: Service Unavailable Error. type: Service Unavailable schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" description: Service Unavailable schemas: applicationId: @@ -8043,10 +8044,10 @@ components: example: 100 type: integer pageInfo: - $ref: '#/components/schemas/pageInfo' + $ref: "#/components/schemas/pageInfo" messages: items: - $ref: '#/components/schemas/listMessageItem' + $ref: "#/components/schemas/listMessageItem" type: array title: MessagesList type: object @@ -8093,11 +8094,11 @@ components: example: "+15554442222" type: string messageStatus: - $ref: '#/components/schemas/messageStatusEnum' + $ref: "#/components/schemas/messageStatusEnum" messageDirection: - $ref: '#/components/schemas/listMessageDirectionEnum' + $ref: "#/components/schemas/listMessageDirectionEnum" messageType: - $ref: '#/components/schemas/messageTypeEnum' + $ref: "#/components/schemas/messageTypeEnum" segmentCount: description: The number of segments the user's message is broken into before sending over carrier networks. @@ -8239,7 +8240,7 @@ components: type: string fieldErrors: items: - $ref: '#/components/schemas/fieldError' + $ref: "#/components/schemas/fieldError" type: array required: - description @@ -8330,7 +8331,7 @@ components: example: 1 type: integer direction: - $ref: '#/components/schemas/messageDirectionEnum' + $ref: "#/components/schemas/messageDirectionEnum" to: description: The phone number recipients of the message. example: @@ -8365,7 +8366,7 @@ components: title: Tag type: string priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -8426,7 +8427,7 @@ components: title: Tag type: string priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -8583,14 +8584,14 @@ components: links: example: [] items: - $ref: '#/components/schemas/link' + $ref: "#/components/schemas/link" type: array data: - $ref: '#/components/schemas/multiChannelMessageResponseData' + $ref: "#/components/schemas/multiChannelMessageResponseData" errors: example: [] items: - $ref: '#/components/schemas/errorObject' + $ref: "#/components/schemas/errorObject" type: array type: object multiChannelError: @@ -8616,7 +8617,7 @@ components: links: example: [] items: - $ref: '#/components/schemas/link' + $ref: "#/components/schemas/link" type: array data: nullable: true @@ -8624,7 +8625,7 @@ components: example: null errors: items: - $ref: '#/components/schemas/errorObject' + $ref: "#/components/schemas/errorObject" type: array type: object link: @@ -8651,7 +8652,7 @@ components: description: A detailed explanation of the error. type: string source: - $ref: '#/components/schemas/errorSource' + $ref: "#/components/schemas/errorSource" required: - description - source @@ -8738,7 +8739,7 @@ components: suggestions: description: An array of suggested actions for the recipient. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 11 type: array required: @@ -8790,11 +8791,11 @@ components: rbmMessageMedia: properties: media: - $ref: '#/components/schemas/rbmMessageContentFile' + $ref: "#/components/schemas/rbmMessageContentFile" suggestions: description: An array of suggested actions for the recipient. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 11 type: array required: @@ -8814,27 +8815,27 @@ components: maxLength: 2000 type: string media: - $ref: '#/components/schemas/rbmCardContent_media' + $ref: "#/components/schemas/rbmCardContent_media" suggestions: description: An array of suggested actions for the recipient that will be displayed on the rich card. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 4 type: array type: object rbmStandaloneCard: properties: orientation: - $ref: '#/components/schemas/standaloneCardOrientationEnum' + $ref: "#/components/schemas/standaloneCardOrientationEnum" thumbnailImageAlignment: - $ref: '#/components/schemas/thumbnailAlignmentEnum' + $ref: "#/components/schemas/thumbnailAlignmentEnum" cardContent: - $ref: '#/components/schemas/rbmCardContent' + $ref: "#/components/schemas/rbmCardContent" suggestions: description: An array of suggested actions for the recipient. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 11 type: array required: @@ -8860,16 +8861,16 @@ components: rbmMessageCarouselCard: properties: cardWidth: - $ref: '#/components/schemas/cardWidthEnum' + $ref: "#/components/schemas/cardWidthEnum" cardContents: items: - $ref: '#/components/schemas/rbmCardContent' + $ref: "#/components/schemas/rbmCardContent" maxItems: 10 type: array suggestions: description: An array of suggested actions for the recipient. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 11 type: array required: @@ -8905,14 +8906,14 @@ components: type: string media: items: - $ref: '#/components/schemas/mmsMessageContentFile' + $ref: "#/components/schemas/mmsMessageContentFile" type: array title: MMS Message type: object rbmMessageContentRichCard: oneOf: - - $ref: '#/components/schemas/rbmStandaloneCard' - - $ref: '#/components/schemas/rbmMessageCarouselCard' + - $ref: "#/components/schemas/rbmStandaloneCard" + - $ref: "#/components/schemas/rbmMessageCarouselCard" title: RBM Rich Card rbmActionTypeEnum: enum: @@ -8946,7 +8947,7 @@ components: type: REPLY properties: type: - $ref: '#/components/schemas/rbmActionTypeEnum' + $ref: "#/components/schemas/rbmActionTypeEnum" text: description: Displayed text for user to click example: Hello world @@ -8968,7 +8969,7 @@ components: type: object rbmActionDial: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: phoneNumber: description: The phone number to dial. Must be E164 format. @@ -8980,7 +8981,7 @@ components: type: object rbmActionViewLocation: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: latitude: description: The latitude of the location. @@ -9004,7 +9005,7 @@ components: type: object multiChannelActionCalendarEvent: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: title: description: The title of the event. @@ -9034,7 +9035,7 @@ components: type: object rbmActionOpenUrl: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - properties: url: description: The URL to open in browser. @@ -9049,25 +9050,25 @@ components: multiChannelFullActions: description: An array of suggested actions for the recipient. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 11 type: array multiChannelAction: discriminator: mapping: - REPLY: '#/components/schemas/rbmActionBase' - DIAL_PHONE: '#/components/schemas/rbmActionDial' - SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' - CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' - OPEN_URL: '#/components/schemas/rbmActionOpenUrl' - REQUEST_LOCATION: '#/components/schemas/rbmActionBase' + REPLY: "#/components/schemas/rbmActionBase" + DIAL_PHONE: "#/components/schemas/rbmActionDial" + SHOW_LOCATION: "#/components/schemas/rbmActionViewLocation" + CREATE_CALENDAR_EVENT: "#/components/schemas/multiChannelActionCalendarEvent" + OPEN_URL: "#/components/schemas/rbmActionOpenUrl" + REQUEST_LOCATION: "#/components/schemas/rbmActionBase" propertyName: type oneOf: - - $ref: '#/components/schemas/rbmActionBase' - - $ref: '#/components/schemas/rbmActionDial' - - $ref: '#/components/schemas/rbmActionViewLocation' - - $ref: '#/components/schemas/multiChannelActionCalendarEvent' - - $ref: '#/components/schemas/rbmActionOpenUrl' + - $ref: "#/components/schemas/rbmActionBase" + - $ref: "#/components/schemas/rbmActionDial" + - $ref: "#/components/schemas/rbmActionViewLocation" + - $ref: "#/components/schemas/multiChannelActionCalendarEvent" + - $ref: "#/components/schemas/rbmActionOpenUrl" multiChannelChannelListObject: properties: from: @@ -9081,9 +9082,9 @@ components: example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + $ref: "#/components/schemas/multiChannelMessageChannelEnum" content: - $ref: '#/components/schemas/multiChannelChannelListObject_content' + $ref: "#/components/schemas/multiChannelChannelListObject_content" required: - applicationId - channel @@ -9102,7 +9103,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: '#/components/schemas/multiChannelChannelListObject' + $ref: "#/components/schemas/multiChannelChannelListObject" maxItems: 4 type: array tag: @@ -9112,7 +9113,7 @@ components: title: Tag type: string priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -9255,7 +9256,7 @@ components: format: date-time type: string direction: - $ref: '#/components/schemas/messageDirectionEnum' + $ref: "#/components/schemas/messageDirectionEnum" to: description: "The destination phone number(s) of the message, in E164 format." example: @@ -9269,7 +9270,7 @@ components: \ the order they are listed. Once a message sends successfully, the others\ \ will be ignored." items: - $ref: '#/components/schemas/multiChannelMessageResponseData_channelList_inner' + $ref: "#/components/schemas/multiChannelMessageResponseData_channelList_inner" maxItems: 4 type: array tag: @@ -9279,7 +9280,7 @@ components: title: Tag type: string priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -9300,7 +9301,7 @@ components: text: type: string media: - $ref: '#/components/schemas/rbmMessageContentFile' + $ref: "#/components/schemas/rbmMessageContentFile" type: object rbmSuggestionResponse: properties: @@ -9337,17 +9338,17 @@ components: - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. discriminator: mapping: - message-sent: '#/components/schemas/statusCallback' - message-delivered: '#/components/schemas/statusCallback' - message-failed: '#/components/schemas/statusCallback' - message-read: '#/components/schemas/statusCallback' - message-received: '#/components/schemas/inboundCallback' - request-location-response: '#/components/schemas/inboundCallback' - suggestion-response: '#/components/schemas/inboundCallback' + message-sent: "#/components/schemas/statusCallback" + message-delivered: "#/components/schemas/statusCallback" + message-failed: "#/components/schemas/statusCallback" + message-read: "#/components/schemas/statusCallback" + message-received: "#/components/schemas/inboundCallback" + request-location-response: "#/components/schemas/inboundCallback" + suggestion-response: "#/components/schemas/inboundCallback" propertyName: type oneOf: - - $ref: '#/components/schemas/statusCallback' - - $ref: '#/components/schemas/inboundCallback' + - $ref: "#/components/schemas/statusCallback" + - $ref: "#/components/schemas/inboundCallback" type: object statusCallback: description: Represents a status callback for an outbound MT SMS or MMS or RBM @@ -9364,7 +9365,7 @@ components: format: date-time type: string type: - $ref: '#/components/schemas/statusCallbackTypeEnum' + $ref: "#/components/schemas/statusCallbackTypeEnum" to: description: |- The destination phone number the message was sent to. @@ -9376,7 +9377,7 @@ components: example: Message delivered to carrier. type: string message: - $ref: '#/components/schemas/statusCallbackMessage' + $ref: "#/components/schemas/statusCallbackMessage" errorCode: description: "Optional error code, applicable only when type is `message-failed`." example: 4405 @@ -9403,7 +9404,7 @@ components: format: date-time type: string type: - $ref: '#/components/schemas/inboundCallbackTypeEnum' + $ref: "#/components/schemas/inboundCallbackTypeEnum" to: description: "The destination phone number the message was sent to. \nFor\ \ inbound callbacks, this is the Bandwidth number or alphanumeric identifier\ @@ -9415,7 +9416,7 @@ components: example: Incoming message received type: string message: - $ref: '#/components/schemas/inboundCallbackMessage' + $ref: "#/components/schemas/inboundCallbackMessage" carrierName: description: "The name of the Authorized Message Provider (AMP) that handled\ \ this message. \nIn the US, this is the carrier that the message was\ @@ -9485,7 +9486,7 @@ components: example: 1 type: integer direction: - $ref: '#/components/schemas/messageDirectionEnum' + $ref: "#/components/schemas/messageDirectionEnum" to: description: The phone number recipients of the message. example: @@ -9518,9 +9519,9 @@ components: type: string type: array priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + $ref: "#/components/schemas/multiChannelMessageChannelEnum" required: - applicationId - direction @@ -9533,14 +9534,14 @@ components: type: object inboundCallbackMessage: allOf: - - $ref: '#/components/schemas/statusCallbackMessage' + - $ref: "#/components/schemas/statusCallbackMessage" - properties: content: - $ref: '#/components/schemas/multiChannelMessageContent' + $ref: "#/components/schemas/multiChannelMessageContent" suggestionResponse: - $ref: '#/components/schemas/rbmSuggestionResponse' + $ref: "#/components/schemas/rbmSuggestionResponse" locationResponse: - $ref: '#/components/schemas/rbmLocationResponse' + $ref: "#/components/schemas/rbmLocationResponse" type: object required: - applicationId @@ -9704,7 +9705,7 @@ components: maxLength: 2048 type: string answerMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -9729,7 +9730,7 @@ components: nullable: true type: string answerFallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -9751,7 +9752,7 @@ components: nullable: true type: string disconnectMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" callTimeout: default: 30 description: |- @@ -9778,7 +9779,7 @@ components: nullable: true type: number machineDetection: - $ref: '#/components/schemas/machineDetectionConfiguration' + $ref: "#/components/schemas/machineDetectionConfiguration" priority: default: 5 description: |- @@ -9885,14 +9886,14 @@ components: nullable: true type: string answerMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" answerUrl: description: URL to deliver the `answer` event webhook. example: https://myServer.example/bandwidth/webhooks/answer format: uri type: string answerFallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" answerFallbackUrl: description: Fallback URL to deliver the `answer` event webhook. example: https://myFallbackServer.example/bandwidth/webhooks/answer @@ -9900,7 +9901,7 @@ components: nullable: true type: string disconnectMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" disconnectUrl: description: URL to deliver the `disconnect` event webhook. example: https://myServer.example/bandwidth/webhooks/disconnect @@ -10000,7 +10001,7 @@ components: example: "+19195554321" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" state: description: |- The current state of the call. Current possible values are @@ -10107,7 +10108,7 @@ components: updateCall: properties: state: - $ref: '#/components/schemas/callStateEnum' + $ref: "#/components/schemas/callStateEnum" redirectUrl: description: |- The URL to send the [Redirect](/docs/voice/bxml/redirect) event @@ -10121,7 +10122,7 @@ components: nullable: true type: string redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10143,7 +10144,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10175,7 +10176,7 @@ components: updateCallRecording: properties: state: - $ref: '#/components/schemas/recordingStateEnum' + $ref: "#/components/schemas/recordingStateEnum" required: - state type: object @@ -10267,7 +10268,7 @@ components: example: PT13.67S type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" channels: description: Always `1` for conference recordings; multi-channel recordings are not supported on conferences. @@ -10285,7 +10286,7 @@ components: format: date-time type: string fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" status: description: "The current status of the process. For recording, current\ \ possible values are 'processing', 'partial', 'complete', 'deleted',\ @@ -10303,7 +10304,7 @@ components: nullable: true type: string transcription: - $ref: '#/components/schemas/recordingTranscriptionMetadata' + $ref: "#/components/schemas/recordingTranscriptionMetadata" recordingName: description: A name to identify this recording. example: my-recording-name @@ -10360,7 +10361,7 @@ components: nullable: true type: string conferenceEventMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" tag: description: The custom string attached to the conference that will be sent with callbacks. @@ -10372,14 +10373,14 @@ components: A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). items: - $ref: '#/components/schemas/conferenceMember' + $ref: "#/components/schemas/conferenceMember" nullable: true type: array type: object updateConference: properties: status: - $ref: '#/components/schemas/conferenceStateEnum' + $ref: "#/components/schemas/conferenceStateEnum" redirectUrl: description: |- The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) @@ -10390,7 +10391,7 @@ components: nullable: true type: string redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10413,7 +10414,7 @@ components: nullable: true type: string redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10566,7 +10567,7 @@ components: format: date-time type: string fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" status: description: "The current status of the process. For recording, current\ \ possible values are 'processing', 'partial', 'complete', 'deleted',\ @@ -10596,7 +10597,7 @@ components: \ need more information." properties: mode: - $ref: '#/components/schemas/machineDetectionModeEnum' + $ref: "#/components/schemas/machineDetectionModeEnum" detectionTimeout: default: 15 description: |- @@ -10663,7 +10664,7 @@ components: nullable: true type: string callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10687,7 +10688,7 @@ components: nullable: true type: string fallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: description: Basic auth username. example: mySecretUsername @@ -10713,7 +10714,7 @@ components: format: uri type: string callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: description: Basic auth username. example: mySecretUsername @@ -10764,7 +10765,7 @@ components: properties: transcripts: items: - $ref: '#/components/schemas/transcription' + $ref: "#/components/schemas/transcription" type: array type: object callTranscriptionMetadataList: @@ -10773,7 +10774,7 @@ components: transcriptionName: live_transcription transcriptionUrl: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b items: - $ref: '#/components/schemas/callTranscriptionMetadata' + $ref: "#/components/schemas/callTranscriptionMetadata" type: array callTranscriptionMetadata: properties: @@ -10823,15 +10824,15 @@ components: transcript: Hello World! This is an example. confidence: 0.9 items: - $ref: '#/components/schemas/callTranscription' + $ref: "#/components/schemas/callTranscription" type: array type: object callTranscription: properties: detectedLanguage: - $ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum' + $ref: "#/components/schemas/callTranscriptionDetectedLanguageEnum" track: - $ref: '#/components/schemas/callTranscriptionTrackEnum' + $ref: "#/components/schemas/callTranscriptionTrackEnum" transcript: description: The transcription itself. example: Hello World! This is an example. @@ -10931,7 +10932,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -10966,7 +10967,7 @@ components: nullable: true type: string machineDetectionResult: - $ref: '#/components/schemas/machineDetectionResult' + $ref: "#/components/schemas/machineDetectionResult" type: object bridgeCompleteCallback: description: "If the target call leaves the , then this callback is\ @@ -11010,7 +11011,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11104,7 +11105,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11427,7 +11428,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" mediaUrl: description: The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. @@ -11493,7 +11494,7 @@ components: example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callUrl: description: The URL of the call associated with the event. example: https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11590,7 +11591,7 @@ components: example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" digit: description: The digit collected in the call. example: "2" @@ -11680,7 +11681,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11723,7 +11724,7 @@ components: terminatingDigit: description: (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. - example: '#' + example: "#" type: string transferCallerId: description: "The phone number used as the from field of the B-leg call,\ @@ -11783,7 +11784,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11799,9 +11800,9 @@ components: format: date-time type: string diversion: - $ref: '#/components/schemas/diversion' + $ref: "#/components/schemas/diversion" stirShaken: - $ref: '#/components/schemas/stirShaken' + $ref: "#/components/schemas/stirShaken" uui: description: "The value of the `User-To-User` header to send within the\ \ initial `INVITE`. Must include the encoding parameter as specified in\ @@ -11852,7 +11853,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11887,7 +11888,7 @@ components: nullable: true type: string machineDetectionResult: - $ref: '#/components/schemas/machineDetectionResult' + $ref: "#/components/schemas/machineDetectionResult" type: object recordingCompleteCallback: description: "The Record Complete event is sent after a verb has executed\ @@ -11930,7 +11931,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -11985,7 +11986,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" channels: description: Always `1` for conference recordings; multi-channel recordings are not supported on conferences. @@ -12048,7 +12049,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12097,7 +12098,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" channels: description: Always `1` for conference recordings; multi-channel recordings are not supported on conferences. @@ -12169,7 +12170,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12259,7 +12260,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12308,7 +12309,7 @@ components: example: PT13.67S type: string fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" tag: description: "(optional) The tag specified on call creation. If no tag was\ \ specified or it was previously cleared, this field will not be present." @@ -12316,7 +12317,7 @@ components: nullable: true type: string transcription: - $ref: '#/components/schemas/transcription' + $ref: "#/components/schemas/transcription" transferCallerId: description: "The phone number used as the from field of the B-leg call,\ \ in E.164 format (e.g. +15555555555)." @@ -12372,7 +12373,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12459,7 +12460,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12565,7 +12566,7 @@ components: example: "+15555555555" type: string direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: description: The call id associated with the event. example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 @@ -12709,7 +12710,7 @@ components: terminatingDigit: description: (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. - example: '#' + example: "#" type: string startTime: description: "Time the call was started, in ISO 8601 format." @@ -13068,7 +13069,7 @@ components: description: The phone number lookup request ID from Bandwidth. type: string status: - $ref: '#/components/schemas/lookupStatusEnum' + $ref: "#/components/schemas/lookupStatusEnum" type: object lookupStatus: description: "If requestId exists, the result for that request is returned.\ @@ -13106,12 +13107,12 @@ components: example: 004223a0-8b17-41b1-bf81-20732adf5590 type: string status: - $ref: '#/components/schemas/lookupStatusEnum' + $ref: "#/components/schemas/lookupStatusEnum" result: description: The carrier information results for the specified telephone number. items: - $ref: '#/components/schemas/lookupResult' + $ref: "#/components/schemas/lookupResult" type: array failedTelephoneNumbers: description: The telephone numbers whose lookup failed. @@ -13332,9 +13333,9 @@ components: verificationRequest: properties: businessAddress: - $ref: '#/components/schemas/address' + $ref: "#/components/schemas/address" businessContact: - $ref: '#/components/schemas/contact' + $ref: "#/components/schemas/contact" messageVolume: description: Estimated monthly volume of messages from the toll-free number. example: 10000 @@ -13343,7 +13344,7 @@ components: type: integer phoneNumbers: items: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" maxItems: 10 minItems: 1 type: array @@ -13368,7 +13369,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -13406,9 +13407,9 @@ components: nullable: true type: string businessRegistrationType: - $ref: '#/components/schemas/businessRegistrationTypeEnum' + $ref: "#/components/schemas/businessRegistrationTypeEnum" businessEntityType: - $ref: '#/components/schemas/businessEntityTypeEnum' + $ref: "#/components/schemas/businessEntityTypeEnum" helpMessageResponse: description: A message that gets sent to users requesting help. example: Please contact support for assistance. @@ -13432,9 +13433,9 @@ components: verificationUpdateRequest: properties: businessAddress: - $ref: '#/components/schemas/address' + $ref: "#/components/schemas/address" businessContact: - $ref: '#/components/schemas/contact' + $ref: "#/components/schemas/contact" messageVolume: description: Estimated monthly volume of messages from the toll-free number. example: 10000 @@ -13462,7 +13463,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -13500,9 +13501,9 @@ components: nullable: true type: string businessRegistrationType: - $ref: '#/components/schemas/businessRegistrationTypeEnum' + $ref: "#/components/schemas/businessRegistrationTypeEnum" businessEntityType: - $ref: '#/components/schemas/businessEntityTypeEnum' + $ref: "#/components/schemas/businessEntityTypeEnum" helpMessageResponse: description: A message that gets sent to users requesting help. example: Please contact support for assistance. @@ -13539,7 +13540,7 @@ components: webhookSubscriptionRequestSchema: properties: basicAuthentication: - $ref: '#/components/schemas/tfvBasicAuthentication' + $ref: "#/components/schemas/tfvBasicAuthentication" callbackUrl: description: "Callback URL to receive status updates from Bandwidth. When\ \ a webhook subscription is registered with Bandwidth under a given account\ @@ -13620,7 +13621,7 @@ components: reason: Reason B resubmitAllowed: true items: - $ref: '#/components/schemas/additionalDenialReason' + $ref: "#/components/schemas/additionalDenialReason" type: array declineReasonDescription: description: Explanation for why a verification request was declined. @@ -13681,7 +13682,7 @@ components: pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" type: string status: - $ref: '#/components/schemas/tfvCallbackStatusEnum' + $ref: "#/components/schemas/tfvCallbackStatusEnum" internalTicketNumber: description: Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. @@ -13704,7 +13705,7 @@ components: pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" type: string status: - $ref: '#/components/schemas/tfvCallbackStatusEnum' + $ref: "#/components/schemas/tfvCallbackStatusEnum" internalTicketNumber: description: Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. @@ -13725,7 +13726,7 @@ components: tfvSubmissionWrapper: properties: submission: - $ref: '#/components/schemas/verificationUpdateRequest' + $ref: "#/components/schemas/verificationUpdateRequest" type: object address: example: @@ -13983,14 +13984,14 @@ components: description: description properties: links: - $ref: '#/components/schemas/linksObject' + $ref: "#/components/schemas/linksObject" errors: items: - $ref: '#/components/schemas/error' + $ref: "#/components/schemas/error" type: array data: items: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" type: array required: - data @@ -14032,7 +14033,7 @@ components: type: string telephoneNumbers: items: - $ref: '#/components/schemas/telephoneNumber' + $ref: "#/components/schemas/telephoneNumber" type: array type: object telephoneNumber: @@ -14083,9 +14084,9 @@ components: b([-a-zA-Z0-9@:%_\\+.~#()?&//=]*)" type: string type: - $ref: '#/components/schemas/webhookSubscriptionTypeEnum' + $ref: "#/components/schemas/webhookSubscriptionTypeEnum" basicAuthentication: - $ref: '#/components/schemas/webhookSubscription_basicAuthentication' + $ref: "#/components/schemas/webhookSubscription_basicAuthentication" createdDate: example: 2023-05-15T13:56:39.965Z format: date-time @@ -14186,7 +14187,7 @@ components: pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" type: string status: - $ref: '#/components/schemas/tfvStatusEnum' + $ref: "#/components/schemas/tfvStatusEnum" internalTicketNumber: description: Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all @@ -14216,7 +14217,7 @@ components: format: date-time type: string submission: - $ref: '#/components/schemas/tfvSubmissionInfo' + $ref: "#/components/schemas/tfvSubmissionInfo" blocked: description: Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. @@ -14263,9 +14264,9 @@ components: useCaseSummary: Text summarizing the use case for the toll-free number properties: businessAddress: - $ref: '#/components/schemas/address' + $ref: "#/components/schemas/address" businessContact: - $ref: '#/components/schemas/contact' + $ref: "#/components/schemas/contact" messageVolume: description: Estimated monthly volume of messages from the toll-free number. example: 10000 @@ -14293,7 +14294,7 @@ components: nullable: false type: string optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: description: Any additional information. example: Any additional information @@ -14331,9 +14332,9 @@ components: nullable: true type: string businessRegistrationType: - $ref: '#/components/schemas/businessRegistrationTypeEnum' + $ref: "#/components/schemas/businessRegistrationTypeEnum" businessEntityType: - $ref: '#/components/schemas/businessEntityTypeEnum' + $ref: "#/components/schemas/businessEntityTypeEnum" type: object tfvStatusEnum: enum: @@ -14353,24 +14354,24 @@ components: type: string rbmCardContent_media: allOf: - - $ref: '#/components/schemas/rbmMessageContentFile' + - $ref: "#/components/schemas/rbmMessageContentFile" - properties: height: - $ref: '#/components/schemas/rbmMediaHeightEnum' + $ref: "#/components/schemas/rbmMediaHeightEnum" type: object required: - height multiChannelChannelListObject_content: description: The content of the message. oneOf: - - $ref: '#/components/schemas/rbmMessageContentText' - - $ref: '#/components/schemas/rbmMessageMedia' - - $ref: '#/components/schemas/rbmMessageContentRichCard' - - $ref: '#/components/schemas/smsMessageContent' - - $ref: '#/components/schemas/mmsMessageContent' + - $ref: "#/components/schemas/rbmMessageContentText" + - $ref: "#/components/schemas/rbmMessageMedia" + - $ref: "#/components/schemas/rbmMessageContentRichCard" + - $ref: "#/components/schemas/smsMessageContent" + - $ref: "#/components/schemas/mmsMessageContent" multiChannelMessageResponseData_channelList_inner: allOf: - - $ref: '#/components/schemas/multiChannelChannelListObject' + - $ref: "#/components/schemas/multiChannelChannelListObject" - properties: owner: description: The Bandwidth senderId associated with the message. Identical @@ -14432,4 +14433,10 @@ components: - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` scheme: basic type: http + OAuth2: + flows: + clientCredentials: + scopes: {} + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + type: oauth2 diff --git a/bandwidth.yml b/bandwidth.yml index 3cc990a7..084d00ad 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -9,6 +9,7 @@ info: version: 1.0.0 security: - Basic: [] + - OAuth2: [] tags: - name: Messages - name: Media @@ -8095,6 +8096,12 @@ components: - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` + OAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + scopes: {} callbacks: inboundCallback: '{inboundCallbackUrl}': diff --git a/build.gradle b/build.gradle index 315cc285..040aeb9b 100644 --- a/build.gradle +++ b/build.gradle @@ -106,15 +106,15 @@ ext { } dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' implementation "com.google.code.findbugs:jsr305:3.0.2" implementation 'com.squareup.okhttp3:okhttp:4.12.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' implementation 'com.google.code.gson:gson:2.9.1' implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' - implementation 'org.openapitools:jackson-databind-nullable:0.2.6' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0' + implementation 'org.openapitools:jackson-databind-nullable:0.2.7' + implementation group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.2' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' testImplementation 'org.mockito:mockito-core:3.12.4' diff --git a/build.sbt b/build.sbt index 5ddc6450..0f7c5bb9 100644 --- a/build.sbt +++ b/build.sbt @@ -3,19 +3,20 @@ lazy val root = (project in file(".")). organization := "com.bandwidth.sdk", name := "bandwidth-sdk", version := "1.0.0", - scalaVersion := "2.11.4", + scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), - javacOptions in compile ++= Seq("-Xlint:deprecation"), - publishArtifact in (Compile, packageDoc) := false, + compile / javacOptions ++= Seq("-Xlint:deprecation"), + Compile / packageDoc / publishArtifact := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( "io.swagger" % "swagger-annotations" % "1.6.5", "com.squareup.okhttp3" % "okhttp" % "4.12.0", "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", "com.google.code.gson" % "gson" % "2.9.1", - "org.apache.commons" % "commons-lang3" % "3.17.0", + "org.apache.commons" % "commons-lang3" % "3.18.0", "jakarta.ws.rs" % "jakarta.ws.rs-api" % "2.1.6", - "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "org.openapitools" % "jackson-databind-nullable" % "0.2.7", + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.2", "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", diff --git a/custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache b/custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache new file mode 100644 index 00000000..facbc974 --- /dev/null +++ b/custom_templates/libraries/okhttp-gson/auth/OAuthOkHttpClient.mustache @@ -0,0 +1,75 @@ +{{>licenseInfo}} + +{{#hasOAuthMethods}} +package {{invokerPackage}}.auth; + +import okhttp3.OkHttpClient; +import okhttp3.MediaType; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +public class OAuthOkHttpClient implements HttpClient { + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + @Override + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + headers = request.getHeaders(); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(request.getBody(), mediaType) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + response.headers().toMultimap(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + @Override + public void shutdown() { + // Nothing to do here + } +} +{{/hasOAuthMethods}} diff --git a/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache b/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache new file mode 100644 index 00000000..d68b69e6 --- /dev/null +++ b/custom_templates/libraries/okhttp-gson/auth/RetryingOAuth.mustache @@ -0,0 +1,220 @@ +{{>licenseInfo}} + +{{#hasOAuthMethods}} +package {{invokerPackage}}.auth; + +import {{invokerPackage}}.ApiException; +import {{invokerPackage}}.Pair; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URI; +import java.util.Map; +import java.util.List; +import java.util.Base64; + +public class RetryingOAuth extends OAuth implements Interceptor { + private OAuthClient oAuthClient; + + private TokenRequestBuilder tokenRequestBuilder; + + private String clientId; + private String clientSecret; + + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { + this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = tokenRequestBuilder; + } + + /** + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { + this(new OkHttpClient(), tokenRequestBuilder); + } + + /** + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ + public RetryingOAuth( + String tokenUrl, + String clientId, + OAuthFlow flow, + String clientSecret, + Map parameters + ) { + this(OAuthClientRequest.tokenLocation(tokenUrl)); + this.clientId = clientId; + this.clientSecret = clientSecret; + setFlow(flow); + if (parameters != null) { + for (Map.Entry entry : parameters.entrySet()) { + tokenRequestBuilder.setParameter(entry.getKey(), entry.getValue()); + } + } + } + + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ + public void setFlow(OAuthFlow flow) { + switch(flow) { + case ACCESS_CODE: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case IMPLICIT: + tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); + break; + case PASSWORD: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case APPLICATION: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) throws IOException { + return retryingIntercept(chain, true); + } + + private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { + Request request = chain.request(); + + // If the request already has an authorization (e.g. Basic auth), proceed with the request as is + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // Get the token if it has not yet been acquired + if (getAccessToken() == null) { + updateAccessToken(null); + } + + OAuthClientRequest oAuthRequest; + if (getAccessToken() != null) { + // Build the request + Request.Builder requestBuilder = request.newBuilder(); + + String requestAccessToken = getAccessToken(); + try { + oAuthRequest = + new OAuthBearerClientRequest(request.url().toString()). + setAccessToken(requestAccessToken). + buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + Map headers = oAuthRequest.getHeaders(); + for (Map.Entry entry : headers.entrySet()) { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + requestBuilder.url(oAuthRequest.getLocationUri()); + + // Execute the request + Response response = chain.proceed(requestBuilder.build()); + + // 401/403 response codes most likely indicate an expired access token, unless it happens two times in a row + if ( + response != null && + ( response.code() == HttpURLConnection.HTTP_UNAUTHORIZED || + response.code() == HttpURLConnection.HTTP_FORBIDDEN ) && + updateTokenAndRetryOnAuthorizationFailure + ) { + try { + if (updateAccessToken(requestAccessToken)) { + response.body().close(); + return retryingIntercept(chain, false); + } + } catch (Exception e) { + response.body().close(); + throw e; + } + } + return response; + } + else { + return chain.proceed(chain.request()); + } + } + + /** + * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthClientRequest req = tokenRequestBuilder.buildBodyMessage(); + String credentials = Base64.getEncoder().encodeToString((clientId + ":" + clientSecret).getBytes()); + req.setHeader("Authorization", "Basic " + credentials); + OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(req); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + } + } catch (OAuthSystemException | OAuthProblemException e) { + throw new IOException(e); + } + } + return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); + } + + /** + * Gets the token request builder + * + * @return A token request builder + */ + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + // Applying authorization to parameters is performed in the retryingIntercept method + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + // No implementation necessary + } +} +{{/hasOAuthMethods}} diff --git a/docs/CallsApi.md b/docs/CallsApi.md index 19512af8..2e9fd55f 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -39,6 +39,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CreateCall createCall = new CreateCall(); // CreateCall | JSON object containing information to create an outbound call @@ -69,7 +73,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -117,6 +121,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -147,7 +155,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -195,6 +203,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String to = "%2b19195551234"; // String | Filter results by the `to` field. @@ -237,7 +249,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -285,6 +297,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -316,7 +332,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -365,6 +381,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -399,7 +419,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/ConferencesApi.md b/docs/ConferencesApi.md index 74750e16..65124019 100644 --- a/docs/ConferencesApi.md +++ b/docs/ConferencesApi.md @@ -43,6 +43,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -75,7 +79,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -123,6 +127,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -153,7 +161,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -201,6 +209,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -233,7 +245,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -281,6 +293,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -313,7 +329,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -361,6 +377,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -391,7 +411,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -439,6 +459,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String name = "my-custom-name"; // String | Filter results by the `name` field. @@ -477,7 +501,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -525,6 +549,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -556,7 +584,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -604,6 +632,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -638,7 +670,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -686,6 +718,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + ConferencesApi apiInstance = new ConferencesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String conferenceId = "conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9"; // String | Programmable Voice API Conference ID. @@ -719,7 +755,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 427119ae..4a378ea0 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -38,6 +38,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. @@ -67,7 +71,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -115,6 +119,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. @@ -145,7 +153,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -193,6 +201,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String continuationToken = "1XEi2tsFtLo1JbtLwETnM1ZJ+PqAa8w6ENvC5QKvwyrCDYII663Gy5M4s40owR1tjkuWUif6qbWvFtQJR5/ipqbUnfAqL254LKNlPy6tATCzioKSuHuOqgzloDkSwRtX0LtcL2otHS69hK343m+SjdL+vlj71tT39"; // String | Continuation token used to retrieve subsequent media. @@ -223,7 +235,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -271,6 +283,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MediaApi apiInstance = new MediaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String mediaId = "14762070468292kw2fuqty55yp2b2/0/bw.png"; // String | Media ID to retrieve. @@ -306,7 +322,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 84135448..d10cc290 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -36,6 +36,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MessagesApi apiInstance = new MessagesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. MessageRequest messageRequest = new MessageRequest(); // MessageRequest | @@ -66,7 +70,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -115,6 +119,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MessagesApi apiInstance = new MessagesApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String messageId = "9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6"; // String | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. @@ -197,7 +205,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MfaApi.md b/docs/MfaApi.md index 34b407d2..ee184f93 100644 --- a/docs/MfaApi.md +++ b/docs/MfaApi.md @@ -37,6 +37,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MfaApi apiInstance = new MfaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. @@ -67,7 +71,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -111,6 +115,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MfaApi apiInstance = new MfaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. CodeRequest codeRequest = new CodeRequest(); // CodeRequest | MFA code request body. @@ -141,7 +149,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -185,6 +193,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MfaApi apiInstance = new MfaApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. VerifyCodeRequest verifyCodeRequest = new VerifyCodeRequest(); // VerifyCodeRequest | MFA code verify request body. @@ -215,7 +227,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md index 5a6e5307..39d4040b 100644 --- a/docs/MultiChannelApi.md +++ b/docs/MultiChannelApi.md @@ -35,6 +35,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + MultiChannelApi apiInstance = new MultiChannelApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. MultiChannelMessageRequest multiChannelMessageRequest = new MultiChannelMessageRequest(); // MultiChannelMessageRequest | @@ -65,7 +69,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/PhoneNumberLookupApi.md b/docs/PhoneNumberLookupApi.md index be6defa2..4ef1f76d 100644 --- a/docs/PhoneNumberLookupApi.md +++ b/docs/PhoneNumberLookupApi.md @@ -36,6 +36,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. LookupRequest lookupRequest = new LookupRequest(); // LookupRequest | Phone number lookup request. @@ -66,7 +70,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -112,6 +116,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + PhoneNumberLookupApi apiInstance = new PhoneNumberLookupApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String requestId = "004223a0-8b17-41b1-bf81-20732adf5590"; // String | The phone number lookup request ID from Bandwidth. @@ -142,7 +150,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/RecordingsApi.md b/docs/RecordingsApi.md index 42131b80..a4d479a5 100644 --- a/docs/RecordingsApi.md +++ b/docs/RecordingsApi.md @@ -44,6 +44,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -75,7 +79,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -123,6 +127,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -154,7 +162,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -202,6 +210,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -233,7 +245,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -281,6 +293,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -313,7 +329,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -361,6 +377,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -393,7 +413,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -441,6 +461,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -473,7 +497,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -521,6 +545,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String to = "%2b19195551234"; // String | Filter results by the `to` field. @@ -557,7 +585,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -605,6 +633,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -635,7 +667,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -683,6 +715,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -716,7 +752,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -764,6 +800,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + RecordingsApi apiInstance = new RecordingsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -795,7 +835,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index be38dbc8..269b3c12 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -35,6 +35,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + StatisticsApi apiInstance = new StatisticsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. try { @@ -63,7 +67,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md index 6323da6f..0b626836 100644 --- a/docs/StatusCallbackTypeEnum.md +++ b/docs/StatusCallbackTypeEnum.md @@ -5,13 +5,13 @@ ## Enum -* `SENDING` (value: `"message-sending"`) +* `MESSAGE_SENDING` (value: `"message-sending"`) -* `DELIVERED` (value: `"message-delivered"`) +* `MESSAGE_DELIVERED` (value: `"message-delivered"`) -* `FAILED` (value: `"message-failed"`) +* `MESSAGE_FAILED` (value: `"message-failed"`) -* `READ` (value: `"message-read"`) +* `MESSAGE_READ` (value: `"message-read"`) diff --git a/docs/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index 5f187578..b0e000f7 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -43,6 +43,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema = new WebhookSubscriptionRequestSchema(); // WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. @@ -73,7 +77,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -121,6 +125,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String phoneNumber = "+18885555555"; // String | Valid Toll-Free telephone number in E.164 format. @@ -150,7 +158,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -198,6 +206,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String id = "7bt57JcsVYJrN9K1OcV1Nu"; // String | Webhook subscription ID @@ -227,7 +239,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -275,6 +287,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String phoneNumber = "+18885555555"; // String | Valid Toll-Free telephone number in E.164 format. @@ -305,7 +321,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -353,6 +369,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); try { List result = apiInstance.listTollFreeUseCases(); @@ -377,7 +397,7 @@ This endpoint does not need any parameter. ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -425,6 +445,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. try { @@ -453,7 +477,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -500,6 +524,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. VerificationRequest verificationRequest = new VerificationRequest(); // VerificationRequest | Request for verification of a toll-free phone number. @@ -529,7 +557,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -576,6 +604,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String phoneNumber = "+18885555555"; // String | Valid Toll-Free telephone number in E.164 format. @@ -607,7 +639,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -654,6 +686,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TollFreeVerificationApi apiInstance = new TollFreeVerificationApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String id = "7bt57JcsVYJrN9K1OcV1Nu"; // String | Webhook subscription ID @@ -686,7 +722,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md index ec633266..35f434ef 100644 --- a/docs/TranscriptionsApi.md +++ b/docs/TranscriptionsApi.md @@ -37,6 +37,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TranscriptionsApi apiInstance = new TranscriptionsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -68,7 +72,7 @@ null (empty response body) ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -116,6 +120,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TranscriptionsApi apiInstance = new TranscriptionsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -148,7 +156,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers @@ -196,6 +204,10 @@ public class Example { Basic.setUsername("YOUR USERNAME"); Basic.setPassword("YOUR PASSWORD"); + // Configure OAuth2 access token for authorization: OAuth2 + OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2"); + OAuth2.setAccessToken("YOUR ACCESS TOKEN"); + TranscriptionsApi apiInstance = new TranscriptionsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. @@ -226,7 +238,7 @@ public class Example { ### Authorization -[Basic](../README.md#Basic) +[Basic](../README.md#Basic), [OAuth2](../README.md#OAuth2) ### HTTP request headers diff --git a/openapitools.json b/openapitools.json index f8d07ce1..8244df42 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.10.0" + "version": "7.16.0" } } diff --git a/pom.xml b/pom.xml index 1f42da35..98896dea 100644 --- a/pom.xml +++ b/pom.xml @@ -361,6 +361,11 @@ gson-fire ${gson-fire-version} + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.2 + org.apache.commons commons-lang3 diff --git a/src/main/java/com/bandwidth/sdk/ApiClient.java b/src/main/java/com/bandwidth/sdk/ApiClient.java index c2710180..f40a69a2 100644 --- a/src/main/java/com/bandwidth/sdk/ApiClient.java +++ b/src/main/java/com/bandwidth/sdk/ApiClient.java @@ -21,6 +21,8 @@ import okio.Buffer; import okio.BufferedSink; import okio.Okio; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.common.message.types.GrantType; import javax.net.ssl.*; import java.io.File; @@ -55,13 +57,16 @@ import com.bandwidth.sdk.auth.HttpBasicAuth; import com.bandwidth.sdk.auth.HttpBearerAuth; import com.bandwidth.sdk.auth.ApiKeyAuth; +import com.bandwidth.sdk.auth.OAuth; +import com.bandwidth.sdk.auth.RetryingOAuth; +import com.bandwidth.sdk.auth.OAuthFlow; /** *

ApiClient class.

*/ public class ApiClient { - private String basePath = "http://localhost"; + protected String basePath = "http://localhost"; protected List servers = new ArrayList(Arrays.asList( new ServerConfiguration( "", @@ -71,26 +76,26 @@ public class ApiClient { )); protected Integer serverIndex = 0; protected Map serverVariables = null; - private boolean debugging = false; - private Map defaultHeaderMap = new HashMap(); - private Map defaultCookieMap = new HashMap(); - private String tempFolderPath = null; + protected boolean debugging = false; + protected Map defaultHeaderMap = new HashMap(); + protected Map defaultCookieMap = new HashMap(); + protected String tempFolderPath = null; - private Map authentications; + protected Map authentications; - private DateFormat dateFormat; - private DateFormat datetimeFormat; - private boolean lenientDatetimeFormat; - private int dateLength; + protected DateFormat dateFormat; + protected DateFormat datetimeFormat; + protected boolean lenientDatetimeFormat; + protected int dateLength; - private InputStream sslCaCert; - private boolean verifyingSsl; - private KeyManager[] keyManagers; + protected InputStream sslCaCert; + protected boolean verifyingSsl; + protected KeyManager[] keyManagers; - private OkHttpClient httpClient; - private JSON json; + protected OkHttpClient httpClient; + protected JSON json; - private HttpLoggingInterceptor loggingInterceptor; + protected HttpLoggingInterceptor loggingInterceptor; /** * Basic constructor for ApiClient @@ -101,6 +106,7 @@ public ApiClient() { // Setup authentications (key: authentication name, value: authentication). authentications.put("Basic", new HttpBasicAuth()); + authentications.put("OAuth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -117,15 +123,83 @@ public ApiClient(OkHttpClient client) { // Setup authentications (key: authentication name, value: authentication). authentications.put("Basic", new HttpBasicAuth()); + authentications.put("OAuth2", new OAuth()); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } - private void initHttpClient() { + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID + * + * @param clientId client ID + */ + public ApiClient(String clientId) { + this(clientId, null, null); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID and additional parameters + * + * @param clientId client ID + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, Map parameters) { + this(clientId, null, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with client ID, secret, and additional parameters + * + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String clientId, String clientSecret, Map parameters) { + this(null, clientId, clientSecret, parameters); + } + + /** + * Constructor for ApiClient to support access token retry on 401/403 configured with base path, client ID, secret, and additional parameters + * + * @param basePath base path + * @param clientId client ID + * @param clientSecret client secret + * @param parameters a {@link java.util.Map} of parameters + */ + public ApiClient(String basePath, String clientId, String clientSecret, Map parameters) { + init(); + if (basePath != null) { + this.basePath = basePath; + } + + String tokenUrl = "https://api.bandwidth.com/api/v1/oauth2/token"; + if (!"".equals(tokenUrl) && !URI.create(tokenUrl).isAbsolute()) { + URI uri = URI.create(getBasePath()); + tokenUrl = uri.getScheme() + ":" + + (uri.getAuthority() != null ? "//" + uri.getAuthority() : "") + + tokenUrl; + if (!URI.create(tokenUrl).isAbsolute()) { + throw new IllegalArgumentException("OAuth2 token URL must be an absolute URL"); + } + } + RetryingOAuth retryingOAuth = new RetryingOAuth(tokenUrl, clientId, OAuthFlow.APPLICATION, clientSecret, parameters); + authentications.put( + "OAuth2", + retryingOAuth + ); + initHttpClient(Collections.singletonList(retryingOAuth)); + // Setup authentications (key: authentication name, value: authentication). + authentications.put("Basic", new HttpBasicAuth()); + + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + protected void initHttpClient() { initHttpClient(Collections.emptyList()); } - private void initHttpClient(List interceptors) { + protected void initHttpClient(List interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); for (Interceptor interceptor: interceptors) { @@ -135,7 +209,7 @@ private void initHttpClient(List interceptors) { httpClient = builder.build(); } - private void init() { + protected void init() { verifyingSsl = true; json = new JSON(); @@ -158,8 +232,8 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g http://localhost - * @return An instance of OkHttpClient + * @param basePath Base path of the URL (e.g http://localhost) + * @return An instance of ApiClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; @@ -207,7 +281,7 @@ public OkHttpClient getHttpClient() { * Set HTTP client, which must never be null. * * @param newHttpClient An instance of OkHttpClient - * @return Api Client + * @return ApiClient * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { @@ -452,6 +526,12 @@ public void setApiKeyPrefix(String apiKeyPrefix) { * @param accessToken Access token */ public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } throw new RuntimeException("No OAuth2 authentication configured!"); } @@ -636,6 +716,20 @@ public ApiClient setWriteTimeout(int writeTimeout) { return this; } + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for (Authentication apiAuth : authentications.values()) { + if (apiAuth instanceof RetryingOAuth) { + RetryingOAuth retryingOAuth = (RetryingOAuth) apiAuth; + return retryingOAuth.getTokenRequestBuilder(); + } + } + return null; + } /** * Format the given parameter object into string. @@ -695,7 +789,7 @@ public List parameterToPair(String name, Object value) { * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ - public List parameterToPairs(String collectionFormat, String name, Collection value) { + public List parameterToPairs(String collectionFormat, String name, Collection value) { List params = new ArrayList(); // preconditions @@ -802,7 +896,7 @@ public String collectionPathParameterToString(String collectionFormat, Collectio * @return The sanitized filename */ public String sanitizeFilename(String filename) { - return filename.replaceAll(".*[/\\\\]", ""); + return filename.replaceFirst("^.*[/\\\\]", ""); } /** @@ -912,17 +1006,8 @@ public T deserialize(Response response, Type returnType) throws ApiException return (T) downloadFileFromResponse(response); } - String respBody; - try { - if (response.body() != null) - respBody = response.body().string(); - else - respBody = null; - } catch (IOException e) { - throw new ApiException(e); - } - - if (respBody == null || "".equals(respBody)) { + ResponseBody respBody = response.body(); + if (respBody == null) { return null; } @@ -931,17 +1016,25 @@ public T deserialize(Response response, Type returnType) throws ApiException // ensuring a default content type contentType = "application/json"; } - if (isJsonMime(contentType)) { - return JSON.deserialize(respBody, returnType); - } else if (returnType.equals(String.class)) { - // Expecting string, return the raw response body. - return (T) respBody; - } else { - throw new ApiException( + try { + if (isJsonMime(contentType)) { + return JSON.deserialize(respBody.byteStream(), returnType); + } else if (returnType.equals(String.class)) { + String respBodyString = respBody.string(); + if (respBodyString.isEmpty()) { + return null; + } + // Expecting string, return the raw response body. + return (T) respBodyString; + } else { + throw new ApiException( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), - respBody); + response.body().string()); + } + } catch (IOException e) { + throw new ApiException(e); } } @@ -1268,7 +1361,8 @@ public String buildUrl(String baseUrl, String path, List queryParams, List if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { throw new ArrayIndexOutOfBoundsException(String.format( - "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + Locale.ROOT, + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } baseURL = servers.get(serverIndex).URL(serverVariables); @@ -1340,11 +1434,11 @@ public void processHeaderParams(Map headerParams, Request.Builde */ public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { for (Entry param : cookieParams.entrySet()) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } for (Entry param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { - reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + reqBuilder.addHeader("Cookie", String.format(Locale.ROOT, "%s=%s", param.getKey(), param.getValue())); } } } @@ -1437,7 +1531,7 @@ public String guessContentTypeFromFile(File file) { * @param key The key of the Header element * @param file The file to add to the Header */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); @@ -1450,7 +1544,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k * @param key The key of the Header element * @param obj The complex object to add to the Header */ - private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); @@ -1472,7 +1566,7 @@ private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String k * Get network interceptor to add it to the httpClient to track download progress for * async requests. */ - private Interceptor getProgressInterceptor() { + protected Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { @@ -1493,7 +1587,7 @@ public Response intercept(Interceptor.Chain chain) throws IOException { * Apply SSL related settings to httpClient according to the current values of * verifyingSsl and sslCaCert. */ - private void applySslSettings() { + protected void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; @@ -1555,7 +1649,7 @@ public boolean verify(String hostname, SSLSession session) { } } - private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); @@ -1572,7 +1666,7 @@ private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityExcepti * @return The string representation of the HTTP request body * @throws com.bandwidth.sdk.ApiException If fail to serialize the request body object into a string */ - private String requestBodyToString(RequestBody requestBody) throws ApiException { + protected String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { final Buffer buffer = new Buffer(); diff --git a/src/main/java/com/bandwidth/sdk/ApiException.java b/src/main/java/com/bandwidth/sdk/ApiException.java index 1bb97746..224b7e95 100644 --- a/src/main/java/com/bandwidth/sdk/ApiException.java +++ b/src/main/java/com/bandwidth/sdk/ApiException.java @@ -15,13 +15,14 @@ import java.util.Map; import java.util.List; +import java.util.Locale; /** *

ApiException class.

*/ @SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; @@ -161,7 +162,7 @@ public String getResponseBody() { * @return The exception message */ public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + return String.format(Locale.ROOT, "Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); } } diff --git a/src/main/java/com/bandwidth/sdk/Configuration.java b/src/main/java/com/bandwidth/sdk/Configuration.java index 57fcf592..9f6ba07e 100644 --- a/src/main/java/com/bandwidth/sdk/Configuration.java +++ b/src/main/java/com/bandwidth/sdk/Configuration.java @@ -13,29 +13,51 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +import java.util.Objects; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Supplier; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Configuration { - public static final String VERSION = "1.0.0"; - - private static ApiClient defaultApiClient = new ApiClient(); - - /** - * Get the default API client, which would be used when creating API - * instances without providing an API client. - * - * @return Default API client - */ - public static ApiClient getDefaultApiClient() { - return defaultApiClient; - } + public static final String VERSION = "1.0.0"; + + private static final AtomicReference defaultApiClient = new AtomicReference<>(); + private static volatile Supplier apiClientFactory = ApiClient::new; - /** - * Set the default API client, which would be used when creating API - * instances without providing an API client. - * - * @param apiClient API client - */ - public static void setDefaultApiClient(ApiClient apiClient) { - defaultApiClient = apiClient; + /** + * Get the default API client, which would be used when creating API instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + ApiClient client = defaultApiClient.get(); + if (client == null) { + client = defaultApiClient.updateAndGet(val -> { + if (val != null) { // changed by another thread + return val; + } + return apiClientFactory.get(); + }); } -} + return client; + } + + /** + * Set the default API client, which would be used when creating API instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient.set(apiClient); + } + + /** + * set the callback used to create new ApiClient objects + */ + public static void setApiClientFactory(Supplier factory) { + apiClientFactory = Objects.requireNonNull(factory); + } + + private Configuration() { + } +} \ No newline at end of file diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index 90740687..1e4c3dae 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -27,8 +27,11 @@ import okio.ByteString; import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; import java.io.StringReader; import java.lang.reflect.Type; +import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; @@ -69,8 +72,6 @@ public Class getClassForElement(Json classByDiscriminatorValue.put("message-sent", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("request-location-response", com.bandwidth.sdk.model.InboundCallback.class); classByDiscriminatorValue.put("suggestion-response", com.bandwidth.sdk.model.InboundCallback.class); - classByDiscriminatorValue.put("inboundCallback", com.bandwidth.sdk.model.InboundCallback.class); - classByDiscriminatorValue.put("statusCallback", com.bandwidth.sdk.model.StatusCallback.class); classByDiscriminatorValue.put("callback", com.bandwidth.sdk.model.Callback.class); return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "type")); @@ -86,11 +87,6 @@ public Class getClassForEl classByDiscriminatorValue.put("REPLY", com.bandwidth.sdk.model.RbmActionBase.class); classByDiscriminatorValue.put("REQUEST_LOCATION", com.bandwidth.sdk.model.RbmActionBase.class); classByDiscriminatorValue.put("SHOW_LOCATION", com.bandwidth.sdk.model.RbmActionViewLocation.class); - classByDiscriminatorValue.put("multiChannelActionCalendarEvent", com.bandwidth.sdk.model.MultiChannelActionCalendarEvent.class); - classByDiscriminatorValue.put("rbmActionBase", com.bandwidth.sdk.model.RbmActionBase.class); - classByDiscriminatorValue.put("rbmActionDial", com.bandwidth.sdk.model.RbmActionDial.class); - classByDiscriminatorValue.put("rbmActionOpenUrl", com.bandwidth.sdk.model.RbmActionOpenUrl.class); - classByDiscriminatorValue.put("rbmActionViewLocation", com.bandwidth.sdk.model.RbmActionViewLocation.class); classByDiscriminatorValue.put("multiChannelAction", com.bandwidth.sdk.model.MultiChannelAction.class); return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "type")); @@ -320,6 +316,28 @@ public static T deserialize(String body, Type returnType) { } } + /** + * Deserialize the given JSON InputStream to a Java object. + * + * @param Type + * @param inputStream The JSON InputStream + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public static T deserialize(InputStream inputStream, Type returnType) throws IOException { + try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { + if (isLenientOnJson) { + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + JsonReader jsonReader = new JsonReader(reader); + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(reader, returnType); + } + } + } + /** * Gson TypeAdapter for Byte Array type */ diff --git a/src/main/java/com/bandwidth/sdk/Pair.java b/src/main/java/com/bandwidth/sdk/Pair.java index a04697ce..50857528 100644 --- a/src/main/java/com/bandwidth/sdk/Pair.java +++ b/src/main/java/com/bandwidth/sdk/Pair.java @@ -13,45 +13,25 @@ package com.bandwidth.sdk; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Pair { - private String name = ""; - private String value = ""; + private final String name; + private final String value; - public Pair (String name, String value) { - setName(name); - setValue(value); - } + public Pair(String name, String value) { + this.name = isValidString(name) ? name : ""; + this.value = isValidString(value) ? value : ""; + } - private void setName(String name) { - if (!isValidString(name)) { - return; - } + public String getName() { + return this.name; + } - this.name = name; - } + public String getValue() { + return this.value; + } - private void setValue(String value) { - if (!isValidString(value)) { - return; - } - - this.value = value; - } - - public String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - return true; - } + private static boolean isValidString(String arg) { + return arg != null; + } } diff --git a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java index c74fbd03..34225b69 100644 --- a/src/main/java/com/bandwidth/sdk/ServerConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/ServerConfiguration.java @@ -18,7 +18,7 @@ /** * Representing a Server configuration. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ServerConfiguration { public String URL; public String description; diff --git a/src/main/java/com/bandwidth/sdk/ServerVariable.java b/src/main/java/com/bandwidth/sdk/ServerVariable.java index beaab482..300fe0f3 100644 --- a/src/main/java/com/bandwidth/sdk/ServerVariable.java +++ b/src/main/java/com/bandwidth/sdk/ServerVariable.java @@ -18,7 +18,7 @@ /** * Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/src/main/java/com/bandwidth/sdk/StringUtil.java b/src/main/java/com/bandwidth/sdk/StringUtil.java index 6ef9eb8c..599cf3a2 100644 --- a/src/main/java/com/bandwidth/sdk/StringUtil.java +++ b/src/main/java/com/bandwidth/sdk/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/bandwidth/sdk/api/CallsApi.java b/src/main/java/com/bandwidth/sdk/api/CallsApi.java index c80844d8..52de6ace 100644 --- a/src/main/java/com/bandwidth/sdk/api/CallsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/CallsApi.java @@ -98,7 +98,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createCallCall(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCallCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -140,12 +140,12 @@ public okhttp3.Call createCallCall(String accountId, CreateCall createCall, fina localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createCallValidateBeforeCall(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createCallValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createCall(Async)"); @@ -182,7 +182,7 @@ private okhttp3.Call createCallValidateBeforeCall(String accountId, CreateCall c 500 Internal Server Error - */ - public CreateCallResponse createCall(String accountId, CreateCall createCall) throws ApiException { + public CreateCallResponse createCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall) throws ApiException { ApiResponse localVarResp = createCallWithHttpInfo(accountId, createCall); return localVarResp.getData(); } @@ -209,7 +209,7 @@ public CreateCallResponse createCall(String accountId, CreateCall createCall) th 500 Internal Server Error - */ - public ApiResponse createCallWithHttpInfo(String accountId, CreateCall createCall) throws ApiException { + public ApiResponse createCallWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall) throws ApiException { okhttp3.Call localVarCall = createCallValidateBeforeCall(accountId, createCall, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -238,7 +238,7 @@ public ApiResponse createCallWithHttpInfo(String accountId, 500 Internal Server Error - */ - public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createCallAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CreateCall createCall, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createCallValidateBeforeCall(accountId, createCall, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -267,7 +267,7 @@ public okhttp3.Call createCallAsync(String accountId, CreateCall createCall, fin 500 Internal Server Error - */ - public okhttp3.Call getCallStateCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallStateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -309,12 +309,12 @@ public okhttp3.Call getCallStateCall(String accountId, String callId, final ApiC localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCallStateValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCallStateValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getCallState(Async)"); @@ -351,7 +351,7 @@ private okhttp3.Call getCallStateValidateBeforeCall(String accountId, String cal 500 Internal Server Error - */ - public CallState getCallState(String accountId, String callId) throws ApiException { + public CallState getCallState(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { ApiResponse localVarResp = getCallStateWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -378,7 +378,7 @@ public CallState getCallState(String accountId, String callId) throws ApiExcepti 500 Internal Server Error - */ - public ApiResponse getCallStateWithHttpInfo(String accountId, String callId) throws ApiException { + public ApiResponse getCallStateWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { okhttp3.Call localVarCall = getCallStateValidateBeforeCall(accountId, callId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -407,7 +407,7 @@ public ApiResponse getCallStateWithHttpInfo(String accountId, String 500 Internal Server Error - */ - public okhttp3.Call getCallStateAsync(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallStateAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCallStateValidateBeforeCall(accountId, callId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -442,7 +442,7 @@ public okhttp3.Call getCallStateAsync(String accountId, String callId, final Api 500 Internal Server Error - */ - public okhttp3.Call listCallsCall(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listCallsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -511,12 +511,12 @@ public okhttp3.Call listCallsCall(String accountId, String to, String from, Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listCallsValidateBeforeCall(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listCallsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listCalls(Async)"); @@ -554,7 +554,7 @@ private okhttp3.Call listCallsValidateBeforeCall(String accountId, String to, St 500 Internal Server Error - */ - public List listCalls(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException { + public List listCalls(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { ApiResponse> localVarResp = listCallsWithHttpInfo(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken); return localVarResp.getData(); } @@ -587,7 +587,7 @@ public List listCalls(String accountId, String to, String from, Strin 500 Internal Server Error - */ - public ApiResponse> listCallsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken) throws ApiException { + public ApiResponse> listCallsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { okhttp3.Call localVarCall = listCallsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -622,7 +622,7 @@ public ApiResponse> listCallsWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call listCallsAsync(String accountId, String to, String from, String minStartTime, String maxStartTime, String disconnectCause, Integer pageSize, String pageToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listCallsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, @javax.annotation.Nullable String disconnectCause, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listCallsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, disconnectCause, pageSize, pageToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -653,7 +653,7 @@ public okhttp3.Call listCallsAsync(String accountId, String to, String from, Str 500 Internal Server Error - */ - public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -696,12 +696,12 @@ public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall u localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCall(Async)"); @@ -744,7 +744,7 @@ private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callI 500 Internal Server Error - */ - public void updateCall(String accountId, String callId, UpdateCall updateCall) throws ApiException { + public void updateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall) throws ApiException { updateCallWithHttpInfo(accountId, callId, updateCall); } @@ -772,7 +772,7 @@ public void updateCall(String accountId, String callId, UpdateCall updateCall) t 500 Internal Server Error - */ - public ApiResponse updateCallWithHttpInfo(String accountId, String callId, UpdateCall updateCall) throws ApiException { + public ApiResponse updateCallWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall) throws ApiException { okhttp3.Call localVarCall = updateCallValidateBeforeCall(accountId, callId, updateCall, null); return localVarApiClient.execute(localVarCall); } @@ -802,7 +802,7 @@ public ApiResponse updateCallWithHttpInfo(String accountId, String callId, 500 Internal Server Error - */ - public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall updateCall, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCall updateCall, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCallValidateBeforeCall(accountId, callId, updateCall, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -832,7 +832,7 @@ public okhttp3.Call updateCallAsync(String accountId, String callId, UpdateCall 500 Internal Server Error - */ - public okhttp3.Call updateCallBxmlCall(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallBxmlCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -875,12 +875,12 @@ public okhttp3.Call updateCallBxmlCall(String accountId, String callId, String b localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallBxmlValidateBeforeCall(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallBxmlValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCallBxml(Async)"); @@ -923,7 +923,7 @@ private okhttp3.Call updateCallBxmlValidateBeforeCall(String accountId, String c 500 Internal Server Error - */ - public void updateCallBxml(String accountId, String callId, String body) throws ApiException { + public void updateCallBxml(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body) throws ApiException { updateCallBxmlWithHttpInfo(accountId, callId, body); } @@ -951,7 +951,7 @@ public void updateCallBxml(String accountId, String callId, String body) throws 500 Internal Server Error - */ - public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String callId, String body) throws ApiException { + public ApiResponse updateCallBxmlWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body) throws ApiException { okhttp3.Call localVarCall = updateCallBxmlValidateBeforeCall(accountId, callId, body, null); return localVarApiClient.execute(localVarCall); } @@ -981,7 +981,7 @@ public ApiResponse updateCallBxmlWithHttpInfo(String accountId, String cal 500 Internal Server Error - */ - public okhttp3.Call updateCallBxmlAsync(String accountId, String callId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallBxmlAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCallBxmlValidateBeforeCall(accountId, callId, body, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java b/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java index aaf24a61..23ca9f91 100644 --- a/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/ConferencesApi.java @@ -101,7 +101,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call downloadConferenceRecordingCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConferenceRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -146,12 +146,12 @@ public okhttp3.Call downloadConferenceRecordingCall(String accountId, String con localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling downloadConferenceRecording(Async)"); @@ -194,7 +194,7 @@ private okhttp3.Call downloadConferenceRecordingValidateBeforeCall(String accoun 500 Internal Server Error - */ - public File downloadConferenceRecording(String accountId, String conferenceId, String recordingId) throws ApiException { + public File downloadConferenceRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = downloadConferenceRecordingWithHttpInfo(accountId, conferenceId, recordingId); return localVarResp.getData(); } @@ -222,7 +222,7 @@ public File downloadConferenceRecording(String accountId, String conferenceId, S 500 Internal Server Error - */ - public ApiResponse downloadConferenceRecordingWithHttpInfo(String accountId, String conferenceId, String recordingId) throws ApiException { + public ApiResponse downloadConferenceRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = downloadConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -252,7 +252,7 @@ public ApiResponse downloadConferenceRecordingWithHttpInfo(String accountI 500 Internal Server Error - */ - public okhttp3.Call downloadConferenceRecordingAsync(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadConferenceRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -281,7 +281,7 @@ public okhttp3.Call downloadConferenceRecordingAsync(String accountId, String co 500 Internal Server Error - */ - public okhttp3.Call getConferenceCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -323,12 +323,12 @@ public okhttp3.Call getConferenceCall(String accountId, String conferenceId, fin localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceValidateBeforeCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getConference(Async)"); @@ -365,7 +365,7 @@ private okhttp3.Call getConferenceValidateBeforeCall(String accountId, String co 500 Internal Server Error - */ - public Conference getConference(String accountId, String conferenceId) throws ApiException { + public Conference getConference(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { ApiResponse localVarResp = getConferenceWithHttpInfo(accountId, conferenceId); return localVarResp.getData(); } @@ -392,7 +392,7 @@ public Conference getConference(String accountId, String conferenceId) throws Ap 500 Internal Server Error - */ - public ApiResponse getConferenceWithHttpInfo(String accountId, String conferenceId) throws ApiException { + public ApiResponse getConferenceWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { okhttp3.Call localVarCall = getConferenceValidateBeforeCall(accountId, conferenceId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -421,7 +421,7 @@ public ApiResponse getConferenceWithHttpInfo(String accountId, Strin 500 Internal Server Error - */ - public okhttp3.Call getConferenceAsync(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConferenceValidateBeforeCall(accountId, conferenceId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -451,7 +451,7 @@ public okhttp3.Call getConferenceAsync(String accountId, String conferenceId, fi 500 Internal Server Error - */ - public okhttp3.Call getConferenceMemberCall(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceMemberCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -494,12 +494,12 @@ public okhttp3.Call getConferenceMemberCall(String accountId, String conferenceI localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceMemberValidateBeforeCall(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceMemberValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getConferenceMember(Async)"); @@ -542,7 +542,7 @@ private okhttp3.Call getConferenceMemberValidateBeforeCall(String accountId, Str 500 Internal Server Error - */ - public ConferenceMember getConferenceMember(String accountId, String conferenceId, String memberId) throws ApiException { + public ConferenceMember getConferenceMember(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId) throws ApiException { ApiResponse localVarResp = getConferenceMemberWithHttpInfo(accountId, conferenceId, memberId); return localVarResp.getData(); } @@ -570,7 +570,7 @@ public ConferenceMember getConferenceMember(String accountId, String conferenceI 500 Internal Server Error - */ - public ApiResponse getConferenceMemberWithHttpInfo(String accountId, String conferenceId, String memberId) throws ApiException { + public ApiResponse getConferenceMemberWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId) throws ApiException { okhttp3.Call localVarCall = getConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -600,7 +600,7 @@ public ApiResponse getConferenceMemberWithHttpInfo(String acco 500 Internal Server Error - */ - public okhttp3.Call getConferenceMemberAsync(String accountId, String conferenceId, String memberId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceMemberAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -630,7 +630,7 @@ public okhttp3.Call getConferenceMemberAsync(String accountId, String conference 500 Internal Server Error - */ - public okhttp3.Call getConferenceRecordingCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -673,12 +673,12 @@ public okhttp3.Call getConferenceRecordingCall(String accountId, String conferen localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getConferenceRecordingValidateBeforeCall(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getConferenceRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getConferenceRecording(Async)"); @@ -721,7 +721,7 @@ private okhttp3.Call getConferenceRecordingValidateBeforeCall(String accountId, 500 Internal Server Error - */ - public ConferenceRecordingMetadata getConferenceRecording(String accountId, String conferenceId, String recordingId) throws ApiException { + public ConferenceRecordingMetadata getConferenceRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = getConferenceRecordingWithHttpInfo(accountId, conferenceId, recordingId); return localVarResp.getData(); } @@ -749,7 +749,7 @@ public ConferenceRecordingMetadata getConferenceRecording(String accountId, Stri 500 Internal Server Error - */ - public ApiResponse getConferenceRecordingWithHttpInfo(String accountId, String conferenceId, String recordingId) throws ApiException { + public ApiResponse getConferenceRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = getConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -779,7 +779,7 @@ public ApiResponse getConferenceRecordingWithHttpIn 500 Internal Server Error - */ - public okhttp3.Call getConferenceRecordingAsync(String accountId, String conferenceId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getConferenceRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getConferenceRecordingValidateBeforeCall(accountId, conferenceId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -808,7 +808,7 @@ public okhttp3.Call getConferenceRecordingAsync(String accountId, String confere 500 Internal Server Error - */ - public okhttp3.Call listConferenceRecordingsCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listConferenceRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -850,12 +850,12 @@ public okhttp3.Call listConferenceRecordingsCall(String accountId, String confer localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listConferenceRecordingsValidateBeforeCall(String accountId, String conferenceId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listConferenceRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listConferenceRecordings(Async)"); @@ -892,7 +892,7 @@ private okhttp3.Call listConferenceRecordingsValidateBeforeCall(String accountId 500 Internal Server Error - */ - public List listConferenceRecordings(String accountId, String conferenceId) throws ApiException { + public List listConferenceRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { ApiResponse> localVarResp = listConferenceRecordingsWithHttpInfo(accountId, conferenceId); return localVarResp.getData(); } @@ -919,7 +919,7 @@ public List listConferenceRecordings(String account 500 Internal Server Error - */ - public ApiResponse> listConferenceRecordingsWithHttpInfo(String accountId, String conferenceId) throws ApiException { + public ApiResponse> listConferenceRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId) throws ApiException { okhttp3.Call localVarCall = listConferenceRecordingsValidateBeforeCall(accountId, conferenceId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -948,7 +948,7 @@ public ApiResponse> listConferenceRecordingsWi 500 Internal Server Error - */ - public okhttp3.Call listConferenceRecordingsAsync(String accountId, String conferenceId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listConferenceRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listConferenceRecordingsValidateBeforeCall(accountId, conferenceId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -981,7 +981,7 @@ public okhttp3.Call listConferenceRecordingsAsync(String accountId, String confe 500 Internal Server Error - */ - public okhttp3.Call listConferencesCall(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listConferencesCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1042,12 +1042,12 @@ public okhttp3.Call listConferencesCall(String accountId, String name, String mi localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listConferencesValidateBeforeCall(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listConferencesValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listConferences(Async)"); @@ -1083,7 +1083,7 @@ private okhttp3.Call listConferencesValidateBeforeCall(String accountId, String 500 Internal Server Error - */ - public List listConferences(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken) throws ApiException { + public List listConferences(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { ApiResponse> localVarResp = listConferencesWithHttpInfo(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken); return localVarResp.getData(); } @@ -1114,7 +1114,7 @@ public List listConferences(String accountId, String name, String mi 500 Internal Server Error - */ - public ApiResponse> listConferencesWithHttpInfo(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken) throws ApiException { + public ApiResponse> listConferencesWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken) throws ApiException { okhttp3.Call localVarCall = listConferencesValidateBeforeCall(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1147,7 +1147,7 @@ public ApiResponse> listConferencesWithHttpInfo(String accountI 500 Internal Server Error - */ - public okhttp3.Call listConferencesAsync(String accountId, String name, String minCreatedTime, String maxCreatedTime, Integer pageSize, String pageToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listConferencesAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String minCreatedTime, @javax.annotation.Nullable String maxCreatedTime, @javax.annotation.Nullable Integer pageSize, @javax.annotation.Nullable String pageToken, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listConferencesValidateBeforeCall(accountId, name, minCreatedTime, maxCreatedTime, pageSize, pageToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1177,7 +1177,7 @@ public okhttp3.Call listConferencesAsync(String accountId, String name, String m 500 Internal Server Error - */ - public okhttp3.Call updateConferenceCall(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1220,12 +1220,12 @@ public okhttp3.Call updateConferenceCall(String accountId, String conferenceId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceValidateBeforeCall(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateConference(Async)"); @@ -1267,7 +1267,7 @@ private okhttp3.Call updateConferenceValidateBeforeCall(String accountId, String 500 Internal Server Error - */ - public void updateConference(String accountId, String conferenceId, UpdateConference updateConference) throws ApiException { + public void updateConference(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference) throws ApiException { updateConferenceWithHttpInfo(accountId, conferenceId, updateConference); } @@ -1294,7 +1294,7 @@ public void updateConference(String accountId, String conferenceId, UpdateConfer 500 Internal Server Error - */ - public ApiResponse updateConferenceWithHttpInfo(String accountId, String conferenceId, UpdateConference updateConference) throws ApiException { + public ApiResponse updateConferenceWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference) throws ApiException { okhttp3.Call localVarCall = updateConferenceValidateBeforeCall(accountId, conferenceId, updateConference, null); return localVarApiClient.execute(localVarCall); } @@ -1323,7 +1323,7 @@ public ApiResponse updateConferenceWithHttpInfo(String accountId, String c 500 Internal Server Error - */ - public okhttp3.Call updateConferenceAsync(String accountId, String conferenceId, UpdateConference updateConference, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull UpdateConference updateConference, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConferenceValidateBeforeCall(accountId, conferenceId, updateConference, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1352,7 +1352,7 @@ public okhttp3.Call updateConferenceAsync(String accountId, String conferenceId, 500 Internal Server Error - */ - public okhttp3.Call updateConferenceBxmlCall(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceBxmlCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1395,12 +1395,12 @@ public okhttp3.Call updateConferenceBxmlCall(String accountId, String conference localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceBxmlValidateBeforeCall(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceBxmlValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateConferenceBxml(Async)"); @@ -1442,7 +1442,7 @@ private okhttp3.Call updateConferenceBxmlValidateBeforeCall(String accountId, St 500 Internal Server Error - */ - public void updateConferenceBxml(String accountId, String conferenceId, String body) throws ApiException { + public void updateConferenceBxml(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body) throws ApiException { updateConferenceBxmlWithHttpInfo(accountId, conferenceId, body); } @@ -1469,7 +1469,7 @@ public void updateConferenceBxml(String accountId, String conferenceId, String b 500 Internal Server Error - */ - public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, String conferenceId, String body) throws ApiException { + public ApiResponse updateConferenceBxmlWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body) throws ApiException { okhttp3.Call localVarCall = updateConferenceBxmlValidateBeforeCall(accountId, conferenceId, body, null); return localVarApiClient.execute(localVarCall); } @@ -1498,7 +1498,7 @@ public ApiResponse updateConferenceBxmlWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call updateConferenceBxmlAsync(String accountId, String conferenceId, String body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceBxmlAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConferenceBxmlValidateBeforeCall(accountId, conferenceId, body, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1528,7 +1528,7 @@ public okhttp3.Call updateConferenceBxmlAsync(String accountId, String conferenc 500 Internal Server Error - */ - public okhttp3.Call updateConferenceMemberCall(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceMemberCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1572,12 +1572,12 @@ public okhttp3.Call updateConferenceMemberCall(String accountId, String conferen localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateConferenceMemberValidateBeforeCall(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateConferenceMemberValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateConferenceMember(Async)"); @@ -1625,7 +1625,7 @@ private okhttp3.Call updateConferenceMemberValidateBeforeCall(String accountId, 500 Internal Server Error - */ - public void updateConferenceMember(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember) throws ApiException { + public void updateConferenceMember(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember) throws ApiException { updateConferenceMemberWithHttpInfo(accountId, conferenceId, memberId, updateConferenceMember); } @@ -1653,7 +1653,7 @@ public void updateConferenceMember(String accountId, String conferenceId, String 500 Internal Server Error - */ - public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember) throws ApiException { + public ApiResponse updateConferenceMemberWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember) throws ApiException { okhttp3.Call localVarCall = updateConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, updateConferenceMember, null); return localVarApiClient.execute(localVarCall); } @@ -1683,7 +1683,7 @@ public ApiResponse updateConferenceMemberWithHttpInfo(String accountId, St 500 Internal Server Error - */ - public okhttp3.Call updateConferenceMemberAsync(String accountId, String conferenceId, String memberId, UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateConferenceMemberAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String conferenceId, @javax.annotation.Nonnull String memberId, @javax.annotation.Nonnull UpdateConferenceMember updateConferenceMember, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateConferenceMemberValidateBeforeCall(accountId, conferenceId, memberId, updateConferenceMember, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/MediaApi.java b/src/main/java/com/bandwidth/sdk/api/MediaApi.java index e98cfb3b..755d07e0 100644 --- a/src/main/java/com/bandwidth/sdk/api/MediaApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MediaApi.java @@ -96,7 +96,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call deleteMediaCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -138,12 +138,12 @@ public okhttp3.Call deleteMediaCall(String accountId, String mediaId, final ApiC localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteMediaValidateBeforeCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteMedia(Async)"); @@ -179,7 +179,7 @@ private okhttp3.Call deleteMediaValidateBeforeCall(String accountId, String medi 500 Internal Server Error - */ - public void deleteMedia(String accountId, String mediaId) throws ApiException { + public void deleteMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { deleteMediaWithHttpInfo(accountId, mediaId); } @@ -205,7 +205,7 @@ public void deleteMedia(String accountId, String mediaId) throws ApiException { 500 Internal Server Error - */ - public ApiResponse deleteMediaWithHttpInfo(String accountId, String mediaId) throws ApiException { + public ApiResponse deleteMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { okhttp3.Call localVarCall = deleteMediaValidateBeforeCall(accountId, mediaId, null); return localVarApiClient.execute(localVarCall); } @@ -233,7 +233,7 @@ public ApiResponse deleteMediaWithHttpInfo(String accountId, String mediaI 500 Internal Server Error - */ - public okhttp3.Call deleteMediaAsync(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteMediaValidateBeforeCall(accountId, mediaId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -261,7 +261,7 @@ public okhttp3.Call deleteMediaAsync(String accountId, String mediaId, final Api 500 Internal Server Error - */ - public okhttp3.Call getMediaCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -304,12 +304,12 @@ public okhttp3.Call getMediaCall(String accountId, String mediaId, final ApiCall localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getMediaValidateBeforeCall(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getMedia(Async)"); @@ -346,7 +346,7 @@ private okhttp3.Call getMediaValidateBeforeCall(String accountId, String mediaId 500 Internal Server Error - */ - public File getMedia(String accountId, String mediaId) throws ApiException { + public File getMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { ApiResponse localVarResp = getMediaWithHttpInfo(accountId, mediaId); return localVarResp.getData(); } @@ -373,7 +373,7 @@ public File getMedia(String accountId, String mediaId) throws ApiException { 500 Internal Server Error - */ - public ApiResponse getMediaWithHttpInfo(String accountId, String mediaId) throws ApiException { + public ApiResponse getMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId) throws ApiException { okhttp3.Call localVarCall = getMediaValidateBeforeCall(accountId, mediaId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -402,7 +402,7 @@ public ApiResponse getMediaWithHttpInfo(String accountId, String mediaId) 500 Internal Server Error - */ - public okhttp3.Call getMediaAsync(String accountId, String mediaId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getMediaValidateBeforeCall(accountId, mediaId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -431,7 +431,7 @@ public okhttp3.Call getMediaAsync(String accountId, String mediaId, final ApiCal 500 Internal Server Error - */ - public okhttp3.Call listMediaCall(String accountId, String continuationToken, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -477,12 +477,12 @@ public okhttp3.Call listMediaCall(String accountId, String continuationToken, fi } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listMediaValidateBeforeCall(String accountId, String continuationToken, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listMedia(Async)"); @@ -514,7 +514,7 @@ private okhttp3.Call listMediaValidateBeforeCall(String accountId, String contin 500 Internal Server Error - */ - public List listMedia(String accountId, String continuationToken) throws ApiException { + public List listMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken) throws ApiException { ApiResponse> localVarResp = listMediaWithHttpInfo(accountId, continuationToken); return localVarResp.getData(); } @@ -541,7 +541,7 @@ public List listMedia(String accountId, String continuationToken) throws 500 Internal Server Error - */ - public ApiResponse> listMediaWithHttpInfo(String accountId, String continuationToken) throws ApiException { + public ApiResponse> listMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken) throws ApiException { okhttp3.Call localVarCall = listMediaValidateBeforeCall(accountId, continuationToken, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -570,7 +570,7 @@ public ApiResponse> listMediaWithHttpInfo(String accountId, String c 500 Internal Server Error - */ - public okhttp3.Call listMediaAsync(String accountId, String continuationToken, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String continuationToken, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listMediaValidateBeforeCall(accountId, continuationToken, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -602,7 +602,7 @@ public okhttp3.Call listMediaAsync(String accountId, String continuationToken, f 500 Internal Server Error - */ - public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -702,12 +702,12 @@ public okhttp3.Call uploadMediaCall(String accountId, String mediaId, File body, } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadMediaValidateBeforeCall(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling uploadMedia(Async)"); @@ -751,7 +751,7 @@ private okhttp3.Call uploadMediaValidateBeforeCall(String accountId, String medi 500 Internal Server Error - */ - public void uploadMedia(String accountId, String mediaId, File body, String contentType, String cacheControl) throws ApiException { + public void uploadMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl) throws ApiException { uploadMediaWithHttpInfo(accountId, mediaId, body, contentType, cacheControl); } @@ -780,7 +780,7 @@ public void uploadMedia(String accountId, String mediaId, File body, String cont 500 Internal Server Error - */ - public ApiResponse uploadMediaWithHttpInfo(String accountId, String mediaId, File body, String contentType, String cacheControl) throws ApiException { + public ApiResponse uploadMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl) throws ApiException { okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(accountId, mediaId, body, contentType, cacheControl, null); return localVarApiClient.execute(localVarCall); } @@ -811,7 +811,7 @@ public ApiResponse uploadMediaWithHttpInfo(String accountId, String mediaI 500 Internal Server Error - */ - public okhttp3.Call uploadMediaAsync(String accountId, String mediaId, File body, String contentType, String cacheControl, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String mediaId, @javax.annotation.Nonnull File body, @javax.annotation.Nullable String contentType, @javax.annotation.Nullable String cacheControl, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadMediaValidateBeforeCall(accountId, mediaId, body, contentType, cacheControl, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java index c20261ed..12a1001f 100644 --- a/src/main/java/com/bandwidth/sdk/api/MessagesApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MessagesApi.java @@ -103,7 +103,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createMessageCall(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMessageCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -145,12 +145,12 @@ public okhttp3.Call createMessageCall(String accountId, MessageRequest messageRe localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createMessageValidateBeforeCall(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMessageValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createMessage(Async)"); @@ -188,7 +188,7 @@ private okhttp3.Call createMessageValidateBeforeCall(String accountId, MessageRe 500 Internal Server Error - */ - public Message createMessage(String accountId, MessageRequest messageRequest) throws ApiException { + public Message createMessage(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest) throws ApiException { ApiResponse localVarResp = createMessageWithHttpInfo(accountId, messageRequest); return localVarResp.getData(); } @@ -216,7 +216,7 @@ public Message createMessage(String accountId, MessageRequest messageRequest) th 500 Internal Server Error - */ - public ApiResponse createMessageWithHttpInfo(String accountId, MessageRequest messageRequest) throws ApiException { + public ApiResponse createMessageWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest) throws ApiException { okhttp3.Call localVarCall = createMessageValidateBeforeCall(accountId, messageRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -246,7 +246,7 @@ public ApiResponse createMessageWithHttpInfo(String accountId, MessageR 500 Internal Server Error - */ - public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMessageAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MessageRequest messageRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createMessageValidateBeforeCall(accountId, messageRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -300,7 +300,7 @@ public okhttp3.Call createMessageAsync(String accountId, MessageRequest messageR 500 Internal Server Error - */ - public okhttp3.Call listMessagesCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -449,12 +449,12 @@ public okhttp3.Call listMessagesCall(String accountId, String messageId, String localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listMessagesValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listMessages(Async)"); @@ -511,7 +511,7 @@ private okhttp3.Call listMessagesValidateBeforeCall(String accountId, String mes 500 Internal Server Error - */ - public MessagesList listMessages(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { + public MessagesList listMessages(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount) throws ApiException { ApiResponse localVarResp = listMessagesWithHttpInfo(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount); return localVarResp.getData(); } @@ -563,7 +563,7 @@ public MessagesList listMessages(String accountId, String messageId, String sour 500 Internal Server Error - */ - public ApiResponse listMessagesWithHttpInfo(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount) throws ApiException { + public ApiResponse listMessagesWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount) throws ApiException { okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -617,7 +617,7 @@ public ApiResponse listMessagesWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call listMessagesAsync(String accountId, String messageId, String sourceTn, String destinationTn, MessageStatusEnum messageStatus, ListMessageDirectionEnum messageDirection, String carrierName, MessageTypeEnum messageType, Integer errorCode, String fromDateTime, String toDateTime, String campaignId, Integer fromBwLatency, Boolean bwQueued, ProductTypeEnum product, String location, Boolean carrierQueued, Integer fromCarrierLatency, String callingNumberCountryA3, String calledNumberCountryA3, Integer fromSegmentCount, Integer toSegmentCount, Integer fromMessageSize, Integer toMessageSize, String sort, String pageToken, Integer limit, Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listMessagesAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String messageId, @javax.annotation.Nullable String sourceTn, @javax.annotation.Nullable String destinationTn, @javax.annotation.Nullable MessageStatusEnum messageStatus, @javax.annotation.Nullable ListMessageDirectionEnum messageDirection, @javax.annotation.Nullable String carrierName, @javax.annotation.Nullable MessageTypeEnum messageType, @javax.annotation.Nullable Integer errorCode, @javax.annotation.Nullable String fromDateTime, @javax.annotation.Nullable String toDateTime, @javax.annotation.Nullable String campaignId, @javax.annotation.Nullable Integer fromBwLatency, @javax.annotation.Nullable Boolean bwQueued, @javax.annotation.Nullable ProductTypeEnum product, @javax.annotation.Nullable String location, @javax.annotation.Nullable Boolean carrierQueued, @javax.annotation.Nullable Integer fromCarrierLatency, @javax.annotation.Nullable String callingNumberCountryA3, @javax.annotation.Nullable String calledNumberCountryA3, @javax.annotation.Nullable Integer fromSegmentCount, @javax.annotation.Nullable Integer toSegmentCount, @javax.annotation.Nullable Integer fromMessageSize, @javax.annotation.Nullable Integer toMessageSize, @javax.annotation.Nullable String sort, @javax.annotation.Nullable String pageToken, @javax.annotation.Nullable Integer limit, @javax.annotation.Nullable Boolean limitTotalCount, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listMessagesValidateBeforeCall(accountId, messageId, sourceTn, destinationTn, messageStatus, messageDirection, carrierName, messageType, errorCode, fromDateTime, toDateTime, campaignId, fromBwLatency, bwQueued, product, location, carrierQueued, fromCarrierLatency, callingNumberCountryA3, calledNumberCountryA3, fromSegmentCount, toSegmentCount, fromMessageSize, toMessageSize, sort, pageToken, limit, limitTotalCount, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/MfaApi.java b/src/main/java/com/bandwidth/sdk/api/MfaApi.java index d13c9a70..d5920bc8 100644 --- a/src/main/java/com/bandwidth/sdk/api/MfaApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MfaApi.java @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call generateMessagingCodeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateMessagingCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -139,12 +139,12 @@ public okhttp3.Call generateMessagingCodeCall(String accountId, CodeRequest code localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call generateMessagingCodeValidateBeforeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call generateMessagingCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling generateMessagingCode(Async)"); @@ -177,7 +177,7 @@ private okhttp3.Call generateMessagingCodeValidateBeforeCall(String accountId, C 500 Internal Server Error - */ - public MessagingCodeResponse generateMessagingCode(String accountId, CodeRequest codeRequest) throws ApiException { + public MessagingCodeResponse generateMessagingCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { ApiResponse localVarResp = generateMessagingCodeWithHttpInfo(accountId, codeRequest); return localVarResp.getData(); } @@ -200,7 +200,7 @@ public MessagingCodeResponse generateMessagingCode(String accountId, CodeRequest 500 Internal Server Error - */ - public ApiResponse generateMessagingCodeWithHttpInfo(String accountId, CodeRequest codeRequest) throws ApiException { + public ApiResponse generateMessagingCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { okhttp3.Call localVarCall = generateMessagingCodeValidateBeforeCall(accountId, codeRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -225,7 +225,7 @@ public ApiResponse generateMessagingCodeWithHttpInfo(Stri 500 Internal Server Error - */ - public okhttp3.Call generateMessagingCodeAsync(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateMessagingCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generateMessagingCodeValidateBeforeCall(accountId, codeRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -250,7 +250,7 @@ public okhttp3.Call generateMessagingCodeAsync(String accountId, CodeRequest cod 500 Internal Server Error - */ - public okhttp3.Call generateVoiceCodeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateVoiceCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -292,12 +292,12 @@ public okhttp3.Call generateVoiceCodeCall(String accountId, CodeRequest codeRequ localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call generateVoiceCodeValidateBeforeCall(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call generateVoiceCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling generateVoiceCode(Async)"); @@ -330,7 +330,7 @@ private okhttp3.Call generateVoiceCodeValidateBeforeCall(String accountId, CodeR 500 Internal Server Error - */ - public VoiceCodeResponse generateVoiceCode(String accountId, CodeRequest codeRequest) throws ApiException { + public VoiceCodeResponse generateVoiceCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { ApiResponse localVarResp = generateVoiceCodeWithHttpInfo(accountId, codeRequest); return localVarResp.getData(); } @@ -353,7 +353,7 @@ public VoiceCodeResponse generateVoiceCode(String accountId, CodeRequest codeReq 500 Internal Server Error - */ - public ApiResponse generateVoiceCodeWithHttpInfo(String accountId, CodeRequest codeRequest) throws ApiException { + public ApiResponse generateVoiceCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest) throws ApiException { okhttp3.Call localVarCall = generateVoiceCodeValidateBeforeCall(accountId, codeRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -378,7 +378,7 @@ public ApiResponse generateVoiceCodeWithHttpInfo(String accou 500 Internal Server Error - */ - public okhttp3.Call generateVoiceCodeAsync(String accountId, CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call generateVoiceCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull CodeRequest codeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = generateVoiceCodeValidateBeforeCall(accountId, codeRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -404,7 +404,7 @@ public okhttp3.Call generateVoiceCodeAsync(String accountId, CodeRequest codeReq 500 Internal Server Error - */ - public okhttp3.Call verifyCodeCall(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyCodeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://mfa.bandwidth.com/api/v1" }; @@ -446,12 +446,12 @@ public okhttp3.Call verifyCodeCall(String accountId, VerifyCodeRequest verifyCod localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call verifyCodeValidateBeforeCall(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call verifyCodeValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling verifyCode(Async)"); @@ -485,7 +485,7 @@ private okhttp3.Call verifyCodeValidateBeforeCall(String accountId, VerifyCodeRe 500 Internal Server Error - */ - public VerifyCodeResponse verifyCode(String accountId, VerifyCodeRequest verifyCodeRequest) throws ApiException { + public VerifyCodeResponse verifyCode(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest) throws ApiException { ApiResponse localVarResp = verifyCodeWithHttpInfo(accountId, verifyCodeRequest); return localVarResp.getData(); } @@ -509,7 +509,7 @@ public VerifyCodeResponse verifyCode(String accountId, VerifyCodeRequest verifyC 500 Internal Server Error - */ - public ApiResponse verifyCodeWithHttpInfo(String accountId, VerifyCodeRequest verifyCodeRequest) throws ApiException { + public ApiResponse verifyCodeWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest) throws ApiException { okhttp3.Call localVarCall = verifyCodeValidateBeforeCall(accountId, verifyCodeRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -535,7 +535,7 @@ public ApiResponse verifyCodeWithHttpInfo(String accountId, 500 Internal Server Error - */ - public okhttp3.Call verifyCodeAsync(String accountId, VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call verifyCodeAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerifyCodeRequest verifyCodeRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifyCodeValidateBeforeCall(accountId, verifyCodeRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java b/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java index e7768696..19487ce3 100644 --- a/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java +++ b/src/main/java/com/bandwidth/sdk/api/MultiChannelApi.java @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createMultiChannelMessageCall(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMultiChannelMessageCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://messaging.bandwidth.com/api/v2" }; @@ -139,12 +139,12 @@ public okhttp3.Call createMultiChannelMessageCall(String accountId, MultiChannel localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createMultiChannelMessageValidateBeforeCall(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createMultiChannelMessageValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createMultiChannelMessage(Async)"); @@ -182,7 +182,7 @@ private okhttp3.Call createMultiChannelMessageValidateBeforeCall(String accountI 500 Internal Server Error - */ - public CreateMultiChannelMessageResponse createMultiChannelMessage(String accountId, MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { + public CreateMultiChannelMessageResponse createMultiChannelMessage(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { ApiResponse localVarResp = createMultiChannelMessageWithHttpInfo(accountId, multiChannelMessageRequest); return localVarResp.getData(); } @@ -210,7 +210,7 @@ public CreateMultiChannelMessageResponse createMultiChannelMessage(String accoun 500 Internal Server Error - */ - public ApiResponse createMultiChannelMessageWithHttpInfo(String accountId, MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { + public ApiResponse createMultiChannelMessageWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest) throws ApiException { okhttp3.Call localVarCall = createMultiChannelMessageValidateBeforeCall(accountId, multiChannelMessageRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -240,7 +240,7 @@ public ApiResponse createMultiChannelMessageW 500 Internal Server Error - */ - public okhttp3.Call createMultiChannelMessageAsync(String accountId, MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createMultiChannelMessageAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull MultiChannelMessageRequest multiChannelMessageRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createMultiChannelMessageValidateBeforeCall(accountId, multiChannelMessageRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java index 11ff5ab2..41a18153 100644 --- a/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java +++ b/src/main/java/com/bandwidth/sdk/api/PhoneNumberLookupApi.java @@ -95,7 +95,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call createLookupCall(String accountId, LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createLookupCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://numbers.bandwidth.com/api/v1" }; @@ -137,12 +137,12 @@ public okhttp3.Call createLookupCall(String accountId, LookupRequest lookupReque localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createLookupValidateBeforeCall(String accountId, LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createLookupValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createLookup(Async)"); @@ -177,7 +177,7 @@ private okhttp3.Call createLookupValidateBeforeCall(String accountId, LookupRequ 500 Internal Server Error - */ - public CreateLookupResponse createLookup(String accountId, LookupRequest lookupRequest) throws ApiException { + public CreateLookupResponse createLookup(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest) throws ApiException { ApiResponse localVarResp = createLookupWithHttpInfo(accountId, lookupRequest); return localVarResp.getData(); } @@ -202,7 +202,7 @@ public CreateLookupResponse createLookup(String accountId, LookupRequest lookupR 500 Internal Server Error - */ - public ApiResponse createLookupWithHttpInfo(String accountId, LookupRequest lookupRequest) throws ApiException { + public ApiResponse createLookupWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest) throws ApiException { okhttp3.Call localVarCall = createLookupValidateBeforeCall(accountId, lookupRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -229,7 +229,7 @@ public ApiResponse createLookupWithHttpInfo(String account 500 Internal Server Error - */ - public okhttp3.Call createLookupAsync(String accountId, LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createLookupAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull LookupRequest lookupRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createLookupValidateBeforeCall(accountId, lookupRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -256,7 +256,7 @@ public okhttp3.Call createLookupAsync(String accountId, LookupRequest lookupRequ 500 Internal Server Error - */ - public okhttp3.Call getLookupStatusCall(String accountId, String requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLookupStatusCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://numbers.bandwidth.com/api/v1" }; @@ -298,12 +298,12 @@ public okhttp3.Call getLookupStatusCall(String accountId, String requestId, fina localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getLookupStatusValidateBeforeCall(String accountId, String requestId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getLookupStatusValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getLookupStatus(Async)"); @@ -338,7 +338,7 @@ private okhttp3.Call getLookupStatusValidateBeforeCall(String accountId, String 500 Internal Server Error - */ - public LookupStatus getLookupStatus(String accountId, String requestId) throws ApiException { + public LookupStatus getLookupStatus(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId) throws ApiException { ApiResponse localVarResp = getLookupStatusWithHttpInfo(accountId, requestId); return localVarResp.getData(); } @@ -363,7 +363,7 @@ public LookupStatus getLookupStatus(String accountId, String requestId) throws A 500 Internal Server Error - */ - public ApiResponse getLookupStatusWithHttpInfo(String accountId, String requestId) throws ApiException { + public ApiResponse getLookupStatusWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId) throws ApiException { okhttp3.Call localVarCall = getLookupStatusValidateBeforeCall(accountId, requestId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -390,7 +390,7 @@ public ApiResponse getLookupStatusWithHttpInfo(String accountId, S 500 Internal Server Error - */ - public okhttp3.Call getLookupStatusAsync(String accountId, String requestId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getLookupStatusAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String requestId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getLookupStatusValidateBeforeCall(accountId, requestId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java b/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java index e4700c63..6c91a4d8 100644 --- a/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/RecordingsApi.java @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -143,12 +143,12 @@ public okhttp3.Call deleteRecordingCall(String accountId, String callId, String localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRecording(Async)"); @@ -190,7 +190,7 @@ private okhttp3.Call deleteRecordingValidateBeforeCall(String accountId, String 500 Internal Server Error - */ - public void deleteRecording(String accountId, String callId, String recordingId) throws ApiException { + public void deleteRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { deleteRecordingWithHttpInfo(accountId, callId, recordingId); } @@ -217,7 +217,7 @@ public void deleteRecording(String accountId, String callId, String recordingId) 500 Internal Server Error - */ - public ApiResponse deleteRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse deleteRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -246,7 +246,7 @@ public ApiResponse deleteRecordingWithHttpInfo(String accountId, String ca 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordingValidateBeforeCall(accountId, callId, recordingId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -275,7 +275,7 @@ public okhttp3.Call deleteRecordingAsync(String accountId, String callId, String 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingMediaCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingMediaCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -318,12 +318,12 @@ public okhttp3.Call deleteRecordingMediaCall(String accountId, String callId, St localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingMediaValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingMediaValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRecordingMedia(Async)"); @@ -365,7 +365,7 @@ private okhttp3.Call deleteRecordingMediaValidateBeforeCall(String accountId, St 500 Internal Server Error - */ - public void deleteRecordingMedia(String accountId, String callId, String recordingId) throws ApiException { + public void deleteRecordingMedia(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { deleteRecordingMediaWithHttpInfo(accountId, callId, recordingId); } @@ -392,7 +392,7 @@ public void deleteRecordingMedia(String accountId, String callId, String recordi 500 Internal Server Error - */ - public ApiResponse deleteRecordingMediaWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse deleteRecordingMediaWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingMediaValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -421,7 +421,7 @@ public ApiResponse deleteRecordingMediaWithHttpInfo(String accountId, Stri 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingMediaAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingMediaAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordingMediaValidateBeforeCall(accountId, callId, recordingId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -450,7 +450,7 @@ public okhttp3.Call deleteRecordingMediaAsync(String accountId, String callId, S 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingTranscriptionCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -493,12 +493,12 @@ public okhttp3.Call deleteRecordingTranscriptionCall(String accountId, String ca localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRecordingTranscription(Async)"); @@ -540,7 +540,7 @@ private okhttp3.Call deleteRecordingTranscriptionValidateBeforeCall(String accou 500 Internal Server Error - */ - public void deleteRecordingTranscription(String accountId, String callId, String recordingId) throws ApiException { + public void deleteRecordingTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { deleteRecordingTranscriptionWithHttpInfo(accountId, callId, recordingId); } @@ -567,7 +567,7 @@ public void deleteRecordingTranscription(String accountId, String callId, String 500 Internal Server Error - */ - public ApiResponse deleteRecordingTranscriptionWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse deleteRecordingTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = deleteRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, null); return localVarApiClient.execute(localVarCall); } @@ -596,7 +596,7 @@ public ApiResponse deleteRecordingTranscriptionWithHttpInfo(String account 500 Internal Server Error - */ - public okhttp3.Call deleteRecordingTranscriptionAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRecordingTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -625,7 +625,7 @@ public okhttp3.Call deleteRecordingTranscriptionAsync(String accountId, String c 500 Internal Server Error - */ - public okhttp3.Call downloadCallRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -670,12 +670,12 @@ public okhttp3.Call downloadCallRecordingCall(String accountId, String callId, S localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling downloadCallRecording(Async)"); @@ -718,7 +718,7 @@ private okhttp3.Call downloadCallRecordingValidateBeforeCall(String accountId, S 500 Internal Server Error - */ - public File downloadCallRecording(String accountId, String callId, String recordingId) throws ApiException { + public File downloadCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = downloadCallRecordingWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -746,7 +746,7 @@ public File downloadCallRecording(String accountId, String callId, String record 500 Internal Server Error - */ - public ApiResponse downloadCallRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse downloadCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = downloadCallRecordingValidateBeforeCall(accountId, callId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -776,7 +776,7 @@ public ApiResponse downloadCallRecordingWithHttpInfo(String accountId, Str 500 Internal Server Error - */ - public okhttp3.Call downloadCallRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadCallRecordingValidateBeforeCall(accountId, callId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -806,7 +806,7 @@ public okhttp3.Call downloadCallRecordingAsync(String accountId, String callId, 500 Internal Server Error - */ - public okhttp3.Call getCallRecordingCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -849,12 +849,12 @@ public okhttp3.Call getCallRecordingCall(String accountId, String callId, String localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getCallRecording(Async)"); @@ -897,7 +897,7 @@ private okhttp3.Call getCallRecordingValidateBeforeCall(String accountId, String 500 Internal Server Error - */ - public CallRecordingMetadata getCallRecording(String accountId, String callId, String recordingId) throws ApiException { + public CallRecordingMetadata getCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = getCallRecordingWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -925,7 +925,7 @@ public CallRecordingMetadata getCallRecording(String accountId, String callId, S 500 Internal Server Error - */ - public ApiResponse getCallRecordingWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse getCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = getCallRecordingValidateBeforeCall(accountId, callId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -955,7 +955,7 @@ public ApiResponse getCallRecordingWithHttpInfo(String ac 500 Internal Server Error - */ - public okhttp3.Call getCallRecordingAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getCallRecordingValidateBeforeCall(accountId, callId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -985,7 +985,7 @@ public okhttp3.Call getCallRecordingAsync(String accountId, String callId, Strin 500 Internal Server Error - */ - public okhttp3.Call getRecordingTranscriptionCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecordingTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1028,12 +1028,12 @@ public okhttp3.Call getRecordingTranscriptionCall(String accountId, String callI localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getRecordingTranscription(Async)"); @@ -1076,7 +1076,7 @@ private okhttp3.Call getRecordingTranscriptionValidateBeforeCall(String accountI 500 Internal Server Error - */ - public RecordingTranscriptions getRecordingTranscription(String accountId, String callId, String recordingId) throws ApiException { + public RecordingTranscriptions getRecordingTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { ApiResponse localVarResp = getRecordingTranscriptionWithHttpInfo(accountId, callId, recordingId); return localVarResp.getData(); } @@ -1104,7 +1104,7 @@ public RecordingTranscriptions getRecordingTranscription(String accountId, Strin 500 Internal Server Error - */ - public ApiResponse getRecordingTranscriptionWithHttpInfo(String accountId, String callId, String recordingId) throws ApiException { + public ApiResponse getRecordingTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId) throws ApiException { okhttp3.Call localVarCall = getRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1134,7 +1134,7 @@ public ApiResponse getRecordingTranscriptionWithHttpInf 500 Internal Server Error - */ - public okhttp3.Call getRecordingTranscriptionAsync(String accountId, String callId, String recordingId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRecordingTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRecordingTranscriptionValidateBeforeCall(accountId, callId, recordingId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1166,7 +1166,7 @@ public okhttp3.Call getRecordingTranscriptionAsync(String accountId, String call 500 Internal Server Error - */ - public okhttp3.Call listAccountCallRecordingsCall(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listAccountCallRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1223,12 +1223,12 @@ public okhttp3.Call listAccountCallRecordingsCall(String accountId, String to, S localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listAccountCallRecordings(Async)"); @@ -1263,7 +1263,7 @@ private okhttp3.Call listAccountCallRecordingsValidateBeforeCall(String accountI 500 Internal Server Error - */ - public List listAccountCallRecordings(String accountId, String to, String from, String minStartTime, String maxStartTime) throws ApiException { + public List listAccountCallRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime) throws ApiException { ApiResponse> localVarResp = listAccountCallRecordingsWithHttpInfo(accountId, to, from, minStartTime, maxStartTime); return localVarResp.getData(); } @@ -1293,7 +1293,7 @@ public List listAccountCallRecordings(String accountId, S 500 Internal Server Error - */ - public ApiResponse> listAccountCallRecordingsWithHttpInfo(String accountId, String to, String from, String minStartTime, String maxStartTime) throws ApiException { + public ApiResponse> listAccountCallRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime) throws ApiException { okhttp3.Call localVarCall = listAccountCallRecordingsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1325,7 +1325,7 @@ public ApiResponse> listAccountCallRecordingsWithHtt 500 Internal Server Error - */ - public okhttp3.Call listAccountCallRecordingsAsync(String accountId, String to, String from, String minStartTime, String maxStartTime, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listAccountCallRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nullable String to, @javax.annotation.Nullable String from, @javax.annotation.Nullable String minStartTime, @javax.annotation.Nullable String maxStartTime, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listAccountCallRecordingsValidateBeforeCall(accountId, to, from, minStartTime, maxStartTime, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1354,7 +1354,7 @@ public okhttp3.Call listAccountCallRecordingsAsync(String accountId, String to, 500 Internal Server Error - */ - public okhttp3.Call listCallRecordingsCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listCallRecordingsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1396,12 +1396,12 @@ public okhttp3.Call listCallRecordingsCall(String accountId, String callId, fina localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listCallRecordingsValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listCallRecordingsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listCallRecordings(Async)"); @@ -1438,7 +1438,7 @@ private okhttp3.Call listCallRecordingsValidateBeforeCall(String accountId, Stri 500 Internal Server Error - */ - public List listCallRecordings(String accountId, String callId) throws ApiException { + public List listCallRecordings(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { ApiResponse> localVarResp = listCallRecordingsWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -1465,7 +1465,7 @@ public List listCallRecordings(String accountId, String c 500 Internal Server Error - */ - public ApiResponse> listCallRecordingsWithHttpInfo(String accountId, String callId) throws ApiException { + public ApiResponse> listCallRecordingsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { okhttp3.Call localVarCall = listCallRecordingsValidateBeforeCall(accountId, callId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1494,7 +1494,7 @@ public ApiResponse> listCallRecordingsWithHttpInfo(S 500 Internal Server Error - */ - public okhttp3.Call listCallRecordingsAsync(String accountId, String callId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listCallRecordingsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listCallRecordingsValidateBeforeCall(accountId, callId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); @@ -1525,7 +1525,7 @@ public okhttp3.Call listCallRecordingsAsync(String accountId, String callId, fin 500 Internal Server Error - */ - public okhttp3.Call transcribeCallRecordingCall(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call transcribeCallRecordingCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1569,12 +1569,12 @@ public okhttp3.Call transcribeCallRecordingCall(String accountId, String callId, localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call transcribeCallRecordingValidateBeforeCall(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + private okhttp3.Call transcribeCallRecordingValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling transcribeCallRecording(Async)"); @@ -1622,7 +1622,7 @@ private okhttp3.Call transcribeCallRecordingValidateBeforeCall(String accountId, 500 Internal Server Error - */ - public void transcribeCallRecording(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording) throws ApiException { + public void transcribeCallRecording(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording) throws ApiException { transcribeCallRecordingWithHttpInfo(accountId, callId, recordingId, transcribeRecording); } @@ -1650,7 +1650,7 @@ public void transcribeCallRecording(String accountId, String callId, String reco 500 Internal Server Error - */ - public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording) throws ApiException { + public ApiResponse transcribeCallRecordingWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording) throws ApiException { okhttp3.Call localVarCall = transcribeCallRecordingValidateBeforeCall(accountId, callId, recordingId, transcribeRecording, null); return localVarApiClient.execute(localVarCall); } @@ -1680,7 +1680,7 @@ public ApiResponse transcribeCallRecordingWithHttpInfo(String accountId, S 500 Internal Server Error - */ - public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId, String recordingId, TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call transcribeCallRecordingAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String recordingId, @javax.annotation.Nonnull TranscribeRecording transcribeRecording, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = transcribeCallRecordingValidateBeforeCall(accountId, callId, recordingId, transcribeRecording, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1709,7 +1709,7 @@ public okhttp3.Call transcribeCallRecordingAsync(String accountId, String callId 500 Internal Server Error - */ - public okhttp3.Call updateCallRecordingStateCall(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallRecordingStateCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -1752,12 +1752,12 @@ public okhttp3.Call updateCallRecordingStateCall(String accountId, String callId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateCallRecordingStateValidateBeforeCall(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateCallRecordingStateValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateCallRecordingState(Async)"); @@ -1799,7 +1799,7 @@ private okhttp3.Call updateCallRecordingStateValidateBeforeCall(String accountId 500 Internal Server Error - */ - public void updateCallRecordingState(String accountId, String callId, UpdateCallRecording updateCallRecording) throws ApiException { + public void updateCallRecordingState(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording) throws ApiException { updateCallRecordingStateWithHttpInfo(accountId, callId, updateCallRecording); } @@ -1826,7 +1826,7 @@ public void updateCallRecordingState(String accountId, String callId, UpdateCall 500 Internal Server Error - */ - public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, String callId, UpdateCallRecording updateCallRecording) throws ApiException { + public ApiResponse updateCallRecordingStateWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording) throws ApiException { okhttp3.Call localVarCall = updateCallRecordingStateValidateBeforeCall(accountId, callId, updateCallRecording, null); return localVarApiClient.execute(localVarCall); } @@ -1855,7 +1855,7 @@ public ApiResponse updateCallRecordingStateWithHttpInfo(String accountId, 500 Internal Server Error - */ - public okhttp3.Call updateCallRecordingStateAsync(String accountId, String callId, UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateCallRecordingStateAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull UpdateCallRecording updateCallRecording, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateCallRecordingStateValidateBeforeCall(accountId, callId, updateCallRecording, _callback); localVarApiClient.executeAsync(localVarCall, _callback); diff --git a/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java b/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java index 8260db2d..3e14cbc7 100644 --- a/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/StatisticsApi.java @@ -94,7 +94,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call getStatisticsCall(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStatisticsCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -135,12 +135,12 @@ public okhttp3.Call getStatisticsCall(String accountId, final ApiCallback _callb localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getStatisticsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getStatisticsValidateBeforeCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getStatistics(Async)"); @@ -171,7 +171,7 @@ private okhttp3.Call getStatisticsValidateBeforeCall(String accountId, final Api 500 Internal Server Error - */ - public AccountStatistics getStatistics(String accountId) throws ApiException { + public AccountStatistics getStatistics(@javax.annotation.Nonnull String accountId) throws ApiException { ApiResponse localVarResp = getStatisticsWithHttpInfo(accountId); return localVarResp.getData(); } @@ -197,7 +197,7 @@ public AccountStatistics getStatistics(String accountId) throws ApiException { 500 Internal Server Error - */ - public ApiResponse getStatisticsWithHttpInfo(String accountId) throws ApiException { + public ApiResponse getStatisticsWithHttpInfo(@javax.annotation.Nonnull String accountId) throws ApiException { okhttp3.Call localVarCall = getStatisticsValidateBeforeCall(accountId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -225,7 +225,7 @@ public ApiResponse getStatisticsWithHttpInfo(String accountId 500 Internal Server Error - */ - public okhttp3.Call getStatisticsAsync(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getStatisticsAsync(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getStatisticsValidateBeforeCall(accountId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java b/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java index d2208831..df41729d 100644 --- a/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java +++ b/src/main/java/com/bandwidth/sdk/api/TollFreeVerificationApi.java @@ -100,7 +100,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 503 Service Unavailable - */ - public okhttp3.Call createWebhookSubscriptionCall(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -142,12 +142,12 @@ public okhttp3.Call createWebhookSubscriptionCall(String accountId, WebhookSubsc localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling createWebhookSubscription(Async)"); @@ -184,7 +184,7 @@ private okhttp3.Call createWebhookSubscriptionValidateBeforeCall(String accountI 503 Service Unavailable - */ - public WebhookSubscription createWebhookSubscription(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public WebhookSubscription createWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { ApiResponse localVarResp = createWebhookSubscriptionWithHttpInfo(accountId, webhookSubscriptionRequestSchema); return localVarResp.getData(); } @@ -211,7 +211,7 @@ public WebhookSubscription createWebhookSubscription(String accountId, WebhookSu 503 Service Unavailable - */ - public ApiResponse createWebhookSubscriptionWithHttpInfo(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public ApiResponse createWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(accountId, webhookSubscriptionRequestSchema, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -240,7 +240,7 @@ public ApiResponse createWebhookSubscriptionWithHttpInfo(St 503 Service Unavailable - */ - public okhttp3.Call createWebhookSubscriptionAsync(String accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call createWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(accountId, webhookSubscriptionRequestSchema, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -269,7 +269,7 @@ public okhttp3.Call createWebhookSubscriptionAsync(String accountId, WebhookSubs 503 Service Unavailable - */ - public okhttp3.Call deleteVerificationRequestCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteVerificationRequestCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -311,12 +311,12 @@ public okhttp3.Call deleteVerificationRequestCall(String accountId, String phone localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteVerificationRequestValidateBeforeCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteVerificationRequestValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteVerificationRequest(Async)"); @@ -352,7 +352,7 @@ private okhttp3.Call deleteVerificationRequestValidateBeforeCall(String accountI 503 Service Unavailable - */ - public void deleteVerificationRequest(String accountId, String phoneNumber) throws ApiException { + public void deleteVerificationRequest(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { deleteVerificationRequestWithHttpInfo(accountId, phoneNumber); } @@ -378,7 +378,7 @@ public void deleteVerificationRequest(String accountId, String phoneNumber) thro 503 Service Unavailable - */ - public ApiResponse deleteVerificationRequestWithHttpInfo(String accountId, String phoneNumber) throws ApiException { + public ApiResponse deleteVerificationRequestWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { okhttp3.Call localVarCall = deleteVerificationRequestValidateBeforeCall(accountId, phoneNumber, null); return localVarApiClient.execute(localVarCall); } @@ -406,7 +406,7 @@ public ApiResponse deleteVerificationRequestWithHttpInfo(String accountId, 503 Service Unavailable - */ - public okhttp3.Call deleteVerificationRequestAsync(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteVerificationRequestAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteVerificationRequestValidateBeforeCall(accountId, phoneNumber, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -434,7 +434,7 @@ public okhttp3.Call deleteVerificationRequestAsync(String accountId, String phon 503 Service Unavailable - */ - public okhttp3.Call deleteWebhookSubscriptionCall(String accountId, String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -476,12 +476,12 @@ public okhttp3.Call deleteWebhookSubscriptionCall(String accountId, String id, f localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(String accountId, String id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteWebhookSubscription(Async)"); @@ -517,7 +517,7 @@ private okhttp3.Call deleteWebhookSubscriptionValidateBeforeCall(String accountI 503 Service Unavailable - */ - public void deleteWebhookSubscription(String accountId, String id) throws ApiException { + public void deleteWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id) throws ApiException { deleteWebhookSubscriptionWithHttpInfo(accountId, id); } @@ -543,7 +543,7 @@ public void deleteWebhookSubscription(String accountId, String id) throws ApiExc 503 Service Unavailable - */ - public ApiResponse deleteWebhookSubscriptionWithHttpInfo(String accountId, String id) throws ApiException { + public ApiResponse deleteWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(accountId, id, null); return localVarApiClient.execute(localVarCall); } @@ -571,7 +571,7 @@ public ApiResponse deleteWebhookSubscriptionWithHttpInfo(String accountId, 503 Service Unavailable - */ - public okhttp3.Call deleteWebhookSubscriptionAsync(String accountId, String id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(accountId, id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -599,7 +599,7 @@ public okhttp3.Call deleteWebhookSubscriptionAsync(String accountId, String id, 503 Service Unavailable - */ - public okhttp3.Call getTollFreeVerificationStatusCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTollFreeVerificationStatusCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -641,12 +641,12 @@ public okhttp3.Call getTollFreeVerificationStatusCall(String accountId, String p localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getTollFreeVerificationStatus(Async)"); @@ -683,7 +683,7 @@ private okhttp3.Call getTollFreeVerificationStatusValidateBeforeCall(String acco 503 Service Unavailable - */ - public TfvStatus getTollFreeVerificationStatus(String accountId, String phoneNumber) throws ApiException { + public TfvStatus getTollFreeVerificationStatus(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { ApiResponse localVarResp = getTollFreeVerificationStatusWithHttpInfo(accountId, phoneNumber); return localVarResp.getData(); } @@ -710,7 +710,7 @@ public TfvStatus getTollFreeVerificationStatus(String accountId, String phoneNum 503 Service Unavailable - */ - public ApiResponse getTollFreeVerificationStatusWithHttpInfo(String accountId, String phoneNumber) throws ApiException { + public ApiResponse getTollFreeVerificationStatusWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber) throws ApiException { okhttp3.Call localVarCall = getTollFreeVerificationStatusValidateBeforeCall(accountId, phoneNumber, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -739,7 +739,7 @@ public ApiResponse getTollFreeVerificationStatusWithHttpInfo(String a 503 Service Unavailable - */ - public okhttp3.Call getTollFreeVerificationStatusAsync(String accountId, String phoneNumber, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getTollFreeVerificationStatusAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getTollFreeVerificationStatusValidateBeforeCall(accountId, phoneNumber, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -806,7 +806,7 @@ public okhttp3.Call listTollFreeUseCasesCall(final ApiCallback _callback) throws localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @@ -915,7 +915,7 @@ public okhttp3.Call listTollFreeUseCasesAsync(final ApiCallback> _c 503 Service Unavailable - */ - public okhttp3.Call listWebhookSubscriptionsCall(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWebhookSubscriptionsCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -956,12 +956,12 @@ public okhttp3.Call listWebhookSubscriptionsCall(String accountId, final ApiCall localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(String accountId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listWebhookSubscriptions(Async)"); @@ -991,7 +991,7 @@ private okhttp3.Call listWebhookSubscriptionsValidateBeforeCall(String accountId 503 Service Unavailable - */ - public WebhookSubscriptionsListBody listWebhookSubscriptions(String accountId) throws ApiException { + public WebhookSubscriptionsListBody listWebhookSubscriptions(@javax.annotation.Nonnull String accountId) throws ApiException { ApiResponse localVarResp = listWebhookSubscriptionsWithHttpInfo(accountId); return localVarResp.getData(); } @@ -1016,7 +1016,7 @@ public WebhookSubscriptionsListBody listWebhookSubscriptions(String accountId) t 503 Service Unavailable - */ - public ApiResponse listWebhookSubscriptionsWithHttpInfo(String accountId) throws ApiException { + public ApiResponse listWebhookSubscriptionsWithHttpInfo(@javax.annotation.Nonnull String accountId) throws ApiException { okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(accountId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1043,7 +1043,7 @@ public ApiResponse listWebhookSubscriptionsWithHtt 503 Service Unavailable - */ - public okhttp3.Call listWebhookSubscriptionsAsync(String accountId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listWebhookSubscriptionsAsync(@javax.annotation.Nonnull String accountId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listWebhookSubscriptionsValidateBeforeCall(accountId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -1071,7 +1071,7 @@ public okhttp3.Call listWebhookSubscriptionsAsync(String accountId, final ApiCal 503 Service Unavailable - */ - public okhttp3.Call requestTollFreeVerificationCall(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestTollFreeVerificationCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1113,12 +1113,12 @@ public okhttp3.Call requestTollFreeVerificationCall(String accountId, Verificati localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling requestTollFreeVerification(Async)"); @@ -1153,7 +1153,7 @@ private okhttp3.Call requestTollFreeVerificationValidateBeforeCall(String accoun 503 Service Unavailable - */ - public void requestTollFreeVerification(String accountId, VerificationRequest verificationRequest) throws ApiException { + public void requestTollFreeVerification(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest) throws ApiException { requestTollFreeVerificationWithHttpInfo(accountId, verificationRequest); } @@ -1178,7 +1178,7 @@ public void requestTollFreeVerification(String accountId, VerificationRequest ve 503 Service Unavailable - */ - public ApiResponse requestTollFreeVerificationWithHttpInfo(String accountId, VerificationRequest verificationRequest) throws ApiException { + public ApiResponse requestTollFreeVerificationWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest) throws ApiException { okhttp3.Call localVarCall = requestTollFreeVerificationValidateBeforeCall(accountId, verificationRequest, null); return localVarApiClient.execute(localVarCall); } @@ -1205,7 +1205,7 @@ public ApiResponse requestTollFreeVerificationWithHttpInfo(String accountI 503 Service Unavailable - */ - public okhttp3.Call requestTollFreeVerificationAsync(String accountId, VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { + public okhttp3.Call requestTollFreeVerificationAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull VerificationRequest verificationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = requestTollFreeVerificationValidateBeforeCall(accountId, verificationRequest, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1233,7 +1233,7 @@ public okhttp3.Call requestTollFreeVerificationAsync(String accountId, Verificat 503 Service Unavailable - */ - public okhttp3.Call updateTollFreeVerificationRequestCall(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTollFreeVerificationRequestCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1276,12 +1276,12 @@ public okhttp3.Call updateTollFreeVerificationRequestCall(String accountId, Stri localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateTollFreeVerificationRequest(Async)"); @@ -1322,7 +1322,7 @@ private okhttp3.Call updateTollFreeVerificationRequestValidateBeforeCall(String 503 Service Unavailable - */ - public void updateTollFreeVerificationRequest(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { + public void updateTollFreeVerificationRequest(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { updateTollFreeVerificationRequestWithHttpInfo(accountId, phoneNumber, tfvSubmissionWrapper); } @@ -1348,7 +1348,7 @@ public void updateTollFreeVerificationRequest(String accountId, String phoneNumb 503 Service Unavailable - */ - public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { + public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper) throws ApiException { okhttp3.Call localVarCall = updateTollFreeVerificationRequestValidateBeforeCall(accountId, phoneNumber, tfvSubmissionWrapper, null); return localVarApiClient.execute(localVarCall); } @@ -1376,7 +1376,7 @@ public ApiResponse updateTollFreeVerificationRequestWithHttpInfo(String ac 503 Service Unavailable - */ - public okhttp3.Call updateTollFreeVerificationRequestAsync(String accountId, String phoneNumber, TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateTollFreeVerificationRequestAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String phoneNumber, @javax.annotation.Nonnull TfvSubmissionWrapper tfvSubmissionWrapper, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateTollFreeVerificationRequestValidateBeforeCall(accountId, phoneNumber, tfvSubmissionWrapper, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -1405,7 +1405,7 @@ public okhttp3.Call updateTollFreeVerificationRequestAsync(String accountId, Str 503 Service Unavailable - */ - public okhttp3.Call updateWebhookSubscriptionCall(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWebhookSubscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://api.bandwidth.com/api/v2" }; @@ -1448,12 +1448,12 @@ public okhttp3.Call updateWebhookSubscriptionCall(String accountId, String id, W localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling updateWebhookSubscription(Async)"); @@ -1496,7 +1496,7 @@ private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(String accountI 503 Service Unavailable - */ - public WebhookSubscription updateWebhookSubscription(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public WebhookSubscription updateWebhookSubscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { ApiResponse localVarResp = updateWebhookSubscriptionWithHttpInfo(accountId, id, webhookSubscriptionRequestSchema); return localVarResp.getData(); } @@ -1524,7 +1524,7 @@ public WebhookSubscription updateWebhookSubscription(String accountId, String id 503 Service Unavailable - */ - public ApiResponse updateWebhookSubscriptionWithHttpInfo(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { + public ApiResponse updateWebhookSubscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema) throws ApiException { okhttp3.Call localVarCall = updateWebhookSubscriptionValidateBeforeCall(accountId, id, webhookSubscriptionRequestSchema, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -1554,7 +1554,7 @@ public ApiResponse updateWebhookSubscriptionWithHttpInfo(St 503 Service Unavailable - */ - public okhttp3.Call updateWebhookSubscriptionAsync(String accountId, String id, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { + public okhttp3.Call updateWebhookSubscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String id, @javax.annotation.Nonnull WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWebhookSubscriptionValidateBeforeCall(accountId, id, webhookSubscriptionRequestSchema, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java b/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java index cd911d97..0c0e42d3 100644 --- a/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/TranscriptionsApi.java @@ -97,7 +97,7 @@ public void setCustomBaseUrl(String customBaseUrl) { 500 Internal Server Error - */ - public okhttp3.Call deleteRealTimeTranscriptionCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRealTimeTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -140,12 +140,12 @@ public okhttp3.Call deleteRealTimeTranscriptionCall(String accountId, String cal localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling deleteRealTimeTranscription(Async)"); @@ -187,7 +187,7 @@ private okhttp3.Call deleteRealTimeTranscriptionValidateBeforeCall(String accoun 500 Internal Server Error - */ - public void deleteRealTimeTranscription(String accountId, String callId, String transcriptionId) throws ApiException { + public void deleteRealTimeTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { deleteRealTimeTranscriptionWithHttpInfo(accountId, callId, transcriptionId); } @@ -214,7 +214,7 @@ public void deleteRealTimeTranscription(String accountId, String callId, String 500 Internal Server Error - */ - public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(String accountId, String callId, String transcriptionId) throws ApiException { + public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { okhttp3.Call localVarCall = deleteRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, null); return localVarApiClient.execute(localVarCall); } @@ -243,7 +243,7 @@ public ApiResponse deleteRealTimeTranscriptionWithHttpInfo(String accountI 500 Internal Server Error - */ - public okhttp3.Call deleteRealTimeTranscriptionAsync(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteRealTimeTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); @@ -272,7 +272,7 @@ public okhttp3.Call deleteRealTimeTranscriptionAsync(String accountId, String ca 500 Internal Server Error - */ - public okhttp3.Call getRealTimeTranscriptionCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRealTimeTranscriptionCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -315,12 +315,12 @@ public okhttp3.Call getRealTimeTranscriptionCall(String accountId, String callId localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling getRealTimeTranscription(Async)"); @@ -363,7 +363,7 @@ private okhttp3.Call getRealTimeTranscriptionValidateBeforeCall(String accountId 500 Internal Server Error - */ - public CallTranscriptionResponse getRealTimeTranscription(String accountId, String callId, String transcriptionId) throws ApiException { + public CallTranscriptionResponse getRealTimeTranscription(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { ApiResponse localVarResp = getRealTimeTranscriptionWithHttpInfo(accountId, callId, transcriptionId); return localVarResp.getData(); } @@ -391,7 +391,7 @@ public CallTranscriptionResponse getRealTimeTranscription(String accountId, Stri 500 Internal Server Error - */ - public ApiResponse getRealTimeTranscriptionWithHttpInfo(String accountId, String callId, String transcriptionId) throws ApiException { + public ApiResponse getRealTimeTranscriptionWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId) throws ApiException { okhttp3.Call localVarCall = getRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -421,7 +421,7 @@ public ApiResponse getRealTimeTranscriptionWithHttpIn 500 Internal Server Error - */ - public okhttp3.Call getRealTimeTranscriptionAsync(String accountId, String callId, String transcriptionId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getRealTimeTranscriptionAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, @javax.annotation.Nonnull String transcriptionId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getRealTimeTranscriptionValidateBeforeCall(accountId, callId, transcriptionId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); @@ -450,7 +450,7 @@ public okhttp3.Call getRealTimeTranscriptionAsync(String accountId, String callI 500 Internal Server Error - */ - public okhttp3.Call listRealTimeTranscriptionsCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call listRealTimeTranscriptionsCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { "https://voice.bandwidth.com/api/v2" }; @@ -492,12 +492,12 @@ public okhttp3.Call listRealTimeTranscriptionsCall(String accountId, String call localVarHeaderParams.put("Content-Type", localVarContentType); } - String[] localVarAuthNames = new String[] { "Basic" }; + String[] localVarAuthNames = new String[] { "Basic", "OAuth2" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(String accountId, String callId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'accountId' is set if (accountId == null) { throw new ApiException("Missing the required parameter 'accountId' when calling listRealTimeTranscriptions(Async)"); @@ -534,7 +534,7 @@ private okhttp3.Call listRealTimeTranscriptionsValidateBeforeCall(String account 500 Internal Server Error - */ - public List listRealTimeTranscriptions(String accountId, String callId) throws ApiException { + public List listRealTimeTranscriptions(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { ApiResponse> localVarResp = listRealTimeTranscriptionsWithHttpInfo(accountId, callId); return localVarResp.getData(); } @@ -561,7 +561,7 @@ public List listRealTimeTranscriptions(String account 500 Internal Server Error - */ - public ApiResponse> listRealTimeTranscriptionsWithHttpInfo(String accountId, String callId) throws ApiException { + public ApiResponse> listRealTimeTranscriptionsWithHttpInfo(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId) throws ApiException { okhttp3.Call localVarCall = listRealTimeTranscriptionsValidateBeforeCall(accountId, callId, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -590,7 +590,7 @@ public ApiResponse> listRealTimeTranscriptionsWi 500 Internal Server Error - */ - public okhttp3.Call listRealTimeTranscriptionsAsync(String accountId, String callId, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call listRealTimeTranscriptionsAsync(@javax.annotation.Nonnull String accountId, @javax.annotation.Nonnull String callId, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = listRealTimeTranscriptionsValidateBeforeCall(accountId, callId, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); diff --git a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java index 61bbc92e..0f8830d9 100644 --- a/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/ApiKeyAuth.java @@ -20,7 +20,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/bandwidth/sdk/auth/Authentication.java b/src/main/java/com/bandwidth/sdk/auth/Authentication.java index 243865e9..e460549a 100644 --- a/src/main/java/com/bandwidth/sdk/auth/Authentication.java +++ b/src/main/java/com/bandwidth/sdk/auth/Authentication.java @@ -20,6 +20,7 @@ import java.util.Map; import java.util.List; +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public interface Authentication { /** * Apply authentication settings to header and query params. diff --git a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java index 565d3c51..640c0300 100644 --- a/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java +++ b/src/main/java/com/bandwidth/sdk/auth/HttpBearerAuth.java @@ -22,7 +22,7 @@ import java.util.Optional; import java.util.function.Supplier; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class HttpBearerAuth implements Authentication { private final String scheme; private Supplier tokenSupplier; diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuth.java b/src/main/java/com/bandwidth/sdk/auth/OAuth.java new file mode 100644 index 00000000..22437158 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/OAuth.java @@ -0,0 +1,42 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.auth; + +import com.bandwidth.sdk.Pair; +import com.bandwidth.sdk.ApiException; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java new file mode 100644 index 00000000..4b67db9c --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthFlow.java @@ -0,0 +1,25 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.auth; + +/** + * OAuth flows that are supported by this client + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") +public enum OAuthFlow { + ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 + IMPLICIT, + PASSWORD, + APPLICATION //called clientCredentials in OpenAPI 3.0 +} diff --git a/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java b/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java new file mode 100644 index 00000000..ae19b927 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/OAuthOkHttpClient.java @@ -0,0 +1,84 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.auth; + +import okhttp3.OkHttpClient; +import okhttp3.MediaType; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +public class OAuthOkHttpClient implements HttpClient { + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + @Override + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + headers = request.getHeaders(); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(request.getBody(), mediaType) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + response.headers().toMultimap(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + @Override + public void shutdown() { + // Nothing to do here + } +} diff --git a/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java new file mode 100644 index 00000000..f943cda7 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/auth/RetryingOAuth.java @@ -0,0 +1,229 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.bandwidth.sdk.auth; + +import com.bandwidth.sdk.ApiException; +import com.bandwidth.sdk.Pair; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URI; +import java.util.Map; +import java.util.List; +import java.util.Base64; + +public class RetryingOAuth extends OAuth implements Interceptor { + private OAuthClient oAuthClient; + + private TokenRequestBuilder tokenRequestBuilder; + + private String clientId; + private String clientSecret; + + /** + * @param client An OkHttp client + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(OkHttpClient client, TokenRequestBuilder tokenRequestBuilder) { + this.oAuthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = tokenRequestBuilder; + } + + /** + * @param tokenRequestBuilder A token request builder + */ + public RetryingOAuth(TokenRequestBuilder tokenRequestBuilder) { + this(new OkHttpClient(), tokenRequestBuilder); + } + + /** + * @param tokenUrl The token URL to be used for this OAuth2 flow. + * Applicable to the following OAuth2 flows: "password", "clientCredentials" and "authorizationCode". + * The value must be an absolute URL. + * @param clientId The OAuth2 client ID for the "clientCredentials" flow. + * @param flow OAuth flow. + * @param clientSecret The OAuth2 client secret for the "clientCredentials" flow. + * @param parameters A map of string. + */ + public RetryingOAuth( + String tokenUrl, + String clientId, + OAuthFlow flow, + String clientSecret, + Map parameters + ) { + this(OAuthClientRequest.tokenLocation(tokenUrl)); + this.clientId = clientId; + this.clientSecret = clientSecret; + setFlow(flow); + if (parameters != null) { + for (Map.Entry entry : parameters.entrySet()) { + tokenRequestBuilder.setParameter(entry.getKey(), entry.getValue()); + } + } + } + + /** + * Set the OAuth flow + * + * @param flow The OAuth flow. + */ + public void setFlow(OAuthFlow flow) { + switch(flow) { + case ACCESS_CODE: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case IMPLICIT: + tokenRequestBuilder.setGrantType(GrantType.IMPLICIT); + break; + case PASSWORD: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case APPLICATION: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) throws IOException { + return retryingIntercept(chain, true); + } + + private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException { + Request request = chain.request(); + + // If the request already has an authorization (e.g. Basic auth), proceed with the request as is + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // Get the token if it has not yet been acquired + if (getAccessToken() == null) { + updateAccessToken(null); + } + + OAuthClientRequest oAuthRequest; + if (getAccessToken() != null) { + // Build the request + Request.Builder requestBuilder = request.newBuilder(); + + String requestAccessToken = getAccessToken(); + try { + oAuthRequest = + new OAuthBearerClientRequest(request.url().toString()). + setAccessToken(requestAccessToken). + buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + Map headers = oAuthRequest.getHeaders(); + for (Map.Entry entry : headers.entrySet()) { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + requestBuilder.url(oAuthRequest.getLocationUri()); + + // Execute the request + Response response = chain.proceed(requestBuilder.build()); + + // 401/403 response codes most likely indicate an expired access token, unless it happens two times in a row + if ( + response != null && + ( response.code() == HttpURLConnection.HTTP_UNAUTHORIZED || + response.code() == HttpURLConnection.HTTP_FORBIDDEN ) && + updateTokenAndRetryOnAuthorizationFailure + ) { + try { + if (updateAccessToken(requestAccessToken)) { + response.body().close(); + return retryingIntercept(chain, false); + } + } catch (Exception e) { + response.body().close(); + throw e; + } + } + return response; + } + else { + return chain.proceed(chain.request()); + } + } + + /** + * Returns true if the access token has been updated + * + * @param requestAccessToken the request access token + * @return True if the update is successful + * @throws java.io.IOException If fail to update the access token + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthClientRequest req = tokenRequestBuilder.buildBodyMessage(); + String credentials = Base64.getEncoder().encodeToString((clientId + ":" + clientSecret).getBytes()); + req.setHeader("Authorization", "Basic " + credentials); + OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(req); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + } + } catch (OAuthSystemException | OAuthProblemException e) { + throw new IOException(e); + } + } + return getAccessToken() == null || !getAccessToken().equals(requestAccessToken); + } + + /** + * Gets the token request builder + * + * @return A token request builder + */ + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + /** + * Sets the token request builder + * + * @param tokenRequestBuilder Token request builder + */ + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + // Applying authorization to parameters is performed in the retryingIntercept method + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + // No implementation necessary + } +} diff --git a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java index 3c487529..346508f7 100644 --- a/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/AbstractOpenApiSchema.java @@ -21,7 +21,7 @@ /** * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object diff --git a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java index 6068f9f0..92a28b9a 100644 --- a/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java +++ b/src/main/java/com/bandwidth/sdk/model/AccountStatistics.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AccountStatistics */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AccountStatistics { public static final String SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE = "currentCallQueueSize"; @SerializedName(SERIALIZED_NAME_CURRENT_CALL_QUEUE_SIZE) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("currentCallQueueSize"); - openapiFields.add("maxCallQueueSize"); + openapiFields = new HashSet(Arrays.asList("currentCallQueueSize", "maxCallQueueSize")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,7 +210,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AccountStatistics.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AccountStatistics is not found in the empty JSON string", AccountStatistics.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -273,7 +273,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java index e9c708b5..74102c08 100644 --- a/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java +++ b/src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * AdditionalDenialReason */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AdditionalDenialReason { public static final String SERIALIZED_NAME_STATUS_CODE = "statusCode"; @SerializedName(SERIALIZED_NAME_STATUS_CODE) @@ -219,16 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("statusCode"); - openapiFields.add("reason"); - openapiFields.add("resubmitAllowed"); + openapiFields = new HashSet(Arrays.asList("statusCode", "reason", "resubmitAllowed")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("statusCode"); - openapiRequiredFields.add("reason"); - openapiRequiredFields.add("resubmitAllowed"); + openapiRequiredFields = new HashSet(Arrays.asList("statusCode", "reason", "resubmitAllowed")); } /** @@ -240,19 +236,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AdditionalDenialReason.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AdditionalDenialReason is not found in the empty JSON string", AdditionalDenialReason.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AdditionalDenialReason is not found in the empty JSON string", AdditionalDenialReason.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : AdditionalDenialReason.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } } @@ -313,7 +309,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Address.java b/src/main/java/com/bandwidth/sdk/model/Address.java index 198c29b9..57f6bc85 100644 --- a/src/main/java/com/bandwidth/sdk/model/Address.java +++ b/src/main/java/com/bandwidth/sdk/model/Address.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Address */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Address { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -335,23 +337,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("name"); - openapiFields.add("addr1"); - openapiFields.add("addr2"); - openapiFields.add("city"); - openapiFields.add("state"); - openapiFields.add("zip"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("name", "addr1", "addr2", "city", "state", "zip", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("addr1"); - openapiRequiredFields.add("city"); - openapiRequiredFields.add("state"); - openapiRequiredFields.add("zip"); - openapiRequiredFields.add("url"); + openapiRequiredFields = new HashSet(Arrays.asList("name", "addr1", "city", "state", "zip", "url")); } /** @@ -363,37 +352,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Address.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Address is not found in the empty JSON string", Address.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Address.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if (!jsonObj.get("addr1").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addr1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr1").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `addr1` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr1").toString())); } if ((jsonObj.get("addr2") != null && !jsonObj.get("addr2").isJsonNull()) && !jsonObj.get("addr2").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `addr2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr2").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `addr2` to be a primitive type in the JSON string but got `%s`", jsonObj.get("addr2").toString())); } if (!jsonObj.get("city").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `city` to be a primitive type in the JSON string but got `%s`", jsonObj.get("city").toString())); } if (!jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if (!jsonObj.get("zip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `zip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("zip").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -454,7 +443,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java index 1805765d..1dacfcd8 100644 --- a/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/AnswerCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.MachineDetectionResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class AnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -521,24 +523,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); - openapiFields.add("machineDetectionResult"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -550,37 +538,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!AnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AnswerCallback is not found in the empty JSON string", AnswerCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -645,7 +633,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java index 805cd7d3..47d56176 100644 --- a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvCallbackStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * BlockedWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BlockedWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -299,16 +301,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("phoneNumber"); - openapiFields.add("status"); - openapiFields.add("internalTicketNumber"); - openapiFields.add("blocked"); - openapiFields.add("blockedReason"); + openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "status", "internalTicketNumber", "blocked", "blockedReason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -320,25 +316,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BlockedWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -399,7 +395,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java index 1550d1f6..99c5c41a 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BridgeCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -572,26 +574,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); - openapiFields.add("cause"); - openapiFields.add("errorMessage"); - openapiFields.add("errorId"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "cause", "errorMessage", "errorId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -603,46 +589,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BridgeCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BridgeCompleteCallback is not found in the empty JSON string", BridgeCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -703,7 +689,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java index 204d6cf8..3ac50f75 100644 --- a/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class BridgeTargetCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -494,23 +496,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -522,37 +511,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!BridgeTargetCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BridgeTargetCompleteCallback is not found in the empty JSON string", BridgeTargetCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -613,7 +602,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java index f1b6f178..eb0a353d 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessEntityTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java index fd5bb5d0..391c263c 100644 --- a/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/BusinessRegistrationTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java index ddf8bbde..cbfa167d 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java index 6247baa9..017f4a5e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.RecordingTranscriptionMetadata; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallRecordingMetadata { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -652,29 +654,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("applicationId"); - openapiFields.add("accountId"); - openapiFields.add("callId"); - openapiFields.add("parentCallId"); - openapiFields.add("recordingId"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); - openapiFields.add("duration"); - openapiFields.add("direction"); - openapiFields.add("channels"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("fileFormat"); - openapiFields.add("status"); - openapiFields.add("mediaUrl"); - openapiFields.add("transcription"); - openapiFields.add("recordingName"); + openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "parentCallId", "recordingId", "to", "from", "transferCallerId", "transferTo", "duration", "direction", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "transcription", "recordingName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -686,39 +669,39 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallRecordingMetadata is not found in the empty JSON string", CallRecordingMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { @@ -729,17 +712,17 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { RecordingTranscriptionMetadata.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("recordingName") != null && !jsonObj.get("recordingName").isJsonNull()) && !jsonObj.get("recordingName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -800,7 +783,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallState.java b/src/main/java/com/bandwidth/sdk/model/CallState.java index 0d6d0396..a91573c7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallState.java +++ b/src/main/java/com/bandwidth/sdk/model/CallState.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallState */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallState { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -633,28 +635,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("applicationId"); - openapiFields.add("accountId"); - openapiFields.add("callId"); - openapiFields.add("parentCallId"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("direction"); - openapiFields.add("state"); - openapiFields.add("stirShaken"); - openapiFields.add("identity"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("endTime"); - openapiFields.add("disconnectCause"); - openapiFields.add("errorMessage"); - openapiFields.add("errorId"); - openapiFields.add("lastUpdate"); + openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "parentCallId", "to", "from", "direction", "state", "stirShaken", "identity", "enqueuedTime", "startTime", "answerTime", "endTime", "disconnectCause", "errorMessage", "errorId", "lastUpdate")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -666,46 +650,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallState.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallState is not found in the empty JSON string", CallState.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("state") != null && !jsonObj.get("state").isJsonNull()) && !jsonObj.get("state").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `state` to be a primitive type in the JSON string but got `%s`", jsonObj.get("state").toString())); } if ((jsonObj.get("identity") != null && !jsonObj.get("identity").isJsonNull()) && !jsonObj.get("identity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `identity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `identity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("identity").toString())); } if ((jsonObj.get("disconnectCause") != null && !jsonObj.get("disconnectCause").isJsonNull()) && !jsonObj.get("disconnectCause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disconnectCause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectCause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectCause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectCause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -766,7 +750,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java index 64fd1045..6fcea9ee 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java index c166e71b..873a1ed5 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscription.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscriptionDetectedLanguageEnum; import com.bandwidth.sdk.model.CallTranscriptionTrackEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallTranscription { public static final String SERIALIZED_NAME_DETECTED_LANGUAGE = "detectedLanguage"; @SerializedName(SERIALIZED_NAME_DETECTED_LANGUAGE) @@ -249,14 +251,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("detectedLanguage"); - openapiFields.add("track"); - openapiFields.add("transcript"); - openapiFields.add("confidence"); + openapiFields = new HashSet(Arrays.asList("detectedLanguage", "track", "transcript", "confidence")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -268,7 +266,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscription is not found in the empty JSON string", CallTranscription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -281,7 +279,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CallTranscriptionTrackEnum.validateJsonElement(jsonObj.get("track")); } if ((jsonObj.get("transcript") != null && !jsonObj.get("transcript").isJsonNull()) && !jsonObj.get("transcript").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcript` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcript").toString())); } } @@ -342,7 +340,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java index 6295e064..4de2aca7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionDetectedLanguageEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java index ca3e2a41..af1a05ed 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallTranscriptionMetadata { public static final String SERIALIZED_NAME_TRANSCRIPTION_ID = "transcriptionId"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTION_ID) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transcriptionId"); - openapiFields.add("transcriptionName"); - openapiFields.add("transcriptionUrl"); + openapiFields = new HashSet(Arrays.asList("transcriptionId", "transcriptionName", "transcriptionUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallTranscriptionMetadata is not found in the empty JSON string", CallTranscriptionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscriptionMetadata is not found in the empty JSON string", CallTranscriptionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("transcriptionId") != null && !jsonObj.get("transcriptionId").isJsonNull()) && !jsonObj.get("transcriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); } if ((jsonObj.get("transcriptionName") != null && !jsonObj.get("transcriptionName").isJsonNull()) && !jsonObj.get("transcriptionName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionName").toString())); } if ((jsonObj.get("transcriptionUrl") != null && !jsonObj.get("transcriptionUrl").isJsonNull()) && !jsonObj.get("transcriptionUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionUrl").toString())); } } @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java index d1c4603e..64ebb417 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallTranscription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CallTranscriptionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CallTranscriptionResponse { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -256,14 +258,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("callId"); - openapiFields.add("transcriptionId"); - openapiFields.add("tracks"); + openapiFields = new HashSet(Arrays.asList("accountId", "callId", "transcriptionId", "tracks")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -275,25 +273,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CallTranscriptionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CallTranscriptionResponse is not found in the empty JSON string", CallTranscriptionResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CallTranscriptionResponse is not found in the empty JSON string", CallTranscriptionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("transcriptionId") != null && !jsonObj.get("transcriptionId").isJsonNull()) && !jsonObj.get("transcriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transcriptionId").toString())); } if (jsonObj.get("tracks") != null && !jsonObj.get("tracks").isJsonNull()) { JsonArray jsonArraytracks = jsonObj.getAsJsonArray("tracks"); if (jsonArraytracks != null) { // ensure the json data is an array if (!jsonObj.get("tracks").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tracks` to be an array in the JSON string but got `%s`", jsonObj.get("tracks").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tracks` to be an array in the JSON string but got `%s`", jsonObj.get("tracks").toString())); } // validate the optional field `tracks` (array) @@ -361,7 +359,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java index 0d0089a7..6f18f069 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallTranscriptionTrackEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Callback.java b/src/main/java/com/bandwidth/sdk/model/Callback.java index afcf7f15..1c64f0ef 100644 --- a/src/main/java/com/bandwidth/sdk/model/Callback.java +++ b/src/main/java/com/bandwidth/sdk/model/Callback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InboundCallback; import com.bandwidth.sdk.model.InboundCallbackMessage; import com.bandwidth.sdk.model.InboundCallbackTypeEnum; @@ -39,6 +40,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -62,7 +64,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Callback extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(Callback.class.getName()); @@ -118,7 +120,7 @@ public Callback read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'StatusCallback'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'StatusCallback'", e); } // deserialize InboundCallback @@ -130,7 +132,7 @@ public Callback read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'InboundCallback'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'InboundCallback'", e); } @@ -140,7 +142,7 @@ public Callback read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format("Failed deserialization for Callback: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for Callback: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -239,7 +241,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StatusCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for StatusCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for StatusCallback failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with InboundCallback @@ -247,11 +249,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti InboundCallback.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for InboundCallback failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for InboundCallback failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for Callback with oneOf schemas: InboundCallback, StatusCallback. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for Callback with oneOf schemas: InboundCallback, StatusCallback. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java index 3e169433..5b608007 100644 --- a/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CallbackMethodEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java index 760212bf..d86c8dfc 100644 --- a/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/CardWidthEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java index 06e06d9b..f8f2dd12 100644 --- a/src/main/java/com/bandwidth/sdk/model/CodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/CodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -299,21 +301,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("applicationId"); - openapiFields.add("scope"); - openapiFields.add("message"); - openapiFields.add("digits"); + openapiFields = new HashSet(Arrays.asList("to", "from", "applicationId", "scope", "message", "digits")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("message"); - openapiRequiredFields.add("digits"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "from", "applicationId", "message", "digits")); } /** @@ -325,31 +316,31 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CodeRequest is not found in the empty JSON string", CodeRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CodeRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if (!jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -410,7 +401,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Conference.java b/src/main/java/com/bandwidth/sdk/model/Conference.java index 5522b692..5104de55 100644 --- a/src/main/java/com/bandwidth/sdk/model/Conference.java +++ b/src/main/java/com/bandwidth/sdk/model/Conference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.ConferenceMember; import com.google.gson.TypeAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Conference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Conference { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -375,18 +377,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("name"); - openapiFields.add("createdTime"); - openapiFields.add("completedTime"); - openapiFields.add("conferenceEventUrl"); - openapiFields.add("conferenceEventMethod"); - openapiFields.add("tag"); - openapiFields.add("activeMembers"); + openapiFields = new HashSet(Arrays.asList("id", "name", "createdTime", "completedTime", "conferenceEventUrl", "conferenceEventMethod", "tag", "activeMembers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -398,32 +392,32 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Conference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Conference is not found in the empty JSON string", Conference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("conferenceEventUrl") != null && !jsonObj.get("conferenceEventUrl").isJsonNull()) && !jsonObj.get("conferenceEventUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceEventUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceEventUrl").toString())); } // validate the optional field `conferenceEventMethod` if (jsonObj.get("conferenceEventMethod") != null && !jsonObj.get("conferenceEventMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("conferenceEventMethod")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if (jsonObj.get("activeMembers") != null && !jsonObj.get("activeMembers").isJsonNull()) { JsonArray jsonArrayactiveMembers = jsonObj.getAsJsonArray("activeMembers"); if (jsonArrayactiveMembers != null) { // ensure the json data is an array if (!jsonObj.get("activeMembers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `activeMembers` to be an array in the JSON string but got `%s`", jsonObj.get("activeMembers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `activeMembers` to be an array in the JSON string but got `%s`", jsonObj.get("activeMembers").toString())); } // validate the optional field `activeMembers` (array) @@ -491,7 +485,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java index 007d0144..d4bab911 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCompletedCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceCompletedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -284,15 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -304,21 +301,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceCompletedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceCompletedCallback is not found in the empty JSON string", ConferenceCompletedCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -379,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java index 30bf3e04..cd5998df 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceCreatedCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceCreatedCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -284,15 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -304,21 +301,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceCreatedCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceCreatedCallback is not found in the empty JSON string", ConferenceCreatedCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -379,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java index e74930a5..72447880 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceMember { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -320,16 +322,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("callId"); - openapiFields.add("conferenceId"); - openapiFields.add("memberUrl"); - openapiFields.add("mute"); - openapiFields.add("hold"); - openapiFields.add("callIdsToCoach"); + openapiFields = new HashSet(Arrays.asList("callId", "conferenceId", "memberUrl", "mute", "hold", "callIdsToCoach")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -341,22 +337,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMember is not found in the empty JSON string", ConferenceMember.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("memberUrl") != null && !jsonObj.get("memberUrl").isJsonNull()) && !jsonObj.get("memberUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `memberUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `memberUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("memberUrl").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -417,7 +413,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java index 82f93c9a..89d7020e 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberExitCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceMemberExitCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -362,18 +364,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("callId"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "from", "to", "callId", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -385,30 +379,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceMemberExitCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMemberExitCallback is not found in the empty JSON string", ConferenceMemberExitCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -469,7 +463,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java index 780c9390..85daf7e1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceMemberJoinCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceMemberJoinCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -362,18 +364,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("callId"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "from", "to", "callId", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -385,30 +379,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceMemberJoinCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceMemberJoinCallback is not found in the empty JSON string", ConferenceMemberJoinCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -469,7 +463,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java index 84c96c4c..1558a280 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceRecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -520,24 +522,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("accountId"); - openapiFields.add("recordingId"); - openapiFields.add("channels"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("duration"); - openapiFields.add("fileFormat"); - openapiFields.add("mediaUrl"); - openapiFields.add("tag"); - openapiFields.add("status"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "accountId", "recordingId", "channels", "startTime", "endTime", "duration", "fileFormat", "mediaUrl", "tag", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -549,40 +537,40 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceRecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRecordingAvailableCallback is not found in the empty JSON string", ConferenceRecordingAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } } @@ -643,7 +631,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java index 64495284..4e619ebe 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRecordingMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ConferenceRecordingMetadata */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceRecordingMetadata { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -468,22 +470,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("recordingId"); - openapiFields.add("duration"); - openapiFields.add("channels"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("fileFormat"); - openapiFields.add("status"); - openapiFields.add("mediaUrl"); - openapiFields.add("recordingName"); + openapiFields = new HashSet(Arrays.asList("accountId", "conferenceId", "name", "recordingId", "duration", "channels", "startTime", "endTime", "fileFormat", "status", "mediaUrl", "recordingName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -495,37 +485,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceRecordingMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRecordingMetadata is not found in the empty JSON string", ConferenceRecordingMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("recordingName") != null && !jsonObj.get("recordingName").isJsonNull()) && !jsonObj.get("recordingName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingName").toString())); } } @@ -586,7 +576,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java index 77daf53b..4b2dd282 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceRedirectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ConferenceRedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -284,15 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("conferenceId"); - openapiFields.add("name"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "conferenceId", "name", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -304,21 +301,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ConferenceRedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ConferenceRedirectCallback is not found in the empty JSON string", ConferenceRedirectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("conferenceId") != null && !jsonObj.get("conferenceId").isJsonNull()) && !jsonObj.get("conferenceId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `conferenceId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("conferenceId").toString())); } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -379,7 +376,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java index 8f457611..2e183ec2 100644 --- a/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ConferenceStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/Contact.java b/src/main/java/com/bandwidth/sdk/model/Contact.java index bf293874..9d2c69ee 100644 --- a/src/main/java/com/bandwidth/sdk/model/Contact.java +++ b/src/main/java/com/bandwidth/sdk/model/Contact.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Contact */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Contact { public static final String SERIALIZED_NAME_FIRST_NAME = "firstName"; @SerializedName(SERIALIZED_NAME_FIRST_NAME) @@ -245,18 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("firstName"); - openapiFields.add("lastName"); - openapiFields.add("email"); - openapiFields.add("phoneNumber"); + openapiFields = new HashSet(Arrays.asList("firstName", "lastName", "email", "phoneNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("firstName"); - openapiRequiredFields.add("lastName"); - openapiRequiredFields.add("email"); - openapiRequiredFields.add("phoneNumber"); + openapiRequiredFields = new HashSet(Arrays.asList("firstName", "lastName", "email", "phoneNumber")); } /** @@ -268,28 +262,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Contact.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Contact is not found in the empty JSON string", Contact.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : Contact.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("firstName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `firstName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("firstName").toString())); } if (!jsonObj.get("lastName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `lastName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lastName").toString())); } if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); } if (!jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -350,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCall.java b/src/main/java/com/bandwidth/sdk/model/CreateCall.java index 4735e05a..f7d33b2e 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCall.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.MachineDetectionConfiguration; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateCall { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -708,35 +710,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("privacy"); - openapiFields.add("displayName"); - openapiFields.add("uui"); - openapiFields.add("applicationId"); - openapiFields.add("answerUrl"); - openapiFields.add("answerMethod"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("answerFallbackUrl"); - openapiFields.add("answerFallbackMethod"); - openapiFields.add("fallbackUsername"); - openapiFields.add("fallbackPassword"); - openapiFields.add("disconnectUrl"); - openapiFields.add("disconnectMethod"); - openapiFields.add("callTimeout"); - openapiFields.add("callbackTimeout"); - openapiFields.add("machineDetection"); - openapiFields.add("priority"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("to", "from", "privacy", "displayName", "uui", "applicationId", "answerUrl", "answerMethod", "username", "password", "answerFallbackUrl", "answerFallbackMethod", "fallbackUsername", "fallbackPassword", "disconnectUrl", "disconnectMethod", "callTimeout", "callbackTimeout", "machineDetection", "priority", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("answerUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "from", "applicationId", "answerUrl")); } /** @@ -748,60 +725,60 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateCall is not found in the empty JSON string", CreateCall.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCall.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("displayName") != null && !jsonObj.get("displayName").isJsonNull()) && !jsonObj.get("displayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `displayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("displayName").toString())); } if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } // validate the optional field `answerMethod` if (jsonObj.get("answerMethod") != null && !jsonObj.get("answerMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } // validate the optional field `answerFallbackMethod` if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } // validate the optional field `disconnectMethod` if (jsonObj.get("disconnectMethod") != null && !jsonObj.get("disconnectMethod").isJsonNull()) { @@ -812,7 +789,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MachineDetectionConfiguration.validateJsonElement(jsonObj.get("machineDetection")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -873,7 +850,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java index c8263e3b..50c9ae4b 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateCallResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateCallResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateCallResponse { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -702,40 +704,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("applicationId"); - openapiFields.add("accountId"); - openapiFields.add("callId"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("enqueuedTime"); - openapiFields.add("callUrl"); - openapiFields.add("callTimeout"); - openapiFields.add("callbackTimeout"); - openapiFields.add("tag"); - openapiFields.add("answerMethod"); - openapiFields.add("answerUrl"); - openapiFields.add("answerFallbackMethod"); - openapiFields.add("answerFallbackUrl"); - openapiFields.add("disconnectMethod"); - openapiFields.add("disconnectUrl"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("fallbackUsername"); - openapiFields.add("fallbackPassword"); - openapiFields.add("priority"); + openapiFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "to", "from", "enqueuedTime", "callUrl", "callTimeout", "callbackTimeout", "tag", "answerMethod", "answerUrl", "answerFallbackMethod", "answerFallbackUrl", "disconnectMethod", "disconnectUrl", "username", "password", "fallbackUsername", "fallbackPassword", "priority")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("accountId"); - openapiRequiredFields.add("callId"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("callUrl"); - openapiRequiredFields.add("answerMethod"); - openapiRequiredFields.add("answerUrl"); - openapiRequiredFields.add("disconnectMethod"); + openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "accountId", "callId", "to", "from", "callUrl", "answerMethod", "answerUrl", "disconnectMethod")); } /** @@ -747,66 +719,66 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateCallResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateCallResponse is not found in the empty JSON string", CreateCallResponse.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateCallResponse.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if (!jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if (!jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the required field `answerMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("answerMethod")); if (!jsonObj.get("answerUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerUrl").toString())); } // validate the optional field `answerFallbackMethod` if (jsonObj.get("answerFallbackMethod") != null && !jsonObj.get("answerFallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("answerFallbackMethod")); } if ((jsonObj.get("answerFallbackUrl") != null && !jsonObj.get("answerFallbackUrl").isJsonNull()) && !jsonObj.get("answerFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `answerFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("answerFallbackUrl").toString())); } // validate the required field `disconnectMethod` CallbackMethodEnum.validateJsonElement(jsonObj.get("disconnectMethod")); if ((jsonObj.get("disconnectUrl") != null && !jsonObj.get("disconnectUrl").isJsonNull()) && !jsonObj.get("disconnectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `disconnectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("disconnectUrl").toString())); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -867,7 +839,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java index 76a1af9a..66b40cc8 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateLookupResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LookupStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The request has been accepted for processing but not yet finished and in a terminal state (COMPLETE, PARTIAL_COMPLETE, or FAILED). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateLookupResponse { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -194,12 +196,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("requestId"); - openapiFields.add("status"); + openapiFields = new HashSet(Arrays.asList("requestId", "status")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -211,12 +211,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateLookupResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateLookupResponse is not found in the empty JSON string", CreateLookupResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateLookupResponse is not found in the empty JSON string", CreateLookupResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -281,7 +281,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java index b0dd177f..5aad8099 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMessageRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.FieldError; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMessageRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateMessageRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -230,15 +232,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("fieldErrors"); + openapiFields = new HashSet(Arrays.asList("type", "description", "fieldErrors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("description"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "description")); } /** @@ -250,29 +247,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateMessageRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateMessageRequestError is not found in the empty JSON string", CreateMessageRequestError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : CreateMessageRequestError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (jsonObj.get("fieldErrors") != null && !jsonObj.get("fieldErrors").isJsonNull()) { JsonArray jsonArrayfieldErrors = jsonObj.getAsJsonArray("fieldErrors"); if (jsonArrayfieldErrors != null) { // ensure the json data is an array if (!jsonObj.get("fieldErrors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `fieldErrors` to be an array in the JSON string but got `%s`", jsonObj.get("fieldErrors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fieldErrors` to be an array in the JSON string but got `%s`", jsonObj.get("fieldErrors").toString())); } // validate the optional field `fieldErrors` (array) @@ -340,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java index b11b43ba..0b748ce7 100644 --- a/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/CreateMultiChannelMessageResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.bandwidth.sdk.model.MultiChannelMessageResponseData; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * CreateMultiChannelMessageResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class CreateMultiChannelMessageResponse { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -240,13 +242,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("links"); - openapiFields.add("data"); - openapiFields.add("errors"); + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -258,7 +257,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!CreateMultiChannelMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in CreateMultiChannelMessageResponse is not found in the empty JSON string", CreateMultiChannelMessageResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -267,7 +266,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -285,7 +284,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -353,7 +352,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java index c4756ba0..38e2369a 100644 --- a/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DisconnectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Disconnect event is fired when a call ends, for any reason. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class DisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -598,27 +600,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("callId"); - openapiFields.add("direction"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("endTime"); - openapiFields.add("cause"); - openapiFields.add("errorMessage"); - openapiFields.add("errorId"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "callUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "cause", "errorMessage", "errorId", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -630,46 +615,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!DisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DisconnectCallback is not found in the empty JSON string", DisconnectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -730,7 +715,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Diversion.java b/src/main/java/com/bandwidth/sdk/model/Diversion.java index 61159811..f5a5edd6 100644 --- a/src/main/java/com/bandwidth/sdk/model/Diversion.java +++ b/src/main/java/com/bandwidth/sdk/model/Diversion.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Diversion */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Diversion { public static final String SERIALIZED_NAME_REASON = "reason"; @SerializedName(SERIALIZED_NAME_REASON) @@ -323,17 +325,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("reason"); - openapiFields.add("privacy"); - openapiFields.add("screen"); - openapiFields.add("counter"); - openapiFields.add("limit"); - openapiFields.add("unknown"); - openapiFields.add("origTo"); + openapiFields = new HashSet(Arrays.asList("reason", "privacy", "screen", "counter", "limit", "unknown", "origTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -345,30 +340,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Diversion.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Diversion is not found in the empty JSON string", Diversion.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("reason") != null && !jsonObj.get("reason").isJsonNull()) && !jsonObj.get("reason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reason").toString())); } if ((jsonObj.get("privacy") != null && !jsonObj.get("privacy").isJsonNull()) && !jsonObj.get("privacy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacy").toString())); } if ((jsonObj.get("screen") != null && !jsonObj.get("screen").isJsonNull()) && !jsonObj.get("screen").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `screen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("screen").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `screen` to be a primitive type in the JSON string but got `%s`", jsonObj.get("screen").toString())); } if ((jsonObj.get("counter") != null && !jsonObj.get("counter").isJsonNull()) && !jsonObj.get("counter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `counter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `counter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("counter").toString())); } if ((jsonObj.get("limit") != null && !jsonObj.get("limit").isJsonNull()) && !jsonObj.get("limit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `limit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("limit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `limit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("limit").toString())); } if ((jsonObj.get("unknown") != null && !jsonObj.get("unknown").isJsonNull()) && !jsonObj.get("unknown").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `unknown` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unknown").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `unknown` to be a primitive type in the JSON string but got `%s`", jsonObj.get("unknown").toString())); } if ((jsonObj.get("origTo") != null && !jsonObj.get("origTo").isJsonNull()) && !jsonObj.get("origTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `origTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("origTo").toString())); } } @@ -429,7 +424,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java index 599cf1bd..8a4fa198 100644 --- a/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/DtmfCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The DTMF event is sent for every digit detected after a <StartGather> verb is executed. You may not respond to this event with BXML. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class DtmfCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -598,27 +600,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("callId"); - openapiFields.add("direction"); - openapiFields.add("digit"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("parentCallId"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "callId", "direction", "digit", "callUrl", "enqueuedTime", "startTime", "answerTime", "parentCallId", "transferCallerId", "transferTo", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -630,49 +615,49 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!DtmfCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DtmfCallback is not found in the empty JSON string", DtmfCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("digit") != null && !jsonObj.get("digit").isJsonNull()) && !jsonObj.get("digit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `digit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digit").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -733,7 +718,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Error.java b/src/main/java/com/bandwidth/sdk/model/Error.java index a6c081dc..f9f8a628 100644 --- a/src/main/java/com/bandwidth/sdk/model/Error.java +++ b/src/main/java/com/bandwidth/sdk/model/Error.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TelephoneNumber; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Error */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Error { public static final String SERIALIZED_NAME_CODE = "code"; @SerializedName(SERIALIZED_NAME_CODE) @@ -230,13 +232,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("description"); - openapiFields.add("telephoneNumbers"); + openapiFields = new HashSet(Arrays.asList("code", "description", "telephoneNumbers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -248,19 +247,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Error.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Error is not found in the empty JSON string", Error.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if (jsonObj.get("telephoneNumbers") != null && !jsonObj.get("telephoneNumbers").isJsonNull()) { JsonArray jsonArraytelephoneNumbers = jsonObj.getAsJsonArray("telephoneNumbers"); if (jsonArraytelephoneNumbers != null) { // ensure the json data is an array if (!jsonObj.get("telephoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `telephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("telephoneNumbers").toString())); } // validate the optional field `telephoneNumbers` (array) @@ -328,7 +327,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java index d15af07e..493dcec1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorObject.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorSource; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ErrorObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ErrorObject { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -220,16 +222,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("source"); + openapiFields = new HashSet(Arrays.asList("type", "description", "source")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("source"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "description", "source")); } /** @@ -241,22 +237,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ErrorObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorObject is not found in the empty JSON string", ErrorObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorObject is not found in the empty JSON string", ErrorObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : ErrorObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `source` ErrorSource.validateJsonElement(jsonObj.get("source")); @@ -319,7 +315,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java index dc26c1d4..10609ea1 100644 --- a/src/main/java/com/bandwidth/sdk/model/ErrorSource.java +++ b/src/main/java/com/bandwidth/sdk/model/ErrorSource.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Specifies relevant sources of the error, if any. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ErrorSource { public static final String SERIALIZED_NAME_PARAMETER = "parameter"; @SerializedName(SERIALIZED_NAME_PARAMETER) @@ -245,14 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("parameter"); - openapiFields.add("field"); - openapiFields.add("header"); - openapiFields.add("reference"); + openapiFields = new HashSet(Arrays.asList("parameter", "field", "header", "reference")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -264,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ErrorSource.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorSource is not found in the empty JSON string", ErrorSource.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ErrorSource is not found in the empty JSON string", ErrorSource.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("parameter") != null && !jsonObj.get("parameter").isJsonNull()) && !jsonObj.get("parameter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parameter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parameter").toString())); } if ((jsonObj.get("field") != null && !jsonObj.get("field").isJsonNull()) && !jsonObj.get("field").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `field` to be a primitive type in the JSON string but got `%s`", jsonObj.get("field").toString())); } if ((jsonObj.get("header") != null && !jsonObj.get("header").isJsonNull()) && !jsonObj.get("header").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `header` to be a primitive type in the JSON string but got `%s`", jsonObj.get("header").toString())); } if ((jsonObj.get("reference") != null && !jsonObj.get("reference").isJsonNull()) && !jsonObj.get("reference").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `reference` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reference").toString())); } } @@ -339,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java index d80aa85c..f95dcef9 100644 --- a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FailureWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class FailureWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -308,16 +310,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("phoneNumber"); - openapiFields.add("errorCode"); - openapiFields.add("errorMessage"); - openapiFields.add("errors"); - openapiFields.add("internalTicketNumber"); + openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "errorCode", "errorMessage", "errors", "internalTicketNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -329,28 +325,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!FailureWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FailureWebhook is not found in the empty JSON string", FailureWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FailureWebhook is not found in the empty JSON string", FailureWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } if ((jsonObj.get("errorCode") != null && !jsonObj.get("errorCode").isJsonNull()) && !jsonObj.get("errorCode").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -411,7 +407,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FieldError.java b/src/main/java/com/bandwidth/sdk/model/FieldError.java index b3aa98a4..5cdcf256 100644 --- a/src/main/java/com/bandwidth/sdk/model/FieldError.java +++ b/src/main/java/com/bandwidth/sdk/model/FieldError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * FieldError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class FieldError { public static final String SERIALIZED_NAME_FIELD_NAME = "fieldName"; @SerializedName(SERIALIZED_NAME_FIELD_NAME) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fieldName"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("fieldName", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!FieldError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in FieldError is not found in the empty JSON string", FieldError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("fieldName") != null && !jsonObj.get("fieldName").isJsonNull()) && !jsonObj.get("fieldName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fieldName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fieldName").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -279,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java index 1f27ba16..7c3e6137 100644 --- a/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/FileFormatEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java index 66a4eb37..898a300e 100644 --- a/src/main/java/com/bandwidth/sdk/model/GatherCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/GatherCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class GatherCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -624,28 +626,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("digits"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("parentCallId"); - openapiFields.add("terminatingDigit"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "digits", "callUrl", "enqueuedTime", "startTime", "answerTime", "parentCallId", "terminatingDigit", "transferCallerId", "transferTo", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -657,52 +641,52 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!GatherCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GatherCallback is not found in the empty JSON string", GatherCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("digits") != null && !jsonObj.get("digits").isJsonNull()) && !jsonObj.get("digits").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digits").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `digits` to be a primitive type in the JSON string but got `%s`", jsonObj.get("digits").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("terminatingDigit") != null && !jsonObj.get("terminatingDigit").isJsonNull()) && !jsonObj.get("terminatingDigit").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `terminatingDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminatingDigit").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `terminatingDigit` to be a primitive type in the JSON string but got `%s`", jsonObj.get("terminatingDigit").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -763,7 +747,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java index e08a089c..34b0e594 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.InboundCallbackMessage; import com.bandwidth.sdk.model.InboundCallbackTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Represents an inbound callback. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InboundCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -300,21 +302,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("time"); - openapiFields.add("type"); - openapiFields.add("to"); - openapiFields.add("description"); - openapiFields.add("message"); - openapiFields.add("carrierName"); + openapiFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message", "carrierName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("message"); + openapiRequiredFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message")); } /** @@ -326,29 +317,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InboundCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InboundCallback is not found in the empty JSON string", InboundCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InboundCallback is not found in the empty JSON string", InboundCallback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundCallback.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` InboundCallbackTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` InboundCallbackMessage.validateJsonElement(jsonObj.get("message")); if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -409,7 +400,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java index 09b62d76..191bc55e 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackMessage.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.MultiChannelMessageContent; @@ -54,13 +55,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * InboundCallbackMessage */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InboundCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -585,34 +587,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("owner"); - openapiFields.add("applicationId"); - openapiFields.add("time"); - openapiFields.add("segmentCount"); - openapiFields.add("direction"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("text"); - openapiFields.add("tag"); - openapiFields.add("media"); - openapiFields.add("priority"); - openapiFields.add("channel"); - openapiFields.add("content"); - openapiFields.add("suggestionResponse"); - openapiFields.add("locationResponse"); + openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "text", "tag", "media", "priority", "channel", "content", "suggestionResponse", "locationResponse")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("owner"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("segmentCount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from")); } /** @@ -624,25 +602,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InboundCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InboundCallbackMessage is not found in the empty JSON string", InboundCallbackMessage.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InboundCallbackMessage is not found in the empty JSON string", InboundCallbackMessage.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : InboundCallbackMessage.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -650,20 +628,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -744,7 +722,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java index fa8eeb3c..cb3a5b64 100644 --- a/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/InboundCallbackTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java index 9d873d99..d0aad03e 100644 --- a/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/InitiateCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.Diversion; import com.bandwidth.sdk.model.StirShaken; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Initiate event is fired when an inbound call is received for a Telephone Number on your Account. It is sent to the URL specified in the application associated with the location (sip-peer) that the called telephone number belongs to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class InitiateCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -484,23 +486,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("startTime"); - openapiFields.add("diversion"); - openapiFields.add("stirShaken"); - openapiFields.add("uui"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "startTime", "diversion", "stirShaken", "uui")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -512,34 +501,34 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!InitiateCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in InitiateCallback is not found in the empty JSON string", InitiateCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } // validate the optional field `diversion` if (jsonObj.get("diversion") != null && !jsonObj.get("diversion").isJsonNull()) { @@ -550,7 +539,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti StirShaken.validateJsonElement(jsonObj.get("stirShaken")); } if ((jsonObj.get("uui") != null && !jsonObj.get("uui").isJsonNull()) && !jsonObj.get("uui").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `uui` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uui").toString())); } } @@ -611,7 +600,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Link.java b/src/main/java/com/bandwidth/sdk/model/Link.java index fa027d22..cf960cc7 100644 --- a/src/main/java/com/bandwidth/sdk/model/Link.java +++ b/src/main/java/com/bandwidth/sdk/model/Link.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Link */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Link { public static final String SERIALIZED_NAME_REL = "rel"; @SerializedName(SERIALIZED_NAME_REL) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("rel"); - openapiFields.add("href"); + openapiFields = new HashSet(Arrays.asList("rel", "href")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Link.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Link is not found in the empty JSON string", Link.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("rel") != null && !jsonObj.get("rel").isJsonNull()) && !jsonObj.get("rel").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `rel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rel").toString())); } if ((jsonObj.get("href") != null && !jsonObj.get("href").isJsonNull()) && !jsonObj.get("href").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `href` to be a primitive type in the JSON string but got `%s`", jsonObj.get("href").toString())); } } @@ -279,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LinksObject.java b/src/main/java/com/bandwidth/sdk/model/LinksObject.java index 630fec92..f02e2d00 100644 --- a/src/main/java/com/bandwidth/sdk/model/LinksObject.java +++ b/src/main/java/com/bandwidth/sdk/model/LinksObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * LinksObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LinksObject { public static final String SERIALIZED_NAME_FIRST = "first"; @SerializedName(SERIALIZED_NAME_FIRST) @@ -245,14 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("first"); - openapiFields.add("next"); - openapiFields.add("previous"); - openapiFields.add("last"); + openapiFields = new HashSet(Arrays.asList("first", "next", "previous", "last")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -264,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LinksObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LinksObject is not found in the empty JSON string", LinksObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LinksObject is not found in the empty JSON string", LinksObject.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("first") != null && !jsonObj.get("first").isJsonNull()) && !jsonObj.get("first").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `first` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first").toString())); } if ((jsonObj.get("next") != null && !jsonObj.get("next").isJsonNull()) && !jsonObj.get("next").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `next` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `next` to be a primitive type in the JSON string but got `%s`", jsonObj.get("next").toString())); } if ((jsonObj.get("previous") != null && !jsonObj.get("previous").isJsonNull()) && !jsonObj.get("previous").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `previous` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `previous` to be a primitive type in the JSON string but got `%s`", jsonObj.get("previous").toString())); } if ((jsonObj.get("last") != null && !jsonObj.get("last").isJsonNull()) && !jsonObj.get("last").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `last` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last").toString())); } } @@ -339,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java index f175c9cd..65fbd38a 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java index d2356f36..2f41733d 100644 --- a/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java +++ b/src/main/java/com/bandwidth/sdk/model/ListMessageItem.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageDirectionEnum; import com.bandwidth.sdk.model.MessageStatusEnum; import com.bandwidth.sdk.model.MessageTypeEnum; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * ListMessageItem */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class ListMessageItem { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -755,33 +757,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messageId"); - openapiFields.add("accountId"); - openapiFields.add("sourceTn"); - openapiFields.add("destinationTn"); - openapiFields.add("messageStatus"); - openapiFields.add("messageDirection"); - openapiFields.add("messageType"); - openapiFields.add("segmentCount"); - openapiFields.add("errorCode"); - openapiFields.add("receiveTime"); - openapiFields.add("carrierName"); - openapiFields.add("messageSize"); - openapiFields.add("messageLength"); - openapiFields.add("attachmentCount"); - openapiFields.add("recipientCount"); - openapiFields.add("campaignClass"); - openapiFields.add("campaignId"); - openapiFields.add("bwLatency"); - openapiFields.add("carrierLatency"); - openapiFields.add("callingNumberCountryA3"); - openapiFields.add("calledNumberCountryA3"); - openapiFields.add("product"); - openapiFields.add("location"); + openapiFields = new HashSet(Arrays.asList("messageId", "accountId", "sourceTn", "destinationTn", "messageStatus", "messageDirection", "messageType", "segmentCount", "errorCode", "receiveTime", "carrierName", "messageSize", "messageLength", "attachmentCount", "recipientCount", "campaignClass", "campaignId", "bwLatency", "carrierLatency", "callingNumberCountryA3", "calledNumberCountryA3", "product", "location")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -793,21 +772,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!ListMessageItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in ListMessageItem is not found in the empty JSON string", ListMessageItem.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("sourceTn") != null && !jsonObj.get("sourceTn").isJsonNull()) && !jsonObj.get("sourceTn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sourceTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceTn").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sourceTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sourceTn").toString())); } if ((jsonObj.get("destinationTn") != null && !jsonObj.get("destinationTn").isJsonNull()) && !jsonObj.get("destinationTn").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `destinationTn` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destinationTn").toString())); } // validate the optional field `messageStatus` if (jsonObj.get("messageStatus") != null && !jsonObj.get("messageStatus").isJsonNull()) { @@ -822,25 +801,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MessageTypeEnum.validateJsonElement(jsonObj.get("messageType")); } if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } if ((jsonObj.get("campaignClass") != null && !jsonObj.get("campaignClass").isJsonNull()) && !jsonObj.get("campaignClass").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `campaignClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignClass").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `campaignClass` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignClass").toString())); } if ((jsonObj.get("campaignId") != null && !jsonObj.get("campaignId").isJsonNull()) && !jsonObj.get("campaignId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `campaignId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("campaignId").toString())); } if ((jsonObj.get("callingNumberCountryA3") != null && !jsonObj.get("callingNumberCountryA3").isJsonNull()) && !jsonObj.get("callingNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callingNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callingNumberCountryA3").toString())); } if ((jsonObj.get("calledNumberCountryA3") != null && !jsonObj.get("calledNumberCountryA3").isJsonNull()) && !jsonObj.get("calledNumberCountryA3").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `calledNumberCountryA3` to be a primitive type in the JSON string but got `%s`", jsonObj.get("calledNumberCountryA3").toString())); } if ((jsonObj.get("product") != null && !jsonObj.get("product").isJsonNull()) && !jsonObj.get("product").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `product` to be a primitive type in the JSON string but got `%s`", jsonObj.get("product").toString())); } if ((jsonObj.get("location") != null && !jsonObj.get("location").isJsonNull()) && !jsonObj.get("location").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `location` to be a primitive type in the JSON string but got `%s`", jsonObj.get("location").toString())); } } @@ -901,7 +880,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java index 9a20f90e..04743120 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Create phone number lookup request. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupRequest { public static final String SERIALIZED_NAME_TNS = "tns"; @SerializedName(SERIALIZED_NAME_TNS) @@ -177,12 +179,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("tns"); + openapiFields = new HashSet(Arrays.asList("tns")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("tns"); + openapiRequiredFields = new HashSet(Arrays.asList("tns")); } /** @@ -194,14 +194,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LookupRequest is not found in the empty JSON string", LookupRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupRequest is not found in the empty JSON string", LookupRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : LookupRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -209,7 +209,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("tns") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("tns").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tns` to be an array in the JSON string but got `%s`", jsonObj.get("tns").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tns` to be an array in the JSON string but got `%s`", jsonObj.get("tns").toString())); } } @@ -270,7 +270,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupResult.java b/src/main/java/com/bandwidth/sdk/model/LookupResult.java index 4b89b117..7a90001b 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupResult.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Carrier information results for the specified telephone number. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupResult { public static final String SERIALIZED_NAME_RESPONSE_CODE = "Response Code"; @SerializedName(SERIALIZED_NAME_RESPONSE_CODE) @@ -375,19 +377,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("Response Code"); - openapiFields.add("Message"); - openapiFields.add("E.164 Format"); - openapiFields.add("Formatted"); - openapiFields.add("Country"); - openapiFields.add("Line Type"); - openapiFields.add("Line Provider"); - openapiFields.add("Mobile Country Code"); - openapiFields.add("Mobile Network Code"); + openapiFields = new HashSet(Arrays.asList("Response Code", "Message", "E.164 Format", "Formatted", "Country", "Line Type", "Line Provider", "Mobile Country Code", "Mobile Network Code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -399,33 +392,33 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupResult is not found in the empty JSON string", LookupResult.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("Message") != null && !jsonObj.get("Message").isJsonNull()) && !jsonObj.get("Message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Message").toString())); } if ((jsonObj.get("E.164 Format") != null && !jsonObj.get("E.164 Format").isJsonNull()) && !jsonObj.get("E.164 Format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `E.164 Format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("E.164 Format").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `E.164 Format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("E.164 Format").toString())); } if ((jsonObj.get("Formatted") != null && !jsonObj.get("Formatted").isJsonNull()) && !jsonObj.get("Formatted").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Formatted` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Formatted").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Formatted` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Formatted").toString())); } if ((jsonObj.get("Country") != null && !jsonObj.get("Country").isJsonNull()) && !jsonObj.get("Country").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Country").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Country` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Country").toString())); } if ((jsonObj.get("Line Type") != null && !jsonObj.get("Line Type").isJsonNull()) && !jsonObj.get("Line Type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Line Type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Line Type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Type").toString())); } if ((jsonObj.get("Line Provider") != null && !jsonObj.get("Line Provider").isJsonNull()) && !jsonObj.get("Line Provider").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Line Provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Provider").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Line Provider` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Line Provider").toString())); } if ((jsonObj.get("Mobile Country Code") != null && !jsonObj.get("Mobile Country Code").isJsonNull()) && !jsonObj.get("Mobile Country Code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Mobile Country Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Country Code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Mobile Country Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Country Code").toString())); } if ((jsonObj.get("Mobile Network Code") != null && !jsonObj.get("Mobile Network Code").isJsonNull()) && !jsonObj.get("Mobile Network Code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `Mobile Network Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Network Code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `Mobile Network Code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("Mobile Network Code").toString())); } } @@ -486,7 +479,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java index c1474231..be76c311 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupStatus.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.LookupResult; import com.bandwidth.sdk.model.LookupStatusEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If requestId exists, the result for that request is returned. See the Examples for details on the various responses that you can receive. Generally, if you see a Response Code of 0 in a result for a TN, information will be available for it. Any other Response Code will indicate no information was available for the TN. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class LookupStatus { public static final String SERIALIZED_NAME_REQUEST_ID = "requestId"; @SerializedName(SERIALIZED_NAME_REQUEST_ID) @@ -265,14 +267,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("requestId"); - openapiFields.add("status"); - openapiFields.add("result"); - openapiFields.add("failedTelephoneNumbers"); + openapiFields = new HashSet(Arrays.asList("requestId", "status", "result", "failedTelephoneNumbers")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -284,12 +282,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!LookupStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in LookupStatus is not found in the empty JSON string", LookupStatus.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in LookupStatus is not found in the empty JSON string", LookupStatus.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { @@ -300,7 +298,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayresult != null) { // ensure the json data is an array if (!jsonObj.get("result").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `result` to be an array in the JSON string but got `%s`", jsonObj.get("result").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `result` to be an array in the JSON string but got `%s`", jsonObj.get("result").toString())); } // validate the optional field `result` (array) @@ -311,7 +309,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // ensure the optional json data is an array if present if (jsonObj.get("failedTelephoneNumbers") != null && !jsonObj.get("failedTelephoneNumbers").isJsonNull() && !jsonObj.get("failedTelephoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `failedTelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("failedTelephoneNumbers").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `failedTelephoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("failedTelephoneNumbers").toString())); } } @@ -372,7 +370,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java index 02a72484..45023ebe 100644 --- a/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/LookupStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java index 0f3f0a98..1247b2ba 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.MachineDetectionResult; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * This event is sent to the url informed when requesting a machine detection operation. It contains the machine detection operation result, which can be: human, answering-machine, silence, timeout, error. This event is not sent when sync answering machine detection mode is chosen. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MachineDetectionCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -521,24 +523,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); - openapiFields.add("machineDetectionResult"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "machineDetectionResult")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -550,37 +538,37 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MachineDetectionCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionCompleteCallback is not found in the empty JSON string", MachineDetectionCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `machineDetectionResult` if (jsonObj.get("machineDetectionResult") != null && !jsonObj.get("machineDetectionResult").isJsonNull()) { @@ -645,7 +633,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java index 4b168f9f..4fb21ee5 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionConfiguration.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.bandwidth.sdk.model.MachineDetectionModeEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MachineDetectionConfiguration { public static final String SERIALIZED_NAME_MODE = "mode"; @SerializedName(SERIALIZED_NAME_MODE) @@ -546,25 +548,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("mode"); - openapiFields.add("detectionTimeout"); - openapiFields.add("silenceTimeout"); - openapiFields.add("speechThreshold"); - openapiFields.add("speechEndThreshold"); - openapiFields.add("machineSpeechEndThreshold"); - openapiFields.add("delayResult"); - openapiFields.add("callbackUrl"); - openapiFields.add("callbackMethod"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("fallbackUrl"); - openapiFields.add("fallbackMethod"); - openapiFields.add("fallbackUsername"); - openapiFields.add("fallbackPassword"); + openapiFields = new HashSet(Arrays.asList("mode", "detectionTimeout", "silenceTimeout", "speechThreshold", "speechEndThreshold", "machineSpeechEndThreshold", "delayResult", "callbackUrl", "callbackMethod", "username", "password", "fallbackUrl", "fallbackMethod", "fallbackUsername", "fallbackPassword")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -576,7 +563,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MachineDetectionConfiguration.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionConfiguration is not found in the empty JSON string", MachineDetectionConfiguration.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -585,30 +572,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MachineDetectionModeEnum.validateJsonElement(jsonObj.get("mode")); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `callbackMethod` if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("fallbackUrl") != null && !jsonObj.get("fallbackUrl").isJsonNull()) && !jsonObj.get("fallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUrl").toString())); } // validate the optional field `fallbackMethod` if (jsonObj.get("fallbackMethod") != null && !jsonObj.get("fallbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("fallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -669,7 +656,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java index 633c38e1..422a60db 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionModeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java index a424bdfb..f866dc1f 100644 --- a/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java +++ b/src/main/java/com/bandwidth/sdk/model/MachineDetectionResult.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MachineDetectionResult { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("value"); - openapiFields.add("duration"); + openapiFields = new HashSet(Arrays.asList("value", "duration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MachineDetectionResult.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MachineDetectionResult is not found in the empty JSON string", MachineDetectionResult.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } } @@ -279,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Media.java b/src/main/java/com/bandwidth/sdk/model/Media.java index 551b9a39..b64179c0 100644 --- a/src/main/java/com/bandwidth/sdk/model/Media.java +++ b/src/main/java/com/bandwidth/sdk/model/Media.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Media */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Media { public static final String SERIALIZED_NAME_CONTENT = "content"; @SerializedName(SERIALIZED_NAME_CONTENT) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("content"); - openapiFields.add("contentLength"); - openapiFields.add("mediaName"); + openapiFields = new HashSet(Arrays.asList("content", "contentLength", "mediaName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,15 +236,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Media.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Media is not found in the empty JSON string", Media.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) && !jsonObj.get("content").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `content` to be a primitive type in the JSON string but got `%s`", jsonObj.get("content").toString())); } if ((jsonObj.get("mediaName") != null && !jsonObj.get("mediaName").isJsonNull()) && !jsonObj.get("mediaName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaName").toString())); } } @@ -306,7 +305,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Message.java b/src/main/java/com/bandwidth/sdk/model/Message.java index 33749830..3f01bd98 100644 --- a/src/main/java/com/bandwidth/sdk/model/Message.java +++ b/src/main/java/com/bandwidth/sdk/model/Message.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Message */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Message { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -500,23 +502,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("owner"); - openapiFields.add("applicationId"); - openapiFields.add("time"); - openapiFields.add("segmentCount"); - openapiFields.add("direction"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("media"); - openapiFields.add("text"); - openapiFields.add("tag"); - openapiFields.add("priority"); - openapiFields.add("expiration"); + openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "media", "text", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -528,18 +517,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("owner") != null && !jsonObj.get("owner").isJsonNull()) && !jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { @@ -547,20 +536,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // ensure the optional json data is an array if present if (jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull() && !jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -625,7 +614,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java index 52886e8a..73efd53a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageDirectionEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java index 592eabf5..24678ff3 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -49,13 +50,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessageRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessageRequest { public static final String SERIALIZED_NAME_APPLICATION_ID = "applicationId"; @SerializedName(SERIALIZED_NAME_APPLICATION_ID) @@ -372,21 +374,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("applicationId"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("text"); - openapiFields.add("media"); - openapiFields.add("tag"); - openapiFields.add("priority"); - openapiFields.add("expiration"); + openapiFields = new HashSet(Arrays.asList("applicationId", "to", "from", "text", "media", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); + openapiRequiredFields = new HashSet(Arrays.asList("applicationId", "to", "from")); } /** @@ -398,38 +389,38 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessageRequest is not found in the empty JSON string", MessageRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessageRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // ensure the required json array is present if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -494,7 +485,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java index 80760f09..743cb1b7 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java index ba7ade9b..84010448 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MessageTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MessagesList.java b/src/main/java/com/bandwidth/sdk/model/MessagesList.java index 1f74bd1e..d12b50ac 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagesList.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagesList.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ListMessageItem; import com.bandwidth.sdk.model.PageInfo; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagesList */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessagesList { public static final String SERIALIZED_NAME_TOTAL_COUNT = "totalCount"; @SerializedName(SERIALIZED_NAME_TOTAL_COUNT) @@ -231,13 +233,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("totalCount"); - openapiFields.add("pageInfo"); - openapiFields.add("messages"); + openapiFields = new HashSet(Arrays.asList("totalCount", "pageInfo", "messages")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -249,7 +248,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessagesList.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagesList is not found in the empty JSON string", MessagesList.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -262,7 +261,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraymessages != null) { // ensure the json data is an array if (!jsonObj.get("messages").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messages` to be an array in the JSON string but got `%s`", jsonObj.get("messages").toString())); } // validate the optional field `messages` (array) @@ -330,7 +329,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java index 8fe89b02..7c88c9df 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessagingCodeResponse { public static final String SERIALIZED_NAME_MESSAGE_ID = "messageId"; @SerializedName(SERIALIZED_NAME_MESSAGE_ID) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("messageId"); + openapiFields = new HashSet(Arrays.asList("messageId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessagingCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagingCodeResponse is not found in the empty JSON string", MessagingCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("messageId") != null && !jsonObj.get("messageId").isJsonNull()) && !jsonObj.get("messageId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `messageId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageId").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java index b42f7150..5e2b53d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MessagingRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MessagingRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MessagingRequestError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -193,14 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("type", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("description"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "description")); } /** @@ -212,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MessagingRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MessagingRequestError is not found in the empty JSON string", MessagingRequestError.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MessagingRequestError.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -288,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java index 206737b2..7713b8c3 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaForbiddenRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaForbiddenRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MfaForbiddenRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MfaForbiddenRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaForbiddenRequestError is not found in the empty JSON string", MfaForbiddenRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java index b4674ca8..e39bff95 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MfaRequestError { public static final String SERIALIZED_NAME_ERROR = "error"; @SerializedName(SERIALIZED_NAME_ERROR) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("error"); - openapiFields.add("requestId"); + openapiFields = new HashSet(Arrays.asList("error", "requestId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MfaRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaRequestError is not found in the empty JSON string", MfaRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); } if ((jsonObj.get("requestId") != null && !jsonObj.get("requestId").isJsonNull()) && !jsonObj.get("requestId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `requestId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("requestId").toString())); } } @@ -279,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java index 63173e46..791bd4f6 100644 --- a/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/MfaUnauthorizedRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MfaUnauthorizedRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MfaUnauthorizedRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MfaUnauthorizedRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MfaUnauthorizedRequestError is not found in the empty JSON string", MfaUnauthorizedRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java index cee4d1ae..39b0c9d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MmsMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -204,12 +206,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("media"); + openapiFields = new HashSet(Arrays.asList("text", "media")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -221,19 +221,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MmsMessageContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MmsMessageContent is not found in the empty JSON string", MmsMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MmsMessageContent is not found in the empty JSON string", MmsMessageContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { JsonArray jsonArraymedia = jsonObj.getAsJsonArray("media"); if (jsonArraymedia != null) { // ensure the json data is an array if (!jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `media` (array) @@ -301,7 +301,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java index bbcab5ab..6212d610 100644 --- a/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/MmsMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MmsMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MmsMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -168,12 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileUrl"); + openapiFields = new HashSet(Arrays.asList("fileUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("fileUrl")); } /** @@ -185,19 +185,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MmsMessageContentFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MmsMessageContentFile is not found in the empty JSON string", MmsMessageContentFile.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MmsMessageContentFile is not found in the empty JSON string", MmsMessageContentFile.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MmsMessageContentFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } } @@ -258,7 +258,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java index 443e4e35..d22be724 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelAction.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelActionCalendarEvent; import com.bandwidth.sdk.model.RbmActionBase; import com.bandwidth.sdk.model.RbmActionDial; @@ -42,6 +43,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -65,7 +67,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelAction extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelAction.class.getName()); @@ -142,7 +144,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionBase'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionBase'", e); } // deserialize RbmActionDial @@ -154,7 +156,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionDial'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionDial'", e); } // deserialize RbmActionViewLocation @@ -166,7 +168,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionViewLocation'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionViewLocation'", e); } // deserialize MultiChannelActionCalendarEvent @@ -178,7 +180,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'MultiChannelActionCalendarEvent'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'MultiChannelActionCalendarEvent'", e); } // deserialize RbmActionOpenUrl @@ -190,7 +192,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmActionOpenUrl'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmActionOpenUrl'", e); } @@ -200,7 +202,7 @@ public MultiChannelAction read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format("Failed deserialization for MultiChannelAction: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelAction: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -350,7 +352,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionBase.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionBase failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmActionDial @@ -358,7 +360,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionDial.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionDial failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmActionViewLocation @@ -366,7 +368,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionViewLocation.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionViewLocation failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with MultiChannelActionCalendarEvent @@ -374,7 +376,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelActionCalendarEvent.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MultiChannelActionCalendarEvent failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmActionOpenUrl @@ -382,11 +384,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmActionOpenUrl.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmActionOpenUrl failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for MultiChannelAction with oneOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelAction with oneOf schemas: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java index 58de6e0d..9c7f4f1d 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelActionCalendarEvent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelActionCalendarEvent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelActionCalendarEvent { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -325,23 +327,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("title"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("description"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "title", "startTime", "endTime", "description")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("title"); - openapiRequiredFields.add("startTime"); - openapiRequiredFields.add("endTime"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "title", "startTime", "endTime")); } /** @@ -353,27 +342,27 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelActionCalendarEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelActionCalendarEvent is not found in the empty JSON string", MultiChannelActionCalendarEvent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelActionCalendarEvent is not found in the empty JSON string", MultiChannelActionCalendarEvent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelActionCalendarEvent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -434,7 +423,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java index 61ef22fd..0a102766 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObject.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelChannelListObject */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelChannelListObject { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -247,18 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("from"); - openapiFields.add("applicationId"); - openapiFields.add("channel"); - openapiFields.add("content"); + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("content"); + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content")); } /** @@ -270,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelChannelListObject.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelChannelListObject is not found in the empty JSON string", MultiChannelChannelListObject.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelChannelListObject is not found in the empty JSON string", MultiChannelChannelListObject.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelChannelListObject.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); @@ -350,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java index 0dfbbcee..4e46192a 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelChannelListObjectContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MmsMessageContent; import com.bandwidth.sdk.model.MmsMessageContentFile; @@ -47,6 +48,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -70,7 +72,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelChannelListObjectContent extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(MultiChannelChannelListObjectContent.class.getName()); @@ -147,7 +149,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'RbmMessageContentText'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentText'", e); } // deserialize RbmMessageMedia @@ -159,7 +161,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'RbmMessageMedia'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageMedia'", e); } // deserialize RbmMessageContentRichCard @@ -171,7 +173,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'RbmMessageContentRichCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageContentRichCard'", e); } // deserialize SmsMessageContent @@ -183,7 +185,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'SmsMessageContent'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'SmsMessageContent'", e); } // deserialize MmsMessageContent @@ -195,7 +197,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti log.log(Level.FINER, "Input data matches schema 'MmsMessageContent'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'MmsMessageContent'", e); } @@ -205,7 +207,7 @@ public MultiChannelChannelListObjectContent read(JsonReader in) throws IOExcepti return ret; } - throw new IOException(String.format("Failed deserialization for MultiChannelChannelListObjectContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for MultiChannelChannelListObjectContent: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -355,7 +357,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageContentText.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentText failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageMedia @@ -363,7 +365,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageMedia.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageMedia failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageContentRichCard @@ -371,7 +373,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageContentRichCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageContentRichCard failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with SmsMessageContent @@ -379,7 +381,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti SmsMessageContent.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for SmsMessageContent failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with MmsMessageContent @@ -387,11 +389,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MmsMessageContent.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for MmsMessageContent failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for MultiChannelChannelListObjectContent with oneOf schemas: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for MultiChannelChannelListObjectContent with oneOf schemas: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java index 9104dd19..0a060505 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ErrorObject; import com.bandwidth.sdk.model.Link; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelError { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -251,13 +253,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("links"); - openapiFields.add("data"); - openapiFields.add("errors"); + openapiFields = new HashSet(Arrays.asList("links", "data", "errors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -269,7 +268,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelError is not found in the empty JSON string", MultiChannelError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -278,7 +277,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraylinks != null) { // ensure the json data is an array if (!jsonObj.get("links").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `links` to be an array in the JSON string but got `%s`", jsonObj.get("links").toString())); } // validate the optional field `links` (array) @@ -292,7 +291,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -360,7 +359,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java index 3f7546c8..c9d207ef 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageChannelEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java index 2d26e40f..b70a8e17 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The structure of the content field of a multichannel message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -194,12 +196,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("media"); + openapiFields = new HashSet(Arrays.asList("text", "media")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -211,12 +211,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelMessageContent is not found in the empty JSON string", MultiChannelMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageContent is not found in the empty JSON string", MultiChannelMessageContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } // validate the optional field `media` if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { @@ -281,7 +281,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java index 613211c8..da969b77 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListObject; import com.bandwidth.sdk.model.PriorityEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Multi-Channel Message Request */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -284,17 +286,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("channelList"); - openapiFields.add("tag"); - openapiFields.add("priority"); - openapiFields.add("expiration"); + openapiFields = new HashSet(Arrays.asList("to", "channelList", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("channelList"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "channelList")); } /** @@ -306,23 +301,23 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelMessageRequest is not found in the empty JSON string", MultiChannelMessageRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageRequest is not found in the empty JSON string", MultiChannelMessageRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // ensure the json data is an array if (!jsonObj.get("channelList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); @@ -331,7 +326,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelChannelListObject.validateJsonElement(jsonArraychannelList.get(i)); }; if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -396,7 +391,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java index 7f24dfdd..22883e76 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseData.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageResponseDataChannelListInner; import com.bandwidth.sdk.model.PriorityEnum; @@ -50,13 +51,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The data returned in a multichannel message response. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageResponseData { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -373,23 +375,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("time"); - openapiFields.add("direction"); - openapiFields.add("to"); - openapiFields.add("channelList"); - openapiFields.add("tag"); - openapiFields.add("priority"); - openapiFields.add("expiration"); + openapiFields = new HashSet(Arrays.asList("id", "time", "direction", "to", "channelList", "tag", "priority", "expiration")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("channelList"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "time", "direction", "to", "channelList")); } /** @@ -401,19 +390,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageResponseData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelMessageResponseData is not found in the empty JSON string", MultiChannelMessageResponseData.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseData is not found in the empty JSON string", MultiChannelMessageResponseData.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageResponseData.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -421,11 +410,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } // ensure the json data is an array if (!jsonObj.get("channelList").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `channelList` to be an array in the JSON string but got `%s`", jsonObj.get("channelList").toString())); } JsonArray jsonArraychannelList = jsonObj.getAsJsonArray("channelList"); @@ -434,7 +423,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti MultiChannelMessageResponseDataChannelListInner.validateJsonElement(jsonArraychannelList.get(i)); }; if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -499,7 +488,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java index 7454f1e8..be91c494 100644 --- a/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java +++ b/src/main/java/com/bandwidth/sdk/model/MultiChannelMessageResponseDataChannelListInner.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelChannelListObjectContent; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.google.gson.TypeAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * MultiChannelMessageResponseDataChannelListInner */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class MultiChannelMessageResponseDataChannelListInner { public static final String SERIALIZED_NAME_FROM = "from"; @SerializedName(SERIALIZED_NAME_FROM) @@ -273,20 +275,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("from"); - openapiFields.add("applicationId"); - openapiFields.add("channel"); - openapiFields.add("content"); - openapiFields.add("owner"); + openapiFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("from"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("channel"); - openapiRequiredFields.add("content"); - openapiRequiredFields.add("owner"); + openapiRequiredFields = new HashSet(Arrays.asList("from", "applicationId", "channel", "content", "owner")); } /** @@ -298,29 +290,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in MultiChannelMessageResponseDataChannelListInner is not found in the empty JSON string", MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in MultiChannelMessageResponseDataChannelListInner is not found in the empty JSON string", MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : MultiChannelMessageResponseDataChannelListInner.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `channel` MultiChannelMessageChannelEnum.validateJsonElement(jsonObj.get("channel")); // validate the required field `content` MultiChannelChannelListObjectContent.validateJsonElement(jsonObj.get("content")); if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } } @@ -381,7 +373,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java index 698c2093..6e8edecf 100644 --- a/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java +++ b/src/main/java/com/bandwidth/sdk/model/OptInWorkflow.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * OptInWorkflow */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class OptInWorkflow { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -241,15 +243,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("description"); - openapiFields.add("imageUrls"); - openapiFields.add("confirmationResponse"); + openapiFields = new HashSet(Arrays.asList("description", "imageUrls", "confirmationResponse")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("imageUrls"); + openapiRequiredFields = new HashSet(Arrays.asList("description", "imageUrls")); } /** @@ -261,28 +258,28 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!OptInWorkflow.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OptInWorkflow is not found in the empty JSON string", OptInWorkflow.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in OptInWorkflow is not found in the empty JSON string", OptInWorkflow.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : OptInWorkflow.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // ensure the required json array is present if (jsonObj.get("imageUrls") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("imageUrls").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `imageUrls` to be an array in the JSON string but got `%s`", jsonObj.get("imageUrls").toString())); } if ((jsonObj.get("confirmationResponse") != null && !jsonObj.get("confirmationResponse").isJsonNull()) && !jsonObj.get("confirmationResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `confirmationResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("confirmationResponse").toString())); } } @@ -343,7 +340,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/PageInfo.java b/src/main/java/com/bandwidth/sdk/model/PageInfo.java index b0bfd585..917c52b2 100644 --- a/src/main/java/com/bandwidth/sdk/model/PageInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/PageInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * PageInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class PageInfo { public static final String SERIALIZED_NAME_PREV_PAGE = "prevPage"; @SerializedName(SERIALIZED_NAME_PREV_PAGE) @@ -245,14 +247,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("prevPage"); - openapiFields.add("nextPage"); - openapiFields.add("prevPageToken"); - openapiFields.add("nextPageToken"); + openapiFields = new HashSet(Arrays.asList("prevPage", "nextPage", "prevPageToken", "nextPageToken")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -264,21 +262,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!PageInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in PageInfo is not found in the empty JSON string", PageInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("prevPage") != null && !jsonObj.get("prevPage").isJsonNull()) && !jsonObj.get("prevPage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prevPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPage").toString())); } if ((jsonObj.get("nextPage") != null && !jsonObj.get("nextPage").isJsonNull()) && !jsonObj.get("nextPage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nextPage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPage").toString())); } if ((jsonObj.get("prevPageToken") != null && !jsonObj.get("prevPageToken").isJsonNull()) && !jsonObj.get("prevPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `prevPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPageToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `prevPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prevPageToken").toString())); } if ((jsonObj.get("nextPageToken") != null && !jsonObj.get("nextPageToken").isJsonNull()) && !jsonObj.get("nextPageToken").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `nextPageToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("nextPageToken").toString())); } } @@ -339,7 +337,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java index 26533e2c..1d667b81 100644 --- a/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/PriorityEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java index 5c83c023..f97e4116 100644 --- a/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ProductTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java index a2f7a6f1..336b2c3d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionBase.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionBase */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionBase { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -220,16 +222,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData")); } /** @@ -241,21 +237,21 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionBase.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionBase is not found in the empty JSON string", RbmActionBase.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionBase is not found in the empty JSON string", RbmActionBase.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionBase.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -316,7 +312,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java index 4928d8ba..1c7fc6d4 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionDial.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionDial */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionDial { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -246,18 +248,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("phoneNumber"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "phoneNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("phoneNumber"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "phoneNumber")); } /** @@ -269,24 +263,24 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionDial.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionDial is not found in the empty JSON string", RbmActionDial.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionDial is not found in the empty JSON string", RbmActionDial.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionDial.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } } @@ -347,7 +341,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java index 6e9b7fe1..c9c40106 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionOpenUrl.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionOpenUrl */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionOpenUrl { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -247,18 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("url"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "url")); } /** @@ -270,24 +264,24 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionOpenUrl.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionOpenUrl is not found in the empty JSON string", RbmActionOpenUrl.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionOpenUrl is not found in the empty JSON string", RbmActionOpenUrl.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionOpenUrl.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -348,7 +342,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java index 77d1054c..41ef7f5a 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java index 97bf52a5..cd9e0848 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmActionViewLocation.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmActionTypeEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmActionViewLocation */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmActionViewLocation { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -298,21 +300,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("text"); - openapiFields.add("postbackData"); - openapiFields.add("latitude"); - openapiFields.add("longitude"); - openapiFields.add("label"); + openapiFields = new HashSet(Arrays.asList("type", "text", "postbackData", "latitude", "longitude", "label")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("text"); - openapiRequiredFields.add("postbackData"); - openapiRequiredFields.add("latitude"); - openapiRequiredFields.add("longitude"); + openapiRequiredFields = new HashSet(Arrays.asList("type", "text", "postbackData", "latitude", "longitude")); } /** @@ -324,30 +315,30 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmActionViewLocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmActionViewLocation is not found in the empty JSON string", RbmActionViewLocation.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmActionViewLocation is not found in the empty JSON string", RbmActionViewLocation.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmActionViewLocation.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` RbmActionTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (!jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); } if (!jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } if ((jsonObj.get("label") != null && !jsonObj.get("label").isJsonNull()) && !jsonObj.get("label").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `label` to be a primitive type in the JSON string but got `%s`", jsonObj.get("label").toString())); } } @@ -408,7 +399,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java index fda67bec..e0a323d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContentMedia; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmCardContent { public static final String SERIALIZED_NAME_TITLE = "title"; @SerializedName(SERIALIZED_NAME_TITLE) @@ -257,14 +259,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("title"); - openapiFields.add("description"); - openapiFields.add("media"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("title", "description", "media", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -276,15 +274,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmCardContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmCardContent is not found in the empty JSON string", RbmCardContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmCardContent is not found in the empty JSON string", RbmCardContent.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("title") != null && !jsonObj.get("title").isJsonNull()) && !jsonObj.get("title").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `title` to be a primitive type in the JSON string but got `%s`", jsonObj.get("title").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the optional field `media` if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull()) { @@ -295,7 +293,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -363,7 +361,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java index 939e529f..0375db16 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmCardContentMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RbmMediaHeightEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmCardContentMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmCardContentMedia { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -221,15 +223,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileUrl"); - openapiFields.add("thumbnailUrl"); - openapiFields.add("height"); + openapiFields = new HashSet(Arrays.asList("fileUrl", "thumbnailUrl", "height")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileUrl"); - openapiRequiredFields.add("height"); + openapiRequiredFields = new HashSet(Arrays.asList("fileUrl", "height")); } /** @@ -241,22 +238,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmCardContentMedia.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmCardContentMedia is not found in the empty JSON string", RbmCardContentMedia.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmCardContentMedia is not found in the empty JSON string", RbmCardContentMedia.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmCardContentMedia.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } // validate the required field `height` RbmMediaHeightEnum.validateJsonElement(jsonObj.get("height")); @@ -319,7 +316,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java index 250175fa..9793c8ec 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmLocationResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmLocationResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmLocationResponse { public static final String SERIALIZED_NAME_LATITUDE = "latitude"; @SerializedName(SERIALIZED_NAME_LATITUDE) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("latitude"); - openapiFields.add("longitude"); + openapiFields = new HashSet(Arrays.asList("latitude", "longitude")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,15 +210,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmLocationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmLocationResponse is not found in the empty JSON string", RbmLocationResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmLocationResponse is not found in the empty JSON string", RbmLocationResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("latitude") != null && !jsonObj.get("latitude").isJsonNull()) && !jsonObj.get("latitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `latitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("latitude").toString())); } if ((jsonObj.get("longitude") != null && !jsonObj.get("longitude").isJsonNull()) && !jsonObj.get("longitude").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `longitude` to be a primitive type in the JSON string but got `%s`", jsonObj.get("longitude").toString())); } } @@ -279,7 +279,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java index c31e67a4..59222725 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMediaHeightEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java index fea64c1c..5e52364d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageCarouselCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageCarouselCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageCarouselCard { public static final String SERIALIZED_NAME_CARD_WIDTH = "cardWidth"; @SerializedName(SERIALIZED_NAME_CARD_WIDTH) @@ -240,15 +242,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("cardWidth"); - openapiFields.add("cardContents"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("cardWidth", "cardContents", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("cardWidth"); - openapiRequiredFields.add("cardContents"); + openapiRequiredFields = new HashSet(Arrays.asList("cardWidth", "cardContents")); } /** @@ -260,14 +257,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageCarouselCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmMessageCarouselCard is not found in the empty JSON string", RbmMessageCarouselCard.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageCarouselCard is not found in the empty JSON string", RbmMessageCarouselCard.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageCarouselCard.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -275,7 +272,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CardWidthEnum.validateJsonElement(jsonObj.get("cardWidth")); // ensure the json data is an array if (!jsonObj.get("cardContents").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cardContents` to be an array in the JSON string but got `%s`", jsonObj.get("cardContents").toString())); } JsonArray jsonArraycardContents = jsonObj.getAsJsonArray("cardContents"); @@ -288,7 +285,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -356,7 +353,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java index 71bd4263..67b187f0 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentFile.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentFile */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageContentFile { public static final String SERIALIZED_NAME_FILE_URL = "fileUrl"; @SerializedName(SERIALIZED_NAME_FILE_URL) @@ -194,13 +196,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("fileUrl"); - openapiFields.add("thumbnailUrl"); + openapiFields = new HashSet(Arrays.asList("fileUrl", "thumbnailUrl")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("fileUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("fileUrl")); } /** @@ -212,22 +211,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageContentFile.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmMessageContentFile is not found in the empty JSON string", RbmMessageContentFile.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageContentFile is not found in the empty JSON string", RbmMessageContentFile.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageContentFile.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("fileUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fileUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fileUrl").toString())); } if ((jsonObj.get("thumbnailUrl") != null && !jsonObj.get("thumbnailUrl").isJsonNull()) && !jsonObj.get("thumbnailUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `thumbnailUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("thumbnailUrl").toString())); } } @@ -288,7 +287,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java index 9f6af6d1..76e21375 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentRichCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CardWidthEnum; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; @@ -43,6 +44,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Locale; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -66,7 +68,7 @@ import com.bandwidth.sdk.JSON; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageContentRichCard extends AbstractOpenApiSchema { private static final Logger log = Logger.getLogger(RbmMessageContentRichCard.class.getName()); @@ -122,7 +124,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmStandaloneCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmStandaloneCard'", e); } // deserialize RbmMessageCarouselCard @@ -134,7 +136,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { log.log(Level.FINER, "Input data matches schema 'RbmMessageCarouselCard'"); } catch (Exception e) { // deserialization failed, continue - errorMessages.add(String.format("Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'RbmMessageCarouselCard'", e); } @@ -144,7 +146,7 @@ public RbmMessageContentRichCard read(JsonReader in) throws IOException { return ret; } - throw new IOException(String.format("Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "Failed deserialization for RbmMessageContentRichCard: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString())); } }.nullSafe(); } @@ -243,7 +245,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmStandaloneCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmStandaloneCard failed with `%s`.", e.getMessage())); // continue to the next one } // validate the json string with RbmMessageCarouselCard @@ -251,11 +253,11 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti RbmMessageCarouselCard.validateJsonElement(jsonElement); validCount++; } catch (Exception e) { - errorMessages.add(String.format("Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); + errorMessages.add(String.format(Locale.ROOT, "Deserialization for RbmMessageCarouselCard failed with `%s`.", e.getMessage())); // continue to the next one } if (validCount != 1) { - throw new IOException(String.format("The JSON string is invalid for RbmMessageContentRichCard with oneOf schemas: RbmMessageCarouselCard, RbmStandaloneCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for RbmMessageContentRichCard with oneOf schemas: RbmMessageCarouselCard, RbmStandaloneCard. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java index 0f62bc31..347d6bbe 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageContentText.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageContentText */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageContentText { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -204,13 +206,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("text", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("text"); + openapiRequiredFields = new HashSet(Arrays.asList("text")); } /** @@ -222,26 +221,26 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageContentText.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmMessageContentText is not found in the empty JSON string", RbmMessageContentText.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageContentText is not found in the empty JSON string", RbmMessageContentText.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageContentText.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if (jsonObj.get("suggestions") != null && !jsonObj.get("suggestions").isJsonNull()) { JsonArray jsonArraysuggestions = jsonObj.getAsJsonArray("suggestions"); if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java index ec5aa0e4..388d8c68 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmMessageMedia.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmMessageContentFile; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmMessageMedia */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmMessageMedia { public static final String SERIALIZED_NAME_MEDIA = "media"; @SerializedName(SERIALIZED_NAME_MEDIA) @@ -205,13 +207,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("media"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("media", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("media"); + openapiRequiredFields = new HashSet(Arrays.asList("media")); } /** @@ -223,14 +222,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmMessageMedia.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmMessageMedia is not found in the empty JSON string", RbmMessageMedia.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmMessageMedia is not found in the empty JSON string", RbmMessageMedia.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmMessageMedia.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -241,7 +240,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java index 4c0665f3..38efdecc 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmStandaloneCard.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MultiChannelAction; import com.bandwidth.sdk.model.RbmCardContent; import com.bandwidth.sdk.model.StandaloneCardOrientationEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmStandaloneCard */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmStandaloneCard { public static final String SERIALIZED_NAME_ORIENTATION = "orientation"; @SerializedName(SERIALIZED_NAME_ORIENTATION) @@ -259,17 +261,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("orientation"); - openapiFields.add("thumbnailImageAlignment"); - openapiFields.add("cardContent"); - openapiFields.add("suggestions"); + openapiFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent", "suggestions")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("orientation"); - openapiRequiredFields.add("thumbnailImageAlignment"); - openapiRequiredFields.add("cardContent"); + openapiRequiredFields = new HashSet(Arrays.asList("orientation", "thumbnailImageAlignment", "cardContent")); } /** @@ -281,14 +276,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmStandaloneCard.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmStandaloneCard is not found in the empty JSON string", RbmStandaloneCard.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmStandaloneCard is not found in the empty JSON string", RbmStandaloneCard.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : RbmStandaloneCard.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -303,7 +298,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraysuggestions != null) { // ensure the json data is an array if (!jsonObj.get("suggestions").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `suggestions` to be an array in the JSON string but got `%s`", jsonObj.get("suggestions").toString())); } // validate the optional field `suggestions` (array) @@ -371,7 +366,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java index b5fd0185..34055d7f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/RbmSuggestionResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RbmSuggestionResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RbmSuggestionResponse { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("postbackData"); + openapiFields = new HashSet(Arrays.asList("text", "postbackData")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,12 +210,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RbmSuggestionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RbmSuggestionResponse is not found in the empty JSON string", RbmSuggestionResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RbmSuggestionResponse is not found in the empty JSON string", RbmSuggestionResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -276,7 +276,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java index 806b6afb..1f781802 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -729,32 +731,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("parentCallId"); - openapiFields.add("recordingId"); - openapiFields.add("mediaUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("duration"); - openapiFields.add("fileFormat"); - openapiFields.add("channels"); - openapiFields.add("tag"); - openapiFields.add("status"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "recordingId", "mediaUrl", "enqueuedTime", "startTime", "endTime", "duration", "fileFormat", "channels", "tag", "status", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -766,62 +746,62 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingAvailableCallback is not found in the empty JSON string", RecordingAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -882,7 +862,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java index 1ae34da6..bc9fa396 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.google.gson.TypeAdapter; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -729,32 +731,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("parentCallId"); - openapiFields.add("recordingId"); - openapiFields.add("mediaUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("endTime"); - openapiFields.add("duration"); - openapiFields.add("fileFormat"); - openapiFields.add("channels"); - openapiFields.add("tag"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "recordingId", "mediaUrl", "enqueuedTime", "startTime", "answerTime", "endTime", "duration", "fileFormat", "channels", "tag", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -766,59 +746,59 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingCompleteCallback is not found in the empty JSON string", RecordingCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -879,7 +859,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java index ff3d9507..07c60a08 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingStateEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java index 38cda932..b1b953d6 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptionMetadata.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * If the recording was transcribed, metadata about the transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingTranscriptionMetadata { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -247,14 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("status"); - openapiFields.add("completedTime"); - openapiFields.add("url"); + openapiFields = new HashSet(Arrays.asList("id", "status", "completedTime", "url")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -266,18 +264,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingTranscriptionMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingTranscriptionMetadata is not found in the empty JSON string", RecordingTranscriptionMetadata.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptionMetadata is not found in the empty JSON string", RecordingTranscriptionMetadata.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("url") != null && !jsonObj.get("url").isJsonNull()) && !jsonObj.get("url").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("url").toString())); } } @@ -338,7 +336,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java index ed6f2dd3..e93ffe6d 100644 --- a/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java +++ b/src/main/java/com/bandwidth/sdk/model/RecordingTranscriptions.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Transcription; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * RecordingTranscriptions */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RecordingTranscriptions { public static final String SERIALIZED_NAME_TRANSCRIPTS = "transcripts"; @SerializedName(SERIALIZED_NAME_TRANSCRIPTS) @@ -178,11 +180,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("transcripts"); + openapiFields = new HashSet(Arrays.asList("transcripts")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -194,7 +195,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RecordingTranscriptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RecordingTranscriptions is not found in the empty JSON string", RecordingTranscriptions.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -203,7 +204,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArraytranscripts != null) { // ensure the json data is an array if (!jsonObj.get("transcripts").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `transcripts` to be an array in the JSON string but got `%s`", jsonObj.get("transcripts").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transcripts` to be an array in the JSON string but got `%s`", jsonObj.get("transcripts").toString())); } // validate the optional field `transcripts` (array) @@ -271,7 +272,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java index 9ba3bb5a..e885d20f 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Redirect event is fired when a <Redirect> verb is executed. Its purpose is to get the next set of verbs from the calling application. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class RedirectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -572,26 +574,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("parentCallId"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -603,46 +589,46 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!RedirectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in RedirectCallback is not found in the empty JSON string", RedirectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -703,7 +689,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java index ef3d6bfd..52ecdcab 100644 --- a/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/RedirectMethodEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java index 50932ded..af4edad2 100644 --- a/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java +++ b/src/main/java/com/bandwidth/sdk/model/SmsMessageContent.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * SmsMessageContent */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class SmsMessageContent { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -167,12 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); + openapiFields = new HashSet(Arrays.asList("text")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("text"); + openapiRequiredFields = new HashSet(Arrays.asList("text")); } /** @@ -184,19 +184,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!SmsMessageContent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in SmsMessageContent is not found in the empty JSON string", SmsMessageContent.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in SmsMessageContent is not found in the empty JSON string", SmsMessageContent.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : SmsMessageContent.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -257,7 +257,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java index 206705f6..c80ead00 100644 --- a/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StandaloneCardOrientationEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java index 64a57657..6428264a 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.StatusCallbackMessage; import com.bandwidth.sdk.model.StatusCallbackTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Represents a status callback for an outbound MT SMS or MMS or RBM message. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StatusCallback { public static final String SERIALIZED_NAME_TIME = "time"; @SerializedName(SERIALIZED_NAME_TIME) @@ -352,23 +354,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("time"); - openapiFields.add("eventTime"); - openapiFields.add("type"); - openapiFields.add("to"); - openapiFields.add("description"); - openapiFields.add("message"); - openapiFields.add("errorCode"); - openapiFields.add("carrierName"); + openapiFields = new HashSet(Arrays.asList("time", "eventTime", "type", "to", "description", "message", "errorCode", "carrierName")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("type"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("message"); + openapiRequiredFields = new HashSet(Arrays.asList("time", "type", "to", "description", "message")); } /** @@ -380,29 +369,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StatusCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusCallback is not found in the empty JSON string", StatusCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StatusCallback is not found in the empty JSON string", StatusCallback.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StatusCallback.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the required field `type` StatusCallbackTypeEnum.validateJsonElement(jsonObj.get("type")); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } // validate the required field `message` StatusCallbackMessage.validateJsonElement(jsonObj.get("message")); if ((jsonObj.get("carrierName") != null && !jsonObj.get("carrierName").isJsonNull()) && !jsonObj.get("carrierName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `carrierName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("carrierName").toString())); } } @@ -463,7 +452,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java index a983981f..0392dd88 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackMessage.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.MessageDirectionEnum; import com.bandwidth.sdk.model.MultiChannelMessageChannelEnum; import com.bandwidth.sdk.model.PriorityEnum; @@ -51,13 +52,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Message payload schema within a callback */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StatusCallbackMessage { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -504,31 +506,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("owner"); - openapiFields.add("applicationId"); - openapiFields.add("time"); - openapiFields.add("segmentCount"); - openapiFields.add("direction"); - openapiFields.add("to"); - openapiFields.add("from"); - openapiFields.add("text"); - openapiFields.add("tag"); - openapiFields.add("media"); - openapiFields.add("priority"); - openapiFields.add("channel"); + openapiFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from", "text", "tag", "media", "priority", "channel")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("owner"); - openapiRequiredFields.add("applicationId"); - openapiRequiredFields.add("time"); - openapiRequiredFields.add("segmentCount"); - openapiRequiredFields.add("direction"); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("from"); + openapiRequiredFields = new HashSet(Arrays.asList("id", "owner", "applicationId", "time", "segmentCount", "direction", "to", "from")); } /** @@ -540,25 +521,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StatusCallbackMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StatusCallbackMessage is not found in the empty JSON string", StatusCallbackMessage.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StatusCallbackMessage is not found in the empty JSON string", StatusCallbackMessage.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : StatusCallbackMessage.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if (!jsonObj.get("owner").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `owner` to be a primitive type in the JSON string but got `%s`", jsonObj.get("owner").toString())); } if (!jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } // validate the required field `direction` MessageDirectionEnum.validateJsonElement(jsonObj.get("direction")); @@ -566,20 +547,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("to") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("to").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be an array in the JSON string but got `%s`", jsonObj.get("to").toString())); } if (!jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("media") != null && !jsonObj.get("media").isJsonNull() && !jsonObj.get("media").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `media` to be an array in the JSON string but got `%s`", jsonObj.get("media").toString())); } // validate the optional field `priority` if (jsonObj.get("priority") != null && !jsonObj.get("priority").isJsonNull()) { @@ -648,7 +629,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java index a793aa48..1d7a59c1 100644 --- a/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; @@ -29,13 +31,13 @@ @JsonAdapter(StatusCallbackTypeEnum.Adapter.class) public enum StatusCallbackTypeEnum { - SENDING("message-sending"), + MESSAGE_SENDING("message-sending"), - DELIVERED("message-delivered"), + MESSAGE_DELIVERED("message-delivered"), - FAILED("message-failed"), + MESSAGE_FAILED("message-failed"), - READ("message-read"); + MESSAGE_READ("message-read"); private String value; diff --git a/src/main/java/com/bandwidth/sdk/model/StirShaken.java b/src/main/java/com/bandwidth/sdk/model/StirShaken.java index e9ee898d..169499fb 100644 --- a/src/main/java/com/bandwidth/sdk/model/StirShaken.java +++ b/src/main/java/com/bandwidth/sdk/model/StirShaken.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * StirShaken */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class StirShaken { public static final String SERIALIZED_NAME_VERSTAT = "verstat"; @SerializedName(SERIALIZED_NAME_VERSTAT) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("verstat"); - openapiFields.add("attestationIndicator"); - openapiFields.add("originatingId"); + openapiFields = new HashSet(Arrays.asList("verstat", "attestationIndicator", "originatingId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,18 +236,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!StirShaken.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in StirShaken is not found in the empty JSON string", StirShaken.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("verstat") != null && !jsonObj.get("verstat").isJsonNull()) && !jsonObj.get("verstat").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `verstat` to be a primitive type in the JSON string but got `%s`", jsonObj.get("verstat").toString())); } if ((jsonObj.get("attestationIndicator") != null && !jsonObj.get("attestationIndicator").isJsonNull()) && !jsonObj.get("attestationIndicator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `attestationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationIndicator").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `attestationIndicator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("attestationIndicator").toString())); } if ((jsonObj.get("originatingId") != null && !jsonObj.get("originatingId").isJsonNull()) && !jsonObj.get("originatingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `originatingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originatingId").toString())); } } @@ -309,7 +308,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java index 13af88b4..babf10cc 100644 --- a/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java +++ b/src/main/java/com/bandwidth/sdk/model/TelephoneNumber.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TelephoneNumber */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TelephoneNumber { public static final String SERIALIZED_NAME_TELEPHONE_NUMBER = "telephoneNumber"; @SerializedName(SERIALIZED_NAME_TELEPHONE_NUMBER) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("telephoneNumber"); + openapiFields = new HashSet(Arrays.asList("telephoneNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TelephoneNumber.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TelephoneNumber is not found in the empty JSON string", TelephoneNumber.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TelephoneNumber is not found in the empty JSON string", TelephoneNumber.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("telephoneNumber") != null && !jsonObj.get("telephoneNumber").isJsonNull()) && !jsonObj.get("telephoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `telephoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("telephoneNumber").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java index 00d5bada..00bcc1f7 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvBasicAuthentication */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -193,14 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); + openapiFields = new HashSet(Arrays.asList("username", "password")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("password"); + openapiRequiredFields = new HashSet(Arrays.asList("username", "password")); } /** @@ -212,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvBasicAuthentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvBasicAuthentication is not found in the empty JSON string", TfvBasicAuthentication.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvBasicAuthentication is not found in the empty JSON string", TfvBasicAuthentication.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : TfvBasicAuthentication.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -288,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java index 7e21b73b..457deaf5 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvCallbackStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TfvError.java b/src/main/java/com/bandwidth/sdk/model/TfvError.java index ef4056a2..9b043c39 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvError.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A generic error object. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -219,13 +221,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("errors"); + openapiFields = new HashSet(Arrays.asList("type", "description", "errors")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -237,15 +236,15 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvError is not found in the empty JSON string", TfvError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvError is not found in the empty JSON string", TfvError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } } @@ -306,7 +305,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java index b2b8d96a..653e5a72 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatus.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatus.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvStatusEnum; import com.bandwidth.sdk.model.TfvSubmissionInfo; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvStatus */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvStatus { public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) @@ -405,20 +407,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("phoneNumber"); - openapiFields.add("status"); - openapiFields.add("internalTicketNumber"); - openapiFields.add("declineReasonDescription"); - openapiFields.add("resubmitAllowed"); - openapiFields.add("createdDateTime"); - openapiFields.add("modifiedDateTime"); - openapiFields.add("submission"); - openapiFields.add("blocked"); - openapiFields.add("blockedReason"); + openapiFields = new HashSet(Arrays.asList("phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -430,29 +422,29 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvStatus.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvStatus is not found in the empty JSON string", TfvStatus.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvStatus is not found in the empty JSON string", TfvStatus.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("declineReasonDescription") != null && !jsonObj.get("declineReasonDescription").isJsonNull()) && !jsonObj.get("declineReasonDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } // validate the optional field `submission` if (jsonObj.get("submission") != null && !jsonObj.get("submission").isJsonNull()) { TfvSubmissionInfo.validateJsonElement(jsonObj.get("submission")); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -513,7 +505,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java index d17c8b50..de526935 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvStatusEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java index a5715be1..704c01e6 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionInfo */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvSubmissionInfo { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -550,25 +552,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("businessAddress"); - openapiFields.add("businessContact"); - openapiFields.add("messageVolume"); - openapiFields.add("useCase"); - openapiFields.add("useCaseSummary"); - openapiFields.add("productionMessageContent"); - openapiFields.add("optInWorkflow"); - openapiFields.add("additionalInformation"); - openapiFields.add("isvReseller"); - openapiFields.add("privacyPolicyUrl"); - openapiFields.add("termsAndConditionsUrl"); - openapiFields.add("businessDba"); - openapiFields.add("businessRegistrationNumber"); - openapiFields.add("businessRegistrationType"); - openapiFields.add("businessEntityType"); + openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -580,7 +567,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvSubmissionInfo.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvSubmissionInfo is not found in the empty JSON string", TfvSubmissionInfo.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -593,35 +580,35 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti Contact.validateJsonElement(jsonObj.get("businessContact")); } if ((jsonObj.get("useCase") != null && !jsonObj.get("useCase").isJsonNull()) && !jsonObj.get("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if ((jsonObj.get("useCaseSummary") != null && !jsonObj.get("useCaseSummary").isJsonNull()) && !jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if ((jsonObj.get("productionMessageContent") != null && !jsonObj.get("productionMessageContent").isJsonNull()) && !jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the optional field `optInWorkflow` if (jsonObj.get("optInWorkflow") != null && !jsonObj.get("optInWorkflow").isJsonNull()) { OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); } if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -690,7 +677,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java index 8abdd125..932b5034 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionWrapper.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.VerificationUpdateRequest; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TfvSubmissionWrapper */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TfvSubmissionWrapper { public static final String SERIALIZED_NAME_SUBMISSION = "submission"; @SerializedName(SERIALIZED_NAME_SUBMISSION) @@ -168,11 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("submission"); + openapiFields = new HashSet(Arrays.asList("submission")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -184,7 +185,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TfvSubmissionWrapper.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TfvSubmissionWrapper is not found in the empty JSON string", TfvSubmissionWrapper.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -251,7 +252,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java index ee456b43..999b112a 100644 --- a/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/ThumbnailAlignmentEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java index b0b75872..b2232448 100644 --- a/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java +++ b/src/main/java/com/bandwidth/sdk/model/TnLookupRequestError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TnLookupRequestError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TnLookupRequestError { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("message"); + openapiFields = new HashSet(Arrays.asList("message")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TnLookupRequestError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TnLookupRequestError is not found in the empty JSON string", TnLookupRequestError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TnLookupRequestError is not found in the empty JSON string", TnLookupRequestError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java index 7d1c7fa7..41652246 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscribeRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallbackMethodEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * TranscribeRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TranscribeRecording { public static final String SERIALIZED_NAME_CALLBACK_URL = "callbackUrl"; @SerializedName(SERIALIZED_NAME_CALLBACK_URL) @@ -339,17 +341,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("callbackUrl"); - openapiFields.add("callbackMethod"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("tag"); - openapiFields.add("callbackTimeout"); - openapiFields.add("detectLanguage"); + openapiFields = new HashSet(Arrays.asList("callbackUrl", "callbackMethod", "username", "password", "tag", "callbackTimeout", "detectLanguage")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -361,25 +356,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TranscribeRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TranscribeRecording is not found in the empty JSON string", TranscribeRecording.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `callbackMethod` if (jsonObj.get("callbackMethod") != null && !jsonObj.get("callbackMethod").isJsonNull()) { CallbackMethodEnum.validateJsonElement(jsonObj.get("callbackMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -440,7 +435,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/Transcription.java b/src/main/java/com/bandwidth/sdk/model/Transcription.java index fc017c5c..9c30992d 100644 --- a/src/main/java/com/bandwidth/sdk/model/Transcription.java +++ b/src/main/java/com/bandwidth/sdk/model/Transcription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Transcription */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class Transcription { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) @@ -193,12 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("text"); - openapiFields.add("confidence"); + openapiFields = new HashSet(Arrays.asList("text", "confidence")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -210,12 +210,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!Transcription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in Transcription is not found in the empty JSON string", Transcription.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("text") != null && !jsonObj.get("text").isJsonNull()) && !jsonObj.get("text").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `text` to be a primitive type in the JSON string but got `%s`", jsonObj.get("text").toString())); } } @@ -276,7 +276,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java index b1eecdc2..700d8f81 100644 --- a/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TranscriptionAvailableCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.bandwidth.sdk.model.FileFormatEnum; import com.bandwidth.sdk.model.Transcription; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * The Transcription Available event is sent when the recording transcription is available to be downloaded. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TranscriptionAvailableCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -704,31 +706,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("mediaUrl"); - openapiFields.add("parentCallId"); - openapiFields.add("recordingId"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("endTime"); - openapiFields.add("duration"); - openapiFields.add("fileFormat"); - openapiFields.add("tag"); - openapiFields.add("transcription"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "mediaUrl", "parentCallId", "recordingId", "enqueuedTime", "startTime", "endTime", "duration", "fileFormat", "tag", "transcription", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -740,63 +721,63 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TranscriptionAvailableCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TranscriptionAvailableCallback is not found in the empty JSON string", TranscriptionAvailableCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("mediaUrl") != null && !jsonObj.get("mediaUrl").isJsonNull()) && !jsonObj.get("mediaUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `mediaUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("mediaUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("recordingId") != null && !jsonObj.get("recordingId").isJsonNull()) && !jsonObj.get("recordingId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `recordingId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recordingId").toString())); } if ((jsonObj.get("duration") != null && !jsonObj.get("duration").isJsonNull()) && !jsonObj.get("duration").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `duration` to be a primitive type in the JSON string but got `%s`", jsonObj.get("duration").toString())); } // validate the optional field `fileFormat` if (jsonObj.get("fileFormat") != null && !jsonObj.get("fileFormat").isJsonNull()) { FileFormatEnum.validateJsonElement(jsonObj.get("fileFormat")); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } // validate the optional field `transcription` if (jsonObj.get("transcription") != null && !jsonObj.get("transcription").isJsonNull()) { Transcription.validateJsonElement(jsonObj.get("transcription")); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -857,7 +838,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java index 4e6cbad0..d8a9a4ca 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferAnswerCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TransferAnswerCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -546,25 +548,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -576,43 +563,43 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TransferAnswerCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferAnswerCallback is not found in the empty JSON string", TransferAnswerCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } } @@ -673,7 +660,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java index 40908757..a4f7d6b0 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferCompleteCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TransferCompleteCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -624,28 +626,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("tag"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); - openapiFields.add("cause"); - openapiFields.add("errorMessage"); - openapiFields.add("errorId"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "enqueuedTime", "startTime", "answerTime", "tag", "transferCallerId", "transferTo", "cause", "errorMessage", "errorId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -657,52 +641,52 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TransferCompleteCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferCompleteCallback is not found in the empty JSON string", TransferCompleteCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -763,7 +747,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java index aac192fe..6e3e50a9 100644 --- a/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java +++ b/src/main/java/com/bandwidth/sdk/model/TransferDisconnectCallback.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallDirectionEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class TransferDisconnectCallback { public static final String SERIALIZED_NAME_EVENT_TYPE = "eventType"; @SerializedName(SERIALIZED_NAME_EVENT_TYPE) @@ -676,30 +678,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("eventType"); - openapiFields.add("eventTime"); - openapiFields.add("accountId"); - openapiFields.add("applicationId"); - openapiFields.add("from"); - openapiFields.add("to"); - openapiFields.add("direction"); - openapiFields.add("callId"); - openapiFields.add("callUrl"); - openapiFields.add("parentCallId"); - openapiFields.add("enqueuedTime"); - openapiFields.add("startTime"); - openapiFields.add("answerTime"); - openapiFields.add("endTime"); - openapiFields.add("tag"); - openapiFields.add("transferCallerId"); - openapiFields.add("transferTo"); - openapiFields.add("cause"); - openapiFields.add("errorMessage"); - openapiFields.add("errorId"); + openapiFields = new HashSet(Arrays.asList("eventType", "eventTime", "accountId", "applicationId", "from", "to", "direction", "callId", "callUrl", "parentCallId", "enqueuedTime", "startTime", "answerTime", "endTime", "tag", "transferCallerId", "transferTo", "cause", "errorMessage", "errorId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -711,55 +693,55 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!TransferDisconnectCallback.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in TransferDisconnectCallback is not found in the empty JSON string", TransferDisconnectCallback.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("eventType") != null && !jsonObj.get("eventType").isJsonNull()) && !jsonObj.get("eventType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `eventType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("eventType").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("applicationId") != null && !jsonObj.get("applicationId").isJsonNull()) && !jsonObj.get("applicationId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicationId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicationId").toString())); } if ((jsonObj.get("from") != null && !jsonObj.get("from").isJsonNull()) && !jsonObj.get("from").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `from` to be a primitive type in the JSON string but got `%s`", jsonObj.get("from").toString())); } if ((jsonObj.get("to") != null && !jsonObj.get("to").isJsonNull()) && !jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } // validate the optional field `direction` if (jsonObj.get("direction") != null && !jsonObj.get("direction").isJsonNull()) { CallDirectionEnum.validateJsonElement(jsonObj.get("direction")); } if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } if ((jsonObj.get("callUrl") != null && !jsonObj.get("callUrl").isJsonNull()) && !jsonObj.get("callUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callUrl").toString())); } if ((jsonObj.get("parentCallId") != null && !jsonObj.get("parentCallId").isJsonNull()) && !jsonObj.get("parentCallId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `parentCallId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentCallId").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } if ((jsonObj.get("transferCallerId") != null && !jsonObj.get("transferCallerId").isJsonNull()) && !jsonObj.get("transferCallerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferCallerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferCallerId").toString())); } if ((jsonObj.get("transferTo") != null && !jsonObj.get("transferTo").isJsonNull()) && !jsonObj.get("transferTo").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `transferTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("transferTo").toString())); } if ((jsonObj.get("cause") != null && !jsonObj.get("cause").isJsonNull()) && !jsonObj.get("cause").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cause` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cause").toString())); } if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } if ((jsonObj.get("errorId") != null && !jsonObj.get("errorId").isJsonNull()) && !jsonObj.get("errorId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errorId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorId").toString())); } } @@ -820,7 +802,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java index 22164f89..361171b6 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCall.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCall.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.CallStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCall */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateCall { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -416,20 +418,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("state"); - openapiFields.add("redirectUrl"); - openapiFields.add("redirectMethod"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("redirectFallbackUrl"); - openapiFields.add("redirectFallbackMethod"); - openapiFields.add("fallbackUsername"); - openapiFields.add("fallbackPassword"); - openapiFields.add("tag"); + openapiFields = new HashSet(Arrays.asList("state", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword", "tag")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -441,7 +433,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateCall.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateCall is not found in the empty JSON string", UpdateCall.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -450,33 +442,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti CallStateEnum.validateJsonElement(jsonObj.get("state")); } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } // validate the optional field `redirectMethod` if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } // validate the optional field `redirectFallbackMethod` if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } if ((jsonObj.get("tag") != null && !jsonObj.get("tag").isJsonNull()) && !jsonObj.get("tag").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString())); } } @@ -537,7 +529,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java index c269d8d3..d2978269 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateCallRecording.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.RecordingStateEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateCallRecording */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateCallRecording { public static final String SERIALIZED_NAME_STATE = "state"; @SerializedName(SERIALIZED_NAME_STATE) @@ -168,12 +170,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("state"); + openapiFields = new HashSet(Arrays.asList("state")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("state"); + openapiRequiredFields = new HashSet(Arrays.asList("state")); } /** @@ -185,14 +185,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateCallRecording.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateCallRecording is not found in the empty JSON string", UpdateCallRecording.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : UpdateCallRecording.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -257,7 +257,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java index 0b09b1e4..f110ffb0 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConference.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConference.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.ConferenceStateEnum; import com.bandwidth.sdk.model.RedirectMethodEnum; import com.google.gson.TypeAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConference */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateConference { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @@ -390,19 +392,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("redirectUrl"); - openapiFields.add("redirectMethod"); - openapiFields.add("username"); - openapiFields.add("password"); - openapiFields.add("redirectFallbackUrl"); - openapiFields.add("redirectFallbackMethod"); - openapiFields.add("fallbackUsername"); - openapiFields.add("fallbackPassword"); + openapiFields = new HashSet(Arrays.asList("status", "redirectUrl", "redirectMethod", "username", "password", "redirectFallbackUrl", "redirectFallbackMethod", "fallbackUsername", "fallbackPassword")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -414,7 +407,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateConference.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateConference is not found in the empty JSON string", UpdateConference.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -423,30 +416,30 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti ConferenceStateEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("redirectUrl") != null && !jsonObj.get("redirectUrl").isJsonNull()) && !jsonObj.get("redirectUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectUrl").toString())); } // validate the optional field `redirectMethod` if (jsonObj.get("redirectMethod") != null && !jsonObj.get("redirectMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectMethod")); } if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } if ((jsonObj.get("redirectFallbackUrl") != null && !jsonObj.get("redirectFallbackUrl").isJsonNull()) && !jsonObj.get("redirectFallbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `redirectFallbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("redirectFallbackUrl").toString())); } // validate the optional field `redirectFallbackMethod` if (jsonObj.get("redirectFallbackMethod") != null && !jsonObj.get("redirectFallbackMethod").isJsonNull()) { RedirectMethodEnum.validateJsonElement(jsonObj.get("redirectFallbackMethod")); } if ((jsonObj.get("fallbackUsername") != null && !jsonObj.get("fallbackUsername").isJsonNull()) && !jsonObj.get("fallbackUsername").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackUsername` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackUsername").toString())); } if ((jsonObj.get("fallbackPassword") != null && !jsonObj.get("fallbackPassword").isJsonNull()) && !jsonObj.get("fallbackPassword").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `fallbackPassword` to be a primitive type in the JSON string but got `%s`", jsonObj.get("fallbackPassword").toString())); } } @@ -507,7 +500,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java index e0e385ba..5f365392 100644 --- a/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java +++ b/src/main/java/com/bandwidth/sdk/model/UpdateConferenceMember.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * UpdateConferenceMember */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class UpdateConferenceMember { public static final String SERIALIZED_NAME_MUTE = "mute"; @SerializedName(SERIALIZED_NAME_MUTE) @@ -241,13 +243,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("mute"); - openapiFields.add("hold"); - openapiFields.add("callIdsToCoach"); + openapiFields = new HashSet(Arrays.asList("mute", "hold", "callIdsToCoach")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -259,13 +258,13 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!UpdateConferenceMember.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in UpdateConferenceMember is not found in the empty JSON string", UpdateConferenceMember.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); // ensure the optional json data is an array if present if (jsonObj.get("callIdsToCoach") != null && !jsonObj.get("callIdsToCoach").isJsonNull() && !jsonObj.get("callIdsToCoach").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callIdsToCoach` to be an array in the JSON string but got `%s`", jsonObj.get("callIdsToCoach").toString())); } } @@ -326,7 +325,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java index 92b77d63..176529b8 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationDenialWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.AdditionalDenialReason; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -46,13 +47,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationDenialWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationDenialWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -413,20 +415,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("additionalDenialReasons"); - openapiFields.add("declineReasonDescription"); - openapiFields.add("denialStatusCode"); - openapiFields.add("internalTicketNumber"); - openapiFields.add("phoneNumber"); - openapiFields.add("resubmitAllowed"); - openapiFields.add("status"); - openapiFields.add("blocked"); - openapiFields.add("blockedReason"); + openapiFields = new HashSet(Arrays.asList("accountId", "additionalDenialReasons", "declineReasonDescription", "denialStatusCode", "internalTicketNumber", "phoneNumber", "resubmitAllowed", "status", "blocked", "blockedReason")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -438,19 +430,19 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationDenialWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerificationDenialWebhook is not found in the empty JSON string", VerificationDenialWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationDenialWebhook is not found in the empty JSON string", VerificationDenialWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if (jsonObj.get("additionalDenialReasons") != null && !jsonObj.get("additionalDenialReasons").isJsonNull()) { JsonArray jsonArrayadditionalDenialReasons = jsonObj.getAsJsonArray("additionalDenialReasons"); if (jsonArrayadditionalDenialReasons != null) { // ensure the json data is an array if (!jsonObj.get("additionalDenialReasons").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString())); } // validate the optional field `additionalDenialReasons` (array) @@ -460,19 +452,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } if ((jsonObj.get("declineReasonDescription") != null && !jsonObj.get("declineReasonDescription").isJsonNull()) && !jsonObj.get("declineReasonDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString())); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); } } @@ -533,7 +525,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java index 270670c9..93bfdb0c 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -50,13 +51,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -638,36 +640,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("businessAddress"); - openapiFields.add("businessContact"); - openapiFields.add("messageVolume"); - openapiFields.add("phoneNumbers"); - openapiFields.add("useCase"); - openapiFields.add("useCaseSummary"); - openapiFields.add("productionMessageContent"); - openapiFields.add("optInWorkflow"); - openapiFields.add("additionalInformation"); - openapiFields.add("isvReseller"); - openapiFields.add("privacyPolicyUrl"); - openapiFields.add("termsAndConditionsUrl"); - openapiFields.add("businessDba"); - openapiFields.add("businessRegistrationNumber"); - openapiFields.add("businessRegistrationType"); - openapiFields.add("businessEntityType"); - openapiFields.add("helpMessageResponse"); - openapiFields.add("ageGatedContent"); + openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("businessAddress"); - openapiRequiredFields.add("businessContact"); - openapiRequiredFields.add("messageVolume"); - openapiRequiredFields.add("phoneNumbers"); - openapiRequiredFields.add("useCase"); - openapiRequiredFields.add("useCaseSummary"); - openapiRequiredFields.add("productionMessageContent"); - openapiRequiredFields.add("optInWorkflow"); + openapiRequiredFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow")); } /** @@ -679,14 +655,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerificationRequest is not found in the empty JSON string", VerificationRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationRequest is not found in the empty JSON string", VerificationRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerificationRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -698,36 +674,36 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("phoneNumbers") == null) { throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); } else if (!jsonObj.get("phoneNumbers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumbers` to be an array in the JSON string but got `%s`", jsonObj.get("phoneNumbers").toString())); + 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("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if (!jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if (!jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the required field `optInWorkflow` OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -738,7 +714,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); } if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } } @@ -799,7 +775,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java index f68127b8..d2acc02f 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Address; import com.bandwidth.sdk.model.BusinessEntityTypeEnum; import com.bandwidth.sdk.model.BusinessRegistrationTypeEnum; @@ -48,13 +49,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationUpdateRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationUpdateRequest { public static final String SERIALIZED_NAME_BUSINESS_ADDRESS = "businessAddress"; @SerializedName(SERIALIZED_NAME_BUSINESS_ADDRESS) @@ -602,34 +604,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("businessAddress"); - openapiFields.add("businessContact"); - openapiFields.add("messageVolume"); - openapiFields.add("useCase"); - openapiFields.add("useCaseSummary"); - openapiFields.add("productionMessageContent"); - openapiFields.add("optInWorkflow"); - openapiFields.add("additionalInformation"); - openapiFields.add("isvReseller"); - openapiFields.add("privacyPolicyUrl"); - openapiFields.add("termsAndConditionsUrl"); - openapiFields.add("businessDba"); - openapiFields.add("businessRegistrationNumber"); - openapiFields.add("businessRegistrationType"); - openapiFields.add("businessEntityType"); - openapiFields.add("helpMessageResponse"); - openapiFields.add("ageGatedContent"); + openapiFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("businessAddress"); - openapiRequiredFields.add("businessContact"); - openapiRequiredFields.add("messageVolume"); - openapiRequiredFields.add("useCase"); - openapiRequiredFields.add("useCaseSummary"); - openapiRequiredFields.add("productionMessageContent"); - openapiRequiredFields.add("optInWorkflow"); + openapiRequiredFields = new HashSet(Arrays.asList("businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow")); } /** @@ -641,14 +619,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationUpdateRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerificationUpdateRequest is not found in the empty JSON string", VerificationUpdateRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationUpdateRequest is not found in the empty JSON string", VerificationUpdateRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerificationUpdateRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -657,33 +635,33 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // validate the required field `businessContact` Contact.validateJsonElement(jsonObj.get("businessContact")); if (!jsonObj.get("useCase").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCase").toString())); } if (!jsonObj.get("useCaseSummary").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `useCaseSummary` to be a primitive type in the JSON string but got `%s`", jsonObj.get("useCaseSummary").toString())); } if (!jsonObj.get("productionMessageContent").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `productionMessageContent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productionMessageContent").toString())); } // validate the required field `optInWorkflow` OptInWorkflow.validateJsonElement(jsonObj.get("optInWorkflow")); if ((jsonObj.get("additionalInformation") != null && !jsonObj.get("additionalInformation").isJsonNull()) && !jsonObj.get("additionalInformation").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalInformation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("additionalInformation").toString())); } if ((jsonObj.get("isvReseller") != null && !jsonObj.get("isvReseller").isJsonNull()) && !jsonObj.get("isvReseller").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `isvReseller` to be a primitive type in the JSON string but got `%s`", jsonObj.get("isvReseller").toString())); } if ((jsonObj.get("privacyPolicyUrl") != null && !jsonObj.get("privacyPolicyUrl").isJsonNull()) && !jsonObj.get("privacyPolicyUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `privacyPolicyUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("privacyPolicyUrl").toString())); } if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } if ((jsonObj.get("businessRegistrationNumber") != null && !jsonObj.get("businessRegistrationNumber").isJsonNull()) && !jsonObj.get("businessRegistrationNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `businessRegistrationNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessRegistrationNumber").toString())); } // validate the optional field `businessRegistrationType` if (jsonObj.get("businessRegistrationType") != null && !jsonObj.get("businessRegistrationType").isJsonNull()) { @@ -694,7 +672,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti BusinessEntityTypeEnum.validateJsonElement(jsonObj.get("businessEntityType")); } if ((jsonObj.get("helpMessageResponse") != null && !jsonObj.get("helpMessageResponse").isJsonNull()) && !jsonObj.get("helpMessageResponse").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `helpMessageResponse` to be a primitive type in the JSON string but got `%s`", jsonObj.get("helpMessageResponse").toString())); } } @@ -755,7 +733,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java index 22ce9d79..39ca6932 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationWebhook.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvCallbackStatusEnum; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerificationWebhook */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerificationWebhook { public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) @@ -247,14 +249,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("accountId"); - openapiFields.add("phoneNumber"); - openapiFields.add("status"); - openapiFields.add("internalTicketNumber"); + openapiFields = new HashSet(Arrays.asList("accountId", "phoneNumber", "status", "internalTicketNumber")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -266,22 +264,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerificationWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerificationWebhook is not found in the empty JSON string", VerificationWebhook.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerificationWebhook is not found in the empty JSON string", VerificationWebhook.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); } // validate the optional field `status` if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); } if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); } } @@ -342,7 +340,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java index 98611e5c..86df714b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeRequest.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerifyCodeRequest { public static final String SERIALIZED_NAME_TO = "to"; @SerializedName(SERIALIZED_NAME_TO) @@ -248,17 +250,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("to"); - openapiFields.add("scope"); - openapiFields.add("expirationTimeInMinutes"); - openapiFields.add("code"); + openapiFields = new HashSet(Arrays.asList("to", "scope", "expirationTimeInMinutes", "code")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("to"); - openapiRequiredFields.add("expirationTimeInMinutes"); - openapiRequiredFields.add("code"); + openapiRequiredFields = new HashSet(Arrays.asList("to", "expirationTimeInMinutes", "code")); } /** @@ -270,25 +265,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerifyCodeRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerifyCodeRequest is not found in the empty JSON string", VerifyCodeRequest.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : VerifyCodeRequest.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("to").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `to` to be a primitive type in the JSON string but got `%s`", jsonObj.get("to").toString())); } if ((jsonObj.get("scope") != null && !jsonObj.get("scope").isJsonNull()) && !jsonObj.get("scope").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `scope` to be a primitive type in the JSON string but got `%s`", jsonObj.get("scope").toString())); } if (!jsonObj.get("code").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("code").toString())); } } @@ -349,7 +344,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java index d8040b0b..fd9f6dca 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VerifyCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VerifyCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VerifyCodeResponse { public static final String SERIALIZED_NAME_VALID = "valid"; @SerializedName(SERIALIZED_NAME_VALID) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("valid"); + openapiFields = new HashSet(Arrays.asList("valid")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,7 +184,7 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VerifyCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VerifyCodeResponse is not found in the empty JSON string", VerifyCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -246,7 +247,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java index 589bbdbc..68a02d54 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceApiError.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,13 +44,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceApiError */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VoiceApiError { public static final String SERIALIZED_NAME_TYPE = "type"; @SerializedName(SERIALIZED_NAME_TYPE) @@ -231,13 +233,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("type"); - openapiFields.add("description"); - openapiFields.add("id"); + openapiFields = new HashSet(Arrays.asList("type", "description", "id")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -249,18 +248,18 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VoiceApiError.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VoiceApiError is not found in the empty JSON string", VoiceApiError.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) && !jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } } @@ -321,7 +320,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java index 8e0047dd..cc3d2b0b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java +++ b/src/main/java/com/bandwidth/sdk/model/VoiceCodeResponse.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * VoiceCodeResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class VoiceCodeResponse { public static final String SERIALIZED_NAME_CALL_ID = "callId"; @SerializedName(SERIALIZED_NAME_CALL_ID) @@ -167,11 +169,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("callId"); + openapiFields = new HashSet(Arrays.asList("callId")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); + openapiRequiredFields = new HashSet(0); } /** @@ -183,12 +184,12 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!VoiceCodeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in VoiceCodeResponse is not found in the empty JSON string", VoiceCodeResponse.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("callId") != null && !jsonObj.get("callId").isJsonNull()) && !jsonObj.get("callId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callId").toString())); } } @@ -249,7 +250,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java index 9521bc5d..654946f3 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscription.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.WebhookSubscriptionBasicAuthentication; import com.bandwidth.sdk.model.WebhookSubscriptionTypeEnum; import com.google.gson.TypeAdapter; @@ -45,13 +46,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscription { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -326,18 +328,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("accountId"); - openapiFields.add("callbackUrl"); - openapiFields.add("type"); - openapiFields.add("basicAuthentication"); - openapiFields.add("createdDate"); - openapiFields.add("modifiedDate"); + openapiFields = new HashSet(Arrays.asList("id", "accountId", "callbackUrl", "type", "basicAuthentication", "createdDate", "modifiedDate")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("callbackUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("callbackUrl")); } /** @@ -349,25 +343,25 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscription.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscription is not found in the empty JSON string", WebhookSubscription.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscription is not found in the empty JSON string", WebhookSubscription.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscription.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } // validate the optional field `type` if (jsonObj.get("type") != null && !jsonObj.get("type").isJsonNull()) { @@ -436,7 +430,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java index a95b0707..2a5923c0 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionBasicAuthentication.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,13 +43,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * Basic authentication credentials are not required, but if present, both username and password must be provided. */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscriptionBasicAuthentication { public static final String SERIALIZED_NAME_USERNAME = "username"; @SerializedName(SERIALIZED_NAME_USERNAME) @@ -193,14 +195,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("username"); - openapiFields.add("password"); + openapiFields = new HashSet(Arrays.asList("username", "password")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("username"); - openapiRequiredFields.add("password"); + openapiRequiredFields = new HashSet(Arrays.asList("username", "password")); } /** @@ -212,22 +210,22 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionBasicAuthentication.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscriptionBasicAuthentication is not found in the empty JSON string", WebhookSubscriptionBasicAuthentication.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionBasicAuthentication is not found in the empty JSON string", WebhookSubscriptionBasicAuthentication.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionBasicAuthentication.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); if (!jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); } if (!jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); } } @@ -288,7 +286,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java index fd354bc8..7176fa91 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionRequestSchema.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.TfvBasicAuthentication; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,13 +45,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * WebhookSubscriptionRequestSchema */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscriptionRequestSchema { public static final String SERIALIZED_NAME_BASIC_AUTHENTICATION = "basicAuthentication"; @SerializedName(SERIALIZED_NAME_BASIC_AUTHENTICATION) @@ -232,14 +234,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("basicAuthentication"); - openapiFields.add("callbackUrl"); - openapiFields.add("sharedSecretKey"); + openapiFields = new HashSet(Arrays.asList("basicAuthentication", "callbackUrl", "sharedSecretKey")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("callbackUrl"); + openapiRequiredFields = new HashSet(Arrays.asList("callbackUrl")); } /** @@ -251,14 +249,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionRequestSchema.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscriptionRequestSchema is not found in the empty JSON string", WebhookSubscriptionRequestSchema.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionRequestSchema is not found in the empty JSON string", WebhookSubscriptionRequestSchema.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionRequestSchema.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -267,10 +265,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti TfvBasicAuthentication.validateJsonElement(jsonObj.get("basicAuthentication")); } if ((jsonObj.get("callbackUrl") != null && !jsonObj.get("callbackUrl").isJsonNull()) && !jsonObj.get("callbackUrl").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `callbackUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("callbackUrl").toString())); } if ((jsonObj.get("sharedSecretKey") != null && !jsonObj.get("sharedSecretKey").isJsonNull()) && !jsonObj.get("sharedSecretKey").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `sharedSecretKey` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sharedSecretKey").toString())); } } @@ -331,7 +329,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java index e3688c9a..2873d71f 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionTypeEnum.java @@ -14,9 +14,11 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.google.gson.annotations.SerializedName; import java.io.IOException; +import java.util.Locale; import com.google.gson.TypeAdapter; import com.google.gson.JsonElement; import com.google.gson.annotations.JsonAdapter; diff --git a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java index 9cde6bac..d1205b0c 100644 --- a/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java +++ b/src/main/java/com/bandwidth/sdk/model/WebhookSubscriptionsListBody.java @@ -14,6 +14,7 @@ package com.bandwidth.sdk.model; import java.util.Objects; +import java.util.Locale; import com.bandwidth.sdk.model.Error; import com.bandwidth.sdk.model.LinksObject; import com.bandwidth.sdk.model.WebhookSubscription; @@ -47,13 +48,14 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.Locale; import com.bandwidth.sdk.JSON; /** * A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") public class WebhookSubscriptionsListBody { public static final String SERIALIZED_NAME_LINKS = "links"; @SerializedName(SERIALIZED_NAME_LINKS) @@ -240,14 +242,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("links"); - openapiFields.add("errors"); - openapiFields.add("data"); + openapiFields = new HashSet(Arrays.asList("links", "errors", "data")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("data"); + openapiRequiredFields = new HashSet(Arrays.asList("data")); } /** @@ -259,14 +257,14 @@ private String toIndentedString(Object o) { public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { if (!WebhookSubscriptionsListBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in WebhookSubscriptionsListBody is not found in the empty JSON string", WebhookSubscriptionsListBody.openapiRequiredFields.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in WebhookSubscriptionsListBody is not found in the empty JSON string", WebhookSubscriptionsListBody.openapiRequiredFields.toString())); } } // check to make sure all required properties/fields are present in the JSON string for (String requiredField : WebhookSubscriptionsListBody.openapiRequiredFields) { if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -279,7 +277,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonArrayerrors != null) { // ensure the json data is an array if (!jsonObj.get("errors").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); } // validate the optional field `errors` (array) @@ -290,7 +288,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } // ensure the json data is an array if (!jsonObj.get("data").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `data` to be an array in the JSON string but got `%s`", jsonObj.get("data").toString())); } JsonArray jsonArraydata = jsonObj.getAsJsonArray("data"); @@ -357,7 +355,7 @@ else if (entry.getValue().getAsJsonPrimitive().isNumber()) else if (entry.getValue().getAsJsonPrimitive().isBoolean()) instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); else - throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); } else if (entry.getValue().isJsonArray()) { instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); } else { // JSON object diff --git a/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java b/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java index 6c4e82bc..c2cde951 100644 --- a/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java +++ b/src/test/java/com/bandwidth/sdk/smoke/StatisticsApiTest.java @@ -1,5 +1,6 @@ package com.bandwidth.sdk.smoke; +import com.bandwidth.sdk.api.MessagesApi; import com.bandwidth.sdk.api.StatisticsApi; import com.bandwidth.sdk.auth.HttpBasicAuth; import com.bandwidth.sdk.ApiClient; @@ -17,10 +18,8 @@ * API tests for StatisticsApi */ public class StatisticsApiTest { - public ApiClient defaultClient = Configuration.getDefaultApiClient(); - public HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); - private final StatisticsApi api = new StatisticsApi(defaultClient); - + ApiClient oauthClient = new ApiClient(BW_USERNAME, BW_PASSWORD, null); + private final StatisticsApi api = new StatisticsApi(oauthClient); /** * Get Account Statistics * @@ -30,8 +29,6 @@ public class StatisticsApiTest { */ @Test public void getStatisticsTest() throws ApiException { - Basic.setUsername(BW_USERNAME); - Basic.setPassword(BW_PASSWORD); AccountStatistics response = api.getStatistics(BW_ACCOUNT_ID); diff --git a/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java b/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java index a8a97ccf..989b5845 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java @@ -19,7 +19,6 @@ import java.util.Arrays; import java.util.ArrayList; import com.bandwidth.sdk.model.FailureWebhook; -import com.bandwidth.sdk.model.TelephoneNumber; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.CoreMatchers.instanceOf; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java index 226f5c1d..cfee4a11 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTest.java @@ -30,7 +30,7 @@ public class StatusCallbackTest { private final StatusCallback model = new StatusCallback() .time(OffsetDateTime.now()) .eventTime(OffsetDateTime.now()) - .type(StatusCallbackTypeEnum.DELIVERED) + .type(StatusCallbackTypeEnum.MESSAGE_DELIVERED) .to("to") .description("description") .message(new StatusCallbackMessage()) diff --git a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java index 0317bd89..9a6b3d82 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java @@ -29,10 +29,10 @@ public class StatusCallbackTypeEnumTest { */ @Test public void testStatusCallbackTypeEnum() { - assertThat(StatusCallbackTypeEnum.SENDING.toString(), equalTo("message-sending")); - assertThat(StatusCallbackTypeEnum.DELIVERED.toString(), equalTo("message-delivered")); - assertThat(StatusCallbackTypeEnum.FAILED.toString(), equalTo("message-failed")); - assertThat(StatusCallbackTypeEnum.READ.toString(), equalTo("message-read")); + assertThat(StatusCallbackTypeEnum.MESSAGE_SENDING.toString(), equalTo("message-sending")); + assertThat(StatusCallbackTypeEnum.MESSAGE_DELIVERED.toString(), equalTo("message-delivered")); + assertThat(StatusCallbackTypeEnum.MESSAGE_FAILED.toString(), equalTo("message-failed")); + assertThat(StatusCallbackTypeEnum.MESSAGE_READ.toString(), equalTo("message-read")); }