
com.amazonaws.services.config.model.PutConformancePackRequest 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 PutConformancePackRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique name of the conformance pack you want to deploy.
*
*/
private String conformancePackName;
/**
*
* The location of the file containing the template body (s3://bucketname/prefix
). The uri must point
* to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same Region as
* the conformance pack.
*
*
*
* 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 the full conformance pack template body. The structure containing the template body has a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
*
*
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
) and
* remediation action (AWS::Config::RemediationConfiguration
).
*
*
*/
private String templateBody;
/**
*
* The name of the Amazon S3 bucket where Config stores conformance pack templates.
*
*
*
* This field is optional.
*
*
*/
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;
/**
*
* An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource Name
* (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM document that
* is used to create a conformance pack.
*
*/
private TemplateSSMDocumentDetails templateSSMDocumentDetails;
/**
*
* The unique name of the conformance pack you want to deploy.
*
*
* @param conformancePackName
* The unique name of the conformance pack you want to deploy.
*/
public void setConformancePackName(String conformancePackName) {
this.conformancePackName = conformancePackName;
}
/**
*
* The unique name of the conformance pack you want to deploy.
*
*
* @return The unique name of the conformance pack you want to deploy.
*/
public String getConformancePackName() {
return this.conformancePackName;
}
/**
*
* The unique name of the conformance pack you want to deploy.
*
*
* @param conformancePackName
* The unique name of the conformance pack you want to deploy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutConformancePackRequest withConformancePackName(String conformancePackName) {
setConformancePackName(conformancePackName);
return this;
}
/**
*
* The location of the file containing the template body (s3://bucketname/prefix
). The uri must point
* to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same Region as
* the conformance pack.
*
*
*
* 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
* The location of the file containing the template body (s3://bucketname/prefix
). The uri must
* point to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same
* Region as the conformance pack.
*
* 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;
}
/**
*
* The location of the file containing the template body (s3://bucketname/prefix
). The uri must point
* to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same Region as
* the conformance pack.
*
*
*
* 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 The location of the file containing the template body (s3://bucketname/prefix
). The uri must
* point to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the
* same Region as the conformance pack.
*
* 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;
}
/**
*
* The location of the file containing the template body (s3://bucketname/prefix
). The uri must point
* to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same Region as
* the conformance pack.
*
*
*
* 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
* The location of the file containing the template body (s3://bucketname/prefix
). The uri must
* point to a conformance pack template (max size: 300 KB) that is located in an Amazon S3 bucket in the same
* Region as the conformance pack.
*
* 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 PutConformancePackRequest withTemplateS3Uri(String templateS3Uri) {
setTemplateS3Uri(templateS3Uri);
return this;
}
/**
*
* A string containing the full conformance pack template body. The structure containing the template body has a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
*
*
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
) and
* remediation action (AWS::Config::RemediationConfiguration
).
*
*
*
* @param templateBody
* A string containing the full conformance pack template body. The structure containing the template body
* has a minimum length of 1 byte and a maximum length of 51,200 bytes.
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
)
* and remediation action (AWS::Config::RemediationConfiguration
).
*
*/
public void setTemplateBody(String templateBody) {
this.templateBody = templateBody;
}
/**
*
* A string containing the full conformance pack template body. The structure containing the template body has a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
*
*
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
) and
* remediation action (AWS::Config::RemediationConfiguration
).
*
*
*
* @return A string containing the full conformance pack template body. The structure containing the template body
* has a minimum length of 1 byte and a maximum length of 51,200 bytes.
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
)
* and remediation action (AWS::Config::RemediationConfiguration
).
*
*/
public String getTemplateBody() {
return this.templateBody;
}
/**
*
* A string containing the full conformance pack template body. The structure containing the template body has a
* minimum length of 1 byte and a maximum length of 51,200 bytes.
*
*
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
) and
* remediation action (AWS::Config::RemediationConfiguration
).
*
*
*
* @param templateBody
* A string containing the full conformance pack template body. The structure containing the template body
* has a minimum length of 1 byte and a maximum length of 51,200 bytes.
*
* You can use a YAML template with two resource types: Config rule (AWS::Config::ConfigRule
)
* and remediation action (AWS::Config::RemediationConfiguration
).
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutConformancePackRequest withTemplateBody(String templateBody) {
setTemplateBody(templateBody);
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 PutConformancePackRequest 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 PutConformancePackRequest 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 PutConformancePackRequest 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 PutConformancePackRequest withConformancePackInputParameters(java.util.Collection conformancePackInputParameters) {
setConformancePackInputParameters(conformancePackInputParameters);
return this;
}
/**
*
* An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource Name
* (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM document that
* is used to create a conformance pack.
*
*
* @param templateSSMDocumentDetails
* An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource
* Name (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM
* document that is used to create a conformance pack.
*/
public void setTemplateSSMDocumentDetails(TemplateSSMDocumentDetails templateSSMDocumentDetails) {
this.templateSSMDocumentDetails = templateSSMDocumentDetails;
}
/**
*
* An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource Name
* (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM document that
* is used to create a conformance pack.
*
*
* @return An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource
* Name (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM
* document that is used to create a conformance pack.
*/
public TemplateSSMDocumentDetails getTemplateSSMDocumentDetails() {
return this.templateSSMDocumentDetails;
}
/**
*
* An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource Name
* (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM document that
* is used to create a conformance pack.
*
*
* @param templateSSMDocumentDetails
* An object of type TemplateSSMDocumentDetails
, which contains the name or the Amazon Resource
* Name (ARN) of the Amazon Web Services Systems Manager document (SSM document) and the version of the SSM
* document that is used to create a conformance pack.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutConformancePackRequest withTemplateSSMDocumentDetails(TemplateSSMDocumentDetails templateSSMDocumentDetails) {
setTemplateSSMDocumentDetails(templateSSMDocumentDetails);
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 (getConformancePackName() != null)
sb.append("ConformancePackName: ").append(getConformancePackName()).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 (getTemplateSSMDocumentDetails() != null)
sb.append("TemplateSSMDocumentDetails: ").append(getTemplateSSMDocumentDetails());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutConformancePackRequest == false)
return false;
PutConformancePackRequest other = (PutConformancePackRequest) obj;
if (other.getConformancePackName() == null ^ this.getConformancePackName() == null)
return false;
if (other.getConformancePackName() != null && other.getConformancePackName().equals(this.getConformancePackName()) == 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.getTemplateSSMDocumentDetails() == null ^ this.getTemplateSSMDocumentDetails() == null)
return false;
if (other.getTemplateSSMDocumentDetails() != null && other.getTemplateSSMDocumentDetails().equals(this.getTemplateSSMDocumentDetails()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getConformancePackName() == null) ? 0 : getConformancePackName().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 + ((getTemplateSSMDocumentDetails() == null) ? 0 : getTemplateSSMDocumentDetails().hashCode());
return hashCode;
}
@Override
public PutConformancePackRequest clone() {
return (PutConformancePackRequest) super.clone();
}
}