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

com.amazonaws.services.mq.model.CreateUserRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2017-2022 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.mq.model;

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

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Creates a new ActiveMQ user. *

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

* The unique ID that Amazon MQ generates for the broker. *

*/ private String brokerId; /** *

* Enables access to the ActiveMQ Web Console for the ActiveMQ user. *

*/ private Boolean consoleAccess; /** *

* The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric * characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

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

* Required. The password of the user. This value must be at least 12 characters long, must contain at least 4 * unique characters, and must not contain commas, colons, or equal signs (,:=). *

*/ private String password; /** *

* The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

*/ private String username; /** *

* The unique ID that Amazon MQ generates for the broker. *

* * @param brokerId * The unique ID that Amazon MQ generates for the broker. */ public void setBrokerId(String brokerId) { this.brokerId = brokerId; } /** *

* The unique ID that Amazon MQ generates for the broker. *

* * @return The unique ID that Amazon MQ generates for the broker. */ public String getBrokerId() { return this.brokerId; } /** *

* The unique ID that Amazon MQ generates for the broker. *

* * @param brokerId * The unique ID that Amazon MQ generates for the broker. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withBrokerId(String brokerId) { setBrokerId(brokerId); return this; } /** *

* Enables access to the ActiveMQ Web Console for the ActiveMQ user. *

* * @param consoleAccess * Enables access to the ActiveMQ Web Console for the ActiveMQ user. */ public void setConsoleAccess(Boolean consoleAccess) { this.consoleAccess = consoleAccess; } /** *

* Enables access to the ActiveMQ Web Console for the ActiveMQ user. *

* * @return Enables access to the ActiveMQ Web Console for the ActiveMQ user. */ public Boolean getConsoleAccess() { return this.consoleAccess; } /** *

* Enables access to the ActiveMQ Web Console for the ActiveMQ user. *

* * @param consoleAccess * Enables access to the ActiveMQ Web Console for the ActiveMQ user. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withConsoleAccess(Boolean consoleAccess) { setConsoleAccess(consoleAccess); return this; } /** *

* Enables access to the ActiveMQ Web Console for the ActiveMQ user. *

* * @return Enables access to the ActiveMQ Web Console for the ActiveMQ user. */ public Boolean isConsoleAccess() { return this.consoleAccess; } /** *

* The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric * characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

* * @return The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only * alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 * characters long. */ public java.util.List getGroups() { return groups; } /** *

* The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric * characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

* * @param groups * The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only * alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 * characters long. */ public void setGroups(java.util.Collection groups) { if (groups == null) { this.groups = null; return; } this.groups = new java.util.ArrayList(groups); } /** *

* The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric * characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

*

* 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 * The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only * alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 * characters long. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withGroups(String... groups) { if (this.groups == null) { setGroups(new java.util.ArrayList(groups.length)); } for (String ele : groups) { this.groups.add(ele); } return this; } /** *

* The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only alphanumeric * characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

* * @param groups * The list of groups (20 maximum) to which the ActiveMQ user belongs. This value can contain only * alphanumeric characters, dashes, periods, underscores, and tildes (- . _ ~). This value must be 2-100 * characters long. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withGroups(java.util.Collection groups) { setGroups(groups); return this; } /** *

* Required. The password of the user. This value must be at least 12 characters long, must contain at least 4 * unique characters, and must not contain commas, colons, or equal signs (,:=). *

* * @param password * Required. The password of the user. This value must be at least 12 characters long, must contain at least * 4 unique characters, and must not contain commas, colons, or equal signs (,:=). */ public void setPassword(String password) { this.password = password; } /** *

* Required. The password of the user. This value must be at least 12 characters long, must contain at least 4 * unique characters, and must not contain commas, colons, or equal signs (,:=). *

* * @return Required. The password of the user. This value must be at least 12 characters long, must contain at least * 4 unique characters, and must not contain commas, colons, or equal signs (,:=). */ public String getPassword() { return this.password; } /** *

* Required. The password of the user. This value must be at least 12 characters long, must contain at least 4 * unique characters, and must not contain commas, colons, or equal signs (,:=). *

* * @param password * Required. The password of the user. This value must be at least 12 characters long, must contain at least * 4 unique characters, and must not contain commas, colons, or equal signs (,:=). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withPassword(String password) { setPassword(password); return this; } /** *

* The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

* * @param username * The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. */ public void setUsername(String username) { this.username = username; } /** *

* The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

* * @return The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. */ public String getUsername() { return this.username; } /** *

* The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. *

* * @param username * The username of the ActiveMQ user. This value can contain only alphanumeric characters, dashes, periods, * underscores, and tildes (- . _ ~). This value must be 2-100 characters long. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withUsername(String username) { setUsername(username); 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 (getBrokerId() != null) sb.append("BrokerId: ").append(getBrokerId()).append(","); if (getConsoleAccess() != null) sb.append("ConsoleAccess: ").append(getConsoleAccess()).append(","); if (getGroups() != null) sb.append("Groups: ").append(getGroups()).append(","); if (getPassword() != null) sb.append("Password: ").append(getPassword()).append(","); if (getUsername() != null) sb.append("Username: ").append(getUsername()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateUserRequest == false) return false; CreateUserRequest other = (CreateUserRequest) obj; if (other.getBrokerId() == null ^ this.getBrokerId() == null) return false; if (other.getBrokerId() != null && other.getBrokerId().equals(this.getBrokerId()) == false) return false; if (other.getConsoleAccess() == null ^ this.getConsoleAccess() == null) return false; if (other.getConsoleAccess() != null && other.getConsoleAccess().equals(this.getConsoleAccess()) == 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.getPassword() == null ^ this.getPassword() == null) return false; if (other.getPassword() != null && other.getPassword().equals(this.getPassword()) == false) return false; if (other.getUsername() == null ^ this.getUsername() == null) return false; if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBrokerId() == null) ? 0 : getBrokerId().hashCode()); hashCode = prime * hashCode + ((getConsoleAccess() == null) ? 0 : getConsoleAccess().hashCode()); hashCode = prime * hashCode + ((getGroups() == null) ? 0 : getGroups().hashCode()); hashCode = prime * hashCode + ((getPassword() == null) ? 0 : getPassword().hashCode()); hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); return hashCode; } @Override public CreateUserRequest clone() { return (CreateUserRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy