com.amazonaws.services.resourcegroups.model.SearchResourcesResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-resourcegroups 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.resourcegroups.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SearchResourcesResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARNs and resource types of resources that are members of the group that you specified.
*
*/
private java.util.List resourceIdentifiers;
/**
*
* If present, indicates that more output is available than is included in the current response. Use this value in
* the NextToken
request parameter in a subsequent call to the operation to get the next part of the
* output. You should repeat this until the NextToken
response element comes back as null
.
*
*/
private String nextToken;
/**
*
* A list of QueryError
objects. Each error contains an ErrorCode
and Message
* .
*
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*
*/
private java.util.List queryErrors;
/**
*
* The ARNs and resource types of resources that are members of the group that you specified.
*
*
* @return The ARNs and resource types of resources that are members of the group that you specified.
*/
public java.util.List getResourceIdentifiers() {
return resourceIdentifiers;
}
/**
*
* The ARNs and resource types of resources that are members of the group that you specified.
*
*
* @param resourceIdentifiers
* The ARNs and resource types of resources that are members of the group that you specified.
*/
public void setResourceIdentifiers(java.util.Collection resourceIdentifiers) {
if (resourceIdentifiers == null) {
this.resourceIdentifiers = null;
return;
}
this.resourceIdentifiers = new java.util.ArrayList(resourceIdentifiers);
}
/**
*
* The ARNs and resource types of resources that are members of the group that you specified.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setResourceIdentifiers(java.util.Collection)} or {@link #withResourceIdentifiers(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param resourceIdentifiers
* The ARNs and resource types of resources that are members of the group that you specified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchResourcesResult withResourceIdentifiers(ResourceIdentifier... resourceIdentifiers) {
if (this.resourceIdentifiers == null) {
setResourceIdentifiers(new java.util.ArrayList(resourceIdentifiers.length));
}
for (ResourceIdentifier ele : resourceIdentifiers) {
this.resourceIdentifiers.add(ele);
}
return this;
}
/**
*
* The ARNs and resource types of resources that are members of the group that you specified.
*
*
* @param resourceIdentifiers
* The ARNs and resource types of resources that are members of the group that you specified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchResourcesResult withResourceIdentifiers(java.util.Collection resourceIdentifiers) {
setResourceIdentifiers(resourceIdentifiers);
return this;
}
/**
*
* If present, indicates that more output is available than is included in the current response. Use this value in
* the NextToken
request parameter in a subsequent call to the operation to get the next part of the
* output. You should repeat this until the NextToken
response element comes back as null
.
*
*
* @param nextToken
* If present, indicates that more output is available than is included in the current response. Use this
* value in the NextToken
request parameter in a subsequent call to the operation to get the
* next part of the output. You should repeat this until the NextToken
response element comes
* back as null
.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* If present, indicates that more output is available than is included in the current response. Use this value in
* the NextToken
request parameter in a subsequent call to the operation to get the next part of the
* output. You should repeat this until the NextToken
response element comes back as null
.
*
*
* @return If present, indicates that more output is available than is included in the current response. Use this
* value in the NextToken
request parameter in a subsequent call to the operation to get the
* next part of the output. You should repeat this until the NextToken
response element comes
* back as null
.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* If present, indicates that more output is available than is included in the current response. Use this value in
* the NextToken
request parameter in a subsequent call to the operation to get the next part of the
* output. You should repeat this until the NextToken
response element comes back as null
.
*
*
* @param nextToken
* If present, indicates that more output is available than is included in the current response. Use this
* value in the NextToken
request parameter in a subsequent call to the operation to get the
* next part of the output. You should repeat this until the NextToken
response element comes
* back as null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchResourcesResult withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* A list of QueryError
objects. Each error contains an ErrorCode
and Message
* .
*
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*
*
* @return A list of QueryError
objects. Each error contains an ErrorCode
and
* Message
.
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*/
public java.util.List getQueryErrors() {
return queryErrors;
}
/**
*
* A list of QueryError
objects. Each error contains an ErrorCode
and Message
* .
*
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*
*
* @param queryErrors
* A list of QueryError
objects. Each error contains an ErrorCode
and
* Message
.
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*/
public void setQueryErrors(java.util.Collection queryErrors) {
if (queryErrors == null) {
this.queryErrors = null;
return;
}
this.queryErrors = new java.util.ArrayList(queryErrors);
}
/**
*
* A list of QueryError
objects. Each error contains an ErrorCode
and Message
* .
*
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setQueryErrors(java.util.Collection)} or {@link #withQueryErrors(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param queryErrors
* A list of QueryError
objects. Each error contains an ErrorCode
and
* Message
.
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchResourcesResult withQueryErrors(QueryError... queryErrors) {
if (this.queryErrors == null) {
setQueryErrors(new java.util.ArrayList(queryErrors.length));
}
for (QueryError ele : queryErrors) {
this.queryErrors.add(ele);
}
return this;
}
/**
*
* A list of QueryError
objects. Each error contains an ErrorCode
and Message
* .
*
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
*
*
* @param queryErrors
* A list of QueryError
objects. Each error contains an ErrorCode
and
* Message
.
*
* Possible values for ErrorCode
:
*
*
* -
*
* CLOUDFORMATION_STACK_INACTIVE
*
*
* -
*
* CLOUDFORMATION_STACK_NOT_EXISTING
*
*
* -
*
* CLOUDFORMATION_STACK_UNASSUMABLE_ROLE
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchResourcesResult withQueryErrors(java.util.Collection queryErrors) {
setQueryErrors(queryErrors);
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 (getResourceIdentifiers() != null)
sb.append("ResourceIdentifiers: ").append(getResourceIdentifiers()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getQueryErrors() != null)
sb.append("QueryErrors: ").append(getQueryErrors());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SearchResourcesResult == false)
return false;
SearchResourcesResult other = (SearchResourcesResult) obj;
if (other.getResourceIdentifiers() == null ^ this.getResourceIdentifiers() == null)
return false;
if (other.getResourceIdentifiers() != null && other.getResourceIdentifiers().equals(this.getResourceIdentifiers()) == 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.getQueryErrors() == null ^ this.getQueryErrors() == null)
return false;
if (other.getQueryErrors() != null && other.getQueryErrors().equals(this.getQueryErrors()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceIdentifiers() == null) ? 0 : getResourceIdentifiers().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getQueryErrors() == null) ? 0 : getQueryErrors().hashCode());
return hashCode;
}
@Override
public SearchResourcesResult clone() {
try {
return (SearchResourcesResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}