com.amazonaws.services.cloudformation.model.DescribeStackResourceDriftsResult Maven / Gradle / Ivy
/*
* Copyright 2017-2022 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.cloudformation.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeStackResourceDriftsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Drift information for the resources that have been checked for drift in the specified stack. This includes actual
* and expected configuration values for resources where CloudFormation detects drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do not
* currently support drift detection aren't checked, and so not included. For a list of resources that support drift
* detection, see Resources that Support Drift Detection.
*
*/
private com.amazonaws.internal.SdkInternalList stackResourceDrifts;
/**
*
* If the request doesn't return all the remaining results, NextToken
is set to a token. To retrieve
* the next set of results, call DescribeStackResourceDrifts
again and assign that token to the request
* object's NextToken
parameter. If the request returns all results, NextToken
is set to
* null
.
*
*/
private String nextToken;
/**
*
* Drift information for the resources that have been checked for drift in the specified stack. This includes actual
* and expected configuration values for resources where CloudFormation detects drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do not
* currently support drift detection aren't checked, and so not included. For a list of resources that support drift
* detection, see Resources that Support Drift Detection.
*
*
* @return Drift information for the resources that have been checked for drift in the specified stack. This
* includes actual and expected configuration values for resources where CloudFormation detects drift.
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has
* been checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that
* do not currently support drift detection aren't checked, and so not included. For a list of resources
* that support drift detection, see Resources that Support Drift Detection.
*/
public java.util.List getStackResourceDrifts() {
if (stackResourceDrifts == null) {
stackResourceDrifts = new com.amazonaws.internal.SdkInternalList();
}
return stackResourceDrifts;
}
/**
*
* Drift information for the resources that have been checked for drift in the specified stack. This includes actual
* and expected configuration values for resources where CloudFormation detects drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do not
* currently support drift detection aren't checked, and so not included. For a list of resources that support drift
* detection, see Resources that Support Drift Detection.
*
*
* @param stackResourceDrifts
* Drift information for the resources that have been checked for drift in the specified stack. This includes
* actual and expected configuration values for resources where CloudFormation detects drift.
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do
* not currently support drift detection aren't checked, and so not included. For a list of resources that
* support drift detection, see Resources that Support Drift Detection.
*/
public void setStackResourceDrifts(java.util.Collection stackResourceDrifts) {
if (stackResourceDrifts == null) {
this.stackResourceDrifts = null;
return;
}
this.stackResourceDrifts = new com.amazonaws.internal.SdkInternalList(stackResourceDrifts);
}
/**
*
* Drift information for the resources that have been checked for drift in the specified stack. This includes actual
* and expected configuration values for resources where CloudFormation detects drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do not
* currently support drift detection aren't checked, and so not included. For a list of resources that support drift
* detection, see Resources that Support Drift Detection.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setStackResourceDrifts(java.util.Collection)} or {@link #withStackResourceDrifts(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param stackResourceDrifts
* Drift information for the resources that have been checked for drift in the specified stack. This includes
* actual and expected configuration values for resources where CloudFormation detects drift.
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do
* not currently support drift detection aren't checked, and so not included. For a list of resources that
* support drift detection, see Resources that Support Drift Detection.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStackResourceDriftsResult withStackResourceDrifts(StackResourceDrift... stackResourceDrifts) {
if (this.stackResourceDrifts == null) {
setStackResourceDrifts(new com.amazonaws.internal.SdkInternalList(stackResourceDrifts.length));
}
for (StackResourceDrift ele : stackResourceDrifts) {
this.stackResourceDrifts.add(ele);
}
return this;
}
/**
*
* Drift information for the resources that have been checked for drift in the specified stack. This includes actual
* and expected configuration values for resources where CloudFormation detects drift.
*
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do not
* currently support drift detection aren't checked, and so not included. For a list of resources that support drift
* detection, see Resources that Support Drift Detection.
*
*
* @param stackResourceDrifts
* Drift information for the resources that have been checked for drift in the specified stack. This includes
* actual and expected configuration values for resources where CloudFormation detects drift.
*
* For a given stack, there will be one StackResourceDrift
for each stack resource that has been
* checked for drift. Resources that haven't yet been checked for drift aren't included. Resources that do
* not currently support drift detection aren't checked, and so not included. For a list of resources that
* support drift detection, see Resources that Support Drift Detection.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStackResourceDriftsResult withStackResourceDrifts(java.util.Collection stackResourceDrifts) {
setStackResourceDrifts(stackResourceDrifts);
return this;
}
/**
*
* If the request doesn't return all the remaining results, NextToken
is set to a token. To retrieve
* the next set of results, call DescribeStackResourceDrifts
again and assign that token to the request
* object's NextToken
parameter. If the request returns all results, NextToken
is set to
* null
.
*
*
* @param nextToken
* If the request doesn't return all the remaining results, NextToken
is set to a token. To
* retrieve the next set of results, call DescribeStackResourceDrifts
again and assign that
* token to the request object's NextToken
parameter. If the request returns all results,
* NextToken
is set to null
.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* If the request doesn't return all the remaining results, NextToken
is set to a token. To retrieve
* the next set of results, call DescribeStackResourceDrifts
again and assign that token to the request
* object's NextToken
parameter. If the request returns all results, NextToken
is set to
* null
.
*
*
* @return If the request doesn't return all the remaining results, NextToken
is set to a token. To
* retrieve the next set of results, call DescribeStackResourceDrifts
again and assign that
* token to the request object's NextToken
parameter. If the request returns all results,
* NextToken
is set to null
.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* If the request doesn't return all the remaining results, NextToken
is set to a token. To retrieve
* the next set of results, call DescribeStackResourceDrifts
again and assign that token to the request
* object's NextToken
parameter. If the request returns all results, NextToken
is set to
* null
.
*
*
* @param nextToken
* If the request doesn't return all the remaining results, NextToken
is set to a token. To
* retrieve the next set of results, call DescribeStackResourceDrifts
again and assign that
* token to the request object's NextToken
parameter. If the request returns all results,
* NextToken
is set to null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeStackResourceDriftsResult withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getStackResourceDrifts() != null)
sb.append("StackResourceDrifts: ").append(getStackResourceDrifts()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeStackResourceDriftsResult == false)
return false;
DescribeStackResourceDriftsResult other = (DescribeStackResourceDriftsResult) obj;
if (other.getStackResourceDrifts() == null ^ this.getStackResourceDrifts() == null)
return false;
if (other.getStackResourceDrifts() != null && other.getStackResourceDrifts().equals(this.getStackResourceDrifts()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStackResourceDrifts() == null) ? 0 : getStackResourceDrifts().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public DescribeStackResourceDriftsResult clone() {
try {
return (DescribeStackResourceDriftsResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}