/* * 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.dlm.model; import javax.annotation.Generated; /** *

* Bad request. The request is missing required parameters or has invalid parameters. *

*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InvalidRequestException extends com.amazonaws.services.dlm.model.AmazonDLMException { private static final long serialVersionUID = 1L; private String code; /** *

* The request omitted one or more required parameters. *

*/ private java.util.List requiredParameters; /** *

* The request included parameters that cannot be provided together. *

*/ private java.util.List mutuallyExclusiveParameters; /** * Constructs a new InvalidRequestException with the specified error message. * * @param message * Describes the error encountered. */ public InvalidRequestException(String message) { super(message); } /** * @param code */ @com.fasterxml.jackson.annotation.JsonProperty("Code") public void setCode(String code) { this.code = code; } /** * @return */ @com.fasterxml.jackson.annotation.JsonProperty("Code") public String getCode() { return this.code; } /** * @param code * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidRequestException withCode(String code) { setCode(code); return this; } /** *

* The request omitted one or more required parameters. *

* * @return The request omitted one or more required parameters. */ @com.fasterxml.jackson.annotation.JsonProperty("RequiredParameters") public java.util.List getRequiredParameters() { return requiredParameters; } /** *

* The request omitted one or more required parameters. *

* * @param requiredParameters * The request omitted one or more required parameters. */ @com.fasterxml.jackson.annotation.JsonProperty("RequiredParameters") public void setRequiredParameters(java.util.Collection requiredParameters) { if (requiredParameters == null) { this.requiredParameters = null; return; } this.requiredParameters = new java.util.ArrayList(requiredParameters); } /** *

* The request omitted one or more required parameters. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRequiredParameters(java.util.Collection)} or {@link #withRequiredParameters(java.util.Collection)} if * you want to override the existing values. *

* * @param requiredParameters * The request omitted one or more required parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidRequestException withRequiredParameters(String... requiredParameters) { if (this.requiredParameters == null) { setRequiredParameters(new java.util.ArrayList(requiredParameters.length)); } for (String ele : requiredParameters) { this.requiredParameters.add(ele); } return this; } /** *

* The request omitted one or more required parameters. *

* * @param requiredParameters * The request omitted one or more required parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidRequestException withRequiredParameters(java.util.Collection requiredParameters) { setRequiredParameters(requiredParameters); return this; } /** *

* The request included parameters that cannot be provided together. *

* * @return The request included parameters that cannot be provided together. */ @com.fasterxml.jackson.annotation.JsonProperty("MutuallyExclusiveParameters") public java.util.List getMutuallyExclusiveParameters() { return mutuallyExclusiveParameters; } /** *

* The request included parameters that cannot be provided together. *

* * @param mutuallyExclusiveParameters * The request included parameters that cannot be provided together. */ @com.fasterxml.jackson.annotation.JsonProperty("MutuallyExclusiveParameters") public void setMutuallyExclusiveParameters(java.util.Collection mutuallyExclusiveParameters) { if (mutuallyExclusiveParameters == null) { this.mutuallyExclusiveParameters = null; return; } this.mutuallyExclusiveParameters = new java.util.ArrayList(mutuallyExclusiveParameters); } /** *

* The request included parameters that cannot be provided together. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMutuallyExclusiveParameters(java.util.Collection)} or * {@link #withMutuallyExclusiveParameters(java.util.Collection)} if you want to override the existing values. *

* * @param mutuallyExclusiveParameters * The request included parameters that cannot be provided together. * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidRequestException withMutuallyExclusiveParameters(String... mutuallyExclusiveParameters) { if (this.mutuallyExclusiveParameters == null) { setMutuallyExclusiveParameters(new java.util.ArrayList(mutuallyExclusiveParameters.length)); } for (String ele : mutuallyExclusiveParameters) { this.mutuallyExclusiveParameters.add(ele); } return this; } /** *

* The request included parameters that cannot be provided together. *

* * @param mutuallyExclusiveParameters * The request included parameters that cannot be provided together. * @return Returns a reference to this object so that method calls can be chained together. */ public InvalidRequestException withMutuallyExclusiveParameters(java.util.Collection mutuallyExclusiveParameters) { setMutuallyExclusiveParameters(mutuallyExclusiveParameters); return this; } }