com.amazonaws.services.cloudformation.model.WarningProperty Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudformation 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.cloudformation.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* A specific property that is impacted by a warning.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WarningProperty implements Serializable, Cloneable {
/**
*
* The path of the property. For example, if this is for the S3Bucket
member of the Code
* property, the property path would be Code/S3Bucket
.
*
*/
private String propertyPath;
/**
*
* If true
, the specified property is required.
*
*/
private Boolean required;
/**
*
* The description of the property from the resource provider schema.
*
*/
private String description;
/**
*
* The path of the property. For example, if this is for the S3Bucket
member of the Code
* property, the property path would be Code/S3Bucket
.
*
*
* @param propertyPath
* The path of the property. For example, if this is for the S3Bucket
member of the
* Code
property, the property path would be Code/S3Bucket
.
*/
public void setPropertyPath(String propertyPath) {
this.propertyPath = propertyPath;
}
/**
*
* The path of the property. For example, if this is for the S3Bucket
member of the Code
* property, the property path would be Code/S3Bucket
.
*
*
* @return The path of the property. For example, if this is for the S3Bucket
member of the
* Code
property, the property path would be Code/S3Bucket
.
*/
public String getPropertyPath() {
return this.propertyPath;
}
/**
*
* The path of the property. For example, if this is for the S3Bucket
member of the Code
* property, the property path would be Code/S3Bucket
.
*
*
* @param propertyPath
* The path of the property. For example, if this is for the S3Bucket
member of the
* Code
property, the property path would be Code/S3Bucket
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WarningProperty withPropertyPath(String propertyPath) {
setPropertyPath(propertyPath);
return this;
}
/**
*
* If true
, the specified property is required.
*
*
* @param required
* If true
, the specified property is required.
*/
public void setRequired(Boolean required) {
this.required = required;
}
/**
*
* If true
, the specified property is required.
*
*
* @return If true
, the specified property is required.
*/
public Boolean getRequired() {
return this.required;
}
/**
*
* If true
, the specified property is required.
*
*
* @param required
* If true
, the specified property is required.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WarningProperty withRequired(Boolean required) {
setRequired(required);
return this;
}
/**
*
* If true
, the specified property is required.
*
*
* @return If true
, the specified property is required.
*/
public Boolean isRequired() {
return this.required;
}
/**
*
* The description of the property from the resource provider schema.
*
*
* @param description
* The description of the property from the resource provider schema.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the property from the resource provider schema.
*
*
* @return The description of the property from the resource provider schema.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the property from the resource provider schema.
*
*
* @param description
* The description of the property from the resource provider schema.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WarningProperty withDescription(String description) {
setDescription(description);
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 (getRequired() != null)
sb.append("Required: ").append(getRequired()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof WarningProperty == false)
return false;
WarningProperty other = (WarningProperty) obj;
if (other.getPropertyPath() == null ^ this.getPropertyPath() == null)
return false;
if (other.getPropertyPath() != null && other.getPropertyPath().equals(this.getPropertyPath()) == false)
return false;
if (other.getRequired() == null ^ this.getRequired() == null)
return false;
if (other.getRequired() != null && other.getRequired().equals(this.getRequired()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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 + ((getRequired() == null) ? 0 : getRequired().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
return hashCode;
}
@Override
public WarningProperty clone() {
try {
return (WarningProperty) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}