/* * 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.config.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartResourceEvaluationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* Returns a ResourceDetails object. *

*/ private ResourceDetails resourceDetails; /** *

* Returns an EvaluationContext object. *

*/ private EvaluationContext evaluationContext; /** *

* The mode of an evaluation. The valid values for this API are DETECTIVE and PROACTIVE. *

*/ private String evaluationMode; /** *

* The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. If you * specify 0, Config uses the default. *

*/ private Integer evaluationTimeout; /** *

* A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request * using one of these actions, specify a client token in the request. *

* *

* Avoid reusing the same client token for other API requests. If you retry a request that completed successfully * using the same client token and the same parameters, the retry succeeds without performing any further actions. * If you retry a successful request using the same client token, but one or more of the parameters are different, * other than the Region or Availability Zone, the retry fails with an IdempotentParameterMismatch error. *

*
*/ private String clientToken; /** *

* Returns a ResourceDetails object. *

* * @param resourceDetails * Returns a ResourceDetails object. */ public void setResourceDetails(ResourceDetails resourceDetails) { this.resourceDetails = resourceDetails; } /** *

* Returns a ResourceDetails object. *

* * @return Returns a ResourceDetails object. */ public ResourceDetails getResourceDetails() { return this.resourceDetails; } /** *

* Returns a ResourceDetails object. *

* * @param resourceDetails * Returns a ResourceDetails object. * @return Returns a reference to this object so that method calls can be chained together. */ public StartResourceEvaluationRequest withResourceDetails(ResourceDetails resourceDetails) { setResourceDetails(resourceDetails); return this; } /** *

* Returns an EvaluationContext object. *

* * @param evaluationContext * Returns an EvaluationContext object. */ public void setEvaluationContext(EvaluationContext evaluationContext) { this.evaluationContext = evaluationContext; } /** *

* Returns an EvaluationContext object. *

* * @return Returns an EvaluationContext object. */ public EvaluationContext getEvaluationContext() { return this.evaluationContext; } /** *

* Returns an EvaluationContext object. *

* * @param evaluationContext * Returns an EvaluationContext object. * @return Returns a reference to this object so that method calls can be chained together. */ public StartResourceEvaluationRequest withEvaluationContext(EvaluationContext evaluationContext) { setEvaluationContext(evaluationContext); return this; } /** *

* The mode of an evaluation. The valid values for this API are DETECTIVE and PROACTIVE. *

* * @param evaluationMode * The mode of an evaluation. The valid values for this API are DETECTIVE and * PROACTIVE. * @see EvaluationMode */ public void setEvaluationMode(String evaluationMode) { this.evaluationMode = evaluationMode; } /** *

* The mode of an evaluation. The valid values for this API are DETECTIVE and PROACTIVE. *

* * @return The mode of an evaluation. The valid values for this API are DETECTIVE and * PROACTIVE. * @see EvaluationMode */ public String getEvaluationMode() { return this.evaluationMode; } /** *

* The mode of an evaluation. The valid values for this API are DETECTIVE and PROACTIVE. *

* * @param evaluationMode * The mode of an evaluation. The valid values for this API are DETECTIVE and * PROACTIVE. * @return Returns a reference to this object so that method calls can be chained together. * @see EvaluationMode */ public StartResourceEvaluationRequest withEvaluationMode(String evaluationMode) { setEvaluationMode(evaluationMode); return this; } /** *

* The mode of an evaluation. The valid values for this API are DETECTIVE and PROACTIVE. *

* * @param evaluationMode * The mode of an evaluation. The valid values for this API are DETECTIVE and * PROACTIVE. * @return Returns a reference to this object so that method calls can be chained together. * @see EvaluationMode */ public StartResourceEvaluationRequest withEvaluationMode(EvaluationMode evaluationMode) { this.evaluationMode = evaluationMode.toString(); return this; } /** *

* The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. If you * specify 0, Config uses the default. *

* * @param evaluationTimeout * The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. * If you specify 0, Config uses the default. */ public void setEvaluationTimeout(Integer evaluationTimeout) { this.evaluationTimeout = evaluationTimeout; } /** *

* The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. If you * specify 0, Config uses the default. *

* * @return The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. * If you specify 0, Config uses the default. */ public Integer getEvaluationTimeout() { return this.evaluationTimeout; } /** *

* The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. If you * specify 0, Config uses the default. *

* * @param evaluationTimeout * The timeout for an evaluation. The default is 900 seconds. You cannot specify a number greater than 3600. * If you specify 0, Config uses the default. * @return Returns a reference to this object so that method calls can be chained together. */ public StartResourceEvaluationRequest withEvaluationTimeout(Integer evaluationTimeout) { setEvaluationTimeout(evaluationTimeout); return this; } /** *

* A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request * using one of these actions, specify a client token in the request. *

* *

* Avoid reusing the same client token for other API requests. If you retry a request that completed successfully * using the same client token and the same parameters, the retry succeeds without performing any further actions. * If you retry a successful request using the same client token, but one or more of the parameters are different, * other than the Region or Availability Zone, the retry fails with an IdempotentParameterMismatch error. *

*
* * @param clientToken * A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API * request using one of these actions, specify a client token in the request.

*

* Avoid reusing the same client token for other API requests. If you retry a request that completed * successfully using the same client token and the same parameters, the retry succeeds without performing * any further actions. If you retry a successful request using the same client token, but one or more of the * parameters are different, other than the Region or Availability Zone, the retry fails with an * IdempotentParameterMismatch error. *

*/ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request * using one of these actions, specify a client token in the request. *

