/*
* Copyright 2012-2017 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.simplesystemsmanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/StartAutomationExecution" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StartAutomationExecutionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* The name of the Automation document to use for this execution.
* </p>
*/
private String documentName;
/**
* <p>
* The version of the Automation document to use for this execution.
* </p>
*/
private String documentVersion;
/**
* <p>
* A key-value map of execution parameters, which match the declared parameters in the Automation document.
* </p>
*/
private java.util.Map<String, java.util.List<String>> parameters;
/**
* <p>
* The name of the Automation document to use for this execution.
* </p>
*
* @param documentName
* The name of the Automation document to use for this execution.
*/
public void setDocumentName(String documentName) {
this.documentName = documentName;
}
/**
* <p>
* The name of the Automation document to use for this execution.
* </p>
*
* @return The name of the Automation document to use for this execution.
*/
public String getDocumentName() {
return this.documentName;
}
/**
* <p>
* The name of the Automation document to use for this execution.
* </p>
*
* @param documentName
* The name of the Automation document to use for this execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartAutomationExecutionRequest withDocumentName(String documentName) {
setDocumentName(documentName);
return this;
}
/**
* <p>
* The version of the Automation document to use for this execution.
* </p>
*
* @param documentVersion
* The version of the Automation document to use for this execution.
*/
public void setDocumentVersion(String documentVersion) {
this.documentVersion = documentVersion;
}
/**
* <p>
* The version of the Automation document to use for this execution.
* </p>
*
* @return The version of the Automation document to use for this execution.
*/
public String getDocumentVersion() {
return this.documentVersion;
}
/**
* <p>
* The version of the Automation document to use for this execution.
* </p>
*
* @param documentVersion
* The version of the Automation document to use for this execution.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartAutomationExecutionRequest withDocumentVersion(String documentVersion) {
setDocumentVersion(documentVersion);
return this;
}
/**
* <p>
* A key-value map of execution parameters, which match the declared parameters in the Automation document.
* </p>
*
* @return A key-value map of execution parameters, which match the declared parameters in the Automation document.
*/
public java.util.Map<String, java.util.List<String>> getParameters() {
return parameters;
}
/**
* <p>
* A key-value map of execution parameters, which match the declared parameters in the Automation document.
* </p>
*
* @param parameters
* A key-value map of execution parameters, which match the declared parameters in the Automation document.
*/
public void setParameters(java.util.Map<String, java.util.List<String>> parameters) {
this.parameters = parameters;
}
/**
* <p>
* A key-value map of execution parameters, which match the declared parameters in the Automation document.
* </p>
*
* @param parameters
* A key-value map of execution parameters, which match the declared parameters in the Automation document.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartAutomationExecutionRequest withParameters(java.util.Map<String, java.util.List<String>> parameters) {
setParameters(parameters);
return this;
}
public StartAutomationExecutionRequest addParametersEntry(String key, java.util.List<String> value) {
if (null == this.parameters) {
this.parameters = new java.util.HashMap<String, java.util.List<String>>();
}
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 StartAutomationExecutionRequest clearParametersEntries() {
this.parameters = null;
return this;
}
/**
* Returns a string representation of this object; useful for testing and debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getDocumentName() != null)
sb.append("DocumentName: ").append(getDocumentName()).append(",");
if (getDocumentVersion() != null)
sb.append("DocumentVersion: ").append(getDocumentVersion()).append(",");
if (getParameters() != null)
sb.append("Parameters: ").append(getParameters());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StartAutomationExecutionRequest == false)
return false;
StartAutomationExecutionRequest other = (StartAutomationExecutionRequest) obj;
if (other.getDocumentName() == null ^ this.getDocumentName() == null)
return false;
if (other.getDocumentName() != null && other.getDocumentName().equals(this.getDocumentName()) == 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.getParameters() == null ^ this.getParameters() == null)
return false;
if (other.getParameters() != null && other.getParameters().equals(this.getParameters()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDocumentName() == null) ? 0 : getDocumentName().hashCode());
hashCode = prime * hashCode + ((getDocumentVersion() == null) ? 0 : getDocumentVersion().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
return hashCode;
}
@Override
public StartAutomationExecutionRequest clone() {
return (StartAutomationExecutionRequest) super.clone();
}
}