com.amazonaws.services.servicecatalog.model.ProvisioningArtifactPreferences Maven / Gradle / Ivy
Show all versions of aws-java-sdk-servicecatalog 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.servicecatalog.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The user-defined preferences that will be applied during product provisioning, unless overridden by
* ProvisioningPreferences
or UpdateProvisioningPreferences
.
*
*
* For more information on maximum concurrent accounts and failure tolerance, see Stack set operation options in the CloudFormation User Guide.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ProvisioningArtifactPreferences implements Serializable, Cloneable, StructuredPojo {
/**
*
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These accounts
* can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*/
private java.util.List stackSetAccounts;
/**
*
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These Regions can
* be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*/
private java.util.List stackSetRegions;
/**
*
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These accounts
* can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* @return One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These
* accounts can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*/
public java.util.List getStackSetAccounts() {
return stackSetAccounts;
}
/**
*
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These accounts
* can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* @param stackSetAccounts
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These
* accounts can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*/
public void setStackSetAccounts(java.util.Collection stackSetAccounts) {
if (stackSetAccounts == null) {
this.stackSetAccounts = null;
return;
}
this.stackSetAccounts = new java.util.ArrayList(stackSetAccounts);
}
/**
*
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These accounts
* can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setStackSetAccounts(java.util.Collection)} or {@link #withStackSetAccounts(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param stackSetAccounts
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These
* accounts can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProvisioningArtifactPreferences withStackSetAccounts(String... stackSetAccounts) {
if (this.stackSetAccounts == null) {
setStackSetAccounts(new java.util.ArrayList(stackSetAccounts.length));
}
for (String ele : stackSetAccounts) {
this.stackSetAccounts.add(ele);
}
return this;
}
/**
*
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These accounts
* can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* @param stackSetAccounts
* One or more Amazon Web Services accounts where stack instances are deployed from the stack set. These
* accounts can be scoped in ProvisioningPreferences$StackSetAccounts
and
* UpdateProvisioningPreferences$StackSetAccounts
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProvisioningArtifactPreferences withStackSetAccounts(java.util.Collection stackSetAccounts) {
setStackSetAccounts(stackSetAccounts);
return this;
}
/**
*
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These Regions can
* be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* @return One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These
* Regions can be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*/
public java.util.List getStackSetRegions() {
return stackSetRegions;
}
/**
*
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These Regions can
* be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* @param stackSetRegions
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These
* Regions can be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*/
public void setStackSetRegions(java.util.Collection stackSetRegions) {
if (stackSetRegions == null) {
this.stackSetRegions = null;
return;
}
this.stackSetRegions = new java.util.ArrayList(stackSetRegions);
}
/**
*
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These Regions can
* be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setStackSetRegions(java.util.Collection)} or {@link #withStackSetRegions(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param stackSetRegions
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These
* Regions can be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProvisioningArtifactPreferences withStackSetRegions(String... stackSetRegions) {
if (this.stackSetRegions == null) {
setStackSetRegions(new java.util.ArrayList(stackSetRegions.length));
}
for (String ele : stackSetRegions) {
this.stackSetRegions.add(ele);
}
return this;
}
/**
*
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These Regions can
* be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
*
* Applicable only to a CFN_STACKSET
provisioned product type.
*
*
* @param stackSetRegions
* One or more Amazon Web Services Regions where stack instances are deployed from the stack set. These
* Regions can be scoped in ProvisioningPreferences$StackSetRegions
and
* UpdateProvisioningPreferences$StackSetRegions
.
*
* Applicable only to a CFN_STACKSET
provisioned product type.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProvisioningArtifactPreferences withStackSetRegions(java.util.Collection stackSetRegions) {
setStackSetRegions(stackSetRegions);
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 (getStackSetAccounts() != null)
sb.append("StackSetAccounts: ").append(getStackSetAccounts()).append(",");
if (getStackSetRegions() != null)
sb.append("StackSetRegions: ").append(getStackSetRegions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProvisioningArtifactPreferences == false)
return false;
ProvisioningArtifactPreferences other = (ProvisioningArtifactPreferences) obj;
if (other.getStackSetAccounts() == null ^ this.getStackSetAccounts() == null)
return false;
if (other.getStackSetAccounts() != null && other.getStackSetAccounts().equals(this.getStackSetAccounts()) == false)
return false;
if (other.getStackSetRegions() == null ^ this.getStackSetRegions() == null)
return false;
if (other.getStackSetRegions() != null && other.getStackSetRegions().equals(this.getStackSetRegions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStackSetAccounts() == null) ? 0 : getStackSetAccounts().hashCode());
hashCode = prime * hashCode + ((getStackSetRegions() == null) ? 0 : getStackSetRegions().hashCode());
return hashCode;
}
@Override
public ProvisioningArtifactPreferences clone() {
try {
return (ProvisioningArtifactPreferences) 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.servicecatalog.model.transform.ProvisioningArtifactPreferencesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}