/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.appconfigdata.model; import javax.annotation.Generated; /** *
* The input fails to satisfy the constraints specified by the service. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BadRequestException extends com.amazonaws.services.appconfigdata.model.AWSAppConfigDataException { private static final long serialVersionUID = 1L; /** ** Code indicating the reason the request was invalid. *
*/ private String reason; /** ** Details describing why the request was invalid. *
*/ private BadRequestDetails details; /** * Constructs a new BadRequestException with the specified error message. * * @param message * Describes the error encountered. */ public BadRequestException(String message) { super(message); } /** ** Code indicating the reason the request was invalid. *
* * @param reason * Code indicating the reason the request was invalid. * @see BadRequestReason */ @com.fasterxml.jackson.annotation.JsonProperty("Reason") public void setReason(String reason) { this.reason = reason; } /** ** Code indicating the reason the request was invalid. *
* * @return Code indicating the reason the request was invalid. * @see BadRequestReason */ @com.fasterxml.jackson.annotation.JsonProperty("Reason") public String getReason() { return this.reason; } /** ** Code indicating the reason the request was invalid. *
* * @param reason * Code indicating the reason the request was invalid. * @return Returns a reference to this object so that method calls can be chained together. * @see BadRequestReason */ public BadRequestException withReason(String reason) { setReason(reason); return this; } /** ** Code indicating the reason the request was invalid. *
* * @param reason * Code indicating the reason the request was invalid. * @return Returns a reference to this object so that method calls can be chained together. * @see BadRequestReason */ public BadRequestException withReason(BadRequestReason reason) { this.reason = reason.toString(); return this; } /** ** Details describing why the request was invalid. *
* * @param details * Details describing why the request was invalid. */ @com.fasterxml.jackson.annotation.JsonProperty("Details") public void setDetails(BadRequestDetails details) { this.details = details; } /** ** Details describing why the request was invalid. *
* * @return Details describing why the request was invalid. */ @com.fasterxml.jackson.annotation.JsonProperty("Details") public BadRequestDetails getDetails() { return this.details; } /** ** Details describing why the request was invalid. *
* * @param details * Details describing why the request was invalid. * @return Returns a reference to this object so that method calls can be chained together. */ public BadRequestException withDetails(BadRequestDetails details) { setDetails(details); return this; } }