* *

* Avoid reusing the same client token for other API requests. If you retry a request that completed successfully * using the same client token and the same parameters, the retry succeeds without performing any further actions. * If you retry a successful request using the same client token, but one or more of the parameters are different, * other than the Region or Availability Zone, the retry fails with an IdempotentParameterMismatch error. *

*
* * @return A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API * request using one of these actions, specify a client token in the request.

*

* Avoid reusing the same client token for other API requests. If you retry a request that completed * successfully using the same client token and the same parameters, the retry succeeds without performing * any further actions. If you retry a successful request using the same client token, but one or more of * the parameters are different, other than the Region or Availability Zone, the retry fails with an * IdempotentParameterMismatch error. *

*/ public String getClientToken() { return this.clientToken; } /** *

* A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API request * using one of these actions, specify a client token in the request. *

* *

* Avoid reusing the same client token for other API requests. If you retry a request that completed successfully * using the same client token and the same parameters, the retry succeeds without performing any further actions. * If you retry a successful request using the same client token, but one or more of the parameters are different, * other than the Region or Availability Zone, the retry fails with an IdempotentParameterMismatch error. *

*
* * @param clientToken * A client token is a unique, case-sensitive string of up to 64 ASCII characters. To make an idempotent API * request using one of these actions, specify a client token in the request.

*

* Avoid reusing the same client token for other API requests. If you retry a request that completed * successfully using the same client token and the same parameters, the retry succeeds without performing * any further actions. If you retry a successful request using the same client token, but one or more of the * parameters are different, other than the Region or Availability Zone, the retry fails with an * IdempotentParameterMismatch error. *

* @return Returns a reference to this object so that method calls can be chained together. */ public StartResourceEvaluationRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getResourceDetails() != null) sb.append("ResourceDetails: ").append(getResourceDetails()).append(","); if (getEvaluationContext() != null) sb.append("EvaluationContext: ").append(getEvaluationContext()).append(","); if (getEvaluationMode() != null) sb.append("EvaluationMode: ").append(getEvaluationMode()).append(","); if (getEvaluationTimeout() != null) sb.append("EvaluationTimeout: ").append(getEvaluationTimeout()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartResourceEvaluationRequest == false) return false; StartResourceEvaluationRequest other = (StartResourceEvaluationRequest) obj; if (other.getResourceDetails() == null ^ this.getResourceDetails() == null) return false; if (other.getResourceDetails() != null && other.getResourceDetails().equals(this.getResourceDetails()) == false) return false; if (other.getEvaluationContext() == null ^ this.getEvaluationContext() == null) return false; if (other.getEvaluationContext() != null && other.getEvaluationContext().equals(this.getEvaluationContext()) == false) return false; if (other.getEvaluationMode() == null ^ this.getEvaluationMode() == null) return false; if (other.getEvaluationMode() != null && other.getEvaluationMode().equals(this.getEvaluationMode()) == false) return false; if (other.getEvaluationTimeout() == null ^ this.getEvaluationTimeout() == null) return false; if (other.getEvaluationTimeout() != null && other.getEvaluationTimeout().equals(this.getEvaluationTimeout()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceDetails() == null) ? 0 : getResourceDetails().hashCode()); hashCode = prime * hashCode + ((getEvaluationContext() == null) ? 0 : getEvaluationContext().hashCode()); hashCode = prime * hashCode + ((getEvaluationMode() == null) ? 0 : getEvaluationMode().hashCode()); hashCode = prime * hashCode + ((getEvaluationTimeout() == null) ? 0 : getEvaluationTimeout().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); return hashCode; } @Override public StartResourceEvaluationRequest clone() { return (StartResourceEvaluationRequest) super.clone(); } }