All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.cloudformation.model.ResourceTargetDefinition Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CloudFormation module holds the client classes that are used for communicating with AWS CloudFormation Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2018-2023 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.cloudformation.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* The field that CloudFormation will change, such as the name of a resource's property, and whether the resource will * be recreated. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ResourceTargetDefinition implements Serializable, Cloneable { /** *

* Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. *

*/ private String attribute; /** *

* If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. *

*/ private String name; /** *

* If the Attribute value is Properties, indicates whether a change to this property * causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see the * update behavior for that property in the CloudFormation User Guide. *

*/ private String requiresRecreation; /** *

* Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. *

* * @param attribute * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. * @see ResourceAttribute */ public void setAttribute(String attribute) { this.attribute = attribute; } /** *

* Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. *

* * @return Indicates which resource attribute is triggering this update, such as a change in the resource * attribute's Metadata, Properties, or Tags. * @see ResourceAttribute */ public String getAttribute() { return this.attribute; } /** *

* Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. *

* * @param attribute * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceAttribute */ public ResourceTargetDefinition withAttribute(String attribute) { setAttribute(attribute); return this; } /** *

* Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. *

* * @param attribute * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. * @see ResourceAttribute */ public void setAttribute(ResourceAttribute attribute) { withAttribute(attribute); } /** *

* Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. *

* * @param attribute * Indicates which resource attribute is triggering this update, such as a change in the resource attribute's * Metadata, Properties, or Tags. * @return Returns a reference to this object so that method calls can be chained together. * @see ResourceAttribute */ public ResourceTargetDefinition withAttribute(ResourceAttribute attribute) { this.attribute = attribute.toString(); return this; } /** *

* If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. *

* * @param name * If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. */ public void setName(String name) { this.name = name; } /** *

* If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. *

* * @return If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. */ public String getName() { return this.name; } /** *

* If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. *

* * @param name * If the Attribute value is Properties, the name of the property. For all other * attributes, the value is null. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTargetDefinition withName(String name) { setName(name); return this; } /** *

* If the Attribute value is Properties, indicates whether a change to this property * causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see the * update behavior for that property in the CloudFormation User Guide. *

* * @param requiresRecreation * If the Attribute value is Properties, indicates whether a change to this * property causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see * the update behavior for that property in the CloudFormation User Guide. * @see RequiresRecreation */ public void setRequiresRecreation(String requiresRecreation) { this.requiresRecreation = requiresRecreation; } /** *

* If the Attribute value is Properties, indicates whether a change to this property * causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see the * update behavior for that property in the CloudFormation User Guide. *

* * @return If the Attribute value is Properties, indicates whether a change to this * property causes the resource to be recreated. The value can be Never, Always, * or Conditionally. To determine the conditions for a Conditionally recreation, * see the update behavior for that property in the CloudFormation User Guide. * @see RequiresRecreation */ public String getRequiresRecreation() { return this.requiresRecreation; } /** *

* If the Attribute value is Properties, indicates whether a change to this property * causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see the * update behavior for that property in the CloudFormation User Guide. *

* * @param requiresRecreation * If the Attribute value is Properties, indicates whether a change to this * property causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see * the update behavior for that property in the CloudFormation User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see RequiresRecreation */ public ResourceTargetDefinition withRequiresRecreation(String requiresRecreation) { setRequiresRecreation(requiresRecreation); return this; } /** *

* If the Attribute value is Properties, indicates whether a change to this property * causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see the * update behavior for that property in the CloudFormation User Guide. *

* * @param requiresRecreation * If the Attribute value is Properties, indicates whether a change to this * property causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see * the update behavior for that property in the CloudFormation User Guide. * @see RequiresRecreation */ public void setRequiresRecreation(RequiresRecreation requiresRecreation) { withRequiresRecreation(requiresRecreation); } /** *

* If the Attribute value is Properties, indicates whether a change to this property * causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see the * update behavior for that property in the CloudFormation User Guide. *

* * @param requiresRecreation * If the Attribute value is Properties, indicates whether a change to this * property causes the resource to be recreated. The value can be Never, Always, or * Conditionally. To determine the conditions for a Conditionally recreation, see * the update behavior for that property in the CloudFormation User Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see RequiresRecreation */ public ResourceTargetDefinition withRequiresRecreation(RequiresRecreation requiresRecreation) { this.requiresRecreation = requiresRecreation.toString(); 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 (getAttribute() != null) sb.append("Attribute: ").append(getAttribute()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getRequiresRecreation() != null) sb.append("RequiresRecreation: ").append(getRequiresRecreation()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResourceTargetDefinition == false) return false; ResourceTargetDefinition other = (ResourceTargetDefinition) obj; if (other.getAttribute() == null ^ this.getAttribute() == null) return false; if (other.getAttribute() != null && other.getAttribute().equals(this.getAttribute()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getRequiresRecreation() == null ^ this.getRequiresRecreation() == null) return false; if (other.getRequiresRecreation() != null && other.getRequiresRecreation().equals(this.getRequiresRecreation()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAttribute() == null) ? 0 : getAttribute().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRequiresRecreation() == null) ? 0 : getRequiresRecreation().hashCode()); return hashCode; } @Override public ResourceTargetDefinition clone() { try { return (ResourceTargetDefinition) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy