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

com.amazonaws.services.elasticache.model.CreateUserGroupRequest Maven / Gradle / Ivy

Go to download

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

The 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.elasticache.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateUserGroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The ID of the user group. *

*/ private String userGroupId; /** *

* The current supported value is Redis user. *

*/ private String engine; /** *

* The list of user IDs that belong to the user group. *

*/ private com.amazonaws.internal.SdkInternalList userIds; /** *

* A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag * value, although null is accepted. Available for Redis OSS only. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The ID of the user group. *

* * @param userGroupId * The ID of the user group. */ public void setUserGroupId(String userGroupId) { this.userGroupId = userGroupId; } /** *

* The ID of the user group. *

* * @return The ID of the user group. */ public String getUserGroupId() { return this.userGroupId; } /** *

* The ID of the user group. *

* * @param userGroupId * The ID of the user group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserGroupRequest withUserGroupId(String userGroupId) { setUserGroupId(userGroupId); return this; } /** *

* The current supported value is Redis user. *

* * @param engine * The current supported value is Redis user. */ public void setEngine(String engine) { this.engine = engine; } /** *

* The current supported value is Redis user. *

* * @return The current supported value is Redis user. */ public String getEngine() { return this.engine; } /** *

* The current supported value is Redis user. *

* * @param engine * The current supported value is Redis user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserGroupRequest withEngine(String engine) { setEngine(engine); return this; } /** *

* The list of user IDs that belong to the user group. *

* * @return The list of user IDs that belong to the user group. */ public java.util.List getUserIds() { if (userIds == null) { userIds = new com.amazonaws.internal.SdkInternalList(); } return userIds; } /** *

* The list of user IDs that belong to the user group. *

* * @param userIds * The list of user IDs that belong to the user group. */ public void setUserIds(java.util.Collection userIds) { if (userIds == null) { this.userIds = null; return; } this.userIds = new com.amazonaws.internal.SdkInternalList(userIds); } /** *

* The list of user IDs that belong to the user group. *

*

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

* * @param userIds * The list of user IDs that belong to the user group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserGroupRequest withUserIds(String... userIds) { if (this.userIds == null) { setUserIds(new com.amazonaws.internal.SdkInternalList(userIds.length)); } for (String ele : userIds) { this.userIds.add(ele); } return this; } /** *

* The list of user IDs that belong to the user group. *

* * @param userIds * The list of user IDs that belong to the user group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserGroupRequest withUserIds(java.util.Collection userIds) { setUserIds(userIds); return this; } /** *

* A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag * value, although null is accepted. Available for Redis OSS only. *

* * @return A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by * a tag value, although null is accepted. Available for Redis OSS only. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag * value, although null is accepted. Available for Redis OSS only. *

* * @param tags * A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a * tag value, although null is accepted. Available for Redis OSS only. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag * value, although null is accepted. Available for Redis OSS only. *

*

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

* * @param tags * A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a * tag value, although null is accepted. Available for Redis OSS only. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserGroupRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag * value, although null is accepted. Available for Redis OSS only. *

* * @param tags * A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a * tag value, although null is accepted. Available for Redis OSS only. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserGroupRequest withTags(java.util.Collection tags) { setTags(tags); 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 (getUserGroupId() != null) sb.append("UserGroupId: ").append(getUserGroupId()).append(","); if (getEngine() != null) sb.append("Engine: ").append(getEngine()).append(","); if (getUserIds() != null) sb.append("UserIds: ").append(getUserIds()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateUserGroupRequest == false) return false; CreateUserGroupRequest other = (CreateUserGroupRequest) obj; if (other.getUserGroupId() == null ^ this.getUserGroupId() == null) return false; if (other.getUserGroupId() != null && other.getUserGroupId().equals(this.getUserGroupId()) == false) return false; if (other.getEngine() == null ^ this.getEngine() == null) return false; if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false) return false; if (other.getUserIds() == null ^ this.getUserIds() == null) return false; if (other.getUserIds() != null && other.getUserIds().equals(this.getUserIds()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUserGroupId() == null) ? 0 : getUserGroupId().hashCode()); hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); hashCode = prime * hashCode + ((getUserIds() == null) ? 0 : getUserIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateUserGroupRequest clone() { return (CreateUserGroupRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy