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 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.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; /** *

* The property path of the property. *

*/ private String path; /** *

* The value of the property before the change is executed. Large values can be truncated. *

*/ private String beforeValue; /** *

* The value of the property after the change is executed. Large values can be truncated. *

*/ private String afterValue; /** *

* The type of change to be made to the property if the change is executed. *

*
    *
  • *

    * Add The item will be added. *

    *
  • *
  • *

    * Remove The item will be removed. *

    *
  • *
  • *

    * Modify The item will be modified. *

    *
  • *
*/ private String attributeChangeType; /** *

* 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; } /** *

* The property path of the property. *

* * @param path * The property path of the property. */ public void setPath(String path) { this.path = path; } /** *

* The property path of the property. *

* * @return The property path of the property. */ public String getPath() { return this.path; } /** *

* The property path of the property. *

* * @param path * The property path of the property. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTargetDefinition withPath(String path) { setPath(path); return this; } /** *

* The value of the property before the change is executed. Large values can be truncated. *

* * @param beforeValue * The value of the property before the change is executed. Large values can be truncated. */ public void setBeforeValue(String beforeValue) { this.beforeValue = beforeValue; } /** *

* The value of the property before the change is executed. Large values can be truncated. *

* * @return The value of the property before the change is executed. Large values can be truncated. */ public String getBeforeValue() { return this.beforeValue; } /** *

* The value of the property before the change is executed. Large values can be truncated. *

* * @param beforeValue * The value of the property before the change is executed. Large values can be truncated. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTargetDefinition withBeforeValue(String beforeValue) { setBeforeValue(beforeValue); return this; } /** *

* The value of the property after the change is executed. Large values can be truncated. *

* * @param afterValue * The value of the property after the change is executed. Large values can be truncated. */ public void setAfterValue(String afterValue) { this.afterValue = afterValue; } /** *

* The value of the property after the change is executed. Large values can be truncated. *

* * @return The value of the property after the change is executed. Large values can be truncated. */ public String getAfterValue() { return this.afterValue; } /** *

* The value of the property after the change is executed. Large values can be truncated. *

* * @param afterValue * The value of the property after the change is executed. Large values can be truncated. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceTargetDefinition withAfterValue(String afterValue) { setAfterValue(afterValue); return this; } /** *

* The type of change to be made to the property if the change is executed. *

*
    *
  • *

    * Add The item will be added. *

    *
  • *
  • *

    * Remove The item will be removed. *

    *
  • *
  • *

    * Modify The item will be modified. *

    *
  • *
* * @param attributeChangeType * The type of change to be made to the property if the change is executed.

*
    *
  • *

    * Add The item will be added. *

    *
  • *
  • *

    * Remove The item will be removed. *

    *
  • *
  • *

    * Modify The item will be modified. *

    *
  • * @see AttributeChangeType */ public void setAttributeChangeType(String attributeChangeType) { this.attributeChangeType = attributeChangeType; } /** *

    * The type of change to be made to the property if the change is executed. *

    *
      *
    • *

      * Add The item will be added. *

      *
    • *
    • *

      * Remove The item will be removed. *

      *
    • *
    • *

      * Modify The item will be modified. *

      *
    • *
    * * @return The type of change to be made to the property if the change is executed.

    *
      *
    • *

      * Add The item will be added. *

      *
    • *
    • *

      * Remove The item will be removed. *

      *
    • *
    • *

      * Modify The item will be modified. *

      *
    • * @see AttributeChangeType */ public String getAttributeChangeType() { return this.attributeChangeType; } /** *

      * The type of change to be made to the property if the change is executed. *

      *
        *
      • *

        * Add The item will be added. *

        *
      • *
      • *

        * Remove The item will be removed. *

        *
      • *
      • *

        * Modify The item will be modified. *

        *
      • *
      * * @param attributeChangeType * The type of change to be made to the property if the change is executed.

      *
        *
      • *

        * Add The item will be added. *

        *
      • *
      • *

        * Remove The item will be removed. *

        *
      • *
      • *

        * Modify The item will be modified. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see AttributeChangeType */ public ResourceTargetDefinition withAttributeChangeType(String attributeChangeType) { setAttributeChangeType(attributeChangeType); return this; } /** *

        * The type of change to be made to the property if the change is executed. *

        *
          *
        • *

          * Add The item will be added. *

          *
        • *
        • *

          * Remove The item will be removed. *

          *
        • *
        • *

          * Modify The item will be modified. *

          *
        • *
        * * @param attributeChangeType * The type of change to be made to the property if the change is executed.

        *
          *
        • *

          * Add The item will be added. *

          *
        • *
        • *

          * Remove The item will be removed. *

          *
        • *
        • *

          * Modify The item will be modified. *

          *
        • * @see AttributeChangeType */ public void setAttributeChangeType(AttributeChangeType attributeChangeType) { withAttributeChangeType(attributeChangeType); } /** *

          * The type of change to be made to the property if the change is executed. *

          *
            *
          • *

            * Add The item will be added. *

            *
          • *
          • *

            * Remove The item will be removed. *

            *
          • *
          • *

            * Modify The item will be modified. *

            *
          • *
          * * @param attributeChangeType * The type of change to be made to the property if the change is executed.

          *
            *
          • *

            * Add The item will be added. *

            *
          • *
          • *

            * Remove The item will be removed. *

            *
          • *
          • *

            * Modify The item will be modified. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see AttributeChangeType */ public ResourceTargetDefinition withAttributeChangeType(AttributeChangeType attributeChangeType) { this.attributeChangeType = attributeChangeType.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()).append(","); if (getPath() != null) sb.append("Path: ").append(getPath()).append(","); if (getBeforeValue() != null) sb.append("BeforeValue: ").append(getBeforeValue()).append(","); if (getAfterValue() != null) sb.append("AfterValue: ").append(getAfterValue()).append(","); if (getAttributeChangeType() != null) sb.append("AttributeChangeType: ").append(getAttributeChangeType()); 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; if (other.getPath() == null ^ this.getPath() == null) return false; if (other.getPath() != null && other.getPath().equals(this.getPath()) == false) return false; if (other.getBeforeValue() == null ^ this.getBeforeValue() == null) return false; if (other.getBeforeValue() != null && other.getBeforeValue().equals(this.getBeforeValue()) == false) return false; if (other.getAfterValue() == null ^ this.getAfterValue() == null) return false; if (other.getAfterValue() != null && other.getAfterValue().equals(this.getAfterValue()) == false) return false; if (other.getAttributeChangeType() == null ^ this.getAttributeChangeType() == null) return false; if (other.getAttributeChangeType() != null && other.getAttributeChangeType().equals(this.getAttributeChangeType()) == 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()); hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode()); hashCode = prime * hashCode + ((getBeforeValue() == null) ? 0 : getBeforeValue().hashCode()); hashCode = prime * hashCode + ((getAfterValue() == null) ? 0 : getAfterValue().hashCode()); hashCode = prime * hashCode + ((getAttributeChangeType() == null) ? 0 : getAttributeChangeType().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