
com.amazonaws.services.codedeploy.model.ListOnPremisesInstancesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codedeploy Show documentation
/*
* Copyright 2010-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.codedeploy.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Represents the input of a list on-premises instances operation.
*
* .
*/
public class ListOnPremisesInstancesRequest extends AmazonWebServiceRequest
implements Serializable, Cloneable {
/**
*
* The registration status of the on-premises instances:
*
*
* - Deregistered: Include deregistered on-premises instances in the
* resulting list.
* - Registered: Include registered on-premises instances in the resulting
* list.
*
*/
private String registrationStatus;
/**
*
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*
*/
private com.amazonaws.internal.SdkInternalList tagFilters;
/**
*
* An identifier returned from the previous list on-premises instances call.
* It can be used to return the next set of on-premises instances in the
* list.
*
*/
private String nextToken;
/**
*
* The registration status of the on-premises instances:
*
*
* - Deregistered: Include deregistered on-premises instances in the
* resulting list.
* - Registered: Include registered on-premises instances in the resulting
* list.
*
*
* @param registrationStatus
* The registration status of the on-premises instances:
*
* - Deregistered: Include deregistered on-premises instances in
* the resulting list.
* - Registered: Include registered on-premises instances in the
* resulting list.
* @see RegistrationStatus
*/
public void setRegistrationStatus(String registrationStatus) {
this.registrationStatus = registrationStatus;
}
/**
*
* The registration status of the on-premises instances:
*
*
* - Deregistered: Include deregistered on-premises instances in the
* resulting list.
* - Registered: Include registered on-premises instances in the resulting
* list.
*
*
* @return The registration status of the on-premises instances:
*
* - Deregistered: Include deregistered on-premises instances in
* the resulting list.
* - Registered: Include registered on-premises instances in the
* resulting list.
* @see RegistrationStatus
*/
public String getRegistrationStatus() {
return this.registrationStatus;
}
/**
*
* The registration status of the on-premises instances:
*
*
* - Deregistered: Include deregistered on-premises instances in the
* resulting list.
* - Registered: Include registered on-premises instances in the resulting
* list.
*
*
* @param registrationStatus
* The registration status of the on-premises instances:
*
* - Deregistered: Include deregistered on-premises instances in
* the resulting list.
* - Registered: Include registered on-premises instances in the
* resulting list.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see RegistrationStatus
*/
public ListOnPremisesInstancesRequest withRegistrationStatus(
String registrationStatus) {
setRegistrationStatus(registrationStatus);
return this;
}
/**
*
* The registration status of the on-premises instances:
*
*
* - Deregistered: Include deregistered on-premises instances in the
* resulting list.
* - Registered: Include registered on-premises instances in the resulting
* list.
*
*
* @param registrationStatus
* The registration status of the on-premises instances:
*
* - Deregistered: Include deregistered on-premises instances in
* the resulting list.
* - Registered: Include registered on-premises instances in the
* resulting list.
* @see RegistrationStatus
*/
public void setRegistrationStatus(RegistrationStatus registrationStatus) {
this.registrationStatus = registrationStatus.toString();
}
/**
*
* The registration status of the on-premises instances:
*
*
* - Deregistered: Include deregistered on-premises instances in the
* resulting list.
* - Registered: Include registered on-premises instances in the resulting
* list.
*
*
* @param registrationStatus
* The registration status of the on-premises instances:
*
* - Deregistered: Include deregistered on-premises instances in
* the resulting list.
* - Registered: Include registered on-premises instances in the
* resulting list.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see RegistrationStatus
*/
public ListOnPremisesInstancesRequest withRegistrationStatus(
RegistrationStatus registrationStatus) {
setRegistrationStatus(registrationStatus);
return this;
}
/**
*
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*
*
* @return The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*/
public java.util.List getTagFilters() {
if (tagFilters == null) {
tagFilters = new com.amazonaws.internal.SdkInternalList();
}
return tagFilters;
}
/**
*
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*
*
* @param tagFilters
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*/
public void setTagFilters(java.util.Collection tagFilters) {
if (tagFilters == null) {
this.tagFilters = null;
return;
}
this.tagFilters = new com.amazonaws.internal.SdkInternalList(
tagFilters);
}
/**
*
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*
*
* NOTE: This method appends the values to the existing list (if
* any). Use {@link #setTagFilters(java.util.Collection)} or
* {@link #withTagFilters(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tagFilters
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListOnPremisesInstancesRequest withTagFilters(
TagFilter... tagFilters) {
if (this.tagFilters == null) {
setTagFilters(new com.amazonaws.internal.SdkInternalList(
tagFilters.length));
}
for (TagFilter ele : tagFilters) {
this.tagFilters.add(ele);
}
return this;
}
/**
*
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
*
*
* @param tagFilters
* The on-premises instance tags that will be used to restrict the
* corresponding on-premises instance names returned.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListOnPremisesInstancesRequest withTagFilters(
java.util.Collection tagFilters) {
setTagFilters(tagFilters);
return this;
}
/**
*
* An identifier returned from the previous list on-premises instances call.
* It can be used to return the next set of on-premises instances in the
* list.
*
*
* @param nextToken
* An identifier returned from the previous list on-premises
* instances call. It can be used to return the next set of
* on-premises instances in the list.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* An identifier returned from the previous list on-premises instances call.
* It can be used to return the next set of on-premises instances in the
* list.
*
*
* @return An identifier returned from the previous list on-premises
* instances call. It can be used to return the next set of
* on-premises instances in the list.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* An identifier returned from the previous list on-premises instances call.
* It can be used to return the next set of on-premises instances in the
* list.
*
*
* @param nextToken
* An identifier returned from the previous list on-premises
* instances call. It can be used to return the next set of
* on-premises instances in the list.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ListOnPremisesInstancesRequest withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getRegistrationStatus() != null)
sb.append("RegistrationStatus: " + getRegistrationStatus() + ",");
if (getTagFilters() != null)
sb.append("TagFilters: " + getTagFilters() + ",");
if (getNextToken() != null)
sb.append("NextToken: " + getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListOnPremisesInstancesRequest == false)
return false;
ListOnPremisesInstancesRequest other = (ListOnPremisesInstancesRequest) obj;
if (other.getRegistrationStatus() == null
^ this.getRegistrationStatus() == null)
return false;
if (other.getRegistrationStatus() != null
&& other.getRegistrationStatus().equals(
this.getRegistrationStatus()) == false)
return false;
if (other.getTagFilters() == null ^ this.getTagFilters() == null)
return false;
if (other.getTagFilters() != null
&& other.getTagFilters().equals(this.getTagFilters()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null
&& other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime
* hashCode
+ ((getRegistrationStatus() == null) ? 0
: getRegistrationStatus().hashCode());
hashCode = prime * hashCode
+ ((getTagFilters() == null) ? 0 : getTagFilters().hashCode());
hashCode = prime * hashCode
+ ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListOnPremisesInstancesRequest clone() {
return (ListOnPremisesInstancesRequest) super.clone();
}
}