com.amazonaws.services.mgn.model.PutSourceServerActionResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-mgn 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.mgn.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PutSourceServerActionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Source server post migration custom action ID.
*
*/
private String actionID;
/**
*
* Source server post migration custom action name.
*
*/
private String actionName;
/**
*
* Source server post migration custom action active status.
*
*/
private Boolean active;
/**
*
* Source server post migration custom action category.
*
*/
private String category;
/**
*
* Source server post migration custom action description.
*
*/
private String description;
/**
*
* Source server post migration custom action document identifier.
*
*/
private String documentIdentifier;
/**
*
* Source server post migration custom action document version.
*
*/
private String documentVersion;
/**
*
* Source server post migration custom action external parameters.
*
*/
private java.util.Map externalParameters;
/**
*
* Source server post migration custom action must succeed for cutover.
*
*/
private Boolean mustSucceedForCutover;
/**
*
* Source server post migration custom action order.
*
*/
private Integer order;
/**
*
* Source server post migration custom action parameters.
*
*/
private java.util.Map> parameters;
/**
*
* Source server post migration custom action timeout in seconds.
*
*/
private Integer timeoutSeconds;
/**
*
* Source server post migration custom action ID.
*
*
* @param actionID
* Source server post migration custom action ID.
*/
public void setActionID(String actionID) {
this.actionID = actionID;
}
/**
*
* Source server post migration custom action ID.
*
*
* @return Source server post migration custom action ID.
*/
public String getActionID() {
return this.actionID;
}
/**
*
* Source server post migration custom action ID.
*
*
* @param actionID
* Source server post migration custom action ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withActionID(String actionID) {
setActionID(actionID);
return this;
}
/**
*
* Source server post migration custom action name.
*
*
* @param actionName
* Source server post migration custom action name.
*/
public void setActionName(String actionName) {
this.actionName = actionName;
}
/**
*
* Source server post migration custom action name.
*
*
* @return Source server post migration custom action name.
*/
public String getActionName() {
return this.actionName;
}
/**
*
* Source server post migration custom action name.
*
*
* @param actionName
* Source server post migration custom action name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withActionName(String actionName) {
setActionName(actionName);
return this;
}
/**
*
* Source server post migration custom action active status.
*
*
* @param active
* Source server post migration custom action active status.
*/
public void setActive(Boolean active) {
this.active = active;
}
/**
*
* Source server post migration custom action active status.
*
*
* @return Source server post migration custom action active status.
*/
public Boolean getActive() {
return this.active;
}
/**
*
* Source server post migration custom action active status.
*
*
* @param active
* Source server post migration custom action active status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withActive(Boolean active) {
setActive(active);
return this;
}
/**
*
* Source server post migration custom action active status.
*
*
* @return Source server post migration custom action active status.
*/
public Boolean isActive() {
return this.active;
}
/**
*
* Source server post migration custom action category.
*
*
* @param category
* Source server post migration custom action category.
* @see ActionCategory
*/
public void setCategory(String category) {
this.category = category;
}
/**
*
* Source server post migration custom action category.
*
*
* @return Source server post migration custom action category.
* @see ActionCategory
*/
public String getCategory() {
return this.category;
}
/**
*
* Source server post migration custom action category.
*
*
* @param category
* Source server post migration custom action category.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionCategory
*/
public PutSourceServerActionResult withCategory(String category) {
setCategory(category);
return this;
}
/**
*
* Source server post migration custom action category.
*
*
* @param category
* Source server post migration custom action category.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ActionCategory
*/
public PutSourceServerActionResult withCategory(ActionCategory category) {
this.category = category.toString();
return this;
}
/**
*
* Source server post migration custom action description.
*
*
* @param description
* Source server post migration custom action description.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* Source server post migration custom action description.
*
*
* @return Source server post migration custom action description.
*/
public String getDescription() {
return this.description;
}
/**
*
* Source server post migration custom action description.
*
*
* @param description
* Source server post migration custom action description.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* Source server post migration custom action document identifier.
*
*
* @param documentIdentifier
* Source server post migration custom action document identifier.
*/
public void setDocumentIdentifier(String documentIdentifier) {
this.documentIdentifier = documentIdentifier;
}
/**
*
* Source server post migration custom action document identifier.
*
*
* @return Source server post migration custom action document identifier.
*/
public String getDocumentIdentifier() {
return this.documentIdentifier;
}
/**
*
* Source server post migration custom action document identifier.
*
*
* @param documentIdentifier
* Source server post migration custom action document identifier.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withDocumentIdentifier(String documentIdentifier) {
setDocumentIdentifier(documentIdentifier);
return this;
}
/**
*
* Source server post migration custom action document version.
*
*
* @param documentVersion
* Source server post migration custom action document version.
*/
public void setDocumentVersion(String documentVersion) {
this.documentVersion = documentVersion;
}
/**
*
* Source server post migration custom action document version.
*
*
* @return Source server post migration custom action document version.
*/
public String getDocumentVersion() {
return this.documentVersion;
}
/**
*
* Source server post migration custom action document version.
*
*
* @param documentVersion
* Source server post migration custom action document version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withDocumentVersion(String documentVersion) {
setDocumentVersion(documentVersion);
return this;
}
/**
*
* Source server post migration custom action external parameters.
*
*
* @return Source server post migration custom action external parameters.
*/
public java.util.Map getExternalParameters() {
return externalParameters;
}
/**
*
* Source server post migration custom action external parameters.
*
*
* @param externalParameters
* Source server post migration custom action external parameters.
*/
public void setExternalParameters(java.util.Map externalParameters) {
this.externalParameters = externalParameters;
}
/**
*
* Source server post migration custom action external parameters.
*
*
* @param externalParameters
* Source server post migration custom action external parameters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withExternalParameters(java.util.Map externalParameters) {
setExternalParameters(externalParameters);
return this;
}
/**
* Add a single ExternalParameters entry
*
* @see PutSourceServerActionResult#withExternalParameters
* @returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult addExternalParametersEntry(String key, SsmExternalParameter value) {
if (null == this.externalParameters) {
this.externalParameters = new java.util.HashMap();
}
if (this.externalParameters.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.externalParameters.put(key, value);
return this;
}
/**
* Removes all the entries added into ExternalParameters.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult clearExternalParametersEntries() {
this.externalParameters = null;
return this;
}
/**
*
* Source server post migration custom action must succeed for cutover.
*
*
* @param mustSucceedForCutover
* Source server post migration custom action must succeed for cutover.
*/
public void setMustSucceedForCutover(Boolean mustSucceedForCutover) {
this.mustSucceedForCutover = mustSucceedForCutover;
}
/**
*
* Source server post migration custom action must succeed for cutover.
*
*
* @return Source server post migration custom action must succeed for cutover.
*/
public Boolean getMustSucceedForCutover() {
return this.mustSucceedForCutover;
}
/**
*
* Source server post migration custom action must succeed for cutover.
*
*
* @param mustSucceedForCutover
* Source server post migration custom action must succeed for cutover.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withMustSucceedForCutover(Boolean mustSucceedForCutover) {
setMustSucceedForCutover(mustSucceedForCutover);
return this;
}
/**
*
* Source server post migration custom action must succeed for cutover.
*
*
* @return Source server post migration custom action must succeed for cutover.
*/
public Boolean isMustSucceedForCutover() {
return this.mustSucceedForCutover;
}
/**
*
* Source server post migration custom action order.
*
*
* @param order
* Source server post migration custom action order.
*/
public void setOrder(Integer order) {
this.order = order;
}
/**
*
* Source server post migration custom action order.
*
*
* @return Source server post migration custom action order.
*/
public Integer getOrder() {
return this.order;
}
/**
*
* Source server post migration custom action order.
*
*
* @param order
* Source server post migration custom action order.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withOrder(Integer order) {
setOrder(order);
return this;
}
/**
*
* Source server post migration custom action parameters.
*
*
* @return Source server post migration custom action parameters.
*/
public java.util.Map> getParameters() {
return parameters;
}
/**
*
* Source server post migration custom action parameters.
*
*
* @param parameters
* Source server post migration custom action parameters.
*/
public void setParameters(java.util.Map> parameters) {
this.parameters = parameters;
}
/**
*
* Source server post migration custom action parameters.
*
*
* @param parameters
* Source server post migration custom action parameters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withParameters(java.util.Map> parameters) {
setParameters(parameters);
return this;
}
/**
* Add a single Parameters entry
*
* @see PutSourceServerActionResult#withParameters
* @returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult addParametersEntry(String key, java.util.List value) {
if (null == this.parameters) {
this.parameters = new java.util.HashMap>();
}
if (this.parameters.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.parameters.put(key, value);
return this;
}
/**
* Removes all the entries added into Parameters.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult clearParametersEntries() {
this.parameters = null;
return this;
}
/**
*
* Source server post migration custom action timeout in seconds.
*
*
* @param timeoutSeconds
* Source server post migration custom action timeout in seconds.
*/
public void setTimeoutSeconds(Integer timeoutSeconds) {
this.timeoutSeconds = timeoutSeconds;
}
/**
*
* Source server post migration custom action timeout in seconds.
*
*
* @return Source server post migration custom action timeout in seconds.
*/
public Integer getTimeoutSeconds() {
return this.timeoutSeconds;
}
/**
*
* Source server post migration custom action timeout in seconds.
*
*
* @param timeoutSeconds
* Source server post migration custom action timeout in seconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutSourceServerActionResult withTimeoutSeconds(Integer timeoutSeconds) {
setTimeoutSeconds(timeoutSeconds);
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 (getActionID() != null)
sb.append("ActionID: ").append(getActionID()).append(",");
if (getActionName() != null)
sb.append("ActionName: ").append(getActionName()).append(",");
if (getActive() != null)
sb.append("Active: ").append(getActive()).append(",");
if (getCategory() != null)
sb.append("Category: ").append(getCategory()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getDocumentIdentifier() != null)
sb.append("DocumentIdentifier: ").append(getDocumentIdentifier()).append(",");
if (getDocumentVersion() != null)
sb.append("DocumentVersion: ").append(getDocumentVersion()).append(",");
if (getExternalParameters() != null)
sb.append("ExternalParameters: ").append(getExternalParameters()).append(",");
if (getMustSucceedForCutover() != null)
sb.append("MustSucceedForCutover: ").append(getMustSucceedForCutover()).append(",");
if (getOrder() != null)
sb.append("Order: ").append(getOrder()).append(",");
if (getParameters() != null)
sb.append("Parameters: ").append(getParameters()).append(",");
if (getTimeoutSeconds() != null)
sb.append("TimeoutSeconds: ").append(getTimeoutSeconds());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutSourceServerActionResult == false)
return false;
PutSourceServerActionResult other = (PutSourceServerActionResult) obj;
if (other.getActionID() == null ^ this.getActionID() == null)
return false;
if (other.getActionID() != null && other.getActionID().equals(this.getActionID()) == false)
return false;
if (other.getActionName() == null ^ this.getActionName() == null)
return false;
if (other.getActionName() != null && other.getActionName().equals(this.getActionName()) == false)
return false;
if (other.getActive() == null ^ this.getActive() == null)
return false;
if (other.getActive() != null && other.getActive().equals(this.getActive()) == false)
return false;
if (other.getCategory() == null ^ this.getCategory() == null)
return false;
if (other.getCategory() != null && other.getCategory().equals(this.getCategory()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getDocumentIdentifier() == null ^ this.getDocumentIdentifier() == null)
return false;
if (other.getDocumentIdentifier() != null && other.getDocumentIdentifier().equals(this.getDocumentIdentifier()) == false)
return false;
if (other.getDocumentVersion() == null ^ this.getDocumentVersion() == null)
return false;
if (other.getDocumentVersion() != null && other.getDocumentVersion().equals(this.getDocumentVersion()) == false)
return false;
if (other.getExternalParameters() == null ^ this.getExternalParameters() == null)
return false;
if (other.getExternalParameters() != null && other.getExternalParameters().equals(this.getExternalParameters()) == false)
return false;
if (other.getMustSucceedForCutover() == null ^ this.getMustSucceedForCutover() == null)
return false;
if (other.getMustSucceedForCutover() != null && other.getMustSucceedForCutover().equals(this.getMustSucceedForCutover()) == false)
return false;
if (other.getOrder() == null ^ this.getOrder() == null)
return false;
if (other.getOrder() != null && other.getOrder().equals(this.getOrder()) == false)
return false;
if (other.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == false)
return false;
if (other.getTimeoutSeconds() == null ^ this.getTimeoutSeconds() == null)
return false;
if (other.getTimeoutSeconds() != null && other.getTimeoutSeconds().equals(this.getTimeoutSeconds()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getActionID() == null) ? 0 : getActionID().hashCode());
hashCode = prime * hashCode + ((getActionName() == null) ? 0 : getActionName().hashCode());
hashCode = prime * hashCode + ((getActive() == null) ? 0 : getActive().hashCode());
hashCode = prime * hashCode + ((getCategory() == null) ? 0 : getCategory().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getDocumentIdentifier() == null) ? 0 : getDocumentIdentifier().hashCode());
hashCode = prime * hashCode + ((getDocumentVersion() == null) ? 0 : getDocumentVersion().hashCode());
hashCode = prime * hashCode + ((getExternalParameters() == null) ? 0 : getExternalParameters().hashCode());
hashCode = prime * hashCode + ((getMustSucceedForCutover() == null) ? 0 : getMustSucceedForCutover().hashCode());
hashCode = prime * hashCode + ((getOrder() == null) ? 0 : getOrder().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
hashCode = prime * hashCode + ((getTimeoutSeconds() == null) ? 0 : getTimeoutSeconds().hashCode());
return hashCode;
}
@Override
public PutSourceServerActionResult clone() {
try {
return (PutSourceServerActionResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}