
com.wedeploy.api.sdk.Error400 Maven / Gradle / Ivy
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of Liferay, Inc. nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package com.wedeploy.api.sdk;
/**
* Error 400 errors.
*/
public class Error400 extends ErrorBase> {
public Error400(ErrorData errorData, String message) {
super(errorData, 400, message, "Bad Request");
}
public Error400 badContent() {
return badContent(null);
}
public Error400 badContent(String message) {
return error(
"badContent", message,
"The content type of the request data or the content type of a" +
" part of a multipart request is not supported."
);
}
public Error400 badRequest() {
return badRequest(null);
}
public Error400 badRequest(String message) {
return error(
"badRequest", message,
"The API request is invalid or improperly formed.");
}
public Error400 exists() {
return exists(null);
}
public Error400 exists(String message) {
return error("exists", message, "Resource already exists.");
}
public Error400 invalidDocumentValue() {
return invalidDocumentValue(null);
}
public Error400 invalidDocumentValue(String message) {
return error("invalidDocumentValue", message,
"The request failed because it contained an invalid parameter or" +
" parameter value for the document. Review the API" +
" documentation to determine which parameters are valid for" +
" your request."
);
}
public Error400 invalidQuery() {
return invalidQuery(null);
}
public Error400 invalidQuery(String message) {
return error(
"invalidQuery", message,
"The request is invalid. Check the API documentation to determine" +
" what parameters are supported for the request and to see if" +
" the request contains an invalid combination of parameters" +
" or an invalid parameter value."
);
}
public Error400 keyExpired() {
return keyExpired(null);
}
public Error400 keyExpired(String message) {
return error(
"keyExpired", message,
"The API key provided in the request expired, which means the API" +
"server is unable to make the request."
);
}
public Error400 keyInvalid() {
return keyInvalid(null);
}
public Error400 keyInvalid(String message) {
return error(
"keyInvalid", message,
"The API key provided in the request is invalid, which means the" +
" API server is unable to make the request."
);
}
public Error400 parseError() {
return parseError(null);
}
public Error400 parseError(String message) {
return error(
"parseError", message,
"The API server cannot parse the request body.");
}
public Error400 required() {
return required(null);
}
public Error400 required(String message) {
return error(
"required", message,
"The API request is missing required information. The required" +
" information could be a parameter or resource property."
);
}
public Error400 validationError() {
return validationError(null);
}
public Error400 validationError(String message) {
return error(
"validationError", message,
"Validation of input failed.");
}
}