
com.amazonaws.services.config.model.PutOrganizationConformancePackRequest 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.AmazonWebServiceRequest;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutOrganizationConformancePackRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Name of the organization conformance pack you want to create.
*
*/
private String organizationConformancePackName;
/**
*
* Location of file containing the template body. The uri must point to the conformance pack template (max size: 300
* KB).
*
*
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment, the
* template object must not be in an archived storage class
* if this parameter is passed.
*
*
*/
private String templateS3Uri;
/**
*
* A string containing full conformance pack template body. Structure containing the template body with a minimum
* length of 1 byte and a maximum length of 51,200 bytes.
*
*/
private String templateBody;
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional. If used, it must be prefixed with awsconfigconforms
.
*
*
*/
private String deliveryS3Bucket;
/**
*
* The prefix for the Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*/
private String deliveryS3KeyPrefix;
/**
*
* A list of ConformancePackInputParameter
objects.
*
*/
private com.amazonaws.internal.SdkInternalList conformancePackInputParameters;
/**
*
* A list of Amazon Web Services accounts to be excluded from an organization conformance pack while deploying a
* conformance pack.
*
*/
private com.amazonaws.internal.SdkInternalList excludedAccounts;
/**
*
* Name of the organization conformance pack you want to create.
*
*
* @param organizationConformancePackName
* Name of the organization conformance pack you want to create.
*/
public void setOrganizationConformancePackName(String organizationConformancePackName) {
this.organizationConformancePackName = organizationConformancePackName;
}
/**
*
* Name of the organization conformance pack you want to create.
*
*
* @return Name of the organization conformance pack you want to create.
*/
public String getOrganizationConformancePackName() {
return this.organizationConformancePackName;
}
/**
*
* Name of the organization conformance pack you want to create.
*
*
* @param organizationConformancePackName
* Name of the organization conformance pack you want to create.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest withOrganizationConformancePackName(String organizationConformancePackName) {
setOrganizationConformancePackName(organizationConformancePackName);
return this;
}
/**
*
* Location of file containing the template body. The uri must point to the conformance pack template (max size: 300
* KB).
*
*
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment, the
* template object must not be in an archived storage class
* if this parameter is passed.
*
*
*
* @param templateS3Uri
* Location of file containing the template body. The uri must point to the conformance pack template (max
* size: 300 KB).
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment,
* the template object must not be in an archived storage
* class if this parameter is passed.
*
*/
public void setTemplateS3Uri(String templateS3Uri) {
this.templateS3Uri = templateS3Uri;
}
/**
*
* Location of file containing the template body. The uri must point to the conformance pack template (max size: 300
* KB).
*
*
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment, the
* template object must not be in an archived storage class
* if this parameter is passed.
*
*
*
* @return Location of file containing the template body. The uri must point to the conformance pack template (max
* size: 300 KB).
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment,
* the template object must not be in an archived storage
* class if this parameter is passed.
*
*/
public String getTemplateS3Uri() {
return this.templateS3Uri;
}
/**
*
* Location of file containing the template body. The uri must point to the conformance pack template (max size: 300
* KB).
*
*
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment, the
* template object must not be in an archived storage class
* if this parameter is passed.
*
*
*
* @param templateS3Uri
* Location of file containing the template body. The uri must point to the conformance pack template (max
* size: 300 KB).
*
* You must have access to read Amazon S3 bucket. In addition, in order to ensure a successful deployment,
* the template object must not be in an archived storage
* class if this parameter is passed.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest withTemplateS3Uri(String templateS3Uri) {
setTemplateS3Uri(templateS3Uri);
return this;
}
/**
*
* A string containing full conformance pack template body. Structure containing the template body with a minimum
* length of 1 byte and a maximum length of 51,200 bytes.
*
*
* @param templateBody
* A string containing full conformance pack template body. Structure containing the template body with a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
*/
public void setTemplateBody(String templateBody) {
this.templateBody = templateBody;
}
/**
*
* A string containing full conformance pack template body. Structure containing the template body with a minimum
* length of 1 byte and a maximum length of 51,200 bytes.
*
*
* @return A string containing full conformance pack template body. Structure containing the template body with a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
*/
public String getTemplateBody() {
return this.templateBody;
}
/**
*
* A string containing full conformance pack template body. Structure containing the template body with a minimum
* length of 1 byte and a maximum length of 51,200 bytes.
*
*
* @param templateBody
* A string containing full conformance pack template body. Structure containing the template body with a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest withTemplateBody(String templateBody) {
setTemplateBody(templateBody);
return this;
}
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional. If used, it must be prefixed with awsconfigconforms
.
*
*
*
* @param deliveryS3Bucket
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
* This field is optional. If used, it must be prefixed with awsconfigconforms
.
*
*/
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. If used, it must be prefixed with awsconfigconforms
.
*
*
*
* @return The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
* This field is optional. If used, it must be prefixed with awsconfigconforms
.
*
*/
public String getDeliveryS3Bucket() {
return this.deliveryS3Bucket;
}
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional. If used, it must be prefixed with awsconfigconforms
.
*
*
*
* @param deliveryS3Bucket
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
* This field is optional. If used, it must be prefixed with awsconfigconforms
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest withDeliveryS3Bucket(String deliveryS3Bucket) {
setDeliveryS3Bucket(deliveryS3Bucket);
return this;
}
/**
*
* The prefix for the Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*
* @param deliveryS3KeyPrefix
* The prefix for the Amazon S3 bucket.
*
* This field is optional.
*
*/
public void setDeliveryS3KeyPrefix(String deliveryS3KeyPrefix) {
this.deliveryS3KeyPrefix = deliveryS3KeyPrefix;
}
/**
*
* The prefix for the Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*
* @return The prefix for the Amazon S3 bucket.
*
* This field is optional.
*
*/
public String getDeliveryS3KeyPrefix() {
return this.deliveryS3KeyPrefix;
}
/**
*
* The prefix for the Amazon S3 bucket.
*
*
*
* This field is optional.
*
*
*
* @param deliveryS3KeyPrefix
* The prefix for the Amazon S3 bucket.
*
* This field is optional.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest 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 PutOrganizationConformancePackRequest 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 PutOrganizationConformancePackRequest withConformancePackInputParameters(
java.util.Collection conformancePackInputParameters) {
setConformancePackInputParameters(conformancePackInputParameters);
return this;
}
/**
*
* A list of Amazon Web Services accounts to be excluded from an organization conformance pack while deploying a
* conformance pack.
*
*
* @return A list of Amazon Web Services accounts to be excluded from an organization conformance pack while
* deploying a conformance pack.
*/
public java.util.List getExcludedAccounts() {
if (excludedAccounts == null) {
excludedAccounts = new com.amazonaws.internal.SdkInternalList();
}
return excludedAccounts;
}
/**
*
* A list of Amazon Web Services accounts to be excluded from an organization conformance pack while deploying a
* conformance pack.
*
*
* @param excludedAccounts
* A list of Amazon Web Services accounts to be excluded from an organization conformance pack while
* deploying a 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 list of Amazon Web Services accounts to be excluded from an organization conformance pack while deploying a
* 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 list of Amazon Web Services accounts to be excluded from an organization conformance pack while
* deploying a conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest 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 list of Amazon Web Services accounts to be excluded from an organization conformance pack while deploying a
* conformance pack.
*
*
* @param excludedAccounts
* A list of Amazon Web Services accounts to be excluded from an organization conformance pack while
* deploying a conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutOrganizationConformancePackRequest withExcludedAccounts(java.util.Collection excludedAccounts) {
setExcludedAccounts(excludedAccounts);
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 (getTemplateS3Uri() != null)
sb.append("TemplateS3Uri: ").append(getTemplateS3Uri()).append(",");
if (getTemplateBody() != null)
sb.append("TemplateBody: ").append(getTemplateBody()).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());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutOrganizationConformancePackRequest == false)
return false;
PutOrganizationConformancePackRequest other = (PutOrganizationConformancePackRequest) obj;
if (other.getOrganizationConformancePackName() == null ^ this.getOrganizationConformancePackName() == null)
return false;
if (other.getOrganizationConformancePackName() != null
&& other.getOrganizationConformancePackName().equals(this.getOrganizationConformancePackName()) == false)
return false;
if (other.getTemplateS3Uri() == null ^ this.getTemplateS3Uri() == null)
return false;
if (other.getTemplateS3Uri() != null && other.getTemplateS3Uri().equals(this.getTemplateS3Uri()) == false)
return false;
if (other.getTemplateBody() == null ^ this.getTemplateBody() == null)
return false;
if (other.getTemplateBody() != null && other.getTemplateBody().equals(this.getTemplateBody()) == 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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOrganizationConformancePackName() == null) ? 0 : getOrganizationConformancePackName().hashCode());
hashCode = prime * hashCode + ((getTemplateS3Uri() == null) ? 0 : getTemplateS3Uri().hashCode());
hashCode = prime * hashCode + ((getTemplateBody() == null) ? 0 : getTemplateBody().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());
return hashCode;
}
@Override
public PutOrganizationConformancePackRequest clone() {
return (PutOrganizationConformancePackRequest) super.clone();
}
}