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

com.amazonaws.services.cloudformation.model.PropertyDifference 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 2017-2022 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;

/**
 * 

* Information about a resource property whose actual value differs from its expected value, as defined in the stack * template and any values specified as template parameters. These will be present only for resources whose * StackResourceDriftStatus is MODIFIED. For more information, see Detecting * Unregulated Configuration Changes to Stacks and Resources. *

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

* The fully-qualified path to the resource property. *

*/ private String propertyPath; /** *

* The expected property value of the resource property, as defined in the stack template and any values specified * as template parameters. *

*/ private String expectedValue; /** *

* The actual property value of the resource property. *

*/ private String actualValue; /** *

* The type of property difference. *

*
    *
  • *

    * ADD: A value has been added to a resource property that is an array or list data type. *

    *
  • *
  • *

    * REMOVE: The property has been removed from the current resource configuration. *

    *
  • *
  • *

    * NOT_EQUAL: The current property value differs from its expected value (as defined in the stack * template and any values specified as template parameters). *

    *
  • *
*/ private String differenceType; /** *

* The fully-qualified path to the resource property. *

* * @param propertyPath * The fully-qualified path to the resource property. */ public void setPropertyPath(String propertyPath) { this.propertyPath = propertyPath; } /** *

* The fully-qualified path to the resource property. *

* * @return The fully-qualified path to the resource property. */ public String getPropertyPath() { return this.propertyPath; } /** *

* The fully-qualified path to the resource property. *

* * @param propertyPath * The fully-qualified path to the resource property. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDifference withPropertyPath(String propertyPath) { setPropertyPath(propertyPath); return this; } /** *

* The expected property value of the resource property, as defined in the stack template and any values specified * as template parameters. *

* * @param expectedValue * The expected property value of the resource property, as defined in the stack template and any values * specified as template parameters. */ public void setExpectedValue(String expectedValue) { this.expectedValue = expectedValue; } /** *

* The expected property value of the resource property, as defined in the stack template and any values specified * as template parameters. *

* * @return The expected property value of the resource property, as defined in the stack template and any values * specified as template parameters. */ public String getExpectedValue() { return this.expectedValue; } /** *

* The expected property value of the resource property, as defined in the stack template and any values specified * as template parameters. *

* * @param expectedValue * The expected property value of the resource property, as defined in the stack template and any values * specified as template parameters. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDifference withExpectedValue(String expectedValue) { setExpectedValue(expectedValue); return this; } /** *

* The actual property value of the resource property. *

* * @param actualValue * The actual property value of the resource property. */ public void setActualValue(String actualValue) { this.actualValue = actualValue; } /** *

* The actual property value of the resource property. *

* * @return The actual property value of the resource property. */ public String getActualValue() { return this.actualValue; } /** *

* The actual property value of the resource property. *

* * @param actualValue * The actual property value of the resource property. * @return Returns a reference to this object so that method calls can be chained together. */ public PropertyDifference withActualValue(String actualValue) { setActualValue(actualValue); return this; } /** *

* The type of property difference. *

*
    *
  • *

    * ADD: A value has been added to a resource property that is an array or list data type. *

    *
  • *
  • *

    * REMOVE: The property has been removed from the current resource configuration. *

    *
  • *
  • *

    * NOT_EQUAL: The current property value differs from its expected value (as defined in the stack * template and any values specified as template parameters). *

    *
  • *
* * @param differenceType * The type of property difference.

*
    *
  • *

    * ADD: A value has been added to a resource property that is an array or list data type. *

    *
  • *
  • *

    * REMOVE: The property has been removed from the current resource configuration. *

    *
  • *
  • *

    * NOT_EQUAL: The current property value differs from its expected value (as defined in the * stack template and any values specified as template parameters). *

    *
  • * @see DifferenceType */ public void setDifferenceType(String differenceType) { this.differenceType = differenceType; } /** *

    * The type of property difference. *

    *
      *
    • *

      * ADD: A value has been added to a resource property that is an array or list data type. *

      *
    • *
    • *

      * REMOVE: The property has been removed from the current resource configuration. *

      *
    • *
    • *

      * NOT_EQUAL: The current property value differs from its expected value (as defined in the stack * template and any values specified as template parameters). *

      *
    • *
    * * @return The type of property difference.

    *
      *
    • *

      * ADD: A value has been added to a resource property that is an array or list data type. *

      *
    • *
    • *

      * REMOVE: The property has been removed from the current resource configuration. *

      *
    • *
    • *

      * NOT_EQUAL: The current property value differs from its expected value (as defined in the * stack template and any values specified as template parameters). *

      *
    • * @see DifferenceType */ public String getDifferenceType() { return this.differenceType; } /** *

      * The type of property difference. *

      *
        *
      • *

        * ADD: A value has been added to a resource property that is an array or list data type. *

        *
      • *
      • *

        * REMOVE: The property has been removed from the current resource configuration. *

        *
      • *
      • *

        * NOT_EQUAL: The current property value differs from its expected value (as defined in the stack * template and any values specified as template parameters). *

        *
      • *
      * * @param differenceType * The type of property difference.

      *
        *
      • *

        * ADD: A value has been added to a resource property that is an array or list data type. *

        *
      • *
      • *

        * REMOVE: The property has been removed from the current resource configuration. *

        *
      • *
      • *

        * NOT_EQUAL: The current property value differs from its expected value (as defined in the * stack template and any values specified as template parameters). *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see DifferenceType */ public PropertyDifference withDifferenceType(String differenceType) { setDifferenceType(differenceType); return this; } /** *

        * The type of property difference. *

        *
          *
        • *

          * ADD: A value has been added to a resource property that is an array or list data type. *

          *
        • *
        • *

          * REMOVE: The property has been removed from the current resource configuration. *

          *
        • *
        • *

          * NOT_EQUAL: The current property value differs from its expected value (as defined in the stack * template and any values specified as template parameters). *

          *
        • *
        * * @param differenceType * The type of property difference.

        *
          *
        • *

          * ADD: A value has been added to a resource property that is an array or list data type. *

          *
        • *
        • *

          * REMOVE: The property has been removed from the current resource configuration. *

          *
        • *
        • *

          * NOT_EQUAL: The current property value differs from its expected value (as defined in the * stack template and any values specified as template parameters). *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see DifferenceType */ public PropertyDifference withDifferenceType(DifferenceType differenceType) { this.differenceType = differenceType.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 (getPropertyPath() != null) sb.append("PropertyPath: ").append(getPropertyPath()).append(","); if (getExpectedValue() != null) sb.append("ExpectedValue: ").append(getExpectedValue()).append(","); if (getActualValue() != null) sb.append("ActualValue: ").append(getActualValue()).append(","); if (getDifferenceType() != null) sb.append("DifferenceType: ").append(getDifferenceType()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PropertyDifference == false) return false; PropertyDifference other = (PropertyDifference) obj; if (other.getPropertyPath() == null ^ this.getPropertyPath() == null) return false; if (other.getPropertyPath() != null && other.getPropertyPath().equals(this.getPropertyPath()) == false) return false; if (other.getExpectedValue() == null ^ this.getExpectedValue() == null) return false; if (other.getExpectedValue() != null && other.getExpectedValue().equals(this.getExpectedValue()) == false) return false; if (other.getActualValue() == null ^ this.getActualValue() == null) return false; if (other.getActualValue() != null && other.getActualValue().equals(this.getActualValue()) == false) return false; if (other.getDifferenceType() == null ^ this.getDifferenceType() == null) return false; if (other.getDifferenceType() != null && other.getDifferenceType().equals(this.getDifferenceType()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPropertyPath() == null) ? 0 : getPropertyPath().hashCode()); hashCode = prime * hashCode + ((getExpectedValue() == null) ? 0 : getExpectedValue().hashCode()); hashCode = prime * hashCode + ((getActualValue() == null) ? 0 : getActualValue().hashCode()); hashCode = prime * hashCode + ((getDifferenceType() == null) ? 0 : getDifferenceType().hashCode()); return hashCode; } @Override public PropertyDifference clone() { try { return (PropertyDifference) 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