diff --git a/pom.xml b/pom.xml index 8000b012..29b12eac 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ - - This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). --> - 4.0.0 diff --git a/src/main/java/com/bandwidth/Configuration.java b/src/main/java/com/bandwidth/Configuration.java index 49fcc681..bba5e06a 100644 --- a/src/main/java/com/bandwidth/Configuration.java +++ b/src/main/java/com/bandwidth/Configuration.java @@ -27,7 +27,7 @@ public interface Configuration { /** * Http Client Configuration instance. - * See available [builder methods here](#httpclientconfigurationbuilder-class). + * See available [builder methods here](__HttpClientConfiguration.Builder). * @return a copy of httpClientConfig */ ReadonlyHttpClientConfiguration getHttpClientConfig(); diff --git a/src/main/java/com/bandwidth/messaging/controllers/APIController.java b/src/main/java/com/bandwidth/messaging/controllers/APIController.java index a18491fa..16f5628b 100644 --- a/src/main/java/com/bandwidth/messaging/controllers/APIController.java +++ b/src/main/java/com/bandwidth/messaging/controllers/APIController.java @@ -64,7 +64,7 @@ public APIController(Configuration config, HttpClient httpClient, } /** - * listMedia. + * Gets a list of your media files. No query parameters are supported. * @param accountId Required parameter: User's account ID * @param continuationToken Optional parameter: Continuation token used to retrieve subsequent * media. @@ -85,7 +85,7 @@ public ApiResponse> listMedia( } /** - * listMedia. + * Gets a list of your media files. No query parameters are supported. * @param accountId Required parameter: User's account ID * @param continuationToken Optional parameter: Continuation token used to retrieve subsequent * media. @@ -157,7 +157,8 @@ private ApiResponse> handleListMediaResponse( throw new MessagingException("400 Request is malformed or invalid", context); } if (responseCode == 401) { - throw new MessagingException("401 The specified user does not have access to the account", context); + throw new MessagingException( + "401 The specified user does not have access to the account", context); } if (responseCode == 403) { throw new MessagingException("403 The user does not have access to this API", context); @@ -166,7 +167,8 @@ private ApiResponse> handleListMediaResponse( throw new MessagingException("404 Path not found", context); } if (responseCode == 415) { - throw new MessagingException("415 The content-type of the request is incorrect", context); + throw new MessagingException("415 The content-type of the request is incorrect", + context); } if (responseCode == 429) { throw new MessagingException("429 The rate limit has been reached", context); @@ -182,7 +184,7 @@ private ApiResponse> handleListMediaResponse( } /** - * getMedia. + * Downloads a media file you previously uploaded. * @param accountId Required parameter: User's account ID * @param mediaId Required parameter: Media ID to retrieve * @return Returns the InputStream wrapped in ApiResponse response from the API call @@ -202,7 +204,7 @@ public ApiResponse getMedia( } /** - * getMedia. + * Downloads a media file you previously uploaded. * @param accountId Required parameter: User's account ID * @param mediaId Required parameter: Media ID to retrieve * @return Returns the InputStream wrapped in ApiResponse response from the API call @@ -273,7 +275,8 @@ private ApiResponse handleGetMediaResponse( throw new MessagingException("400 Request is malformed or invalid", context); } if (responseCode == 401) { - throw new MessagingException("401 The specified user does not have access to the account", context); + throw new MessagingException( + "401 The specified user does not have access to the account", context); } if (responseCode == 403) { throw new MessagingException("403 The user does not have access to this API", context); @@ -282,7 +285,8 @@ private ApiResponse handleGetMediaResponse( throw new MessagingException("404 Path not found", context); } if (responseCode == 415) { - throw new MessagingException("415 The content-type of the request is incorrect", context); + throw new MessagingException("415 The content-type of the request is incorrect", + context); } if (responseCode == 429) { throw new MessagingException("429 The rate limit has been reached", context); @@ -296,7 +300,8 @@ private ApiResponse handleGetMediaResponse( } /** - * uploadMedia. + * Uploads a file the normal HTTP way. You may add headers to the request in order to provide + * some control to your media-file. * @param accountId Required parameter: User's account ID * @param mediaId Required parameter: The user supplied custom media ID * @param body Required parameter: Example: @@ -323,7 +328,8 @@ public ApiResponse uploadMedia( } /** - * uploadMedia. + * Uploads a file the normal HTTP way. You may add headers to the request in order to provide + * some control to your media-file. * @param accountId Required parameter: User's account ID * @param mediaId Required parameter: The user supplied custom media ID * @param body Required parameter: Example: @@ -408,7 +414,8 @@ private ApiResponse handleUploadMediaResponse( throw new MessagingException("400 Request is malformed or invalid", context); } if (responseCode == 401) { - throw new MessagingException("401 The specified user does not have access to the account", context); + throw new MessagingException( + "401 The specified user does not have access to the account", context); } if (responseCode == 403) { throw new MessagingException("403 The user does not have access to this API", context); @@ -417,7 +424,8 @@ private ApiResponse handleUploadMediaResponse( throw new MessagingException("404 Path not found", context); } if (responseCode == 415) { - throw new MessagingException("415 The content-type of the request is incorrect", context); + throw new MessagingException("415 The content-type of the request is incorrect", + context); } if (responseCode == 429) { throw new MessagingException("429 The rate limit has been reached", context); @@ -429,7 +437,9 @@ private ApiResponse handleUploadMediaResponse( } /** - * deleteMedia. + * Deletes a media file from Bandwidth API server. Make sure you don't have any application + * scripts still using the media before you delete. If you accidentally delete a media file, you + * can immediately upload a new file with the same name. * @param accountId Required parameter: User's account ID * @param mediaId Required parameter: The media ID to delete * @throws ApiException Represents error response from the server. @@ -448,7 +458,9 @@ public ApiResponse deleteMedia( } /** - * deleteMedia. + * Deletes a media file from Bandwidth API server. Make sure you don't have any application + * scripts still using the media before you delete. If you accidentally delete a media file, you + * can immediately upload a new file with the same name. * @param accountId Required parameter: User's account ID * @param mediaId Required parameter: The media ID to delete * @return Returns the Void wrapped in ApiResponse response from the API call @@ -519,7 +531,8 @@ private ApiResponse handleDeleteMediaResponse( throw new MessagingException("400 Request is malformed or invalid", context); } if (responseCode == 401) { - throw new MessagingException("401 The specified user does not have access to the account", context); + throw new MessagingException( + "401 The specified user does not have access to the account", context); } if (responseCode == 403) { throw new MessagingException("403 The user does not have access to this API", context); @@ -528,7 +541,8 @@ private ApiResponse handleDeleteMediaResponse( throw new MessagingException("404 Path not found", context); } if (responseCode == 415) { - throw new MessagingException("415 The content-type of the request is incorrect", context); + throw new MessagingException("415 The content-type of the request is incorrect", + context); } if (responseCode == 429) { throw new MessagingException("429 The rate limit has been reached", context); @@ -540,7 +554,7 @@ private ApiResponse handleDeleteMediaResponse( } /** - * getMessages. + * Gets a list of messages based on query parameters. * @param accountId Required parameter: User's account ID * @param messageId Optional parameter: The ID of the message to search for. Special * characters need to be encoded using URL encoding @@ -584,7 +598,7 @@ public ApiResponse getMessages( } /** - * getMessages. + * Gets a list of messages based on query parameters. * @param accountId Required parameter: User's account ID * @param messageId Optional parameter: The ID of the message to search for. Special * characters need to be encoded using URL encoding @@ -700,7 +714,8 @@ private ApiResponse handleGetMessagesResponse( throw new MessagingException("400 Request is malformed or invalid", context); } if (responseCode == 401) { - throw new MessagingException("401 The specified user does not have access to the account", context); + throw new MessagingException( + "401 The specified user does not have access to the account", context); } if (responseCode == 403) { throw new MessagingException("403 The user does not have access to this API", context); @@ -709,7 +724,8 @@ private ApiResponse handleGetMessagesResponse( throw new MessagingException("404 Path not found", context); } if (responseCode == 415) { - throw new MessagingException("415 The content-type of the request is incorrect", context); + throw new MessagingException("415 The content-type of the request is incorrect", + context); } if (responseCode == 429) { throw new MessagingException("429 The rate limit has been reached", context); @@ -726,7 +742,7 @@ private ApiResponse handleGetMessagesResponse( } /** - * createMessage. + * Endpoint for sending text messages and picture messages using V2 messaging. * @param accountId Required parameter: User's account ID * @param body Required parameter: Example: * @return Returns the BandwidthMessage wrapped in ApiResponse response from the API call @@ -746,7 +762,7 @@ public ApiResponse createMessage( } /** - * createMessage. + * Endpoint for sending text messages and picture messages using V2 messaging. * @param accountId Required parameter: User's account ID * @param body Required parameter: Example: * @return Returns the BandwidthMessage wrapped in ApiResponse response from the API call @@ -818,7 +834,8 @@ private ApiResponse handleCreateMessageResponse( throw new MessagingException("400 Request is malformed or invalid", context); } if (responseCode == 401) { - throw new MessagingException("401 The specified user does not have access to the account", context); + throw new MessagingException( + "401 The specified user does not have access to the account", context); } if (responseCode == 403) { throw new MessagingException("403 The user does not have access to this API", context); @@ -827,7 +844,8 @@ private ApiResponse handleCreateMessageResponse( throw new MessagingException("404 Path not found", context); } if (responseCode == 415) { - throw new MessagingException("415 The content-type of the request is incorrect", context); + throw new MessagingException("415 The content-type of the request is incorrect", + context); } if (responseCode == 429) { throw new MessagingException("429 The rate limit has been reached", context); diff --git a/src/main/java/com/bandwidth/messaging/models/BandwidthMessage.java b/src/main/java/com/bandwidth/messaging/models/BandwidthMessage.java index 131c0c76..46a3bf1a 100644 --- a/src/main/java/com/bandwidth/messaging/models/BandwidthMessage.java +++ b/src/main/java/com/bandwidth/messaging/models/BandwidthMessage.java @@ -252,7 +252,9 @@ public void setFrom(String from) { /** * Getter for Media. - * The list of media URLs sent in the message + * The list of media URLs sent in the message. Including a `filename` field in the + * `Content-Disposition` header of the media linked with a URL will set the displayed file name. + * This is a best practice to ensure that your media has a readable file name. * @return Returns the List of String */ @JsonGetter("media") @@ -262,7 +264,9 @@ public List getMedia() { /** * Setter for Media. - * The list of media URLs sent in the message + * The list of media URLs sent in the message. Including a `filename` field in the + * `Content-Disposition` header of the media linked with a URL will set the displayed file name. + * This is a best practice to ensure that your media has a readable file name. * @param media Value for List of String */ @JsonSetter("media") diff --git a/src/main/java/com/bandwidth/multifactorauth/controllers/MFAController.java b/src/main/java/com/bandwidth/multifactorauth/controllers/MFAController.java index fcf45322..8ce50ab4 100644 --- a/src/main/java/com/bandwidth/multifactorauth/controllers/MFAController.java +++ b/src/main/java/com/bandwidth/multifactorauth/controllers/MFAController.java @@ -64,7 +64,8 @@ public MFAController(Configuration config, HttpClient httpClient, } /** - * Allows a user to send a MFA code through a phone call. + * Multi-Factor authentication with Bandwidth Voice services. Allows for a user to send an MFA + * code via a phone call. * @param accountId Required parameter: Bandwidth Account ID with Voice service enabled * @param body Required parameter: Example: * @return Returns the TwoFactorVoiceResponse wrapped in ApiResponse response from the API call @@ -84,7 +85,8 @@ public ApiResponse createVoiceTwoFactor( } /** - * Allows a user to send a MFA code through a phone call. + * Multi-Factor authentication with Bandwidth Voice services. Allows for a user to send an MFA + * code via a phone call. * @param accountId Required parameter: Bandwidth Account ID with Voice service enabled * @param body Required parameter: Example: * @return Returns the TwoFactorVoiceResponse wrapped in ApiResponse response from the API call @@ -153,13 +155,16 @@ private ApiResponse handleCreateVoiceTwoFactorResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ErrorWithRequestException("If there is any issue with values passed in by the user", context); + throw new ErrorWithRequestException( + "If there is any issue with values passed in by the user", context); } if (responseCode == 401) { - throw new UnauthorizedRequestException("Authentication is either incorrect or not present", context); + throw new UnauthorizedRequestException( + "Authentication is either incorrect or not present", context); } if (responseCode == 403) { - throw new ForbiddenRequestException("The user is not authorized to access this resource", context); + throw new ForbiddenRequestException( + "The user is not authorized to access this resource", context); } if (responseCode == 500) { throw new ErrorWithRequestException("An internal server error occurred", context); @@ -176,7 +181,8 @@ private ApiResponse handleCreateVoiceTwoFactorResponse( } /** - * Allows a user to send a MFA code through a text message (SMS). + * Multi-Factor authentication with Bandwidth Messaging services. Allows a user to send an MFA + * code via a text message (SMS). * @param accountId Required parameter: Bandwidth Account ID with Messaging service enabled * @param body Required parameter: Example: * @return Returns the TwoFactorMessagingResponse wrapped in ApiResponse response from the API call @@ -196,7 +202,8 @@ public ApiResponse createMessagingTwoFactor( } /** - * Allows a user to send a MFA code through a text message (SMS). + * Multi-Factor authentication with Bandwidth Messaging services. Allows a user to send an MFA + * code via a text message (SMS). * @param accountId Required parameter: Bandwidth Account ID with Messaging service enabled * @param body Required parameter: Example: * @return Returns the TwoFactorMessagingResponse wrapped in ApiResponse response from the API call @@ -265,13 +272,16 @@ private ApiResponse handleCreateMessagingTwoFactorRe int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ErrorWithRequestException("If there is any issue with values passed in by the user", context); + throw new ErrorWithRequestException( + "If there is any issue with values passed in by the user", context); } if (responseCode == 401) { - throw new UnauthorizedRequestException("Authentication is either incorrect or not present", context); + throw new UnauthorizedRequestException( + "Authentication is either incorrect or not present", context); } if (responseCode == 403) { - throw new ForbiddenRequestException("The user is not authorized to access this resource", context); + throw new ForbiddenRequestException( + "The user is not authorized to access this resource", context); } if (responseCode == 500) { throw new ErrorWithRequestException("An internal server error occurred", context); @@ -377,16 +387,21 @@ private ApiResponse handleCreateVerifyTwoFactorResp int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ErrorWithRequestException("If there is any issue with values passed in by the user", context); + throw new ErrorWithRequestException( + "If there is any issue with values passed in by the user", context); } if (responseCode == 401) { - throw new UnauthorizedRequestException("Authentication is either incorrect or not present", context); + throw new UnauthorizedRequestException( + "Authentication is either incorrect or not present", context); } if (responseCode == 403) { - throw new ForbiddenRequestException("The user is not authorized to access this resource", context); + throw new ForbiddenRequestException( + "The user is not authorized to access this resource", context); } if (responseCode == 429) { - throw new ErrorWithRequestException("The user has made too many bad requests and is temporarily locked out", context); + throw new ErrorWithRequestException( + "The user has made too many bad requests and is temporarily locked out", + context); } if (responseCode == 500) { throw new ErrorWithRequestException("An internal server error occurred", context); diff --git a/src/main/java/com/bandwidth/phonenumberlookup/controllers/APIController.java b/src/main/java/com/bandwidth/phonenumberlookup/controllers/APIController.java index e9ed3ddb..7f6a7aa4 100644 --- a/src/main/java/com/bandwidth/phonenumberlookup/controllers/APIController.java +++ b/src/main/java/com/bandwidth/phonenumberlookup/controllers/APIController.java @@ -151,316 +151,524 @@ private ApiResponse handleCreateLookupRequestResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new AccountsTnlookup400ErrorException("Bad Request. Ensure that your request payload is properly formatted and that the telephone numbers used are valid.", context); + throw new AccountsTnlookup400ErrorException( + "Bad Request. Ensure that your request payload is properly formatted and that the telephone numbers used are valid.", + context); } if (responseCode == 401) { - throw new ApiException("Unauthorized. Ensure that you are using the proper credentials for the environment you are accessing, your user has the proper role assigned to it, and that your Bandwidth account is enabled for TN Lookup access.", context); + throw new ApiException( + "Unauthorized. Ensure that you are using the proper credentials for the environment you are accessing, your user has the proper role assigned to it, and that your Bandwidth account is enabled for TN Lookup access.", + context); } if (responseCode == 415) { - throw new ApiException("Invalid content-type. Ensure that your content-type header is set to application/json.", context); + throw new ApiException( + "Invalid content-type. Ensure that your content-type header is set to application/json.", + context); } if (responseCode == 429) { - throw new ApiException("Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving this status code.", context); + throw new ApiException( + "Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving this status code.", + context); } if (responseCode == 500) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 501) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 502) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 503) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 504) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 505) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 506) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 507) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 508) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 509) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 510) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 511) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 512) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 513) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 514) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 515) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 516) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 517) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 518) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 519) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 520) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 521) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 522) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 523) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 524) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 525) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 526) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 527) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 528) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 529) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 530) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 531) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 532) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 533) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 534) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 535) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 536) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 537) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 538) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 539) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 540) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 541) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 542) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 543) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 544) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 545) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 546) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 547) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 548) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 549) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 550) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 551) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 552) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 553) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 554) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 555) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 556) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 557) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 558) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 559) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 560) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 561) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 562) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 563) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 564) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 565) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 566) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 567) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 568) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 569) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 570) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 571) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 572) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 573) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 574) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 575) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 576) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 577) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 578) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 579) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 580) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 581) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 582) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 583) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 584) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 585) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 586) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 587) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 588) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 589) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 590) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 591) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 592) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 593) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 594) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 595) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 596) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 597) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 598) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 599) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -565,316 +773,524 @@ private ApiResponse handleGetLookupRequestStatusResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiException("Bad Request. Ensure that you have set the requestId as a URL path parameter.", context); + throw new ApiException( + "Bad Request. Ensure that you have set the requestId as a URL path parameter.", + context); } if (responseCode == 401) { - throw new ApiException("Unauthorized. Ensure that you are using the proper credentials for the environment you are accessing, your user has the proper role assigned to it, and that your Bandwidth account is enabled for TN Lookup access.", context); + throw new ApiException( + "Unauthorized. Ensure that you are using the proper credentials for the environment you are accessing, your user has the proper role assigned to it, and that your Bandwidth account is enabled for TN Lookup access.", + context); } if (responseCode == 404) { - throw new ApiException("RequestId not found. Ensure that the requestId used in the URL path is valid and maps to a previous request that was submitted.", context); + throw new ApiException( + "RequestId not found. Ensure that the requestId used in the URL path is valid and maps to a previous request that was submitted.", + context); } if (responseCode == 429) { - throw new ApiException("Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving this status code.", context); + throw new ApiException( + "Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving this status code.", + context); } if (responseCode == 500) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 501) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 502) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 503) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 504) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 505) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 506) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 507) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 508) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 509) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 510) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 511) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 512) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 513) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 514) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 515) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 516) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 517) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 518) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 519) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 520) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 521) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 522) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 523) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 524) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 525) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 526) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 527) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 528) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 529) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 530) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 531) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 532) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 533) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 534) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 535) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 536) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 537) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 538) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 539) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 540) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 541) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 542) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 543) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 544) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 545) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 546) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 547) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 548) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 549) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 550) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 551) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 552) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 553) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 554) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 555) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 556) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 557) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 558) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 559) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 560) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 561) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 562) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 563) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 564) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 565) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 566) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 567) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 568) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 569) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 570) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 571) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 572) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 573) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 574) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 575) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 576) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 577) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 578) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 579) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 580) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 581) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 582) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 583) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 584) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 585) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 586) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 587) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 588) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 589) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 590) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 591) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 592) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 593) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 594) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 595) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 596) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 597) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 598) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } if (responseCode == 599) { - throw new ApiException("Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", context); + throw new ApiException( + "Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code for an extended period of time.", + context); } //handle errors defined at the API level validateResponse(response, context); diff --git a/src/main/java/com/bandwidth/voice/controllers/APIController.java b/src/main/java/com/bandwidth/voice/controllers/APIController.java index 5312680b..b65376b7 100644 --- a/src/main/java/com/bandwidth/voice/controllers/APIController.java +++ b/src/main/java/com/bandwidth/voice/controllers/APIController.java @@ -71,7 +71,7 @@ public APIController(Configuration config, HttpClient httpClient, } /** - * Creates an outbound call. + * Creates an outbound phone call. * @param accountId Required parameter: Example: * @param body Required parameter: Example: * @return Returns the CreateCallResponse wrapped in ApiResponse response from the API call @@ -91,7 +91,7 @@ public ApiResponse createCall( } /** - * Creates an outbound call. + * Creates an outbound phone call. * @param accountId Required parameter: Example: * @param body Required parameter: Example: * @return Returns the CreateCallResponse wrapped in ApiResponse response from the API call @@ -160,25 +160,35 @@ private ApiResponse handleCreateCallResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -281,25 +291,35 @@ private ApiResponse handleGetCallResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -407,25 +427,35 @@ private ApiResponse handleModifyCallResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -529,25 +559,35 @@ private ApiResponse handleModifyCallRecordingStateResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -647,25 +687,35 @@ private ApiResponse> handleGetCallRecordingsResponse int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -774,25 +824,35 @@ private ApiResponse handleGetCallRecordingResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -900,25 +960,35 @@ private ApiResponse handleDeleteRecordingResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1024,25 +1094,35 @@ private ApiResponse handleGetDownloadCallRecordingResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1149,25 +1229,35 @@ private ApiResponse handleDeleteRecordingMediaResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1273,25 +1363,35 @@ private ApiResponse handleGetCallTranscriptionResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1408,28 +1508,40 @@ private ApiResponse handleCreateTranscribeCallRecordingResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 410) { - throw new ApiErrorException("The media for this recording has been deleted, so we can't transcribe it", context); + throw new ApiErrorException( + "The media for this recording has been deleted, so we can't transcribe it", + context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1533,25 +1645,35 @@ private ApiResponse handleDeleteCallTranscriptionResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1679,25 +1801,35 @@ private ApiResponse> handleGetConferencesResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1799,25 +1931,35 @@ private ApiResponse handleGetConferenceResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -1925,25 +2067,35 @@ private ApiResponse handleModifyConferenceResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -2055,25 +2207,35 @@ private ApiResponse handleModifyConferenceMemberResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -2179,25 +2341,35 @@ private ApiResponse handleGetConferenceMemberResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -2302,25 +2474,35 @@ private ApiResponse> handleGetConferenceRecord int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -2431,25 +2613,35 @@ private ApiResponse handleGetConferenceRecordingResponse( int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -2561,25 +2753,35 @@ private ApiResponse handleGetDownloadConferenceRecordingRespons int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); @@ -2707,25 +2909,35 @@ private ApiResponse> handleGetQueryCallRecordingsRes int responseCode = response.getStatusCode(); if (responseCode == 400) { - throw new ApiErrorException("Something's not quite right... Your request is invalid. Please fix it before trying again.", context); + throw new ApiErrorException( + "Something's not quite right... Your request is invalid. Please fix it before trying again.", + context); } if (responseCode == 401) { - throw new ApiException("Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", context); + throw new ApiException( + "Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to the API.", + context); } if (responseCode == 403) { throw new ApiErrorException("User unauthorized to perform this action.", context); } if (responseCode == 404) { - throw new ApiErrorException("The resource specified cannot be found or does not belong to you.", context); + throw new ApiErrorException( + "The resource specified cannot be found or does not belong to you.", context); } if (responseCode == 415) { - throw new ApiErrorException("We don't support that media type. If a request body is required, please send it to us as `application/json`.", context); + throw new ApiErrorException( + "We don't support that media type. If a request body is required, please send it to us as `application/json`.", + context); } if (responseCode == 429) { - throw new ApiErrorException("You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", context); + throw new ApiErrorException( + "You're sending requests to this endpoint too frequently. Please slow your request rate down and try again.", + context); } if (responseCode == 500) { - throw new ApiErrorException("Something unexpected happened. Please try again.", context); + throw new ApiErrorException("Something unexpected happened. Please try again.", + context); } //handle errors defined at the API level validateResponse(response, context); diff --git a/src/main/java/com/bandwidth/voice/models/CallCallback.java b/src/main/java/com/bandwidth/voice/models/CallCallback.java new file mode 100644 index 00000000..6219ed55 --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/CallCallback.java @@ -0,0 +1,1129 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; + +/** + * This is a model class for CallCallback type. + */ +public class CallCallback { + @JsonInclude(JsonInclude.Include.NON_NULL) + private String eventType; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String eventTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String accountId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String applicationId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String from; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String to; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String direction; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String callId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String callUrl; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String startTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String answerTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String transferCallerId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String transferTo; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String cause; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String errorMessage; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String errorId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String endTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String digit; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String parentCallId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String recordingId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String duration; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String fileFormat; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String mediaUrl; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String tag; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Integer channels; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String status; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String digits; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String terminatingDigit; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Transcription transcription; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Diversion diversion; + + /** + * Default constructor. + */ + public CallCallback() { + } + + /** + * Initialization constructor. + * @param eventType String value for eventType. + * @param eventTime String value for eventTime. + * @param accountId String value for accountId. + * @param applicationId String value for applicationId. + * @param from String value for from. + * @param to String value for to. + * @param direction String value for direction. + * @param callId String value for callId. + * @param callUrl String value for callUrl. + * @param startTime String value for startTime. + * @param answerTime String value for answerTime. + * @param transferCallerId String value for transferCallerId. + * @param transferTo String value for transferTo. + * @param cause String value for cause. + * @param errorMessage String value for errorMessage. + * @param errorId String value for errorId. + * @param endTime String value for endTime. + * @param digit String value for digit. + * @param parentCallId String value for parentCallId. + * @param recordingId String value for recordingId. + * @param duration String value for duration. + * @param fileFormat String value for fileFormat. + * @param mediaUrl String value for mediaUrl. + * @param tag String value for tag. + * @param channels Integer value for channels. + * @param status String value for status. + * @param digits String value for digits. + * @param terminatingDigit String value for terminatingDigit. + * @param transcription Transcription value for transcription. + * @param diversion Diversion value for diversion. + */ + public CallCallback( + String eventType, + String eventTime, + String accountId, + String applicationId, + String from, + String to, + String direction, + String callId, + String callUrl, + String startTime, + String answerTime, + String transferCallerId, + String transferTo, + String cause, + String errorMessage, + String errorId, + String endTime, + String digit, + String parentCallId, + String recordingId, + String duration, + String fileFormat, + String mediaUrl, + String tag, + Integer channels, + String status, + String digits, + String terminatingDigit, + Transcription transcription, + Diversion diversion) { + this.eventType = eventType; + this.eventTime = eventTime; + this.accountId = accountId; + this.applicationId = applicationId; + this.from = from; + this.to = to; + this.direction = direction; + this.callId = callId; + this.callUrl = callUrl; + this.startTime = startTime; + this.answerTime = answerTime; + this.transferCallerId = transferCallerId; + this.transferTo = transferTo; + this.cause = cause; + this.errorMessage = errorMessage; + this.errorId = errorId; + this.endTime = endTime; + this.digit = digit; + this.parentCallId = parentCallId; + this.recordingId = recordingId; + this.duration = duration; + this.fileFormat = fileFormat; + this.mediaUrl = mediaUrl; + this.tag = tag; + this.channels = channels; + this.status = status; + this.digits = digits; + this.terminatingDigit = terminatingDigit; + this.transcription = transcription; + this.diversion = diversion; + } + + /** + * Getter for EventType. + * @return Returns the String + */ + @JsonGetter("eventType") + public String getEventType() { + return eventType; + } + + /** + * Setter for EventType. + * @param eventType Value for String + */ + @JsonSetter("eventType") + public void setEventType(String eventType) { + this.eventType = eventType; + } + + /** + * Getter for EventTime. + * @return Returns the String + */ + @JsonGetter("eventTime") + public String getEventTime() { + return eventTime; + } + + /** + * Setter for EventTime. + * @param eventTime Value for String + */ + @JsonSetter("eventTime") + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + /** + * Getter for AccountId. + * @return Returns the String + */ + @JsonGetter("accountId") + public String getAccountId() { + return accountId; + } + + /** + * Setter for AccountId. + * @param accountId Value for String + */ + @JsonSetter("accountId") + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + /** + * Getter for ApplicationId. + * @return Returns the String + */ + @JsonGetter("applicationId") + public String getApplicationId() { + return applicationId; + } + + /** + * Setter for ApplicationId. + * @param applicationId Value for String + */ + @JsonSetter("applicationId") + public void setApplicationId(String applicationId) { + this.applicationId = applicationId; + } + + /** + * Getter for From. + * @return Returns the String + */ + @JsonGetter("from") + public String getFrom() { + return from; + } + + /** + * Setter for From. + * @param from Value for String + */ + @JsonSetter("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Getter for To. + * @return Returns the String + */ + @JsonGetter("to") + public String getTo() { + return to; + } + + /** + * Setter for To. + * @param to Value for String + */ + @JsonSetter("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Getter for Direction. + * @return Returns the String + */ + @JsonGetter("direction") + public String getDirection() { + return direction; + } + + /** + * Setter for Direction. + * @param direction Value for String + */ + @JsonSetter("direction") + public void setDirection(String direction) { + this.direction = direction; + } + + /** + * Getter for CallId. + * @return Returns the String + */ + @JsonGetter("callId") + public String getCallId() { + return callId; + } + + /** + * Setter for CallId. + * @param callId Value for String + */ + @JsonSetter("callId") + public void setCallId(String callId) { + this.callId = callId; + } + + /** + * Getter for CallUrl. + * @return Returns the String + */ + @JsonGetter("callUrl") + public String getCallUrl() { + return callUrl; + } + + /** + * Setter for CallUrl. + * @param callUrl Value for String + */ + @JsonSetter("callUrl") + public void setCallUrl(String callUrl) { + this.callUrl = callUrl; + } + + /** + * Getter for StartTime. + * @return Returns the String + */ + @JsonGetter("startTime") + public String getStartTime() { + return startTime; + } + + /** + * Setter for StartTime. + * @param startTime Value for String + */ + @JsonSetter("startTime") + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + /** + * Getter for AnswerTime. + * @return Returns the String + */ + @JsonGetter("answerTime") + public String getAnswerTime() { + return answerTime; + } + + /** + * Setter for AnswerTime. + * @param answerTime Value for String + */ + @JsonSetter("answerTime") + public void setAnswerTime(String answerTime) { + this.answerTime = answerTime; + } + + /** + * Getter for TransferCallerId. + * @return Returns the String + */ + @JsonGetter("transferCallerId") + public String getTransferCallerId() { + return transferCallerId; + } + + /** + * Setter for TransferCallerId. + * @param transferCallerId Value for String + */ + @JsonSetter("transferCallerId") + public void setTransferCallerId(String transferCallerId) { + this.transferCallerId = transferCallerId; + } + + /** + * Getter for TransferTo. + * @return Returns the String + */ + @JsonGetter("transferTo") + public String getTransferTo() { + return transferTo; + } + + /** + * Setter for TransferTo. + * @param transferTo Value for String + */ + @JsonSetter("transferTo") + public void setTransferTo(String transferTo) { + this.transferTo = transferTo; + } + + /** + * Getter for Cause. + * @return Returns the String + */ + @JsonGetter("cause") + public String getCause() { + return cause; + } + + /** + * Setter for Cause. + * @param cause Value for String + */ + @JsonSetter("cause") + public void setCause(String cause) { + this.cause = cause; + } + + /** + * Getter for ErrorMessage. + * @return Returns the String + */ + @JsonGetter("errorMessage") + public String getErrorMessage() { + return errorMessage; + } + + /** + * Setter for ErrorMessage. + * @param errorMessage Value for String + */ + @JsonSetter("errorMessage") + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + /** + * Getter for ErrorId. + * @return Returns the String + */ + @JsonGetter("errorId") + public String getErrorId() { + return errorId; + } + + /** + * Setter for ErrorId. + * @param errorId Value for String + */ + @JsonSetter("errorId") + public void setErrorId(String errorId) { + this.errorId = errorId; + } + + /** + * Getter for EndTime. + * @return Returns the String + */ + @JsonGetter("endTime") + public String getEndTime() { + return endTime; + } + + /** + * Setter for EndTime. + * @param endTime Value for String + */ + @JsonSetter("endTime") + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + /** + * Getter for Digit. + * @return Returns the String + */ + @JsonGetter("digit") + public String getDigit() { + return digit; + } + + /** + * Setter for Digit. + * @param digit Value for String + */ + @JsonSetter("digit") + public void setDigit(String digit) { + this.digit = digit; + } + + /** + * Getter for ParentCallId. + * @return Returns the String + */ + @JsonGetter("parentCallId") + public String getParentCallId() { + return parentCallId; + } + + /** + * Setter for ParentCallId. + * @param parentCallId Value for String + */ + @JsonSetter("parentCallId") + public void setParentCallId(String parentCallId) { + this.parentCallId = parentCallId; + } + + /** + * Getter for RecordingId. + * @return Returns the String + */ + @JsonGetter("recordingId") + public String getRecordingId() { + return recordingId; + } + + /** + * Setter for RecordingId. + * @param recordingId Value for String + */ + @JsonSetter("recordingId") + public void setRecordingId(String recordingId) { + this.recordingId = recordingId; + } + + /** + * Getter for Duration. + * @return Returns the String + */ + @JsonGetter("duration") + public String getDuration() { + return duration; + } + + /** + * Setter for Duration. + * @param duration Value for String + */ + @JsonSetter("duration") + public void setDuration(String duration) { + this.duration = duration; + } + + /** + * Getter for FileFormat. + * @return Returns the String + */ + @JsonGetter("fileFormat") + public String getFileFormat() { + return fileFormat; + } + + /** + * Setter for FileFormat. + * @param fileFormat Value for String + */ + @JsonSetter("fileFormat") + public void setFileFormat(String fileFormat) { + this.fileFormat = fileFormat; + } + + /** + * Getter for MediaUrl. + * @return Returns the String + */ + @JsonGetter("mediaUrl") + public String getMediaUrl() { + return mediaUrl; + } + + /** + * Setter for MediaUrl. + * @param mediaUrl Value for String + */ + @JsonSetter("mediaUrl") + public void setMediaUrl(String mediaUrl) { + this.mediaUrl = mediaUrl; + } + + /** + * Getter for Tag. + * @return Returns the String + */ + @JsonGetter("tag") + public String getTag() { + return tag; + } + + /** + * Setter for Tag. + * @param tag Value for String + */ + @JsonSetter("tag") + public void setTag(String tag) { + this.tag = tag; + } + + /** + * Getter for Channels. + * @return Returns the Integer + */ + @JsonGetter("channels") + public Integer getChannels() { + return channels; + } + + /** + * Setter for Channels. + * @param channels Value for Integer + */ + @JsonSetter("channels") + public void setChannels(Integer channels) { + this.channels = channels; + } + + /** + * Getter for Status. + * @return Returns the String + */ + @JsonGetter("status") + public String getStatus() { + return status; + } + + /** + * Setter for Status. + * @param status Value for String + */ + @JsonSetter("status") + public void setStatus(String status) { + this.status = status; + } + + /** + * Getter for Digits. + * @return Returns the String + */ + @JsonGetter("digits") + public String getDigits() { + return digits; + } + + /** + * Setter for Digits. + * @param digits Value for String + */ + @JsonSetter("digits") + public void setDigits(String digits) { + this.digits = digits; + } + + /** + * Getter for TerminatingDigit. + * @return Returns the String + */ + @JsonGetter("terminatingDigit") + public String getTerminatingDigit() { + return terminatingDigit; + } + + /** + * Setter for TerminatingDigit. + * @param terminatingDigit Value for String + */ + @JsonSetter("terminatingDigit") + public void setTerminatingDigit(String terminatingDigit) { + this.terminatingDigit = terminatingDigit; + } + + /** + * Getter for Transcription. + * @return Returns the Transcription + */ + @JsonGetter("transcription") + public Transcription getTranscription() { + return transcription; + } + + /** + * Setter for Transcription. + * @param transcription Value for Transcription + */ + @JsonSetter("transcription") + public void setTranscription(Transcription transcription) { + this.transcription = transcription; + } + + /** + * Getter for Diversion. + * @return Returns the Diversion + */ + @JsonGetter("diversion") + public Diversion getDiversion() { + return diversion; + } + + /** + * Setter for Diversion. + * @param diversion Value for Diversion + */ + @JsonSetter("diversion") + public void setDiversion(Diversion diversion) { + this.diversion = diversion; + } + + /** + * Converts this CallCallback into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "CallCallback [" + "eventType=" + eventType + ", eventTime=" + eventTime + + ", accountId=" + accountId + ", applicationId=" + applicationId + ", from=" + from + + ", to=" + to + ", direction=" + direction + ", callId=" + callId + ", callUrl=" + + callUrl + ", startTime=" + startTime + ", answerTime=" + answerTime + + ", transferCallerId=" + transferCallerId + ", transferTo=" + transferTo + + ", cause=" + cause + ", errorMessage=" + errorMessage + ", errorId=" + errorId + + ", endTime=" + endTime + ", digit=" + digit + ", parentCallId=" + parentCallId + + ", recordingId=" + recordingId + ", duration=" + duration + ", fileFormat=" + + fileFormat + ", mediaUrl=" + mediaUrl + ", tag=" + tag + ", channels=" + channels + + ", status=" + status + ", digits=" + digits + ", terminatingDigit=" + + terminatingDigit + ", transcription=" + transcription + ", diversion=" + diversion + + "]"; + } + + /** + * Builds a new {@link CallCallback.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link CallCallback.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .eventType(getEventType()) + .eventTime(getEventTime()) + .accountId(getAccountId()) + .applicationId(getApplicationId()) + .from(getFrom()) + .to(getTo()) + .direction(getDirection()) + .callId(getCallId()) + .callUrl(getCallUrl()) + .startTime(getStartTime()) + .answerTime(getAnswerTime()) + .transferCallerId(getTransferCallerId()) + .transferTo(getTransferTo()) + .cause(getCause()) + .errorMessage(getErrorMessage()) + .errorId(getErrorId()) + .endTime(getEndTime()) + .digit(getDigit()) + .parentCallId(getParentCallId()) + .recordingId(getRecordingId()) + .duration(getDuration()) + .fileFormat(getFileFormat()) + .mediaUrl(getMediaUrl()) + .tag(getTag()) + .channels(getChannels()) + .status(getStatus()) + .digits(getDigits()) + .terminatingDigit(getTerminatingDigit()) + .transcription(getTranscription()) + .diversion(getDiversion()); + return builder; + } + + /** + * Class to build instances of {@link CallCallback}. + */ + public static class Builder { + private String eventType; + private String eventTime; + private String accountId; + private String applicationId; + private String from; + private String to; + private String direction; + private String callId; + private String callUrl; + private String startTime; + private String answerTime; + private String transferCallerId; + private String transferTo; + private String cause; + private String errorMessage; + private String errorId; + private String endTime; + private String digit; + private String parentCallId; + private String recordingId; + private String duration; + private String fileFormat; + private String mediaUrl; + private String tag; + private Integer channels; + private String status; + private String digits; + private String terminatingDigit; + private Transcription transcription; + private Diversion diversion; + + + + /** + * Setter for eventType. + * @param eventType String value for eventType. + * @return Builder + */ + public Builder eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Setter for eventTime. + * @param eventTime String value for eventTime. + * @return Builder + */ + public Builder eventTime(String eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Setter for accountId. + * @param accountId String value for accountId. + * @return Builder + */ + public Builder accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Setter for applicationId. + * @param applicationId String value for applicationId. + * @return Builder + */ + public Builder applicationId(String applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Setter for from. + * @param from String value for from. + * @return Builder + */ + public Builder from(String from) { + this.from = from; + return this; + } + + /** + * Setter for to. + * @param to String value for to. + * @return Builder + */ + public Builder to(String to) { + this.to = to; + return this; + } + + /** + * Setter for direction. + * @param direction String value for direction. + * @return Builder + */ + public Builder direction(String direction) { + this.direction = direction; + return this; + } + + /** + * Setter for callId. + * @param callId String value for callId. + * @return Builder + */ + public Builder callId(String callId) { + this.callId = callId; + return this; + } + + /** + * Setter for callUrl. + * @param callUrl String value for callUrl. + * @return Builder + */ + public Builder callUrl(String callUrl) { + this.callUrl = callUrl; + return this; + } + + /** + * Setter for startTime. + * @param startTime String value for startTime. + * @return Builder + */ + public Builder startTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Setter for answerTime. + * @param answerTime String value for answerTime. + * @return Builder + */ + public Builder answerTime(String answerTime) { + this.answerTime = answerTime; + return this; + } + + /** + * Setter for transferCallerId. + * @param transferCallerId String value for transferCallerId. + * @return Builder + */ + public Builder transferCallerId(String transferCallerId) { + this.transferCallerId = transferCallerId; + return this; + } + + /** + * Setter for transferTo. + * @param transferTo String value for transferTo. + * @return Builder + */ + public Builder transferTo(String transferTo) { + this.transferTo = transferTo; + return this; + } + + /** + * Setter for cause. + * @param cause String value for cause. + * @return Builder + */ + public Builder cause(String cause) { + this.cause = cause; + return this; + } + + /** + * Setter for errorMessage. + * @param errorMessage String value for errorMessage. + * @return Builder + */ + public Builder errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Setter for errorId. + * @param errorId String value for errorId. + * @return Builder + */ + public Builder errorId(String errorId) { + this.errorId = errorId; + return this; + } + + /** + * Setter for endTime. + * @param endTime String value for endTime. + * @return Builder + */ + public Builder endTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Setter for digit. + * @param digit String value for digit. + * @return Builder + */ + public Builder digit(String digit) { + this.digit = digit; + return this; + } + + /** + * Setter for parentCallId. + * @param parentCallId String value for parentCallId. + * @return Builder + */ + public Builder parentCallId(String parentCallId) { + this.parentCallId = parentCallId; + return this; + } + + /** + * Setter for recordingId. + * @param recordingId String value for recordingId. + * @return Builder + */ + public Builder recordingId(String recordingId) { + this.recordingId = recordingId; + return this; + } + + /** + * Setter for duration. + * @param duration String value for duration. + * @return Builder + */ + public Builder duration(String duration) { + this.duration = duration; + return this; + } + + /** + * Setter for fileFormat. + * @param fileFormat String value for fileFormat. + * @return Builder + */ + public Builder fileFormat(String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Setter for mediaUrl. + * @param mediaUrl String value for mediaUrl. + * @return Builder + */ + public Builder mediaUrl(String mediaUrl) { + this.mediaUrl = mediaUrl; + return this; + } + + /** + * Setter for tag. + * @param tag String value for tag. + * @return Builder + */ + public Builder tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Setter for channels. + * @param channels Integer value for channels. + * @return Builder + */ + public Builder channels(Integer channels) { + this.channels = channels; + return this; + } + + /** + * Setter for status. + * @param status String value for status. + * @return Builder + */ + public Builder status(String status) { + this.status = status; + return this; + } + + /** + * Setter for digits. + * @param digits String value for digits. + * @return Builder + */ + public Builder digits(String digits) { + this.digits = digits; + return this; + } + + /** + * Setter for terminatingDigit. + * @param terminatingDigit String value for terminatingDigit. + * @return Builder + */ + public Builder terminatingDigit(String terminatingDigit) { + this.terminatingDigit = terminatingDigit; + return this; + } + + /** + * Setter for transcription. + * @param transcription Transcription value for transcription. + * @return Builder + */ + public Builder transcription(Transcription transcription) { + this.transcription = transcription; + return this; + } + + /** + * Setter for diversion. + * @param diversion Diversion value for diversion. + * @return Builder + */ + public Builder diversion(Diversion diversion) { + this.diversion = diversion; + return this; + } + + /** + * Builds a new {@link CallCallback} object using the set fields. + * @return {@link CallCallback} + */ + public CallCallback build() { + return new CallCallback(eventType, eventTime, accountId, applicationId, from, to, + direction, callId, callUrl, startTime, answerTime, transferCallerId, transferTo, + cause, errorMessage, errorId, endTime, digit, parentCallId, recordingId, + duration, fileFormat, mediaUrl, tag, channels, status, digits, terminatingDigit, + transcription, diversion); + } + } +} diff --git a/src/main/java/com/bandwidth/voice/models/CallState.java b/src/main/java/com/bandwidth/voice/models/CallState.java index cdea8971..a42ab62d 100644 --- a/src/main/java/com/bandwidth/voice/models/CallState.java +++ b/src/main/java/com/bandwidth/voice/models/CallState.java @@ -39,7 +39,7 @@ public class CallState { @JsonInclude(JsonInclude.Include.NON_NULL) private OptionalNullable identity; @JsonInclude(JsonInclude.Include.NON_NULL) - private Map pai; + private Map stirShaken; @JsonInclude(JsonInclude.Include.NON_NULL) private LocalDateTime startTime; @JsonInclude(JsonInclude.Include.NON_NULL) @@ -72,7 +72,7 @@ public CallState() { * @param direction String value for direction. * @param state String value for state. * @param identity String value for identity. - * @param pai Map of String, value for pai. + * @param stirShaken Map of String, value for stirShaken. * @param startTime LocalDateTime value for startTime. * @param answerTime LocalDateTime value for answerTime. * @param endTime LocalDateTime value for endTime. @@ -91,7 +91,7 @@ public CallState( String direction, String state, String identity, - Map pai, + Map stirShaken, LocalDateTime startTime, LocalDateTime answerTime, LocalDateTime endTime, @@ -108,7 +108,7 @@ public CallState( this.direction = direction; this.state = state; this.identity = OptionalNullable.of(identity); - this.pai = pai; + this.stirShaken = stirShaken; this.startTime = startTime; this.answerTime = OptionalNullable.of(answerTime); this.endTime = OptionalNullable.of(endTime); @@ -123,10 +123,11 @@ public CallState( */ protected CallState(String callId, OptionalNullable parentCallId, String applicationId, String accountId, String to, String from, String direction, String state, - OptionalNullable identity, Map pai, LocalDateTime startTime, - OptionalNullable answerTime, OptionalNullable endTime, - OptionalNullable disconnectCause, OptionalNullable errorMessage, - OptionalNullable errorId, LocalDateTime lastUpdate) { + OptionalNullable identity, Map stirShaken, + LocalDateTime startTime, OptionalNullable answerTime, + OptionalNullable endTime, OptionalNullable disconnectCause, + OptionalNullable errorMessage, OptionalNullable errorId, + LocalDateTime lastUpdate) { this.callId = callId; this.parentCallId = parentCallId; this.applicationId = applicationId; @@ -136,7 +137,7 @@ protected CallState(String callId, OptionalNullable parentCallId, String this.direction = direction; this.state = state; this.identity = identity; - this.pai = pai; + this.stirShaken = stirShaken; this.startTime = startTime; this.answerTime = answerTime; this.endTime = endTime; @@ -347,21 +348,21 @@ public void unsetIdentity() { } /** - * Getter for Pai. + * Getter for StirShaken. * @return Returns the Map of String, String */ - @JsonGetter("pai") - public Map getPai() { - return pai; + @JsonGetter("stirShaken") + public Map getStirShaken() { + return stirShaken; } /** - * Setter for Pai. - * @param pai Value for Map of String, String + * Setter for StirShaken. + * @param stirShaken Value for Map of String, String */ - @JsonSetter("pai") - public void setPai(Map pai) { - this.pai = pai; + @JsonSetter("stirShaken") + public void setStirShaken(Map stirShaken) { + this.stirShaken = stirShaken; } /** @@ -605,10 +606,10 @@ public String toString() { return "CallState [" + "callId=" + callId + ", parentCallId=" + parentCallId + ", applicationId=" + applicationId + ", accountId=" + accountId + ", to=" + to + ", from=" + from + ", direction=" + direction + ", state=" + state + ", identity=" - + identity + ", pai=" + pai + ", startTime=" + startTime + ", answerTime=" - + answerTime + ", endTime=" + endTime + ", disconnectCause=" + disconnectCause - + ", errorMessage=" + errorMessage + ", errorId=" + errorId + ", lastUpdate=" - + lastUpdate + "]"; + + identity + ", stirShaken=" + stirShaken + ", startTime=" + startTime + + ", answerTime=" + answerTime + ", endTime=" + endTime + ", disconnectCause=" + + disconnectCause + ", errorMessage=" + errorMessage + ", errorId=" + errorId + + ", lastUpdate=" + lastUpdate + "]"; } /** @@ -625,7 +626,7 @@ public Builder toBuilder() { .from(getFrom()) .direction(getDirection()) .state(getState()) - .pai(getPai()) + .stirShaken(getStirShaken()) .startTime(getStartTime()) .lastUpdate(getLastUpdate()); builder.parentCallId = internalGetParentCallId(); @@ -651,7 +652,7 @@ public static class Builder { private String direction; private String state; private OptionalNullable identity; - private Map pai; + private Map stirShaken; private LocalDateTime startTime; private OptionalNullable answerTime; private OptionalNullable endTime; @@ -771,12 +772,12 @@ public Builder unsetIdentity() { } /** - * Setter for pai. - * @param pai Map of String, value for pai. + * Setter for stirShaken. + * @param stirShaken Map of String, value for stirShaken. * @return Builder */ - public Builder pai(Map pai) { - this.pai = pai; + public Builder stirShaken(Map stirShaken) { + this.stirShaken = stirShaken; return this; } @@ -901,7 +902,7 @@ public Builder lastUpdate(LocalDateTime lastUpdate) { */ public CallState build() { return new CallState(callId, parentCallId, applicationId, accountId, to, from, - direction, state, identity, pai, startTime, answerTime, endTime, + direction, state, identity, stirShaken, startTime, answerTime, endTime, disconnectCause, errorMessage, errorId, lastUpdate); } } diff --git a/src/main/java/com/bandwidth/voice/models/ConferenceCallback.java b/src/main/java/com/bandwidth/voice/models/ConferenceCallback.java new file mode 100644 index 00000000..b38dcff9 --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/ConferenceCallback.java @@ -0,0 +1,667 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; + +/** + * This is a model class for ConferenceCallback type. + */ +public class ConferenceCallback { + @JsonInclude(JsonInclude.Include.NON_NULL) + private String conferenceId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String name; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String eventType; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String eventTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String tag; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String callId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String to; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String from; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String accountId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String recordingId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Integer channels; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String startTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String endTime; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String duration; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String fileFormat; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String mediaUrl; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String status; + + /** + * Default constructor. + */ + public ConferenceCallback() { + } + + /** + * Initialization constructor. + * @param conferenceId String value for conferenceId. + * @param name String value for name. + * @param eventType String value for eventType. + * @param eventTime String value for eventTime. + * @param tag String value for tag. + * @param callId String value for callId. + * @param to String value for to. + * @param from String value for from. + * @param accountId String value for accountId. + * @param recordingId String value for recordingId. + * @param channels Integer value for channels. + * @param startTime String value for startTime. + * @param endTime String value for endTime. + * @param duration String value for duration. + * @param fileFormat String value for fileFormat. + * @param mediaUrl String value for mediaUrl. + * @param status String value for status. + */ + public ConferenceCallback( + String conferenceId, + String name, + String eventType, + String eventTime, + String tag, + String callId, + String to, + String from, + String accountId, + String recordingId, + Integer channels, + String startTime, + String endTime, + String duration, + String fileFormat, + String mediaUrl, + String status) { + this.conferenceId = conferenceId; + this.name = name; + this.eventType = eventType; + this.eventTime = eventTime; + this.tag = tag; + this.callId = callId; + this.to = to; + this.from = from; + this.accountId = accountId; + this.recordingId = recordingId; + this.channels = channels; + this.startTime = startTime; + this.endTime = endTime; + this.duration = duration; + this.fileFormat = fileFormat; + this.mediaUrl = mediaUrl; + this.status = status; + } + + /** + * Getter for ConferenceId. + * @return Returns the String + */ + @JsonGetter("conferenceId") + public String getConferenceId() { + return conferenceId; + } + + /** + * Setter for ConferenceId. + * @param conferenceId Value for String + */ + @JsonSetter("conferenceId") + public void setConferenceId(String conferenceId) { + this.conferenceId = conferenceId; + } + + /** + * Getter for Name. + * @return Returns the String + */ + @JsonGetter("name") + public String getName() { + return name; + } + + /** + * Setter for Name. + * @param name Value for String + */ + @JsonSetter("name") + public void setName(String name) { + this.name = name; + } + + /** + * Getter for EventType. + * @return Returns the String + */ + @JsonGetter("eventType") + public String getEventType() { + return eventType; + } + + /** + * Setter for EventType. + * @param eventType Value for String + */ + @JsonSetter("eventType") + public void setEventType(String eventType) { + this.eventType = eventType; + } + + /** + * Getter for EventTime. + * @return Returns the String + */ + @JsonGetter("eventTime") + public String getEventTime() { + return eventTime; + } + + /** + * Setter for EventTime. + * @param eventTime Value for String + */ + @JsonSetter("eventTime") + public void setEventTime(String eventTime) { + this.eventTime = eventTime; + } + + /** + * Getter for Tag. + * @return Returns the String + */ + @JsonGetter("tag") + public String getTag() { + return tag; + } + + /** + * Setter for Tag. + * @param tag Value for String + */ + @JsonSetter("tag") + public void setTag(String tag) { + this.tag = tag; + } + + /** + * Getter for CallId. + * @return Returns the String + */ + @JsonGetter("callId") + public String getCallId() { + return callId; + } + + /** + * Setter for CallId. + * @param callId Value for String + */ + @JsonSetter("callId") + public void setCallId(String callId) { + this.callId = callId; + } + + /** + * Getter for To. + * @return Returns the String + */ + @JsonGetter("to") + public String getTo() { + return to; + } + + /** + * Setter for To. + * @param to Value for String + */ + @JsonSetter("to") + public void setTo(String to) { + this.to = to; + } + + /** + * Getter for From. + * @return Returns the String + */ + @JsonGetter("from") + public String getFrom() { + return from; + } + + /** + * Setter for From. + * @param from Value for String + */ + @JsonSetter("from") + public void setFrom(String from) { + this.from = from; + } + + /** + * Getter for AccountId. + * @return Returns the String + */ + @JsonGetter("accountId") + public String getAccountId() { + return accountId; + } + + /** + * Setter for AccountId. + * @param accountId Value for String + */ + @JsonSetter("accountId") + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + /** + * Getter for RecordingId. + * @return Returns the String + */ + @JsonGetter("recordingId") + public String getRecordingId() { + return recordingId; + } + + /** + * Setter for RecordingId. + * @param recordingId Value for String + */ + @JsonSetter("recordingId") + public void setRecordingId(String recordingId) { + this.recordingId = recordingId; + } + + /** + * Getter for Channels. + * @return Returns the Integer + */ + @JsonGetter("channels") + public Integer getChannels() { + return channels; + } + + /** + * Setter for Channels. + * @param channels Value for Integer + */ + @JsonSetter("channels") + public void setChannels(Integer channels) { + this.channels = channels; + } + + /** + * Getter for StartTime. + * @return Returns the String + */ + @JsonGetter("startTime") + public String getStartTime() { + return startTime; + } + + /** + * Setter for StartTime. + * @param startTime Value for String + */ + @JsonSetter("startTime") + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + /** + * Getter for EndTime. + * @return Returns the String + */ + @JsonGetter("endTime") + public String getEndTime() { + return endTime; + } + + /** + * Setter for EndTime. + * @param endTime Value for String + */ + @JsonSetter("endTime") + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + /** + * Getter for Duration. + * @return Returns the String + */ + @JsonGetter("duration") + public String getDuration() { + return duration; + } + + /** + * Setter for Duration. + * @param duration Value for String + */ + @JsonSetter("duration") + public void setDuration(String duration) { + this.duration = duration; + } + + /** + * Getter for FileFormat. + * @return Returns the String + */ + @JsonGetter("fileFormat") + public String getFileFormat() { + return fileFormat; + } + + /** + * Setter for FileFormat. + * @param fileFormat Value for String + */ + @JsonSetter("fileFormat") + public void setFileFormat(String fileFormat) { + this.fileFormat = fileFormat; + } + + /** + * Getter for MediaUrl. + * @return Returns the String + */ + @JsonGetter("mediaUrl") + public String getMediaUrl() { + return mediaUrl; + } + + /** + * Setter for MediaUrl. + * @param mediaUrl Value for String + */ + @JsonSetter("mediaUrl") + public void setMediaUrl(String mediaUrl) { + this.mediaUrl = mediaUrl; + } + + /** + * Getter for Status. + * @return Returns the String + */ + @JsonGetter("status") + public String getStatus() { + return status; + } + + /** + * Setter for Status. + * @param status Value for String + */ + @JsonSetter("status") + public void setStatus(String status) { + this.status = status; + } + + /** + * Converts this ConferenceCallback into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "ConferenceCallback [" + "conferenceId=" + conferenceId + ", name=" + name + + ", eventType=" + eventType + ", eventTime=" + eventTime + ", tag=" + tag + + ", callId=" + callId + ", to=" + to + ", from=" + from + ", accountId=" + + accountId + ", recordingId=" + recordingId + ", channels=" + channels + + ", startTime=" + startTime + ", endTime=" + endTime + ", duration=" + duration + + ", fileFormat=" + fileFormat + ", mediaUrl=" + mediaUrl + ", status=" + status + + "]"; + } + + /** + * Builds a new {@link ConferenceCallback.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link ConferenceCallback.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .conferenceId(getConferenceId()) + .name(getName()) + .eventType(getEventType()) + .eventTime(getEventTime()) + .tag(getTag()) + .callId(getCallId()) + .to(getTo()) + .from(getFrom()) + .accountId(getAccountId()) + .recordingId(getRecordingId()) + .channels(getChannels()) + .startTime(getStartTime()) + .endTime(getEndTime()) + .duration(getDuration()) + .fileFormat(getFileFormat()) + .mediaUrl(getMediaUrl()) + .status(getStatus()); + return builder; + } + + /** + * Class to build instances of {@link ConferenceCallback}. + */ + public static class Builder { + private String conferenceId; + private String name; + private String eventType; + private String eventTime; + private String tag; + private String callId; + private String to; + private String from; + private String accountId; + private String recordingId; + private Integer channels; + private String startTime; + private String endTime; + private String duration; + private String fileFormat; + private String mediaUrl; + private String status; + + + + /** + * Setter for conferenceId. + * @param conferenceId String value for conferenceId. + * @return Builder + */ + public Builder conferenceId(String conferenceId) { + this.conferenceId = conferenceId; + return this; + } + + /** + * Setter for name. + * @param name String value for name. + * @return Builder + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Setter for eventType. + * @param eventType String value for eventType. + * @return Builder + */ + public Builder eventType(String eventType) { + this.eventType = eventType; + return this; + } + + /** + * Setter for eventTime. + * @param eventTime String value for eventTime. + * @return Builder + */ + public Builder eventTime(String eventTime) { + this.eventTime = eventTime; + return this; + } + + /** + * Setter for tag. + * @param tag String value for tag. + * @return Builder + */ + public Builder tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Setter for callId. + * @param callId String value for callId. + * @return Builder + */ + public Builder callId(String callId) { + this.callId = callId; + return this; + } + + /** + * Setter for to. + * @param to String value for to. + * @return Builder + */ + public Builder to(String to) { + this.to = to; + return this; + } + + /** + * Setter for from. + * @param from String value for from. + * @return Builder + */ + public Builder from(String from) { + this.from = from; + return this; + } + + /** + * Setter for accountId. + * @param accountId String value for accountId. + * @return Builder + */ + public Builder accountId(String accountId) { + this.accountId = accountId; + return this; + } + + /** + * Setter for recordingId. + * @param recordingId String value for recordingId. + * @return Builder + */ + public Builder recordingId(String recordingId) { + this.recordingId = recordingId; + return this; + } + + /** + * Setter for channels. + * @param channels Integer value for channels. + * @return Builder + */ + public Builder channels(Integer channels) { + this.channels = channels; + return this; + } + + /** + * Setter for startTime. + * @param startTime String value for startTime. + * @return Builder + */ + public Builder startTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** + * Setter for endTime. + * @param endTime String value for endTime. + * @return Builder + */ + public Builder endTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Setter for duration. + * @param duration String value for duration. + * @return Builder + */ + public Builder duration(String duration) { + this.duration = duration; + return this; + } + + /** + * Setter for fileFormat. + * @param fileFormat String value for fileFormat. + * @return Builder + */ + public Builder fileFormat(String fileFormat) { + this.fileFormat = fileFormat; + return this; + } + + /** + * Setter for mediaUrl. + * @param mediaUrl String value for mediaUrl. + * @return Builder + */ + public Builder mediaUrl(String mediaUrl) { + this.mediaUrl = mediaUrl; + return this; + } + + /** + * Setter for status. + * @param status String value for status. + * @return Builder + */ + public Builder status(String status) { + this.status = status; + return this; + } + + /** + * Builds a new {@link ConferenceCallback} object using the set fields. + * @return {@link ConferenceCallback} + */ + public ConferenceCallback build() { + return new ConferenceCallback(conferenceId, name, eventType, eventTime, tag, callId, to, + from, accountId, recordingId, channels, startTime, endTime, duration, + fileFormat, mediaUrl, status); + } + } +} diff --git a/src/main/java/com/bandwidth/voice/models/CreateCallRequest.java b/src/main/java/com/bandwidth/voice/models/CreateCallRequest.java index 30e1028a..f5eef607 100644 --- a/src/main/java/com/bandwidth/voice/models/CreateCallRequest.java +++ b/src/main/java/com/bandwidth/voice/models/CreateCallRequest.java @@ -46,6 +46,8 @@ public class CreateCallRequest { @JsonInclude(JsonInclude.Include.NON_NULL) private OptionalNullable tag; private String applicationId; + @JsonInclude(JsonInclude.Include.NON_NULL) + private MachineDetectionRequest machineDetection; /** * Default constructor. @@ -72,6 +74,7 @@ public CreateCallRequest() { * @param disconnectUrl String value for disconnectUrl. * @param disconnectMethod DisconnectMethodEnum value for disconnectMethod. * @param tag String value for tag. + * @param machineDetection MachineDetectionRequest value for machineDetection. */ public CreateCallRequest( String from, @@ -90,7 +93,8 @@ public CreateCallRequest( AnswerFallbackMethodEnum answerFallbackMethod, String disconnectUrl, DisconnectMethodEnum disconnectMethod, - String tag) { + String tag, + MachineDetectionRequest machineDetection) { this.from = from; this.to = to; this.uui = OptionalNullable.of(uui); @@ -108,6 +112,7 @@ public CreateCallRequest( this.disconnectMethod = OptionalNullable.of(disconnectMethod); this.tag = OptionalNullable.of(tag); this.applicationId = applicationId; + this.machineDetection = machineDetection; } /** @@ -121,8 +126,8 @@ protected CreateCallRequest(String from, String to, String answerUrl, String app OptionalNullable answerMethod, OptionalNullable answerFallbackMethod, OptionalNullable disconnectUrl, - OptionalNullable disconnectMethod, - OptionalNullable tag) { + OptionalNullable disconnectMethod, OptionalNullable tag, + MachineDetectionRequest machineDetection) { this.from = from; this.to = to; this.uui = uui; @@ -140,6 +145,7 @@ protected CreateCallRequest(String from, String to, String answerUrl, String app this.disconnectMethod = disconnectMethod; this.tag = tag; this.applicationId = applicationId; + this.machineDetection = machineDetection; } /** @@ -184,10 +190,10 @@ public void setTo(String to) { /** * Internal Getter for Uui. - * When calling a SIP URI, this will be sent as the 'User-To-User' header within the initial - * INVITE. It must end with an 'encoding' parameter as described in - * https://tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the - * encoding parameter. + * A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP + * URI. Each value must end with an 'encoding' parameter as described in + * https://tools.ietf.org/html/rfc7433. Only 'jwt' and 'base64' encodings are allowed. The + * entire value cannot exceed 350 characters, including parameters and separators. * @return Returns the Internal String */ @JsonGetter("uui") @@ -198,10 +204,10 @@ protected OptionalNullable internalGetUui() { /** * Getter for Uui. - * When calling a SIP URI, this will be sent as the 'User-To-User' header within the initial - * INVITE. It must end with an 'encoding' parameter as described in - * https://tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the - * encoding parameter. + * A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP + * URI. Each value must end with an 'encoding' parameter as described in + * https://tools.ietf.org/html/rfc7433. Only 'jwt' and 'base64' encodings are allowed. The + * entire value cannot exceed 350 characters, including parameters and separators. * @return Returns the String */ public String getUui() { @@ -210,10 +216,10 @@ public String getUui() { /** * Setter for Uui. - * When calling a SIP URI, this will be sent as the 'User-To-User' header within the initial - * INVITE. It must end with an 'encoding' parameter as described in - * https://tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the - * encoding parameter. + * A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP + * URI. Each value must end with an 'encoding' parameter as described in + * https://tools.ietf.org/html/rfc7433. Only 'jwt' and 'base64' encodings are allowed. The + * entire value cannot exceed 350 characters, including parameters and separators. * @param uui Value for String */ @JsonSetter("uui") @@ -223,10 +229,10 @@ public void setUui(String uui) { /** * UnSetter for Uui. - * When calling a SIP URI, this will be sent as the 'User-To-User' header within the initial - * INVITE. It must end with an 'encoding' parameter as described in - * https://tools.ietf.org/html/rfc7433. This header cannot exceed 256 characters, including the - * encoding parameter. + * A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP + * URI. Each value must end with an 'encoding' parameter as described in + * https://tools.ietf.org/html/rfc7433. Only 'jwt' and 'base64' encodings are allowed. The + * entire value cannot exceed 350 characters, including parameters and separators. */ public void unsetUui() { uui = null; @@ -676,6 +682,24 @@ public void setApplicationId(String applicationId) { this.applicationId = applicationId; } + /** + * Getter for MachineDetection. + * @return Returns the MachineDetectionRequest + */ + @JsonGetter("machineDetection") + public MachineDetectionRequest getMachineDetection() { + return machineDetection; + } + + /** + * Setter for MachineDetection. + * @param machineDetection Value for MachineDetectionRequest + */ + @JsonSetter("machineDetection") + public void setMachineDetection(MachineDetectionRequest machineDetection) { + this.machineDetection = machineDetection; + } + /** * Converts this CreateCallRequest into string format. * @return String representation of this class @@ -689,7 +713,8 @@ public String toString() { + ", fallbackUsername=" + fallbackUsername + ", fallbackPassword=" + fallbackPassword + ", answerMethod=" + answerMethod + ", answerFallbackMethod=" + answerFallbackMethod + ", disconnectUrl=" + disconnectUrl + ", disconnectMethod=" - + disconnectMethod + ", tag=" + tag + "]"; + + disconnectMethod + ", tag=" + tag + ", machineDetection=" + machineDetection + + "]"; } /** @@ -698,7 +723,8 @@ public String toString() { * @return a new {@link CreateCallRequest.Builder} object */ public Builder toBuilder() { - Builder builder = new Builder(from, to, answerUrl, applicationId); + Builder builder = new Builder(from, to, answerUrl, applicationId) + .machineDetection(getMachineDetection()); builder.uui = internalGetUui(); builder.callTimeout = internalGetCallTimeout(); builder.callbackTimeout = internalGetCallbackTimeout(); @@ -736,6 +762,7 @@ public static class Builder { private OptionalNullable disconnectUrl; private OptionalNullable disconnectMethod; private OptionalNullable tag; + private MachineDetectionRequest machineDetection; /** * Initialization constructor. @@ -1044,6 +1071,16 @@ public Builder unsetTag() { return this; } + /** + * Setter for machineDetection. + * @param machineDetection MachineDetectionRequest value for machineDetection. + * @return Builder + */ + public Builder machineDetection(MachineDetectionRequest machineDetection) { + this.machineDetection = machineDetection; + return this; + } + /** * Builds a new {@link CreateCallRequest} object using the set fields. * @return {@link CreateCallRequest} @@ -1052,7 +1089,7 @@ public CreateCallRequest build() { return new CreateCallRequest(from, to, answerUrl, applicationId, uui, callTimeout, callbackTimeout, answerFallbackUrl, username, password, fallbackUsername, fallbackPassword, answerMethod, answerFallbackMethod, disconnectUrl, - disconnectMethod, tag); + disconnectMethod, tag, machineDetection); } } } diff --git a/src/main/java/com/bandwidth/voice/models/Diversion.java b/src/main/java/com/bandwidth/voice/models/Diversion.java new file mode 100644 index 00000000..a1c348d8 --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/Diversion.java @@ -0,0 +1,205 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; + +/** + * This is a model class for Diversion type. + */ +public class Diversion { + @JsonInclude(JsonInclude.Include.NON_NULL) + private String reason; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String privacy; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String unknown; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String origTo; + + /** + * Default constructor. + */ + public Diversion() { + } + + /** + * Initialization constructor. + * @param reason String value for reason. + * @param privacy String value for privacy. + * @param unknown String value for unknown. + * @param origTo String value for origTo. + */ + public Diversion( + String reason, + String privacy, + String unknown, + String origTo) { + this.reason = reason; + this.privacy = privacy; + this.unknown = unknown; + this.origTo = origTo; + } + + /** + * Getter for Reason. + * @return Returns the String + */ + @JsonGetter("reason") + public String getReason() { + return reason; + } + + /** + * Setter for Reason. + * @param reason Value for String + */ + @JsonSetter("reason") + public void setReason(String reason) { + this.reason = reason; + } + + /** + * Getter for Privacy. + * @return Returns the String + */ + @JsonGetter("privacy") + public String getPrivacy() { + return privacy; + } + + /** + * Setter for Privacy. + * @param privacy Value for String + */ + @JsonSetter("privacy") + public void setPrivacy(String privacy) { + this.privacy = privacy; + } + + /** + * Getter for Unknown. + * @return Returns the String + */ + @JsonGetter("unknown") + public String getUnknown() { + return unknown; + } + + /** + * Setter for Unknown. + * @param unknown Value for String + */ + @JsonSetter("unknown") + public void setUnknown(String unknown) { + this.unknown = unknown; + } + + /** + * Getter for OrigTo. + * @return Returns the String + */ + @JsonGetter("origTo") + public String getOrigTo() { + return origTo; + } + + /** + * Setter for OrigTo. + * @param origTo Value for String + */ + @JsonSetter("origTo") + public void setOrigTo(String origTo) { + this.origTo = origTo; + } + + /** + * Converts this Diversion into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "Diversion [" + "reason=" + reason + ", privacy=" + privacy + ", unknown=" + unknown + + ", origTo=" + origTo + "]"; + } + + /** + * Builds a new {@link Diversion.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link Diversion.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .reason(getReason()) + .privacy(getPrivacy()) + .unknown(getUnknown()) + .origTo(getOrigTo()); + return builder; + } + + /** + * Class to build instances of {@link Diversion}. + */ + public static class Builder { + private String reason; + private String privacy; + private String unknown; + private String origTo; + + + + /** + * Setter for reason. + * @param reason String value for reason. + * @return Builder + */ + public Builder reason(String reason) { + this.reason = reason; + return this; + } + + /** + * Setter for privacy. + * @param privacy String value for privacy. + * @return Builder + */ + public Builder privacy(String privacy) { + this.privacy = privacy; + return this; + } + + /** + * Setter for unknown. + * @param unknown String value for unknown. + * @return Builder + */ + public Builder unknown(String unknown) { + this.unknown = unknown; + return this; + } + + /** + * Setter for origTo. + * @param origTo String value for origTo. + * @return Builder + */ + public Builder origTo(String origTo) { + this.origTo = origTo; + return this; + } + + /** + * Builds a new {@link Diversion} object using the set fields. + * @return {@link Diversion} + */ + public Diversion build() { + return new Diversion(reason, privacy, unknown, origTo); + } + } +} diff --git a/src/main/java/com/bandwidth/voice/models/FallbackMethodEnum.java b/src/main/java/com/bandwidth/voice/models/FallbackMethodEnum.java new file mode 100644 index 00000000..ea38abfe --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/FallbackMethodEnum.java @@ -0,0 +1,75 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import java.util.ArrayList; +import java.util.List; +import java.util.TreeMap; + +/** + * FallbackMethodEnum to be used. + */ +public enum FallbackMethodEnum { + POST, + + GET; + + + private static TreeMap valueMap = new TreeMap<>(); + private String value; + + static { + POST.value = "POST"; + GET.value = "GET"; + + valueMap.put("POST", POST); + valueMap.put("GET", GET); + } + + /** + * Returns the enum member associated with the given string value. + * @param toConvert String value to get enum member. + * @return The enum member against the given string value. + */ + @com.fasterxml.jackson.annotation.JsonCreator + public static FallbackMethodEnum fromString(String toConvert) { + return valueMap.get(toConvert); + } + + /** + * Returns the string value associated with the enum member. + * @return The string value against enum member. + */ + @com.fasterxml.jackson.annotation.JsonValue + public String value() { + return value; + } + + /** + * Get string representation of this enum. + */ + @Override + public String toString() { + return value.toString(); + } + + /** + * Convert list of FallbackMethodEnum values to list of string values. + * @param toConvert The list of FallbackMethodEnum values to convert. + * @return List of representative string values. + */ + public static List toValue(List toConvert) { + if (toConvert == null) { + return null; + } + List convertedValues = new ArrayList<>(); + for (FallbackMethodEnum enumValue : toConvert) { + convertedValues.add(enumValue.value); + } + return convertedValues; + } +} \ No newline at end of file diff --git a/src/main/java/com/bandwidth/voice/models/MachineDetectionRequest.java b/src/main/java/com/bandwidth/voice/models/MachineDetectionRequest.java new file mode 100644 index 00000000..f9a111b7 --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/MachineDetectionRequest.java @@ -0,0 +1,831 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import com.bandwidth.internal.OptionalNullable; +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +/** + * This is a model class for MachineDetectionRequest type. + */ +public class MachineDetectionRequest { + @JsonInclude(JsonInclude.Include.NON_NULL) + private ModeEnum mode; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Double detectionTimeout; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Double silenceTimeout; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Double speechThreshold; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Double speechEndThreshold; + @JsonInclude(JsonInclude.Include.NON_NULL) + private Boolean delayResult; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable callbackUrl; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable callbackMethod; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable fallbackUrl; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable fallbackMethod; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable username; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable password; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable fallbackUsername; + @JsonInclude(JsonInclude.Include.NON_NULL) + private OptionalNullable fallbackPassword; + + /** + * Default constructor. + */ + public MachineDetectionRequest() { + } + + /** + * Initialization constructor. + * @param mode ModeEnum value for mode. + * @param detectionTimeout Double value for detectionTimeout. + * @param silenceTimeout Double value for silenceTimeout. + * @param speechThreshold Double value for speechThreshold. + * @param speechEndThreshold Double value for speechEndThreshold. + * @param delayResult Boolean value for delayResult. + * @param callbackUrl String value for callbackUrl. + * @param callbackMethod CallbackMethodEnum value for callbackMethod. + * @param fallbackUrl String value for fallbackUrl. + * @param fallbackMethod FallbackMethodEnum value for fallbackMethod. + * @param username String value for username. + * @param password String value for password. + * @param fallbackUsername String value for fallbackUsername. + * @param fallbackPassword String value for fallbackPassword. + */ + public MachineDetectionRequest( + ModeEnum mode, + Double detectionTimeout, + Double silenceTimeout, + Double speechThreshold, + Double speechEndThreshold, + Boolean delayResult, + String callbackUrl, + CallbackMethodEnum callbackMethod, + String fallbackUrl, + FallbackMethodEnum fallbackMethod, + String username, + String password, + String fallbackUsername, + String fallbackPassword) { + this.mode = mode; + this.detectionTimeout = detectionTimeout; + this.silenceTimeout = silenceTimeout; + this.speechThreshold = speechThreshold; + this.speechEndThreshold = speechEndThreshold; + this.delayResult = delayResult; + this.callbackUrl = OptionalNullable.of(callbackUrl); + this.callbackMethod = OptionalNullable.of(callbackMethod); + this.fallbackUrl = OptionalNullable.of(fallbackUrl); + this.fallbackMethod = OptionalNullable.of(fallbackMethod); + this.username = OptionalNullable.of(username); + this.password = OptionalNullable.of(password); + this.fallbackUsername = OptionalNullable.of(fallbackUsername); + this.fallbackPassword = OptionalNullable.of(fallbackPassword); + } + + /** + * Internal initialization constructor. + */ + protected MachineDetectionRequest(ModeEnum mode, Double detectionTimeout, Double silenceTimeout, + Double speechThreshold, Double speechEndThreshold, Boolean delayResult, + OptionalNullable callbackUrl, + OptionalNullable callbackMethod, + OptionalNullable fallbackUrl, + OptionalNullable fallbackMethod, OptionalNullable username, + OptionalNullable password, OptionalNullable fallbackUsername, + OptionalNullable fallbackPassword) { + this.mode = mode; + this.detectionTimeout = detectionTimeout; + this.silenceTimeout = silenceTimeout; + this.speechThreshold = speechThreshold; + this.speechEndThreshold = speechEndThreshold; + this.delayResult = delayResult; + this.callbackUrl = callbackUrl; + this.callbackMethod = callbackMethod; + this.fallbackUrl = fallbackUrl; + this.fallbackMethod = fallbackMethod; + this.username = username; + this.password = password; + this.fallbackUsername = fallbackUsername; + this.fallbackPassword = fallbackPassword; + } + + /** + * Getter for Mode. + * The machine detection mode. If set to 'async', the detection result will be sent in a + * 'machineDetectionComplete' callback. If set to 'sync', the 'answer' callback will wait for + * the machine detection to complete and will include its result. Default is 'async'. + * @return Returns the ModeEnum + */ + @JsonGetter("mode") + public ModeEnum getMode() { + return mode; + } + + /** + * Setter for Mode. + * The machine detection mode. If set to 'async', the detection result will be sent in a + * 'machineDetectionComplete' callback. If set to 'sync', the 'answer' callback will wait for + * the machine detection to complete and will include its result. Default is 'async'. + * @param mode Value for ModeEnum + */ + @JsonSetter("mode") + public void setMode(ModeEnum mode) { + this.mode = mode; + } + + /** + * Getter for DetectionTimeout. + * Total amount of time (in seconds) before giving up. + * @return Returns the Double + */ + @JsonGetter("detectionTimeout") + public Double getDetectionTimeout() { + return detectionTimeout; + } + + /** + * Setter for DetectionTimeout. + * Total amount of time (in seconds) before giving up. + * @param detectionTimeout Value for Double + */ + @JsonSetter("detectionTimeout") + public void setDetectionTimeout(Double detectionTimeout) { + this.detectionTimeout = detectionTimeout; + } + + /** + * Getter for SilenceTimeout. + * If no speech is detected in this period, a callback with a 'silence' result is sent. Default + * is 10 seconds. + * @return Returns the Double + */ + @JsonGetter("silenceTimeout") + public Double getSilenceTimeout() { + return silenceTimeout; + } + + /** + * Setter for SilenceTimeout. + * If no speech is detected in this period, a callback with a 'silence' result is sent. Default + * is 10 seconds. + * @param silenceTimeout Value for Double + */ + @JsonSetter("silenceTimeout") + public void setSilenceTimeout(Double silenceTimeout) { + this.silenceTimeout = silenceTimeout; + } + + /** + * Getter for SpeechThreshold. + * When speech has ended and a result couldn't be determined based on the audio content itself, + * this value is used to determine if the speaker is a machine based on the speech duration. If + * the length of the speech detected is greater than or equal to this threshold, the result will + * be 'answering-machine'. If the length of speech detected is below this threshold, the result + * will be 'human'. Default is 10 seconds. + * @return Returns the Double + */ + @JsonGetter("speechThreshold") + public Double getSpeechThreshold() { + return speechThreshold; + } + + /** + * Setter for SpeechThreshold. + * When speech has ended and a result couldn't be determined based on the audio content itself, + * this value is used to determine if the speaker is a machine based on the speech duration. If + * the length of the speech detected is greater than or equal to this threshold, the result will + * be 'answering-machine'. If the length of speech detected is below this threshold, the result + * will be 'human'. Default is 10 seconds. + * @param speechThreshold Value for Double + */ + @JsonSetter("speechThreshold") + public void setSpeechThreshold(Double speechThreshold) { + this.speechThreshold = speechThreshold; + } + + /** + * Getter for SpeechEndThreshold. + * Amount of silence (in seconds) before assuming the callee has finished speaking. + * @return Returns the Double + */ + @JsonGetter("speechEndThreshold") + public Double getSpeechEndThreshold() { + return speechEndThreshold; + } + + /** + * Setter for SpeechEndThreshold. + * Amount of silence (in seconds) before assuming the callee has finished speaking. + * @param speechEndThreshold Value for Double + */ + @JsonSetter("speechEndThreshold") + public void setSpeechEndThreshold(Double speechEndThreshold) { + this.speechEndThreshold = speechEndThreshold; + } + + /** + * Getter for DelayResult. + * If set to 'true' and if an answering machine is detected, the 'answering-machine' callback + * will be delayed until the machine is done speaking or until the 'detectionTimeout' is + * exceeded. If false, the 'answering-machine' result is sent immediately. Default is 'false'. + * @return Returns the Boolean + */ + @JsonGetter("delayResult") + public Boolean getDelayResult() { + return delayResult; + } + + /** + * Setter for DelayResult. + * If set to 'true' and if an answering machine is detected, the 'answering-machine' callback + * will be delayed until the machine is done speaking or until the 'detectionTimeout' is + * exceeded. If false, the 'answering-machine' result is sent immediately. Default is 'false'. + * @param delayResult Value for Boolean + */ + @JsonSetter("delayResult") + public void setDelayResult(Boolean delayResult) { + this.delayResult = delayResult; + } + + /** + * Internal Getter for CallbackUrl. + * The URL to send the 'machineDetectionComplete' callback when the detection is completed. Only + * for 'async' mode. + * @return Returns the Internal String + */ + @JsonGetter("callbackUrl") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetCallbackUrl() { + return this.callbackUrl; + } + + /** + * Getter for CallbackUrl. + * The URL to send the 'machineDetectionComplete' callback when the detection is completed. Only + * for 'async' mode. + * @return Returns the String + */ + public String getCallbackUrl() { + return OptionalNullable.getFrom(callbackUrl); + } + + /** + * Setter for CallbackUrl. + * The URL to send the 'machineDetectionComplete' callback when the detection is completed. Only + * for 'async' mode. + * @param callbackUrl Value for String + */ + @JsonSetter("callbackUrl") + public void setCallbackUrl(String callbackUrl) { + this.callbackUrl = OptionalNullable.of(callbackUrl); + } + + /** + * UnSetter for CallbackUrl. + * The URL to send the 'machineDetectionComplete' callback when the detection is completed. Only + * for 'async' mode. + */ + public void unsetCallbackUrl() { + callbackUrl = null; + } + + /** + * Internal Getter for CallbackMethod. + * @return Returns the Internal CallbackMethodEnum + */ + @JsonGetter("callbackMethod") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetCallbackMethod() { + return this.callbackMethod; + } + + /** + * Getter for CallbackMethod. + * @return Returns the CallbackMethodEnum + */ + public CallbackMethodEnum getCallbackMethod() { + return OptionalNullable.getFrom(callbackMethod); + } + + /** + * Setter for CallbackMethod. + * @param callbackMethod Value for CallbackMethodEnum + */ + @JsonSetter("callbackMethod") + public void setCallbackMethod(CallbackMethodEnum callbackMethod) { + this.callbackMethod = OptionalNullable.of(callbackMethod); + } + + /** + * UnSetter for CallbackMethod. + */ + public void unsetCallbackMethod() { + callbackMethod = null; + } + + /** + * Internal Getter for FallbackUrl. + * @return Returns the Internal String + */ + @JsonGetter("fallbackUrl") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetFallbackUrl() { + return this.fallbackUrl; + } + + /** + * Getter for FallbackUrl. + * @return Returns the String + */ + public String getFallbackUrl() { + return OptionalNullable.getFrom(fallbackUrl); + } + + /** + * Setter for FallbackUrl. + * @param fallbackUrl Value for String + */ + @JsonSetter("fallbackUrl") + public void setFallbackUrl(String fallbackUrl) { + this.fallbackUrl = OptionalNullable.of(fallbackUrl); + } + + /** + * UnSetter for FallbackUrl. + */ + public void unsetFallbackUrl() { + fallbackUrl = null; + } + + /** + * Internal Getter for FallbackMethod. + * @return Returns the Internal FallbackMethodEnum + */ + @JsonGetter("fallbackMethod") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetFallbackMethod() { + return this.fallbackMethod; + } + + /** + * Getter for FallbackMethod. + * @return Returns the FallbackMethodEnum + */ + public FallbackMethodEnum getFallbackMethod() { + return OptionalNullable.getFrom(fallbackMethod); + } + + /** + * Setter for FallbackMethod. + * @param fallbackMethod Value for FallbackMethodEnum + */ + @JsonSetter("fallbackMethod") + public void setFallbackMethod(FallbackMethodEnum fallbackMethod) { + this.fallbackMethod = OptionalNullable.of(fallbackMethod); + } + + /** + * UnSetter for FallbackMethod. + */ + public void unsetFallbackMethod() { + fallbackMethod = null; + } + + /** + * Internal Getter for Username. + * @return Returns the Internal String + */ + @JsonGetter("username") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetUsername() { + return this.username; + } + + /** + * Getter for Username. + * @return Returns the String + */ + public String getUsername() { + return OptionalNullable.getFrom(username); + } + + /** + * Setter for Username. + * @param username Value for String + */ + @JsonSetter("username") + public void setUsername(String username) { + this.username = OptionalNullable.of(username); + } + + /** + * UnSetter for Username. + */ + public void unsetUsername() { + username = null; + } + + /** + * Internal Getter for Password. + * @return Returns the Internal String + */ + @JsonGetter("password") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetPassword() { + return this.password; + } + + /** + * Getter for Password. + * @return Returns the String + */ + public String getPassword() { + return OptionalNullable.getFrom(password); + } + + /** + * Setter for Password. + * @param password Value for String + */ + @JsonSetter("password") + public void setPassword(String password) { + this.password = OptionalNullable.of(password); + } + + /** + * UnSetter for Password. + */ + public void unsetPassword() { + password = null; + } + + /** + * Internal Getter for FallbackUsername. + * @return Returns the Internal String + */ + @JsonGetter("fallbackUsername") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetFallbackUsername() { + return this.fallbackUsername; + } + + /** + * Getter for FallbackUsername. + * @return Returns the String + */ + public String getFallbackUsername() { + return OptionalNullable.getFrom(fallbackUsername); + } + + /** + * Setter for FallbackUsername. + * @param fallbackUsername Value for String + */ + @JsonSetter("fallbackUsername") + public void setFallbackUsername(String fallbackUsername) { + this.fallbackUsername = OptionalNullable.of(fallbackUsername); + } + + /** + * UnSetter for FallbackUsername. + */ + public void unsetFallbackUsername() { + fallbackUsername = null; + } + + /** + * Internal Getter for FallbackPassword. + * @return Returns the Internal String + */ + @JsonGetter("fallbackPassword") + @JsonSerialize(using = OptionalNullable.Serializer.class) + protected OptionalNullable internalGetFallbackPassword() { + return this.fallbackPassword; + } + + /** + * Getter for FallbackPassword. + * @return Returns the String + */ + public String getFallbackPassword() { + return OptionalNullable.getFrom(fallbackPassword); + } + + /** + * Setter for FallbackPassword. + * @param fallbackPassword Value for String + */ + @JsonSetter("fallbackPassword") + public void setFallbackPassword(String fallbackPassword) { + this.fallbackPassword = OptionalNullable.of(fallbackPassword); + } + + /** + * UnSetter for FallbackPassword. + */ + public void unsetFallbackPassword() { + fallbackPassword = null; + } + + /** + * Converts this MachineDetectionRequest into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "MachineDetectionRequest [" + "mode=" + mode + ", detectionTimeout=" + + detectionTimeout + ", silenceTimeout=" + silenceTimeout + ", speechThreshold=" + + speechThreshold + ", speechEndThreshold=" + speechEndThreshold + ", delayResult=" + + delayResult + ", callbackUrl=" + callbackUrl + ", callbackMethod=" + + callbackMethod + ", fallbackUrl=" + fallbackUrl + ", fallbackMethod=" + + fallbackMethod + ", username=" + username + ", password=" + password + + ", fallbackUsername=" + fallbackUsername + ", fallbackPassword=" + + fallbackPassword + "]"; + } + + /** + * Builds a new {@link MachineDetectionRequest.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link MachineDetectionRequest.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .mode(getMode()) + .detectionTimeout(getDetectionTimeout()) + .silenceTimeout(getSilenceTimeout()) + .speechThreshold(getSpeechThreshold()) + .speechEndThreshold(getSpeechEndThreshold()) + .delayResult(getDelayResult()); + builder.callbackUrl = internalGetCallbackUrl(); + builder.callbackMethod = internalGetCallbackMethod(); + builder.fallbackUrl = internalGetFallbackUrl(); + builder.fallbackMethod = internalGetFallbackMethod(); + builder.username = internalGetUsername(); + builder.password = internalGetPassword(); + builder.fallbackUsername = internalGetFallbackUsername(); + builder.fallbackPassword = internalGetFallbackPassword(); + return builder; + } + + /** + * Class to build instances of {@link MachineDetectionRequest}. + */ + public static class Builder { + private ModeEnum mode; + private Double detectionTimeout; + private Double silenceTimeout; + private Double speechThreshold; + private Double speechEndThreshold; + private Boolean delayResult; + private OptionalNullable callbackUrl; + private OptionalNullable callbackMethod; + private OptionalNullable fallbackUrl; + private OptionalNullable fallbackMethod; + private OptionalNullable username; + private OptionalNullable password; + private OptionalNullable fallbackUsername; + private OptionalNullable fallbackPassword; + + + + /** + * Setter for mode. + * @param mode ModeEnum value for mode. + * @return Builder + */ + public Builder mode(ModeEnum mode) { + this.mode = mode; + return this; + } + + /** + * Setter for detectionTimeout. + * @param detectionTimeout Double value for detectionTimeout. + * @return Builder + */ + public Builder detectionTimeout(Double detectionTimeout) { + this.detectionTimeout = detectionTimeout; + return this; + } + + /** + * Setter for silenceTimeout. + * @param silenceTimeout Double value for silenceTimeout. + * @return Builder + */ + public Builder silenceTimeout(Double silenceTimeout) { + this.silenceTimeout = silenceTimeout; + return this; + } + + /** + * Setter for speechThreshold. + * @param speechThreshold Double value for speechThreshold. + * @return Builder + */ + public Builder speechThreshold(Double speechThreshold) { + this.speechThreshold = speechThreshold; + return this; + } + + /** + * Setter for speechEndThreshold. + * @param speechEndThreshold Double value for speechEndThreshold. + * @return Builder + */ + public Builder speechEndThreshold(Double speechEndThreshold) { + this.speechEndThreshold = speechEndThreshold; + return this; + } + + /** + * Setter for delayResult. + * @param delayResult Boolean value for delayResult. + * @return Builder + */ + public Builder delayResult(Boolean delayResult) { + this.delayResult = delayResult; + return this; + } + + /** + * Setter for callbackUrl. + * @param callbackUrl String value for callbackUrl. + * @return Builder + */ + public Builder callbackUrl(String callbackUrl) { + this.callbackUrl = OptionalNullable.of(callbackUrl); + return this; + } + + /** + * UnSetter for callbackUrl. + * @return Builder + */ + public Builder unsetCallbackUrl() { + callbackUrl = null; + return this; + } + + /** + * Setter for callbackMethod. + * @param callbackMethod CallbackMethodEnum value for callbackMethod. + * @return Builder + */ + public Builder callbackMethod(CallbackMethodEnum callbackMethod) { + this.callbackMethod = OptionalNullable.of(callbackMethod); + return this; + } + + /** + * UnSetter for callbackMethod. + * @return Builder + */ + public Builder unsetCallbackMethod() { + callbackMethod = null; + return this; + } + + /** + * Setter for fallbackUrl. + * @param fallbackUrl String value for fallbackUrl. + * @return Builder + */ + public Builder fallbackUrl(String fallbackUrl) { + this.fallbackUrl = OptionalNullable.of(fallbackUrl); + return this; + } + + /** + * UnSetter for fallbackUrl. + * @return Builder + */ + public Builder unsetFallbackUrl() { + fallbackUrl = null; + return this; + } + + /** + * Setter for fallbackMethod. + * @param fallbackMethod FallbackMethodEnum value for fallbackMethod. + * @return Builder + */ + public Builder fallbackMethod(FallbackMethodEnum fallbackMethod) { + this.fallbackMethod = OptionalNullable.of(fallbackMethod); + return this; + } + + /** + * UnSetter for fallbackMethod. + * @return Builder + */ + public Builder unsetFallbackMethod() { + fallbackMethod = null; + return this; + } + + /** + * Setter for username. + * @param username String value for username. + * @return Builder + */ + public Builder username(String username) { + this.username = OptionalNullable.of(username); + return this; + } + + /** + * UnSetter for username. + * @return Builder + */ + public Builder unsetUsername() { + username = null; + return this; + } + + /** + * Setter for password. + * @param password String value for password. + * @return Builder + */ + public Builder password(String password) { + this.password = OptionalNullable.of(password); + return this; + } + + /** + * UnSetter for password. + * @return Builder + */ + public Builder unsetPassword() { + password = null; + return this; + } + + /** + * Setter for fallbackUsername. + * @param fallbackUsername String value for fallbackUsername. + * @return Builder + */ + public Builder fallbackUsername(String fallbackUsername) { + this.fallbackUsername = OptionalNullable.of(fallbackUsername); + return this; + } + + /** + * UnSetter for fallbackUsername. + * @return Builder + */ + public Builder unsetFallbackUsername() { + fallbackUsername = null; + return this; + } + + /** + * Setter for fallbackPassword. + * @param fallbackPassword String value for fallbackPassword. + * @return Builder + */ + public Builder fallbackPassword(String fallbackPassword) { + this.fallbackPassword = OptionalNullable.of(fallbackPassword); + return this; + } + + /** + * UnSetter for fallbackPassword. + * @return Builder + */ + public Builder unsetFallbackPassword() { + fallbackPassword = null; + return this; + } + + /** + * Builds a new {@link MachineDetectionRequest} object using the set fields. + * @return {@link MachineDetectionRequest} + */ + public MachineDetectionRequest build() { + return new MachineDetectionRequest(mode, detectionTimeout, silenceTimeout, + speechThreshold, speechEndThreshold, delayResult, callbackUrl, callbackMethod, + fallbackUrl, fallbackMethod, username, password, fallbackUsername, + fallbackPassword); + } + } +} diff --git a/src/main/java/com/bandwidth/voice/models/ModeEnum.java b/src/main/java/com/bandwidth/voice/models/ModeEnum.java new file mode 100644 index 00000000..06d2e40f --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/ModeEnum.java @@ -0,0 +1,75 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import java.util.ArrayList; +import java.util.List; +import java.util.TreeMap; + +/** + * ModeEnum to be used. + */ +public enum ModeEnum { + SYNC, + + ASYNC; + + + private static TreeMap valueMap = new TreeMap<>(); + private String value; + + static { + SYNC.value = "sync"; + ASYNC.value = "async"; + + valueMap.put("sync", SYNC); + valueMap.put("async", ASYNC); + } + + /** + * Returns the enum member associated with the given string value. + * @param toConvert String value to get enum member. + * @return The enum member against the given string value. + */ + @com.fasterxml.jackson.annotation.JsonCreator + public static ModeEnum fromString(String toConvert) { + return valueMap.get(toConvert); + } + + /** + * Returns the string value associated with the enum member. + * @return The string value against enum member. + */ + @com.fasterxml.jackson.annotation.JsonValue + public String value() { + return value; + } + + /** + * Get string representation of this enum. + */ + @Override + public String toString() { + return value.toString(); + } + + /** + * Convert list of ModeEnum values to list of string values. + * @param toConvert The list of ModeEnum values to convert. + * @return List of representative string values. + */ + public static List toValue(List toConvert) { + if (toConvert == null) { + return null; + } + List convertedValues = new ArrayList<>(); + for (ModeEnum enumValue : toConvert) { + convertedValues.add(enumValue.value); + } + return convertedValues; + } +} \ No newline at end of file diff --git a/src/main/java/com/bandwidth/voice/models/Transcription.java b/src/main/java/com/bandwidth/voice/models/Transcription.java new file mode 100644 index 00000000..a040b290 --- /dev/null +++ b/src/main/java/com/bandwidth/voice/models/Transcription.java @@ -0,0 +1,205 @@ +/* + * BandwidthLib + * + * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ). + */ + +package com.bandwidth.voice.models; + +import com.fasterxml.jackson.annotation.JsonGetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonSetter; + +/** + * This is a model class for Transcription type. + */ +public class Transcription { + @JsonInclude(JsonInclude.Include.NON_NULL) + private String id; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String url; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String status; + @JsonInclude(JsonInclude.Include.NON_NULL) + private String completedTime; + + /** + * Default constructor. + */ + public Transcription() { + } + + /** + * Initialization constructor. + * @param id String value for id. + * @param url String value for url. + * @param status String value for status. + * @param completedTime String value for completedTime. + */ + public Transcription( + String id, + String url, + String status, + String completedTime) { + this.id = id; + this.url = url; + this.status = status; + this.completedTime = completedTime; + } + + /** + * Getter for Id. + * @return Returns the String + */ + @JsonGetter("id") + public String getId() { + return id; + } + + /** + * Setter for Id. + * @param id Value for String + */ + @JsonSetter("id") + public void setId(String id) { + this.id = id; + } + + /** + * Getter for Url. + * @return Returns the String + */ + @JsonGetter("url") + public String getUrl() { + return url; + } + + /** + * Setter for Url. + * @param url Value for String + */ + @JsonSetter("url") + public void setUrl(String url) { + this.url = url; + } + + /** + * Getter for Status. + * @return Returns the String + */ + @JsonGetter("status") + public String getStatus() { + return status; + } + + /** + * Setter for Status. + * @param status Value for String + */ + @JsonSetter("status") + public void setStatus(String status) { + this.status = status; + } + + /** + * Getter for CompletedTime. + * @return Returns the String + */ + @JsonGetter("completedTime") + public String getCompletedTime() { + return completedTime; + } + + /** + * Setter for CompletedTime. + * @param completedTime Value for String + */ + @JsonSetter("completedTime") + public void setCompletedTime(String completedTime) { + this.completedTime = completedTime; + } + + /** + * Converts this Transcription into string format. + * @return String representation of this class + */ + @Override + public String toString() { + return "Transcription [" + "id=" + id + ", url=" + url + ", status=" + status + + ", completedTime=" + completedTime + "]"; + } + + /** + * Builds a new {@link Transcription.Builder} object. + * Creates the instance with the state of the current model. + * @return a new {@link Transcription.Builder} object + */ + public Builder toBuilder() { + Builder builder = new Builder() + .id(getId()) + .url(getUrl()) + .status(getStatus()) + .completedTime(getCompletedTime()); + return builder; + } + + /** + * Class to build instances of {@link Transcription}. + */ + public static class Builder { + private String id; + private String url; + private String status; + private String completedTime; + + + + /** + * Setter for id. + * @param id String value for id. + * @return Builder + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * Setter for url. + * @param url String value for url. + * @return Builder + */ + public Builder url(String url) { + this.url = url; + return this; + } + + /** + * Setter for status. + * @param status String value for status. + * @return Builder + */ + public Builder status(String status) { + this.status = status; + return this; + } + + /** + * Setter for completedTime. + * @param completedTime String value for completedTime. + * @return Builder + */ + public Builder completedTime(String completedTime) { + this.completedTime = completedTime; + return this; + } + + /** + * Builds a new {@link Transcription} object using the set fields. + * @return {@link Transcription} + */ + public Transcription build() { + return new Transcription(id, url, status, completedTime); + } + } +} diff --git a/src/main/java/com/bandwidth/webrtc/controllers/APIController.java b/src/main/java/com/bandwidth/webrtc/controllers/APIController.java index 3194cc84..b678293b 100644 --- a/src/main/java/com/bandwidth/webrtc/controllers/APIController.java +++ b/src/main/java/com/bandwidth/webrtc/controllers/APIController.java @@ -62,7 +62,7 @@ public APIController(Configuration config, HttpClient httpClient, } /** - * Create a new participant under this account Participants are idempotent, so relevant + * Create a new participant under this account. Participants are idempotent, so relevant * parameters must be set in this function if desired. * @param accountId Required parameter: Account ID * @param body Optional parameter: Participant parameters @@ -83,7 +83,7 @@ public ApiResponse createParticipant( } /** - * Create a new participant under this account Participants are idempotent, so relevant + * Create a new participant under this account. Participants are idempotent, so relevant * parameters must be set in this function if desired. * @param accountId Required parameter: Account ID * @param body Optional parameter: Participant parameters @@ -393,7 +393,7 @@ private ApiResponse handleDeleteParticipantResponse( } /** - * Create a new session Sessions are idempotent, so relevant parameters must be set in this + * Create a new session. Sessions are idempotent, so relevant parameters must be set in this * function if desired. * @param accountId Required parameter: Account ID * @param body Optional parameter: Session parameters @@ -414,7 +414,7 @@ public ApiResponse createSession( } /** - * Create a new session Sessions are idempotent, so relevant parameters must be set in this + * Create a new session. Sessions are idempotent, so relevant parameters must be set in this * function if desired. * @param accountId Required parameter: Account ID * @param body Optional parameter: Session parameters @@ -835,7 +835,8 @@ private ApiResponse> handleListSessionParticipantsResponse( } /** - * Add a participant to a session Subscriptions can optionally be provided as part of this call. + * Add a participant to a session. Subscriptions can optionally be provided as part of this + * call. * @param accountId Required parameter: Account ID * @param sessionId Required parameter: Session ID * @param participantId Required parameter: Participant ID @@ -859,7 +860,8 @@ public ApiResponse addParticipantToSession( } /** - * Add a participant to a session Subscriptions can optionally be provided as part of this call. + * Add a participant to a session. Subscriptions can optionally be provided as part of this + * call. * @param accountId Required parameter: Account ID * @param sessionId Required parameter: Session ID * @param participantId Required parameter: Participant ID @@ -956,7 +958,7 @@ private ApiResponse handleAddParticipantToSessionResponse( } /** - * Remove a participant from a session This will automatically remove any subscriptions the + * Remove a participant from a session. This will automatically remove any subscriptions the * participant has associated with this session. * @param accountId Required parameter: Account ID * @param sessionId Required parameter: Session ID @@ -979,7 +981,7 @@ public ApiResponse removeParticipantFromSession( } /** - * Remove a participant from a session This will automatically remove any subscriptions the + * Remove a participant from a session. This will automatically remove any subscriptions the * participant has associated with this session. * @param accountId Required parameter: Account ID * @param sessionId Required parameter: Session ID @@ -1193,7 +1195,7 @@ private ApiResponse handleGetParticipantSubscriptionsResponse( } /** - * Update a participant's subscriptions This is a full update that will replace the + * Update a participant's subscriptions. This is a full update that will replace the * participant's subscriptions. First call `getParticipantSubscriptions` if you need the current * subscriptions. Call this function with no `Subscriptions` object to remove all subscriptions. * @param accountId Required parameter: Account ID @@ -1219,7 +1221,7 @@ public ApiResponse updateParticipantSubscriptions( } /** - * Update a participant's subscriptions This is a full update that will replace the + * Update a participant's subscriptions. This is a full update that will replace the * participant's subscriptions. First call `getParticipantSubscriptions` if you need the current * subscriptions. Call this function with no `Subscriptions` object to remove all subscriptions. * @param accountId Required parameter: Account ID diff --git a/src/test/java/com/bandwidth/ApiTest.java b/src/test/java/com/bandwidth/ApiTest.java index 4fdf7a3a..055b1199 100644 --- a/src/test/java/com/bandwidth/ApiTest.java +++ b/src/test/java/com/bandwidth/ApiTest.java @@ -150,6 +150,46 @@ public void testCreateCallAndGetCallState() throws Exception { assertEquals("Call ID not equal", callId, callStateResponse.getResult().getCallId()); } + @Test + public void testCreateCallWithAmdAndGetCallState() throws Exception { + String accountId = System.getenv("BW_ACCOUNT_ID"); + String to = System.getenv("USER_NUMBER"); + String from = System.getenv("BW_NUMBER"); + String applicationId = System.getenv("BW_VOICE_APPLICATION_ID"); + String answerUrl = System.getenv("BASE_CALLBACK_URL").concat("/callbacks/outbound"); + String machineDetectionUrl = System.getenv("BASE_CALLBACK_URL").concat("/callbacks/machineDetection"); + + MachineDetectionRequest machineDetection = new MachineDetectionRequest(); + machineDetection.setMode(ModeEnum.ASYNC); + machineDetection.setCallbackUrl(machineDetectionUrl); + machineDetection.setCallbackMethod(CallbackMethodEnum.POST); + machineDetection.setDetectionTimeout(5.0); + machineDetection.setSilenceTimeout(5.0); + machineDetection.setSpeechThreshold(5.0); + machineDetection.setSpeechEndThreshold(5.0); + machineDetection.setDelayResult(Boolean.TRUE); + + CreateCallRequest body = new CreateCallRequest(); + body.setTo(to); + body.setFrom(from); + body.setApplicationId(applicationId); + body.setAnswerUrl(answerUrl); + body.setMachineDetection(machineDetection); + + ApiResponse createCallResponse = voiceController.createCall(accountId, body); + assertEquals("Application ID for create call not equal", applicationId, createCallResponse.getResult().getApplicationId()); + assertEquals("To phone number for create call not equal", to, createCallResponse.getResult().getTo()); + assertEquals("From phone number for create call not equal", from, createCallResponse.getResult().getFrom()); + + //get call state + String callId = createCallResponse.getResult().getCallId(); + ApiResponse callStateResponse = voiceController.getCall(accountId, callId); + assertEquals("Application ID for call state not equal", applicationId, callStateResponse.getResult().getApplicationId()); + assertEquals("To phone number for call state not equal", to, callStateResponse.getResult().getTo()); + assertEquals("From phone number for call state not equal", from, callStateResponse.getResult().getFrom()); + assertEquals("Call ID not equal", callId, callStateResponse.getResult().getCallId()); + } + @Test(expected = ApiErrorException.class) public void testCreateCallInvalidPhoneNumber() throws Exception { String accountId = System.getenv("BW_ACCOUNT_ID");