com.amazonaws.services.cloudformation.model.ChangeSetHook Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudformation Show documentation
/*
* 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;
/**
*
* Specifies the resource, the hook, and the hook version to be invoked.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ChangeSetHook implements Serializable, Cloneable {
/**
*
* Specifies the points in provisioning logic where a hook is invoked.
*
*/
private String invocationPoint;
/**
*
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
*
*/
private String failureMode;
/**
*
* The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of
* Organization::Service::Hook
.
*
*
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
*
*/
private String typeName;
/**
*
* The version ID of the type specified.
*
*/
private String typeVersionId;
/**
*
* The version ID of the type configuration.
*
*/
private String typeConfigurationVersionId;
/**
*
* Specifies details about the target that the hook will run against.
*
*/
private ChangeSetHookTargetDetails targetDetails;
/**
*
* Specifies the points in provisioning logic where a hook is invoked.
*
*
* @param invocationPoint
* Specifies the points in provisioning logic where a hook is invoked.
* @see HookInvocationPoint
*/
public void setInvocationPoint(String invocationPoint) {
this.invocationPoint = invocationPoint;
}
/**
*
* Specifies the points in provisioning logic where a hook is invoked.
*
*
* @return Specifies the points in provisioning logic where a hook is invoked.
* @see HookInvocationPoint
*/
public String getInvocationPoint() {
return this.invocationPoint;
}
/**
*
* Specifies the points in provisioning logic where a hook is invoked.
*
*
* @param invocationPoint
* Specifies the points in provisioning logic where a hook is invoked.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HookInvocationPoint
*/
public ChangeSetHook withInvocationPoint(String invocationPoint) {
setInvocationPoint(invocationPoint);
return this;
}
/**
*
* Specifies the points in provisioning logic where a hook is invoked.
*
*
* @param invocationPoint
* Specifies the points in provisioning logic where a hook is invoked.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HookInvocationPoint
*/
public ChangeSetHook withInvocationPoint(HookInvocationPoint invocationPoint) {
this.invocationPoint = invocationPoint.toString();
return this;
}
/**
*
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
*
*
* @param failureMode
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
* @see HookFailureMode
*/
public void setFailureMode(String failureMode) {
this.failureMode = failureMode;
}
/**
*
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
*
*
* @return Specify the hook failure mode for non-compliant resources in the followings ways.
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
* @see HookFailureMode
*/
public String getFailureMode() {
return this.failureMode;
}
/**
*
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
*
*
* @param failureMode
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see HookFailureMode
*/
public ChangeSetHook withFailureMode(String failureMode) {
setFailureMode(failureMode);
return this;
}
/**
*
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
*
*
* @param failureMode
* Specify the hook failure mode for non-compliant resources in the followings ways.
*
* -
*
* FAIL
Stops provisioning resources.
*
*
* -
*
* WARN
Allows provisioning to continue with a warning message.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see HookFailureMode
*/
public ChangeSetHook withFailureMode(HookFailureMode failureMode) {
this.failureMode = failureMode.toString();
return this;
}
/**
*
* The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of
* Organization::Service::Hook
.
*
*
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
*
*
* @param typeName
* The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern
* of Organization::Service::Hook
.
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
*/
public void setTypeName(String typeName) {
this.typeName = typeName;
}
/**
*
* The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of
* Organization::Service::Hook
.
*
*
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
*
*
* @return The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern
* of Organization::Service::Hook
.
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
*/
public String getTypeName() {
return this.typeName;
}
/**
*
* The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern of
* Organization::Service::Hook
.
*
*
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
*
*
* @param typeName
* The unique name for your hook. Specifies a three-part namespace for your hook, with a recommended pattern
* of Organization::Service::Hook
.
*
* The following organization namespaces are reserved and can't be used in your hook type names:
*
*
* -
*
* Alexa
*
*
* -
*
* AMZN
*
*
* -
*
* Amazon
*
*
* -
*
* ASK
*
*
* -
*
* AWS
*
*
* -
*
* Custom
*
*
* -
*
* Dev
*
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetHook withTypeName(String typeName) {
setTypeName(typeName);
return this;
}
/**
*
* The version ID of the type specified.
*
*
* @param typeVersionId
* The version ID of the type specified.
*/
public void setTypeVersionId(String typeVersionId) {
this.typeVersionId = typeVersionId;
}
/**
*
* The version ID of the type specified.
*
*
* @return The version ID of the type specified.
*/
public String getTypeVersionId() {
return this.typeVersionId;
}
/**
*
* The version ID of the type specified.
*
*
* @param typeVersionId
* The version ID of the type specified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetHook withTypeVersionId(String typeVersionId) {
setTypeVersionId(typeVersionId);
return this;
}
/**
*
* The version ID of the type configuration.
*
*
* @param typeConfigurationVersionId
* The version ID of the type configuration.
*/
public void setTypeConfigurationVersionId(String typeConfigurationVersionId) {
this.typeConfigurationVersionId = typeConfigurationVersionId;
}
/**
*
* The version ID of the type configuration.
*
*
* @return The version ID of the type configuration.
*/
public String getTypeConfigurationVersionId() {
return this.typeConfigurationVersionId;
}
/**
*
* The version ID of the type configuration.
*
*
* @param typeConfigurationVersionId
* The version ID of the type configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetHook withTypeConfigurationVersionId(String typeConfigurationVersionId) {
setTypeConfigurationVersionId(typeConfigurationVersionId);
return this;
}
/**
*
* Specifies details about the target that the hook will run against.
*
*
* @param targetDetails
* Specifies details about the target that the hook will run against.
*/
public void setTargetDetails(ChangeSetHookTargetDetails targetDetails) {
this.targetDetails = targetDetails;
}
/**
*
* Specifies details about the target that the hook will run against.
*
*
* @return Specifies details about the target that the hook will run against.
*/
public ChangeSetHookTargetDetails getTargetDetails() {
return this.targetDetails;
}
/**
*
* Specifies details about the target that the hook will run against.
*
*
* @param targetDetails
* Specifies details about the target that the hook will run against.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChangeSetHook withTargetDetails(ChangeSetHookTargetDetails targetDetails) {
setTargetDetails(targetDetails);
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 (getInvocationPoint() != null)
sb.append("InvocationPoint: ").append(getInvocationPoint()).append(",");
if (getFailureMode() != null)
sb.append("FailureMode: ").append(getFailureMode()).append(",");
if (getTypeName() != null)
sb.append("TypeName: ").append(getTypeName()).append(",");
if (getTypeVersionId() != null)
sb.append("TypeVersionId: ").append(getTypeVersionId()).append(",");
if (getTypeConfigurationVersionId() != null)
sb.append("TypeConfigurationVersionId: ").append(getTypeConfigurationVersionId()).append(",");
if (getTargetDetails() != null)
sb.append("TargetDetails: ").append(getTargetDetails());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ChangeSetHook == false)
return false;
ChangeSetHook other = (ChangeSetHook) obj;
if (other.getInvocationPoint() == null ^ this.getInvocationPoint() == null)
return false;
if (other.getInvocationPoint() != null && other.getInvocationPoint().equals(this.getInvocationPoint()) == false)
return false;
if (other.getFailureMode() == null ^ this.getFailureMode() == null)
return false;
if (other.getFailureMode() != null && other.getFailureMode().equals(this.getFailureMode()) == false)
return false;
if (other.getTypeName() == null ^ this.getTypeName() == null)
return false;
if (other.getTypeName() != null && other.getTypeName().equals(this.getTypeName()) == false)
return false;
if (other.getTypeVersionId() == null ^ this.getTypeVersionId() == null)
return false;
if (other.getTypeVersionId() != null && other.getTypeVersionId().equals(this.getTypeVersionId()) == false)
return false;
if (other.getTypeConfigurationVersionId() == null ^ this.getTypeConfigurationVersionId() == null)
return false;
if (other.getTypeConfigurationVersionId() != null && other.getTypeConfigurationVersionId().equals(this.getTypeConfigurationVersionId()) == false)
return false;
if (other.getTargetDetails() == null ^ this.getTargetDetails() == null)
return false;
if (other.getTargetDetails() != null && other.getTargetDetails().equals(this.getTargetDetails()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getInvocationPoint() == null) ? 0 : getInvocationPoint().hashCode());
hashCode = prime * hashCode + ((getFailureMode() == null) ? 0 : getFailureMode().hashCode());
hashCode = prime * hashCode + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
hashCode = prime * hashCode + ((getTypeVersionId() == null) ? 0 : getTypeVersionId().hashCode());
hashCode = prime * hashCode + ((getTypeConfigurationVersionId() == null) ? 0 : getTypeConfigurationVersionId().hashCode());
hashCode = prime * hashCode + ((getTargetDetails() == null) ? 0 : getTargetDetails().hashCode());
return hashCode;
}
@Override
public ChangeSetHook clone() {
try {
return (ChangeSetHook) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}