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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-
- This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/bandwidth/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -85,7 +85,7 @@ public ApiResponse<List<Media>> 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.
Expand Down Expand Up @@ -157,7 +157,8 @@ private ApiResponse<List<Media>> 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason all of these have been moved to a newline? My Java experience is super limited so I might be missing something but it seems pointless.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#justApiMaticThings

I didnt write any of that its all autogenerated

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poggers, we love apimatic

}
if (responseCode == 403) {
throw new MessagingException("403 The user does not have access to this API", context);
Expand All @@ -166,7 +167,8 @@ private ApiResponse<List<Media>> 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);
Expand All @@ -182,7 +184,7 @@ private ApiResponse<List<Media>> 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
Expand All @@ -202,7 +204,7 @@ public ApiResponse<InputStream> 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
Expand Down Expand Up @@ -273,7 +275,8 @@ private ApiResponse<InputStream> 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);
Expand All @@ -282,7 +285,8 @@ private ApiResponse<InputStream> 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);
Expand All @@ -296,7 +300,8 @@ private ApiResponse<InputStream> 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:
Expand All @@ -323,7 +328,8 @@ public ApiResponse<Void> 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:
Expand Down Expand Up @@ -408,7 +414,8 @@ private ApiResponse<Void> 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);
Expand All @@ -417,7 +424,8 @@ private ApiResponse<Void> 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);
Expand All @@ -429,7 +437,9 @@ private ApiResponse<Void> 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.
Expand All @@ -448,7 +458,9 @@ public ApiResponse<Void> 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
Expand Down Expand Up @@ -519,7 +531,8 @@ private ApiResponse<Void> 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);
Expand All @@ -528,7 +541,8 @@ private ApiResponse<Void> 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);
Expand All @@ -540,7 +554,7 @@ private ApiResponse<Void> 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
Expand Down Expand Up @@ -584,7 +598,7 @@ public ApiResponse<BandwidthMessagesList> 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
Expand Down Expand Up @@ -700,7 +714,8 @@ private ApiResponse<BandwidthMessagesList> 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);
Expand All @@ -709,7 +724,8 @@ private ApiResponse<BandwidthMessagesList> 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);
Expand All @@ -726,7 +742,7 @@ private ApiResponse<BandwidthMessagesList> 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
Expand All @@ -746,7 +762,7 @@ public ApiResponse<BandwidthMessage> 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
Expand Down Expand Up @@ -818,7 +834,8 @@ private ApiResponse<BandwidthMessage> 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);
Expand All @@ -827,7 +844,8 @@ private ApiResponse<BandwidthMessage> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -262,7 +264,9 @@ public List<String> 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")
Expand Down
Loading