com.amazonaws.services.resiliencehub.model.ImportResourcesToDraftAppVersionRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-resiliencehub Show documentation
/*
* 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.resiliencehub.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 ImportResourcesToDraftAppVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*/
private String appArn;
/**
*
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*
*/
private java.util.List eksSources;
/**
*
* The import strategy you would like to set to import resources into Resilience Hub application.
*
*/
private String importStrategy;
/**
*
* The Amazon Resource Names (ARNs) for the resources.
*
*/
private java.util.List sourceArns;
/**
*
* A list of terraform file s3 URLs you need to import.
*
*/
private java.util.List terraformSources;
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @param appArn
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For
* more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
*/
public void setAppArn(String appArn) {
this.appArn = appArn;
}
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @return Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
.
* For more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
*/
public String getAppArn() {
return this.appArn;
}
/**
*
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For more
* information about ARNs, see
* Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.
*
*
* @param appArn
* Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:
* partition
:resiliencehub:region
:account
:app/app-id
. For
* more information about ARNs, see Amazon Resource Names
* (ARNs) in the Amazon Web Services General Reference guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withAppArn(String appArn) {
setAppArn(appArn);
return this;
}
/**
*
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*
*
* @return The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*/
public java.util.List getEksSources() {
return eksSources;
}
/**
*
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*
*
* @param eksSources
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*/
public void setEksSources(java.util.Collection eksSources) {
if (eksSources == null) {
this.eksSources = null;
return;
}
this.eksSources = new java.util.ArrayList(eksSources);
}
/**
*
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEksSources(java.util.Collection)} or {@link #withEksSources(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param eksSources
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withEksSources(EksSource... eksSources) {
if (this.eksSources == null) {
setEksSources(new java.util.ArrayList(eksSources.length));
}
for (EksSource ele : eksSources) {
this.eksSources.add(ele);
}
return this;
}
/**
*
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
*
*
* @param eksSources
* The input sources of the Amazon Elastic Kubernetes Service resources you need to import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withEksSources(java.util.Collection eksSources) {
setEksSources(eksSources);
return this;
}
/**
*
* The import strategy you would like to set to import resources into Resilience Hub application.
*
*
* @param importStrategy
* The import strategy you would like to set to import resources into Resilience Hub application.
* @see ResourceImportStrategyType
*/
public void setImportStrategy(String importStrategy) {
this.importStrategy = importStrategy;
}
/**
*
* The import strategy you would like to set to import resources into Resilience Hub application.
*
*
* @return The import strategy you would like to set to import resources into Resilience Hub application.
* @see ResourceImportStrategyType
*/
public String getImportStrategy() {
return this.importStrategy;
}
/**
*
* The import strategy you would like to set to import resources into Resilience Hub application.
*
*
* @param importStrategy
* The import strategy you would like to set to import resources into Resilience Hub application.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceImportStrategyType
*/
public ImportResourcesToDraftAppVersionRequest withImportStrategy(String importStrategy) {
setImportStrategy(importStrategy);
return this;
}
/**
*
* The import strategy you would like to set to import resources into Resilience Hub application.
*
*
* @param importStrategy
* The import strategy you would like to set to import resources into Resilience Hub application.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ResourceImportStrategyType
*/
public ImportResourcesToDraftAppVersionRequest withImportStrategy(ResourceImportStrategyType importStrategy) {
this.importStrategy = importStrategy.toString();
return this;
}
/**
*
* The Amazon Resource Names (ARNs) for the resources.
*
*
* @return The Amazon Resource Names (ARNs) for the resources.
*/
public java.util.List getSourceArns() {
return sourceArns;
}
/**
*
* The Amazon Resource Names (ARNs) for the resources.
*
*
* @param sourceArns
* The Amazon Resource Names (ARNs) for the resources.
*/
public void setSourceArns(java.util.Collection sourceArns) {
if (sourceArns == null) {
this.sourceArns = null;
return;
}
this.sourceArns = new java.util.ArrayList(sourceArns);
}
/**
*
* The Amazon Resource Names (ARNs) for the resources.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSourceArns(java.util.Collection)} or {@link #withSourceArns(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param sourceArns
* The Amazon Resource Names (ARNs) for the resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withSourceArns(String... sourceArns) {
if (this.sourceArns == null) {
setSourceArns(new java.util.ArrayList(sourceArns.length));
}
for (String ele : sourceArns) {
this.sourceArns.add(ele);
}
return this;
}
/**
*
* The Amazon Resource Names (ARNs) for the resources.
*
*
* @param sourceArns
* The Amazon Resource Names (ARNs) for the resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withSourceArns(java.util.Collection sourceArns) {
setSourceArns(sourceArns);
return this;
}
/**
*
* A list of terraform file s3 URLs you need to import.
*
*
* @return A list of terraform file s3 URLs you need to import.
*/
public java.util.List getTerraformSources() {
return terraformSources;
}
/**
*
* A list of terraform file s3 URLs you need to import.
*
*
* @param terraformSources
* A list of terraform file s3 URLs you need to import.
*/
public void setTerraformSources(java.util.Collection terraformSources) {
if (terraformSources == null) {
this.terraformSources = null;
return;
}
this.terraformSources = new java.util.ArrayList(terraformSources);
}
/**
*
* A list of terraform file s3 URLs you need to import.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTerraformSources(java.util.Collection)} or {@link #withTerraformSources(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param terraformSources
* A list of terraform file s3 URLs you need to import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withTerraformSources(TerraformSource... terraformSources) {
if (this.terraformSources == null) {
setTerraformSources(new java.util.ArrayList(terraformSources.length));
}
for (TerraformSource ele : terraformSources) {
this.terraformSources.add(ele);
}
return this;
}
/**
*
* A list of terraform file s3 URLs you need to import.
*
*
* @param terraformSources
* A list of terraform file s3 URLs you need to import.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImportResourcesToDraftAppVersionRequest withTerraformSources(java.util.Collection terraformSources) {
setTerraformSources(terraformSources);
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 (getAppArn() != null)
sb.append("AppArn: ").append(getAppArn()).append(",");
if (getEksSources() != null)
sb.append("EksSources: ").append(getEksSources()).append(",");
if (getImportStrategy() != null)
sb.append("ImportStrategy: ").append(getImportStrategy()).append(",");
if (getSourceArns() != null)
sb.append("SourceArns: ").append(getSourceArns()).append(",");
if (getTerraformSources() != null)
sb.append("TerraformSources: ").append(getTerraformSources());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ImportResourcesToDraftAppVersionRequest == false)
return false;
ImportResourcesToDraftAppVersionRequest other = (ImportResourcesToDraftAppVersionRequest) obj;
if (other.getAppArn() == null ^ this.getAppArn() == null)
return false;
if (other.getAppArn() != null && other.getAppArn().equals(this.getAppArn()) == false)
return false;
if (other.getEksSources() == null ^ this.getEksSources() == null)
return false;
if (other.getEksSources() != null && other.getEksSources().equals(this.getEksSources()) == false)
return false;
if (other.getImportStrategy() == null ^ this.getImportStrategy() == null)
return false;
if (other.getImportStrategy() != null && other.getImportStrategy().equals(this.getImportStrategy()) == false)
return false;
if (other.getSourceArns() == null ^ this.getSourceArns() == null)
return false;
if (other.getSourceArns() != null && other.getSourceArns().equals(this.getSourceArns()) == false)
return false;
if (other.getTerraformSources() == null ^ this.getTerraformSources() == null)
return false;
if (other.getTerraformSources() != null && other.getTerraformSources().equals(this.getTerraformSources()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAppArn() == null) ? 0 : getAppArn().hashCode());
hashCode = prime * hashCode + ((getEksSources() == null) ? 0 : getEksSources().hashCode());
hashCode = prime * hashCode + ((getImportStrategy() == null) ? 0 : getImportStrategy().hashCode());
hashCode = prime * hashCode + ((getSourceArns() == null) ? 0 : getSourceArns().hashCode());
hashCode = prime * hashCode + ((getTerraformSources() == null) ? 0 : getTerraformSources().hashCode());
return hashCode;
}
@Override
public ImportResourcesToDraftAppVersionRequest clone() {
return (ImportResourcesToDraftAppVersionRequest) super.clone();
}
}