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

com.amazonaws.services.memorydb.model.User Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon MemoryDB module holds the client classes that are used for communicating with Amazon MemoryDB 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.memorydb.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* You create users and assign them specific permissions by using an access string. You assign the users to Access * Control Lists aligned with a specific role (administrators, human resources) that are then deployed to one or more * MemoryDB clusters. *

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

* The name of the user *

*/ private String name; /** *

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

*/ private String status; /** *

* Access permissions string used for this user. *

*/ private String accessString; /** *

* The names of the Access Control Lists to which the user belongs *

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

* The minimum engine version supported for the user *

*/ private String minimumEngineVersion; /** *

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

*/ private Authentication authentication; /** *

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

*/ private String aRN; /** *

* The name of the user *

* * @param name * The name of the user */ public void setName(String name) { this.name = name; } /** *

* The name of the user *

* * @return The name of the user */ public String getName() { return this.name; } /** *

* The name of the user *

* * @param name * The name of the user * @return Returns a reference to this object so that method calls can be chained together. */ public User withName(String name) { setName(name); 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 User withStatus(String status) { setStatus(status); 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 User withAccessString(String accessString) { setAccessString(accessString); return this; } /** *

* The names of the Access Control Lists to which the user belongs *

* * @return The names of the Access Control Lists to which the user belongs */ public java.util.List getACLNames() { return aCLNames; } /** *

* The names of the Access Control Lists to which the user belongs *

* * @param aCLNames * The names of the Access Control Lists to which the user belongs */ public void setACLNames(java.util.Collection aCLNames) { if (aCLNames == null) { this.aCLNames = null; return; } this.aCLNames = new java.util.ArrayList(aCLNames); } /** *

* The names of the Access Control Lists to which the user belongs *

*

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

* * @param aCLNames * The names of the Access Control Lists to which the user belongs * @return Returns a reference to this object so that method calls can be chained together. */ public User withACLNames(String... aCLNames) { if (this.aCLNames == null) { setACLNames(new java.util.ArrayList(aCLNames.length)); } for (String ele : aCLNames) { this.aCLNames.add(ele); } return this; } /** *

* The names of the Access Control Lists to which the user belongs *

* * @param aCLNames * The names of the Access Control Lists to which the user belongs * @return Returns a reference to this object so that method calls can be chained together. */ public User withACLNames(java.util.Collection aCLNames) { setACLNames(aCLNames); return this; } /** *

* The minimum engine version supported for the user *

* * @param minimumEngineVersion * The minimum engine version supported for the user */ public void setMinimumEngineVersion(String minimumEngineVersion) { this.minimumEngineVersion = minimumEngineVersion; } /** *

* The minimum engine version supported for the user *

* * @return The minimum engine version supported for the user */ public String getMinimumEngineVersion() { return this.minimumEngineVersion; } /** *

* The minimum engine version supported for the user *

* * @param minimumEngineVersion * The minimum engine version supported for the user * @return Returns a reference to this object so that method calls can be chained together. */ public User withMinimumEngineVersion(String minimumEngineVersion) { setMinimumEngineVersion(minimumEngineVersion); 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 User 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 User 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getAccessString() != null) sb.append("AccessString: ").append(getAccessString()).append(","); if (getACLNames() != null) sb.append("ACLNames: ").append(getACLNames()).append(","); if (getMinimumEngineVersion() != null) sb.append("MinimumEngineVersion: ").append(getMinimumEngineVersion()).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 User == false) return false; User other = (User) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == 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.getAccessString() == null ^ this.getAccessString() == null) return false; if (other.getAccessString() != null && other.getAccessString().equals(this.getAccessString()) == false) return false; if (other.getACLNames() == null ^ this.getACLNames() == null) return false; if (other.getACLNames() != null && other.getACLNames().equals(this.getACLNames()) == 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.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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getAccessString() == null) ? 0 : getAccessString().hashCode()); hashCode = prime * hashCode + ((getACLNames() == null) ? 0 : getACLNames().hashCode()); hashCode = prime * hashCode + ((getMinimumEngineVersion() == null) ? 0 : getMinimumEngineVersion().hashCode()); hashCode = prime * hashCode + ((getAuthentication() == null) ? 0 : getAuthentication().hashCode()); hashCode = prime * hashCode + ((getARN() == null) ? 0 : getARN().hashCode()); return hashCode; } @Override public User clone() { try { return (User) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.memorydb.model.transform.UserMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy