
com.amazonaws.services.simplesystemsmanagement.model.CreateAssociationRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-ssm Show documentation
Show all versions of aws-java-sdk-ssm Show documentation
The AWS Java SDK for AWS Simple Systems Management Service holds the client classes that are used for communicating with the AWS Simple Systems Management Service
/*
* Copyright 2011-2016 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 com.amazonaws.AmazonWebServiceRequest;
/**
*
*/
public class CreateAssociationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the SSM document.
*
*/
private String name;
/**
*
* The instance ID.
*
*/
private String instanceId;
/**
*
* The parameters for the documents runtime configuration.
*
*/
private java.util.Map> parameters;
/**
*
* The name of the SSM document.
*
*
* @param name
* The name of the SSM document.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the SSM document.
*
*
* @return The name of the SSM document.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the SSM document.
*
*
* @param name
* The name of the SSM document.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateAssociationRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The instance ID.
*
*
* @param instanceId
* The instance ID.
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
*
* The instance ID.
*
*
* @return The instance ID.
*/
public String getInstanceId() {
return this.instanceId;
}
/**
*
* The instance ID.
*
*
* @param instanceId
* The instance ID.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateAssociationRequest withInstanceId(String instanceId) {
setInstanceId(instanceId);
return this;
}
/**
*
* The parameters for the documents runtime configuration.
*
*
* @return The parameters for the documents runtime configuration.
*/
public java.util.Map> getParameters() {
return parameters;
}
/**
*
* The parameters for the documents runtime configuration.
*
*
* @param parameters
* The parameters for the documents runtime configuration.
*/
public void setParameters(java.util.Map> parameters) {
this.parameters = parameters;
}
/**
*
* The parameters for the documents runtime configuration.
*
*
* @param parameters
* The parameters for the documents runtime configuration.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateAssociationRequest withParameters(java.util.Map> parameters) {
setParameters(parameters);
return this;
}
public CreateAssociationRequest 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. <p> Returns a reference to this object so that method calls can
* be chained together.
*/
public CreateAssociationRequest 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 (getName() != null)
sb.append("Name: " + getName() + ",");
if (getInstanceId() != null)
sb.append("InstanceId: " + getInstanceId() + ",");
if (getParameters() != null)
sb.append("Parameters: " + 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 CreateAssociationRequest == false)
return false;
CreateAssociationRequest other = (CreateAssociationRequest) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == 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 + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getParameters() == null) ? 0 : getParameters().hashCode());
return hashCode;
}
@Override
public CreateAssociationRequest clone() {
return (CreateAssociationRequest) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy