
com.amazonaws.services.config.model.Evaluation Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Identifies an Amazon Web Services resource and indicates whether it complies with the Config rule that it was
* evaluated against.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Evaluation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The type of Amazon Web Services resource that was evaluated.
*
*/
private String complianceResourceType;
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*/
private String complianceResourceId;
/**
*
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated against.
*
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for ComplianceType
* from a PutEvaluations
request. For example, an Lambda function for a custom Config rule cannot pass
* an INSUFFICIENT_DATA
value to Config.
*
*/
private String complianceType;
/**
*
* Supplementary information about how the evaluation determined the compliance.
*
*/
private String annotation;
/**
*
* The time of the event in Config that triggered the evaluation. For event-based evaluations, the time indicates
* when Config created the configuration item that triggered the evaluation. For periodic evaluations, the time
* indicates when Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).
*
*/
private java.util.Date orderingTimestamp;
/**
*
* The type of Amazon Web Services resource that was evaluated.
*
*
* @param complianceResourceType
* The type of Amazon Web Services resource that was evaluated.
*/
public void setComplianceResourceType(String complianceResourceType) {
this.complianceResourceType = complianceResourceType;
}
/**
*
* The type of Amazon Web Services resource that was evaluated.
*
*
* @return The type of Amazon Web Services resource that was evaluated.
*/
public String getComplianceResourceType() {
return this.complianceResourceType;
}
/**
*
* The type of Amazon Web Services resource that was evaluated.
*
*
* @param complianceResourceType
* The type of Amazon Web Services resource that was evaluated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Evaluation withComplianceResourceType(String complianceResourceType) {
setComplianceResourceType(complianceResourceType);
return this;
}
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*
* @param complianceResourceId
* The ID of the Amazon Web Services resource that was evaluated.
*/
public void setComplianceResourceId(String complianceResourceId) {
this.complianceResourceId = complianceResourceId;
}
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*
* @return The ID of the Amazon Web Services resource that was evaluated.
*/
public String getComplianceResourceId() {
return this.complianceResourceId;
}
/**
*
* The ID of the Amazon Web Services resource that was evaluated.
*
*
* @param complianceResourceId
* The ID of the Amazon Web Services resource that was evaluated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Evaluation withComplianceResourceId(String complianceResourceId) {
setComplianceResourceId(complianceResourceId);
return this;
}
/**
*
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated against.
*
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for ComplianceType
* from a PutEvaluations
request. For example, an Lambda function for a custom Config rule cannot pass
* an INSUFFICIENT_DATA
value to Config.
*
*
* @param complianceType
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated
* against.
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for
* ComplianceType
from a PutEvaluations
request. For example, an Lambda function
* for a custom Config rule cannot pass an INSUFFICIENT_DATA
value to Config.
* @see ComplianceType
*/
public void setComplianceType(String complianceType) {
this.complianceType = complianceType;
}
/**
*
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated against.
*
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for ComplianceType
* from a PutEvaluations
request. For example, an Lambda function for a custom Config rule cannot pass
* an INSUFFICIENT_DATA
value to Config.
*
*
* @return Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated
* against.
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for
* ComplianceType
from a PutEvaluations
request. For example, an Lambda function
* for a custom Config rule cannot pass an INSUFFICIENT_DATA
value to Config.
* @see ComplianceType
*/
public String getComplianceType() {
return this.complianceType;
}
/**
*
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated against.
*
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for ComplianceType
* from a PutEvaluations
request. For example, an Lambda function for a custom Config rule cannot pass
* an INSUFFICIENT_DATA
value to Config.
*
*
* @param complianceType
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated
* against.
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for
* ComplianceType
from a PutEvaluations
request. For example, an Lambda function
* for a custom Config rule cannot pass an INSUFFICIENT_DATA
value to Config.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ComplianceType
*/
public Evaluation withComplianceType(String complianceType) {
setComplianceType(complianceType);
return this;
}
/**
*
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated against.
*
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for ComplianceType
* from a PutEvaluations
request. For example, an Lambda function for a custom Config rule cannot pass
* an INSUFFICIENT_DATA
value to Config.
*
*
* @param complianceType
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated
* against.
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for
* ComplianceType
from a PutEvaluations
request. For example, an Lambda function
* for a custom Config rule cannot pass an INSUFFICIENT_DATA
value to Config.
* @see ComplianceType
*/
public void setComplianceType(ComplianceType complianceType) {
withComplianceType(complianceType);
}
/**
*
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated against.
*
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for ComplianceType
* from a PutEvaluations
request. For example, an Lambda function for a custom Config rule cannot pass
* an INSUFFICIENT_DATA
value to Config.
*
*
* @param complianceType
* Indicates whether the Amazon Web Services resource complies with the Config rule that it was evaluated
* against.
*
* For the Evaluation
data type, Config supports only the COMPLIANT
,
* NON_COMPLIANT
, and NOT_APPLICABLE
values. Config does not support the
* INSUFFICIENT_DATA
value for this data type.
*
*
* Similarly, Config does not accept INSUFFICIENT_DATA
as the value for
* ComplianceType
from a PutEvaluations
request. For example, an Lambda function
* for a custom Config rule cannot pass an INSUFFICIENT_DATA
value to Config.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ComplianceType
*/
public Evaluation withComplianceType(ComplianceType complianceType) {
this.complianceType = complianceType.toString();
return this;
}
/**
*
* Supplementary information about how the evaluation determined the compliance.
*
*
* @param annotation
* Supplementary information about how the evaluation determined the compliance.
*/
public void setAnnotation(String annotation) {
this.annotation = annotation;
}
/**
*
* Supplementary information about how the evaluation determined the compliance.
*
*
* @return Supplementary information about how the evaluation determined the compliance.
*/
public String getAnnotation() {
return this.annotation;
}
/**
*
* Supplementary information about how the evaluation determined the compliance.
*
*
* @param annotation
* Supplementary information about how the evaluation determined the compliance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Evaluation withAnnotation(String annotation) {
setAnnotation(annotation);
return this;
}
/**
*
* The time of the event in Config that triggered the evaluation. For event-based evaluations, the time indicates
* when Config created the configuration item that triggered the evaluation. For periodic evaluations, the time
* indicates when Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).
*
*
* @param orderingTimestamp
* The time of the event in Config that triggered the evaluation. For event-based evaluations, the time
* indicates when Config created the configuration item that triggered the evaluation. For periodic
* evaluations, the time indicates when Config triggered the evaluation at the frequency that you specified
* (for example, every 24 hours).
*/
public void setOrderingTimestamp(java.util.Date orderingTimestamp) {
this.orderingTimestamp = orderingTimestamp;
}
/**
*
* The time of the event in Config that triggered the evaluation. For event-based evaluations, the time indicates
* when Config created the configuration item that triggered the evaluation. For periodic evaluations, the time
* indicates when Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).
*
*
* @return The time of the event in Config that triggered the evaluation. For event-based evaluations, the time
* indicates when Config created the configuration item that triggered the evaluation. For periodic
* evaluations, the time indicates when Config triggered the evaluation at the frequency that you specified
* (for example, every 24 hours).
*/
public java.util.Date getOrderingTimestamp() {
return this.orderingTimestamp;
}
/**
*
* The time of the event in Config that triggered the evaluation. For event-based evaluations, the time indicates
* when Config created the configuration item that triggered the evaluation. For periodic evaluations, the time
* indicates when Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).
*
*
* @param orderingTimestamp
* The time of the event in Config that triggered the evaluation. For event-based evaluations, the time
* indicates when Config created the configuration item that triggered the evaluation. For periodic
* evaluations, the time indicates when Config triggered the evaluation at the frequency that you specified
* (for example, every 24 hours).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Evaluation withOrderingTimestamp(java.util.Date orderingTimestamp) {
setOrderingTimestamp(orderingTimestamp);
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 (getComplianceResourceType() != null)
sb.append("ComplianceResourceType: ").append(getComplianceResourceType()).append(",");
if (getComplianceResourceId() != null)
sb.append("ComplianceResourceId: ").append(getComplianceResourceId()).append(",");
if (getComplianceType() != null)
sb.append("ComplianceType: ").append(getComplianceType()).append(",");
if (getAnnotation() != null)
sb.append("Annotation: ").append(getAnnotation()).append(",");
if (getOrderingTimestamp() != null)
sb.append("OrderingTimestamp: ").append(getOrderingTimestamp());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Evaluation == false)
return false;
Evaluation other = (Evaluation) obj;
if (other.getComplianceResourceType() == null ^ this.getComplianceResourceType() == null)
return false;
if (other.getComplianceResourceType() != null && other.getComplianceResourceType().equals(this.getComplianceResourceType()) == false)
return false;
if (other.getComplianceResourceId() == null ^ this.getComplianceResourceId() == null)
return false;
if (other.getComplianceResourceId() != null && other.getComplianceResourceId().equals(this.getComplianceResourceId()) == false)
return false;
if (other.getComplianceType() == null ^ this.getComplianceType() == null)
return false;
if (other.getComplianceType() != null && other.getComplianceType().equals(this.getComplianceType()) == false)
return false;
if (other.getAnnotation() == null ^ this.getAnnotation() == null)
return false;
if (other.getAnnotation() != null && other.getAnnotation().equals(this.getAnnotation()) == false)
return false;
if (other.getOrderingTimestamp() == null ^ this.getOrderingTimestamp() == null)
return false;
if (other.getOrderingTimestamp() != null && other.getOrderingTimestamp().equals(this.getOrderingTimestamp()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getComplianceResourceType() == null) ? 0 : getComplianceResourceType().hashCode());
hashCode = prime * hashCode + ((getComplianceResourceId() == null) ? 0 : getComplianceResourceId().hashCode());
hashCode = prime * hashCode + ((getComplianceType() == null) ? 0 : getComplianceType().hashCode());
hashCode = prime * hashCode + ((getAnnotation() == null) ? 0 : getAnnotation().hashCode());
hashCode = prime * hashCode + ((getOrderingTimestamp() == null) ? 0 : getOrderingTimestamp().hashCode());
return hashCode;
}
@Override
public Evaluation clone() {
try {
return (Evaluation) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.config.model.transform.EvaluationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}