
com.amazonaws.services.config.model.ConfigurationAggregator 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;
/**
*
* The details about the configuration aggregator, including information about source accounts, regions, and metadata of
* the aggregator.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConfigurationAggregator implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the aggregator.
*
*/
private String configurationAggregatorName;
/**
*
* The Amazon Resource Name (ARN) of the aggregator.
*
*/
private String configurationAggregatorArn;
/**
*
* Provides a list of source accounts and regions to be aggregated.
*
*/
private com.amazonaws.internal.SdkInternalList accountAggregationSources;
/**
*
* Provides an organization and list of regions to be aggregated.
*
*/
private OrganizationAggregationSource organizationAggregationSource;
/**
*
* The time stamp when the configuration aggregator was created.
*
*/
private java.util.Date creationTime;
/**
*
* The time of the last update.
*
*/
private java.util.Date lastUpdatedTime;
/**
*
* Amazon Web Services service that created the configuration aggregator.
*
*/
private String createdBy;
/**
*
* The name of the aggregator.
*
*
* @param configurationAggregatorName
* The name of the aggregator.
*/
public void setConfigurationAggregatorName(String configurationAggregatorName) {
this.configurationAggregatorName = configurationAggregatorName;
}
/**
*
* The name of the aggregator.
*
*
* @return The name of the aggregator.
*/
public String getConfigurationAggregatorName() {
return this.configurationAggregatorName;
}
/**
*
* The name of the aggregator.
*
*
* @param configurationAggregatorName
* The name of the aggregator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withConfigurationAggregatorName(String configurationAggregatorName) {
setConfigurationAggregatorName(configurationAggregatorName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the aggregator.
*
*
* @param configurationAggregatorArn
* The Amazon Resource Name (ARN) of the aggregator.
*/
public void setConfigurationAggregatorArn(String configurationAggregatorArn) {
this.configurationAggregatorArn = configurationAggregatorArn;
}
/**
*
* The Amazon Resource Name (ARN) of the aggregator.
*
*
* @return The Amazon Resource Name (ARN) of the aggregator.
*/
public String getConfigurationAggregatorArn() {
return this.configurationAggregatorArn;
}
/**
*
* The Amazon Resource Name (ARN) of the aggregator.
*
*
* @param configurationAggregatorArn
* The Amazon Resource Name (ARN) of the aggregator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withConfigurationAggregatorArn(String configurationAggregatorArn) {
setConfigurationAggregatorArn(configurationAggregatorArn);
return this;
}
/**
*
* Provides a list of source accounts and regions to be aggregated.
*
*
* @return Provides a list of source accounts and regions to be aggregated.
*/
public java.util.List getAccountAggregationSources() {
if (accountAggregationSources == null) {
accountAggregationSources = new com.amazonaws.internal.SdkInternalList();
}
return accountAggregationSources;
}
/**
*
* Provides a list of source accounts and regions to be aggregated.
*
*
* @param accountAggregationSources
* Provides a list of source accounts and regions to be aggregated.
*/
public void setAccountAggregationSources(java.util.Collection accountAggregationSources) {
if (accountAggregationSources == null) {
this.accountAggregationSources = null;
return;
}
this.accountAggregationSources = new com.amazonaws.internal.SdkInternalList(accountAggregationSources);
}
/**
*
* Provides a list of source accounts and regions to be aggregated.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAccountAggregationSources(java.util.Collection)} or
* {@link #withAccountAggregationSources(java.util.Collection)} if you want to override the existing values.
*
*
* @param accountAggregationSources
* Provides a list of source accounts and regions to be aggregated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withAccountAggregationSources(AccountAggregationSource... accountAggregationSources) {
if (this.accountAggregationSources == null) {
setAccountAggregationSources(new com.amazonaws.internal.SdkInternalList(accountAggregationSources.length));
}
for (AccountAggregationSource ele : accountAggregationSources) {
this.accountAggregationSources.add(ele);
}
return this;
}
/**
*
* Provides a list of source accounts and regions to be aggregated.
*
*
* @param accountAggregationSources
* Provides a list of source accounts and regions to be aggregated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withAccountAggregationSources(java.util.Collection accountAggregationSources) {
setAccountAggregationSources(accountAggregationSources);
return this;
}
/**
*
* Provides an organization and list of regions to be aggregated.
*
*
* @param organizationAggregationSource
* Provides an organization and list of regions to be aggregated.
*/
public void setOrganizationAggregationSource(OrganizationAggregationSource organizationAggregationSource) {
this.organizationAggregationSource = organizationAggregationSource;
}
/**
*
* Provides an organization and list of regions to be aggregated.
*
*
* @return Provides an organization and list of regions to be aggregated.
*/
public OrganizationAggregationSource getOrganizationAggregationSource() {
return this.organizationAggregationSource;
}
/**
*
* Provides an organization and list of regions to be aggregated.
*
*
* @param organizationAggregationSource
* Provides an organization and list of regions to be aggregated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withOrganizationAggregationSource(OrganizationAggregationSource organizationAggregationSource) {
setOrganizationAggregationSource(organizationAggregationSource);
return this;
}
/**
*
* The time stamp when the configuration aggregator was created.
*
*
* @param creationTime
* The time stamp when the configuration aggregator was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time stamp when the configuration aggregator was created.
*
*
* @return The time stamp when the configuration aggregator was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time stamp when the configuration aggregator was created.
*
*
* @param creationTime
* The time stamp when the configuration aggregator was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The time of the last update.
*
*
* @param lastUpdatedTime
* The time of the last update.
*/
public void setLastUpdatedTime(java.util.Date lastUpdatedTime) {
this.lastUpdatedTime = lastUpdatedTime;
}
/**
*
* The time of the last update.
*
*
* @return The time of the last update.
*/
public java.util.Date getLastUpdatedTime() {
return this.lastUpdatedTime;
}
/**
*
* The time of the last update.
*
*
* @param lastUpdatedTime
* The time of the last update.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withLastUpdatedTime(java.util.Date lastUpdatedTime) {
setLastUpdatedTime(lastUpdatedTime);
return this;
}
/**
*
* Amazon Web Services service that created the configuration aggregator.
*
*
* @param createdBy
* Amazon Web Services service that created the configuration aggregator.
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
*
* Amazon Web Services service that created the configuration aggregator.
*
*
* @return Amazon Web Services service that created the configuration aggregator.
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
*
* Amazon Web Services service that created the configuration aggregator.
*
*
* @param createdBy
* Amazon Web Services service that created the configuration aggregator.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConfigurationAggregator withCreatedBy(String createdBy) {
setCreatedBy(createdBy);
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 (getConfigurationAggregatorName() != null)
sb.append("ConfigurationAggregatorName: ").append(getConfigurationAggregatorName()).append(",");
if (getConfigurationAggregatorArn() != null)
sb.append("ConfigurationAggregatorArn: ").append(getConfigurationAggregatorArn()).append(",");
if (getAccountAggregationSources() != null)
sb.append("AccountAggregationSources: ").append(getAccountAggregationSources()).append(",");
if (getOrganizationAggregationSource() != null)
sb.append("OrganizationAggregationSource: ").append(getOrganizationAggregationSource()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastUpdatedTime() != null)
sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()).append(",");
if (getCreatedBy() != null)
sb.append("CreatedBy: ").append(getCreatedBy());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ConfigurationAggregator == false)
return false;
ConfigurationAggregator other = (ConfigurationAggregator) obj;
if (other.getConfigurationAggregatorName() == null ^ this.getConfigurationAggregatorName() == null)
return false;
if (other.getConfigurationAggregatorName() != null && other.getConfigurationAggregatorName().equals(this.getConfigurationAggregatorName()) == false)
return false;
if (other.getConfigurationAggregatorArn() == null ^ this.getConfigurationAggregatorArn() == null)
return false;
if (other.getConfigurationAggregatorArn() != null && other.getConfigurationAggregatorArn().equals(this.getConfigurationAggregatorArn()) == false)
return false;
if (other.getAccountAggregationSources() == null ^ this.getAccountAggregationSources() == null)
return false;
if (other.getAccountAggregationSources() != null && other.getAccountAggregationSources().equals(this.getAccountAggregationSources()) == false)
return false;
if (other.getOrganizationAggregationSource() == null ^ this.getOrganizationAggregationSource() == null)
return false;
if (other.getOrganizationAggregationSource() != null
&& other.getOrganizationAggregationSource().equals(this.getOrganizationAggregationSource()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null)
return false;
if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false)
return false;
if (other.getCreatedBy() == null ^ this.getCreatedBy() == null)
return false;
if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getConfigurationAggregatorName() == null) ? 0 : getConfigurationAggregatorName().hashCode());
hashCode = prime * hashCode + ((getConfigurationAggregatorArn() == null) ? 0 : getConfigurationAggregatorArn().hashCode());
hashCode = prime * hashCode + ((getAccountAggregationSources() == null) ? 0 : getAccountAggregationSources().hashCode());
hashCode = prime * hashCode + ((getOrganizationAggregationSource() == null) ? 0 : getOrganizationAggregationSource().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode());
hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
return hashCode;
}
@Override
public ConfigurationAggregator clone() {
try {
return (ConfigurationAggregator) 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.ConfigurationAggregatorMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}