All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.resourcegroups.model.ListGroupsResult Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Resource Groups module holds the client classes that are used for communicating with AWS Resource Groups Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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 ListGroupsResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {

    /**
     * 

* A list of GroupIdentifier objects. Each identifier is an object that contains both the Name * and the GroupArn. *

*/ private java.util.List groupIdentifiers; /** * *

* Deprecated - don't use this field. Use the GroupIdentifiers response field instead. *

*
*/ @Deprecated private java.util.List groups; /** *

* 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 GroupIdentifier objects. Each identifier is an object that contains both the Name * and the GroupArn. *

* * @return A list of GroupIdentifier objects. Each identifier is an object that contains both the * Name and the GroupArn. */ public java.util.List getGroupIdentifiers() { return groupIdentifiers; } /** *

* A list of GroupIdentifier objects. Each identifier is an object that contains both the Name * and the GroupArn. *

* * @param groupIdentifiers * A list of GroupIdentifier objects. Each identifier is an object that contains both the * Name and the GroupArn. */ public void setGroupIdentifiers(java.util.Collection groupIdentifiers) { if (groupIdentifiers == null) { this.groupIdentifiers = null; return; } this.groupIdentifiers = new java.util.ArrayList(groupIdentifiers); } /** *

* A list of GroupIdentifier objects. Each identifier is an object that contains both the Name * and the GroupArn. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroupIdentifiers(java.util.Collection)} or {@link #withGroupIdentifiers(java.util.Collection)} if you * want to override the existing values. *

* * @param groupIdentifiers * A list of GroupIdentifier objects. Each identifier is an object that contains both the * Name and the GroupArn. * @return Returns a reference to this object so that method calls can be chained together. */ public ListGroupsResult withGroupIdentifiers(GroupIdentifier... groupIdentifiers) { if (this.groupIdentifiers == null) { setGroupIdentifiers(new java.util.ArrayList(groupIdentifiers.length)); } for (GroupIdentifier ele : groupIdentifiers) { this.groupIdentifiers.add(ele); } return this; } /** *

* A list of GroupIdentifier objects. Each identifier is an object that contains both the Name * and the GroupArn. *

* * @param groupIdentifiers * A list of GroupIdentifier objects. Each identifier is an object that contains both the * Name and the GroupArn. * @return Returns a reference to this object so that method calls can be chained together. */ public ListGroupsResult withGroupIdentifiers(java.util.Collection groupIdentifiers) { setGroupIdentifiers(groupIdentifiers); return this; } /** * *

* Deprecated - don't use this field. Use the GroupIdentifiers response field instead. *

*
* * @return

* Deprecated - don't use this field. Use the GroupIdentifiers response field * instead. *

*/ @Deprecated public java.util.List getGroups() { return groups; } /** * *

* Deprecated - don't use this field. Use the GroupIdentifiers response field instead. *

*
* * @param groups *

* Deprecated - don't use this field. Use the GroupIdentifiers response field * instead. *

*/ @Deprecated public void setGroups(java.util.Collection groups) { if (groups == null) { this.groups = null; return; } this.groups = new java.util.ArrayList(groups); } /** * *

* Deprecated - don't use this field. Use the GroupIdentifiers response field instead. *

*
*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setGroups(java.util.Collection)} or {@link #withGroups(java.util.Collection)} if you want to override the * existing values. *

* * @param groups *

* Deprecated - don't use this field. Use the GroupIdentifiers response field * instead. *

* @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public ListGroupsResult withGroups(Group... groups) { if (this.groups == null) { setGroups(new java.util.ArrayList(groups.length)); } for (Group ele : groups) { this.groups.add(ele); } return this; } /** * *

* Deprecated - don't use this field. Use the GroupIdentifiers response field instead. *

*
* * @param groups *

* Deprecated - don't use this field. Use the GroupIdentifiers response field * instead. *

* @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public ListGroupsResult withGroups(java.util.Collection groups) { setGroups(groups); 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 ListGroupsResult withNextToken(String nextToken) { setNextToken(nextToken); 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 (getGroupIdentifiers() != null) sb.append("GroupIdentifiers: ").append(getGroupIdentifiers()).append(","); if (getGroups() != null) sb.append("Groups: ").append(getGroups()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(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 ListGroupsResult == false) return false; ListGroupsResult other = (ListGroupsResult) obj; if (other.getGroupIdentifiers() == null ^ this.getGroupIdentifiers() == null) return false; if (other.getGroupIdentifiers() != null && other.getGroupIdentifiers().equals(this.getGroupIdentifiers()) == false) return false; if (other.getGroups() == null ^ this.getGroups() == null) return false; if (other.getGroups() != null && other.getGroups().equals(this.getGroups()) == 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 + ((getGroupIdentifiers() == null) ? 0 : getGroupIdentifiers().hashCode()); hashCode = prime * hashCode + ((getGroups() == null) ? 0 : getGroups().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ListGroupsResult clone() { try { return (ListGroupsResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy