@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; }
/** * 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 the ActiveMQ Web Console for the ActiveMQ user. * * @param consoleAccess * Enables access to the 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; }
/** * 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<String> groups) { setGroups(groups); 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withUsername(String username) { setUsername(username); 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. * * @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. * @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 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. * <p> * <b>NOTE:</b> 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. * </p> * * @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<String>(groups.length)); } for (String ele : groups) { this.groups.add(ele); } 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withUsername(String username) { setUsername(username); 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. * * @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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateUserRequest withPassword(String password) { setPassword(password); return this; }
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;
/** * 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<String> groups) { setGroups(groups); return this; }
/** * 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 the ActiveMQ Web Console for the ActiveMQ user. * * @param consoleAccess * Enables access to the 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; }
/** * 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(); }
/** * 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. * <p> * <b>NOTE:</b> 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. * </p> * * @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<String>(groups.length)); } for (String ele : groups) { this.groups.add(ele); } return this; }
/** * Marshall the given parameter object. */ public void marshall(CreateUserRequest createUserRequest, ProtocolMarshaller protocolMarshaller) { if (createUserRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createUserRequest.getBrokerId(), BROKERID_BINDING); protocolMarshaller.marshall(createUserRequest.getConsoleAccess(), CONSOLEACCESS_BINDING); protocolMarshaller.marshall(createUserRequest.getGroups(), GROUPS_BINDING); protocolMarshaller.marshall(createUserRequest.getPassword(), PASSWORD_BINDING); protocolMarshaller.marshall(createUserRequest.getUsername(), USERNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@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; }
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;
/** * 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(); }
/** * Marshall the given parameter object. */ public void marshall(CreateUserRequest createUserRequest, ProtocolMarshaller protocolMarshaller) { if (createUserRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createUserRequest.getBrokerId(), BROKERID_BINDING); protocolMarshaller.marshall(createUserRequest.getConsoleAccess(), CONSOLEACCESS_BINDING); protocolMarshaller.marshall(createUserRequest.getGroups(), GROUPS_BINDING); protocolMarshaller.marshall(createUserRequest.getPassword(), PASSWORD_BINDING); protocolMarshaller.marshall(createUserRequest.getUsername(), USERNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }