
com.amazonaws.services.config.model.OrganizationConformancePack 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;
/**
*
* An organization conformance pack that has information about conformance packs that Config creates in member accounts.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OrganizationConformancePack implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name you assign to an organization conformance pack.
*
*/
private String organizationConformancePackName;
/**
*
* Amazon Resource Name (ARN) of organization conformance pack.
*
*/
private String organizationConformancePackArn;
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional.
*
*
*/
private String deliveryS3Bucket;
/**
*
* Any folder structure you want to add to an Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*/
private String deliveryS3KeyPrefix;
/**
*
* A list of ConformancePackInputParameter
objects.
*
*/
private com.amazonaws.internal.SdkInternalList conformancePackInputParameters;
/**
*
* A comma-separated list of accounts excluded from organization conformance pack.
*
*/
private com.amazonaws.internal.SdkInternalList excludedAccounts;
/**
*
* Last time when organization conformation pack was updated.
*
*/
private java.util.Date lastUpdateTime;
/**
*
* The name you assign to an organization conformance pack.
*
*
* @param organizationConformancePackName
* The name you assign to an organization conformance pack.
*/
public void setOrganizationConformancePackName(String organizationConformancePackName) {
this.organizationConformancePackName = organizationConformancePackName;
}
/**
*
* The name you assign to an organization conformance pack.
*
*
* @return The name you assign to an organization conformance pack.
*/
public String getOrganizationConformancePackName() {
return this.organizationConformancePackName;
}
/**
*
* The name you assign to an organization conformance pack.
*
*
* @param organizationConformancePackName
* The name you assign to an organization conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withOrganizationConformancePackName(String organizationConformancePackName) {
setOrganizationConformancePackName(organizationConformancePackName);
return this;
}
/**
*
* Amazon Resource Name (ARN) of organization conformance pack.
*
*
* @param organizationConformancePackArn
* Amazon Resource Name (ARN) of organization conformance pack.
*/
public void setOrganizationConformancePackArn(String organizationConformancePackArn) {
this.organizationConformancePackArn = organizationConformancePackArn;
}
/**
*
* Amazon Resource Name (ARN) of organization conformance pack.
*
*
* @return Amazon Resource Name (ARN) of organization conformance pack.
*/
public String getOrganizationConformancePackArn() {
return this.organizationConformancePackArn;
}
/**
*
* Amazon Resource Name (ARN) of organization conformance pack.
*
*
* @param organizationConformancePackArn
* Amazon Resource Name (ARN) of organization conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withOrganizationConformancePackArn(String organizationConformancePackArn) {
setOrganizationConformancePackArn(organizationConformancePackArn);
return this;
}
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional.
*
*
*
* @param deliveryS3Bucket
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
* This field is optional.
*
*/
public void setDeliveryS3Bucket(String deliveryS3Bucket) {
this.deliveryS3Bucket = deliveryS3Bucket;
}
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional.
*
*
*
* @return The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
* This field is optional.
*
*/
public String getDeliveryS3Bucket() {
return this.deliveryS3Bucket;
}
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional.
*
*
*
* @param deliveryS3Bucket
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
* This field is optional.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withDeliveryS3Bucket(String deliveryS3Bucket) {
setDeliveryS3Bucket(deliveryS3Bucket);
return this;
}
/**
*
* Any folder structure you want to add to an Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*
* @param deliveryS3KeyPrefix
* Any folder structure you want to add to an Amazon S3 bucket.
*
* This field is optional.
*
*/
public void setDeliveryS3KeyPrefix(String deliveryS3KeyPrefix) {
this.deliveryS3KeyPrefix = deliveryS3KeyPrefix;
}
/**
*
* Any folder structure you want to add to an Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*
* @return Any folder structure you want to add to an Amazon S3 bucket.
*
* This field is optional.
*
*/
public String getDeliveryS3KeyPrefix() {
return this.deliveryS3KeyPrefix;
}
/**
*
* Any folder structure you want to add to an Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*
* @param deliveryS3KeyPrefix
* Any folder structure you want to add to an Amazon S3 bucket.
*
* This field is optional.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withDeliveryS3KeyPrefix(String deliveryS3KeyPrefix) {
setDeliveryS3KeyPrefix(deliveryS3KeyPrefix);
return this;
}
/**
*
* A list of ConformancePackInputParameter
objects.
*
*
* @return A list of ConformancePackInputParameter
objects.
*/
public java.util.List getConformancePackInputParameters() {
if (conformancePackInputParameters == null) {
conformancePackInputParameters = new com.amazonaws.internal.SdkInternalList();
}
return conformancePackInputParameters;
}
/**
*
* A list of ConformancePackInputParameter
objects.
*
*
* @param conformancePackInputParameters
* A list of ConformancePackInputParameter
objects.
*/
public void setConformancePackInputParameters(java.util.Collection conformancePackInputParameters) {
if (conformancePackInputParameters == null) {
this.conformancePackInputParameters = null;
return;
}
this.conformancePackInputParameters = new com.amazonaws.internal.SdkInternalList(conformancePackInputParameters);
}
/**
*
* A list of ConformancePackInputParameter
objects.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setConformancePackInputParameters(java.util.Collection)} or
* {@link #withConformancePackInputParameters(java.util.Collection)} if you want to override the existing values.
*
*
* @param conformancePackInputParameters
* A list of ConformancePackInputParameter
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withConformancePackInputParameters(ConformancePackInputParameter... conformancePackInputParameters) {
if (this.conformancePackInputParameters == null) {
setConformancePackInputParameters(new com.amazonaws.internal.SdkInternalList(conformancePackInputParameters.length));
}
for (ConformancePackInputParameter ele : conformancePackInputParameters) {
this.conformancePackInputParameters.add(ele);
}
return this;
}
/**
*
* A list of ConformancePackInputParameter
objects.
*
*
* @param conformancePackInputParameters
* A list of ConformancePackInputParameter
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withConformancePackInputParameters(java.util.Collection conformancePackInputParameters) {
setConformancePackInputParameters(conformancePackInputParameters);
return this;
}
/**
*
* A comma-separated list of accounts excluded from organization conformance pack.
*
*
* @return A comma-separated list of accounts excluded from organization conformance pack.
*/
public java.util.List getExcludedAccounts() {
if (excludedAccounts == null) {
excludedAccounts = new com.amazonaws.internal.SdkInternalList();
}
return excludedAccounts;
}
/**
*
* A comma-separated list of accounts excluded from organization conformance pack.
*
*
* @param excludedAccounts
* A comma-separated list of accounts excluded from organization conformance pack.
*/
public void setExcludedAccounts(java.util.Collection excludedAccounts) {
if (excludedAccounts == null) {
this.excludedAccounts = null;
return;
}
this.excludedAccounts = new com.amazonaws.internal.SdkInternalList(excludedAccounts);
}
/**
*
* A comma-separated list of accounts excluded from organization conformance pack.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExcludedAccounts(java.util.Collection)} or {@link #withExcludedAccounts(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param excludedAccounts
* A comma-separated list of accounts excluded from organization conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withExcludedAccounts(String... excludedAccounts) {
if (this.excludedAccounts == null) {
setExcludedAccounts(new com.amazonaws.internal.SdkInternalList(excludedAccounts.length));
}
for (String ele : excludedAccounts) {
this.excludedAccounts.add(ele);
}
return this;
}
/**
*
* A comma-separated list of accounts excluded from organization conformance pack.
*
*
* @param excludedAccounts
* A comma-separated list of accounts excluded from organization conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withExcludedAccounts(java.util.Collection excludedAccounts) {
setExcludedAccounts(excludedAccounts);
return this;
}
/**
*
* Last time when organization conformation pack was updated.
*
*
* @param lastUpdateTime
* Last time when organization conformation pack was updated.
*/
public void setLastUpdateTime(java.util.Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
*
* Last time when organization conformation pack was updated.
*
*
* @return Last time when organization conformation pack was updated.
*/
public java.util.Date getLastUpdateTime() {
return this.lastUpdateTime;
}
/**
*
* Last time when organization conformation pack was updated.
*
*
* @param lastUpdateTime
* Last time when organization conformation pack was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OrganizationConformancePack withLastUpdateTime(java.util.Date lastUpdateTime) {
setLastUpdateTime(lastUpdateTime);
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 (getOrganizationConformancePackName() != null)
sb.append("OrganizationConformancePackName: ").append(getOrganizationConformancePackName()).append(",");
if (getOrganizationConformancePackArn() != null)
sb.append("OrganizationConformancePackArn: ").append(getOrganizationConformancePackArn()).append(",");
if (getDeliveryS3Bucket() != null)
sb.append("DeliveryS3Bucket: ").append(getDeliveryS3Bucket()).append(",");
if (getDeliveryS3KeyPrefix() != null)
sb.append("DeliveryS3KeyPrefix: ").append(getDeliveryS3KeyPrefix()).append(",");
if (getConformancePackInputParameters() != null)
sb.append("ConformancePackInputParameters: ").append(getConformancePackInputParameters()).append(",");
if (getExcludedAccounts() != null)
sb.append("ExcludedAccounts: ").append(getExcludedAccounts()).append(",");
if (getLastUpdateTime() != null)
sb.append("LastUpdateTime: ").append(getLastUpdateTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OrganizationConformancePack == false)
return false;
OrganizationConformancePack other = (OrganizationConformancePack) obj;
if (other.getOrganizationConformancePackName() == null ^ this.getOrganizationConformancePackName() == null)
return false;
if (other.getOrganizationConformancePackName() != null
&& other.getOrganizationConformancePackName().equals(this.getOrganizationConformancePackName()) == false)
return false;
if (other.getOrganizationConformancePackArn() == null ^ this.getOrganizationConformancePackArn() == null)
return false;
if (other.getOrganizationConformancePackArn() != null
&& other.getOrganizationConformancePackArn().equals(this.getOrganizationConformancePackArn()) == false)
return false;
if (other.getDeliveryS3Bucket() == null ^ this.getDeliveryS3Bucket() == null)
return false;
if (other.getDeliveryS3Bucket() != null && other.getDeliveryS3Bucket().equals(this.getDeliveryS3Bucket()) == false)
return false;
if (other.getDeliveryS3KeyPrefix() == null ^ this.getDeliveryS3KeyPrefix() == null)
return false;
if (other.getDeliveryS3KeyPrefix() != null && other.getDeliveryS3KeyPrefix().equals(this.getDeliveryS3KeyPrefix()) == false)
return false;
if (other.getConformancePackInputParameters() == null ^ this.getConformancePackInputParameters() == null)
return false;
if (other.getConformancePackInputParameters() != null
&& other.getConformancePackInputParameters().equals(this.getConformancePackInputParameters()) == false)
return false;
if (other.getExcludedAccounts() == null ^ this.getExcludedAccounts() == null)
return false;
if (other.getExcludedAccounts() != null && other.getExcludedAccounts().equals(this.getExcludedAccounts()) == false)
return false;
if (other.getLastUpdateTime() == null ^ this.getLastUpdateTime() == null)
return false;
if (other.getLastUpdateTime() != null && other.getLastUpdateTime().equals(this.getLastUpdateTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOrganizationConformancePackName() == null) ? 0 : getOrganizationConformancePackName().hashCode());
hashCode = prime * hashCode + ((getOrganizationConformancePackArn() == null) ? 0 : getOrganizationConformancePackArn().hashCode());
hashCode = prime * hashCode + ((getDeliveryS3Bucket() == null) ? 0 : getDeliveryS3Bucket().hashCode());
hashCode = prime * hashCode + ((getDeliveryS3KeyPrefix() == null) ? 0 : getDeliveryS3KeyPrefix().hashCode());
hashCode = prime * hashCode + ((getConformancePackInputParameters() == null) ? 0 : getConformancePackInputParameters().hashCode());
hashCode = prime * hashCode + ((getExcludedAccounts() == null) ? 0 : getExcludedAccounts().hashCode());
hashCode = prime * hashCode + ((getLastUpdateTime() == null) ? 0 : getLastUpdateTime().hashCode());
return hashCode;
}
@Override
public OrganizationConformancePack clone() {
try {
return (OrganizationConformancePack) 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.OrganizationConformancePackMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}