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

com.amazonaws.services.elasticache.model.CreateUserResult 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;

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

    /**
     * 

* The ID of the user. *

*/ private String userId; /** *

* The username of the user. *

*/ private String userName; /** *

* Indicates the user status. Can be "active", "modifying" or "deleting". *

*/ private String status; /** *

* The current supported value is Redis. *

*/ private String engine; /** *

* The minimum engine version required, which is Redis OSS 6.0 *

*/ private String minimumEngineVersion; /** *

* Access permissions string used for this user. *

*/ private String accessString; /** *

* Returns a list of the user group IDs the user belongs to. *

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

* Denotes whether the user requires a password to authenticate. *

*/ private Authentication authentication; /** *

* The Amazon Resource Name (ARN) of the user. *

*/ private String aRN; /** *

* The ID of the user. *

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

* The ID of the user. *

* * @return The ID of the user. */ public String getUserId() { return this.userId; } /** *

* The ID of the user. *

* * @param userId * The ID of the user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withUserId(String userId) { setUserId(userId); return this; } /** *

* The username of the user. *

* * @param userName * The username of the user. */ public void setUserName(String userName) { this.userName = userName; } /** *

* The username of the user. *

* * @return The username of the user. */ public String getUserName() { return this.userName; } /** *

* The username of the user. *

* * @param userName * The username of the user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withUserName(String userName) { setUserName(userName); return this; } /** *

* Indicates the user status. Can be "active", "modifying" or "deleting". *

* * @param status * Indicates the user status. Can be "active", "modifying" or "deleting". */ public void setStatus(String status) { this.status = status; } /** *

* Indicates the user status. Can be "active", "modifying" or "deleting". *

* * @return Indicates the user status. Can be "active", "modifying" or "deleting". */ public String getStatus() { return this.status; } /** *

* Indicates the user status. Can be "active", "modifying" or "deleting". *

* * @param status * Indicates the user status. Can be "active", "modifying" or "deleting". * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withStatus(String status) { setStatus(status); return this; } /** *

* The current supported value is Redis. *

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

* The current supported value is Redis. *

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

* The current supported value is Redis. *

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

* The minimum engine version required, which is Redis OSS 6.0 *

* * @param minimumEngineVersion * The minimum engine version required, which is Redis OSS 6.0 */ public void setMinimumEngineVersion(String minimumEngineVersion) { this.minimumEngineVersion = minimumEngineVersion; } /** *

* The minimum engine version required, which is Redis OSS 6.0 *

* * @return The minimum engine version required, which is Redis OSS 6.0 */ public String getMinimumEngineVersion() { return this.minimumEngineVersion; } /** *

* The minimum engine version required, which is Redis OSS 6.0 *

* * @param minimumEngineVersion * The minimum engine version required, which is Redis OSS 6.0 * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withMinimumEngineVersion(String minimumEngineVersion) { setMinimumEngineVersion(minimumEngineVersion); return this; } /** *

* Access permissions string used for this user. *

* * @param accessString * Access permissions string used for this user. */ public void setAccessString(String accessString) { this.accessString = accessString; } /** *

* Access permissions string used for this user. *

* * @return Access permissions string used for this user. */ public String getAccessString() { return this.accessString; } /** *

* Access permissions string used for this user. *

* * @param accessString * Access permissions string used for this user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withAccessString(String accessString) { setAccessString(accessString); return this; } /** *

* Returns a list of the user group IDs the user belongs to. *

* * @return Returns a list of the user group IDs the user belongs to. */ public java.util.List getUserGroupIds() { if (userGroupIds == null) { userGroupIds = new com.amazonaws.internal.SdkInternalList(); } return userGroupIds; } /** *

* Returns a list of the user group IDs the user belongs to. *

* * @param userGroupIds * Returns a list of the user group IDs the user belongs to. */ public void setUserGroupIds(java.util.Collection userGroupIds) { if (userGroupIds == null) { this.userGroupIds = null; return; } this.userGroupIds = new com.amazonaws.internal.SdkInternalList(userGroupIds); } /** *

* Returns a list of the user group IDs the user belongs to. *

*

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

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

* Returns a list of the user group IDs the user belongs to. *

* * @param userGroupIds * Returns a list of the user group IDs the user belongs to. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withUserGroupIds(java.util.Collection userGroupIds) { setUserGroupIds(userGroupIds); return this; } /** *

* Denotes whether the user requires a password to authenticate. *

* * @param authentication * Denotes whether the user requires a password to authenticate. */ public void setAuthentication(Authentication authentication) { this.authentication = authentication; } /** *

* Denotes whether the user requires a password to authenticate. *

* * @return Denotes whether the user requires a password to authenticate. */ public Authentication getAuthentication() { return this.authentication; } /** *

* Denotes whether the user requires a password to authenticate. *

* * @param authentication * Denotes whether the user requires a password to authenticate. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withAuthentication(Authentication authentication) { setAuthentication(authentication); return this; } /** *

* The Amazon Resource Name (ARN) of the user. *

* * @param aRN * The Amazon Resource Name (ARN) of the user. */ public void setARN(String aRN) { this.aRN = aRN; } /** *

* The Amazon Resource Name (ARN) of the user. *

* * @return The Amazon Resource Name (ARN) of the user. */ public String getARN() { return this.aRN; } /** *

* The Amazon Resource Name (ARN) of the user. *

* * @param aRN * The Amazon Resource Name (ARN) of the user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserResult withARN(String aRN) { setARN(aRN); 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 (getUserId() != null) sb.append("UserId: ").append(getUserId()).append(","); if (getUserName() != null) sb.append("UserName: ").append(getUserName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getEngine() != null) sb.append("Engine: ").append(getEngine()).append(","); if (getMinimumEngineVersion() != null) sb.append("MinimumEngineVersion: ").append(getMinimumEngineVersion()).append(","); if (getAccessString() != null) sb.append("AccessString: ").append(getAccessString()).append(","); if (getUserGroupIds() != null) sb.append("UserGroupIds: ").append(getUserGroupIds()).append(","); if (getAuthentication() != null) sb.append("Authentication: ").append(getAuthentication()).append(","); if (getARN() != null) sb.append("ARN: ").append(getARN()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateUserResult == false) return false; CreateUserResult other = (CreateUserResult) obj; if (other.getUserId() == null ^ this.getUserId() == null) return false; if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == false) return false; if (other.getUserName() == null ^ this.getUserName() == null) return false; if (other.getUserName() != null && other.getUserName().equals(this.getUserName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == 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.getMinimumEngineVersion() == null ^ this.getMinimumEngineVersion() == null) return false; if (other.getMinimumEngineVersion() != null && other.getMinimumEngineVersion().equals(this.getMinimumEngineVersion()) == false) return false; if (other.getAccessString() == null ^ this.getAccessString() == null) return false; if (other.getAccessString() != null && other.getAccessString().equals(this.getAccessString()) == false) return false; if (other.getUserGroupIds() == null ^ this.getUserGroupIds() == null) return false; if (other.getUserGroupIds() != null && other.getUserGroupIds().equals(this.getUserGroupIds()) == false) return false; if (other.getAuthentication() == null ^ this.getAuthentication() == null) return false; if (other.getAuthentication() != null && other.getAuthentication().equals(this.getAuthentication()) == false) return false; if (other.getARN() == null ^ this.getARN() == null) return false; if (other.getARN() != null && other.getARN().equals(this.getARN()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getUserName() == null) ? 0 : getUserName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode()); hashCode = prime * hashCode + ((getMinimumEngineVersion() == null) ? 0 : getMinimumEngineVersion().hashCode()); hashCode = prime * hashCode + ((getAccessString() == null) ? 0 : getAccessString().hashCode()); hashCode = prime * hashCode + ((getUserGroupIds() == null) ? 0 : getUserGroupIds().hashCode()); hashCode = prime * hashCode + ((getAuthentication() == null) ? 0 : getAuthentication().hashCode()); hashCode = prime * hashCode + ((getARN() == null) ? 0 : getARN().hashCode()); return hashCode; } @Override public CreateUserResult clone() { try { return (CreateUserResult) 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