com.amazonaws.services.codedeploy.model.ListDeploymentInstancesRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codedeploy Show documentation
/*
* Copyright 2017-2022 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 javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Represents the input of a ListDeploymentInstances
operation.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListDeploymentInstancesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique ID of a deployment.
*
*/
private String deploymentId;
/**
*
* An identifier returned from the previous list deployment instances call. It can be used to return the next set of
* deployment instances in the list.
*
*/
private String nextToken;
/**
*
* A subset of instances to list by status:
*
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
*
*/
private com.amazonaws.internal.SdkInternalList instanceStatusFilter;
/**
*
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in
* the replacement environment ("GREEN"), for which you want to view instance information.
*
*/
private com.amazonaws.internal.SdkInternalList instanceTypeFilter;
/**
*
* The unique ID of a deployment.
*
*
* @param deploymentId
* The unique ID of a deployment.
*/
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
/**
*
* The unique ID of a deployment.
*
*
* @return The unique ID of a deployment.
*/
public String getDeploymentId() {
return this.deploymentId;
}
/**
*
* The unique ID of a deployment.
*
*
* @param deploymentId
* The unique ID of a deployment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListDeploymentInstancesRequest withDeploymentId(String deploymentId) {
setDeploymentId(deploymentId);
return this;
}
/**
*
* An identifier returned from the previous list deployment instances call. It can be used to return the next set of
* deployment instances in the list.
*
*
* @param nextToken
* An identifier returned from the previous list deployment instances call. It can be used to return the next
* set of deployment instances in the list.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* An identifier returned from the previous list deployment instances call. It can be used to return the next set of
* deployment instances in the list.
*
*
* @return An identifier returned from the previous list deployment instances call. It can be used to return the
* next set of deployment instances in the list.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* An identifier returned from the previous list deployment instances call. It can be used to return the next set of
* deployment instances in the list.
*
*
* @param nextToken
* An identifier returned from the previous list deployment instances call. It can be used to return the next
* set of deployment instances in the list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListDeploymentInstancesRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* A subset of instances to list by status:
*
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
*
*
* @return A subset of instances to list by status:
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
* @see InstanceStatus
*/
public java.util.List getInstanceStatusFilter() {
if (instanceStatusFilter == null) {
instanceStatusFilter = new com.amazonaws.internal.SdkInternalList();
}
return instanceStatusFilter;
}
/**
*
* A subset of instances to list by status:
*
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
*
*
* @param instanceStatusFilter
* A subset of instances to list by status:
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
* @see InstanceStatus
*/
public void setInstanceStatusFilter(java.util.Collection instanceStatusFilter) {
if (instanceStatusFilter == null) {
this.instanceStatusFilter = null;
return;
}
this.instanceStatusFilter = new com.amazonaws.internal.SdkInternalList(instanceStatusFilter);
}
/**
*
* A subset of instances to list by status:
*
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInstanceStatusFilter(java.util.Collection)} or {@link #withInstanceStatusFilter(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param instanceStatusFilter
* A subset of instances to list by status:
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceStatus
*/
public ListDeploymentInstancesRequest withInstanceStatusFilter(String... instanceStatusFilter) {
if (this.instanceStatusFilter == null) {
setInstanceStatusFilter(new com.amazonaws.internal.SdkInternalList(instanceStatusFilter.length));
}
for (String ele : instanceStatusFilter) {
this.instanceStatusFilter.add(ele);
}
return this;
}
/**
*
* A subset of instances to list by status:
*
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
*
*
* @param instanceStatusFilter
* A subset of instances to list by status:
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceStatus
*/
public ListDeploymentInstancesRequest withInstanceStatusFilter(java.util.Collection instanceStatusFilter) {
setInstanceStatusFilter(instanceStatusFilter);
return this;
}
/**
*
* A subset of instances to list by status:
*
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
*
*
* @param instanceStatusFilter
* A subset of instances to list by status:
*
* -
*
* Pending
: Include those instances with pending deployments.
*
*
* -
*
* InProgress
: Include those instances where deployments are still in progress.
*
*
* -
*
* Succeeded
: Include those instances with successful deployments.
*
*
* -
*
* Failed
: Include those instances with failed deployments.
*
*
* -
*
* Skipped
: Include those instances with skipped deployments.
*
*
* -
*
* Unknown
: Include those instances with deployments in an unknown state.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceStatus
*/
public ListDeploymentInstancesRequest withInstanceStatusFilter(InstanceStatus... instanceStatusFilter) {
com.amazonaws.internal.SdkInternalList instanceStatusFilterCopy = new com.amazonaws.internal.SdkInternalList(
instanceStatusFilter.length);
for (InstanceStatus value : instanceStatusFilter) {
instanceStatusFilterCopy.add(value.toString());
}
if (getInstanceStatusFilter() == null) {
setInstanceStatusFilter(instanceStatusFilterCopy);
} else {
getInstanceStatusFilter().addAll(instanceStatusFilterCopy);
}
return this;
}
/**
*
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in
* the replacement environment ("GREEN"), for which you want to view instance information.
*
*
* @return The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or
* those in the replacement environment ("GREEN"), for which you want to view instance information.
* @see InstanceType
*/
public java.util.List getInstanceTypeFilter() {
if (instanceTypeFilter == null) {
instanceTypeFilter = new com.amazonaws.internal.SdkInternalList();
}
return instanceTypeFilter;
}
/**
*
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in
* the replacement environment ("GREEN"), for which you want to view instance information.
*
*
* @param instanceTypeFilter
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or
* those in the replacement environment ("GREEN"), for which you want to view instance information.
* @see InstanceType
*/
public void setInstanceTypeFilter(java.util.Collection instanceTypeFilter) {
if (instanceTypeFilter == null) {
this.instanceTypeFilter = null;
return;
}
this.instanceTypeFilter = new com.amazonaws.internal.SdkInternalList(instanceTypeFilter);
}
/**
*
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in
* the replacement environment ("GREEN"), for which you want to view instance information.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setInstanceTypeFilter(java.util.Collection)} or {@link #withInstanceTypeFilter(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param instanceTypeFilter
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or
* those in the replacement environment ("GREEN"), for which you want to view instance information.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceType
*/
public ListDeploymentInstancesRequest withInstanceTypeFilter(String... instanceTypeFilter) {
if (this.instanceTypeFilter == null) {
setInstanceTypeFilter(new com.amazonaws.internal.SdkInternalList(instanceTypeFilter.length));
}
for (String ele : instanceTypeFilter) {
this.instanceTypeFilter.add(ele);
}
return this;
}
/**
*
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in
* the replacement environment ("GREEN"), for which you want to view instance information.
*
*
* @param instanceTypeFilter
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or
* those in the replacement environment ("GREEN"), for which you want to view instance information.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceType
*/
public ListDeploymentInstancesRequest withInstanceTypeFilter(java.util.Collection instanceTypeFilter) {
setInstanceTypeFilter(instanceTypeFilter);
return this;
}
/**
*
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or those in
* the replacement environment ("GREEN"), for which you want to view instance information.
*
*
* @param instanceTypeFilter
* The set of instances in a blue/green deployment, either those in the original environment ("BLUE") or
* those in the replacement environment ("GREEN"), for which you want to view instance information.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceType
*/
public ListDeploymentInstancesRequest withInstanceTypeFilter(InstanceType... instanceTypeFilter) {
com.amazonaws.internal.SdkInternalList instanceTypeFilterCopy = new com.amazonaws.internal.SdkInternalList(instanceTypeFilter.length);
for (InstanceType value : instanceTypeFilter) {
instanceTypeFilterCopy.add(value.toString());
}
if (getInstanceTypeFilter() == null) {
setInstanceTypeFilter(instanceTypeFilterCopy);
} else {
getInstanceTypeFilter().addAll(instanceTypeFilterCopy);
}
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 (getDeploymentId() != null)
sb.append("DeploymentId: ").append(getDeploymentId()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getInstanceStatusFilter() != null)
sb.append("InstanceStatusFilter: ").append(getInstanceStatusFilter()).append(",");
if (getInstanceTypeFilter() != null)
sb.append("InstanceTypeFilter: ").append(getInstanceTypeFilter());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListDeploymentInstancesRequest == false)
return false;
ListDeploymentInstancesRequest other = (ListDeploymentInstancesRequest) obj;
if (other.getDeploymentId() == null ^ this.getDeploymentId() == null)
return false;
if (other.getDeploymentId() != null && other.getDeploymentId().equals(this.getDeploymentId()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getInstanceStatusFilter() == null ^ this.getInstanceStatusFilter() == null)
return false;
if (other.getInstanceStatusFilter() != null && other.getInstanceStatusFilter().equals(this.getInstanceStatusFilter()) == false)
return false;
if (other.getInstanceTypeFilter() == null ^ this.getInstanceTypeFilter() == null)
return false;
if (other.getInstanceTypeFilter() != null && other.getInstanceTypeFilter().equals(this.getInstanceTypeFilter()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDeploymentId() == null) ? 0 : getDeploymentId().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getInstanceStatusFilter() == null) ? 0 : getInstanceStatusFilter().hashCode());
hashCode = prime * hashCode + ((getInstanceTypeFilter() == null) ? 0 : getInstanceTypeFilter().hashCode());
return hashCode;
}
@Override
public ListDeploymentInstancesRequest clone() {
return (ListDeploymentInstancesRequest) super.clone();
}
}