com.amazonaws.services.workmail.model.UpdateUserRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-workmail Show documentation
/*
* 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.workmail.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 UpdateUserRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The identifier for the organization under which the user exists.
*
*/
private String organizationId;
/**
*
* The identifier for the user to be updated.
*
*
* The identifier can be the UserId, Username, or email. The following identity formats are
* available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
*
*/
private String userId;
/**
*
* Updates the user role.
*
*
* You cannot pass SYSTEM_USER or RESOURCE.
*
*/
private String role;
/**
*
* Updates the display name of the user.
*
*/
private String displayName;
/**
*
* Updates the user's first name.
*
*/
private String firstName;
/**
*
* Updates the user's last name.
*
*/
private String lastName;
/**
*
* If enabled, the user is hidden from the global address list.
*
*/
private Boolean hiddenFromGlobalAddressList;
/**
*
* Updates the user's initials.
*
*/
private String initials;
/**
*
* Updates the user's contact details.
*
*/
private String telephone;
/**
*
* Updates the user's street address.
*
*/
private String street;
/**
*
* Updates the user's job title.
*
*/
private String jobTitle;
/**
*
* Updates the user's city.
*
*/
private String city;
/**
*
* Updates the user's company.
*
*/
private String company;
/**
*
* Updates the user's zipcode.
*
*/
private String zipCode;
/**
*
* Updates the user's department.
*
*/
private String department;
/**
*
* Updates the user's country.
*
*/
private String country;
/**
*
* Updates the user's office.
*
*/
private String office;
/**
*
* The identifier for the organization under which the user exists.
*
*
* @param organizationId
* The identifier for the organization under which the user exists.
*/
public void setOrganizationId(String organizationId) {
this.organizationId = organizationId;
}
/**
*
* The identifier for the organization under which the user exists.
*
*
* @return The identifier for the organization under which the user exists.
*/
public String getOrganizationId() {
return this.organizationId;
}
/**
*
* The identifier for the organization under which the user exists.
*
*
* @param organizationId
* The identifier for the organization under which the user exists.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withOrganizationId(String organizationId) {
setOrganizationId(organizationId);
return this;
}
/**
*
* The identifier for the user to be updated.
*
*
* The identifier can be the UserId, Username, or email. The following identity formats are
* available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
*
*
* @param userId
* The identifier for the user to be updated.
*
* The identifier can be the UserId, Username, or email. The following identity formats
* are available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
*
* The identifier for the user to be updated.
*
*
* The identifier can be the UserId, Username, or email. The following identity formats are
* available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
*
*
* @return The identifier for the user to be updated.
*
* The identifier can be the UserId, Username, or email. The following identity formats
* are available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
*/
public String getUserId() {
return this.userId;
}
/**
*
* The identifier for the user to be updated.
*
*
* The identifier can be the UserId, Username, or email. The following identity formats are
* available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
*
*
* @param userId
* The identifier for the user to be updated.
*
* The identifier can be the UserId, Username, or email. The following identity formats
* are available:
*
*
* -
*
* User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
*
*
* -
*
* Email address: [email protected]
*
*
* -
*
* User name: user
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withUserId(String userId) {
setUserId(userId);
return this;
}
/**
*
* Updates the user role.
*
*
* You cannot pass SYSTEM_USER or RESOURCE.
*
*
* @param role
* Updates the user role.
*
* You cannot pass SYSTEM_USER or RESOURCE.
* @see UserRole
*/
public void setRole(String role) {
this.role = role;
}
/**
*
* Updates the user role.
*
*
* You cannot pass SYSTEM_USER or RESOURCE.
*
*
* @return Updates the user role.
*
* You cannot pass SYSTEM_USER or RESOURCE.
* @see UserRole
*/
public String getRole() {
return this.role;
}
/**
*
* Updates the user role.
*
*
* You cannot pass SYSTEM_USER or RESOURCE.
*
*
* @param role
* Updates the user role.
*
* You cannot pass SYSTEM_USER or RESOURCE.
* @return Returns a reference to this object so that method calls can be chained together.
* @see UserRole
*/
public UpdateUserRequest withRole(String role) {
setRole(role);
return this;
}
/**
*
* Updates the user role.
*
*
* You cannot pass SYSTEM_USER or RESOURCE.
*
*
* @param role
* Updates the user role.
*
* You cannot pass SYSTEM_USER or RESOURCE.
* @return Returns a reference to this object so that method calls can be chained together.
* @see UserRole
*/
public UpdateUserRequest withRole(UserRole role) {
this.role = role.toString();
return this;
}
/**
*
* Updates the display name of the user.
*
*
* @param displayName
* Updates the display name of the user.
*/
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
/**
*
* Updates the display name of the user.
*
*
* @return Updates the display name of the user.
*/
public String getDisplayName() {
return this.displayName;
}
/**
*
* Updates the display name of the user.
*
*
* @param displayName
* Updates the display name of the user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withDisplayName(String displayName) {
setDisplayName(displayName);
return this;
}
/**
*
* Updates the user's first name.
*
*
* @param firstName
* Updates the user's first name.
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
*
* Updates the user's first name.
*
*
* @return Updates the user's first name.
*/
public String getFirstName() {
return this.firstName;
}
/**
*
* Updates the user's first name.
*
*
* @param firstName
* Updates the user's first name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withFirstName(String firstName) {
setFirstName(firstName);
return this;
}
/**
*
* Updates the user's last name.
*
*
* @param lastName
* Updates the user's last name.
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
*
* Updates the user's last name.
*
*
* @return Updates the user's last name.
*/
public String getLastName() {
return this.lastName;
}
/**
*
* Updates the user's last name.
*
*
* @param lastName
* Updates the user's last name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withLastName(String lastName) {
setLastName(lastName);
return this;
}
/**
*
* If enabled, the user is hidden from the global address list.
*
*
* @param hiddenFromGlobalAddressList
* If enabled, the user is hidden from the global address list.
*/
public void setHiddenFromGlobalAddressList(Boolean hiddenFromGlobalAddressList) {
this.hiddenFromGlobalAddressList = hiddenFromGlobalAddressList;
}
/**
*
* If enabled, the user is hidden from the global address list.
*
*
* @return If enabled, the user is hidden from the global address list.
*/
public Boolean getHiddenFromGlobalAddressList() {
return this.hiddenFromGlobalAddressList;
}
/**
*
* If enabled, the user is hidden from the global address list.
*
*
* @param hiddenFromGlobalAddressList
* If enabled, the user is hidden from the global address list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withHiddenFromGlobalAddressList(Boolean hiddenFromGlobalAddressList) {
setHiddenFromGlobalAddressList(hiddenFromGlobalAddressList);
return this;
}
/**
*
* If enabled, the user is hidden from the global address list.
*
*
* @return If enabled, the user is hidden from the global address list.
*/
public Boolean isHiddenFromGlobalAddressList() {
return this.hiddenFromGlobalAddressList;
}
/**
*
* Updates the user's initials.
*
*
* @param initials
* Updates the user's initials.
*/
public void setInitials(String initials) {
this.initials = initials;
}
/**
*
* Updates the user's initials.
*
*
* @return Updates the user's initials.
*/
public String getInitials() {
return this.initials;
}
/**
*
* Updates the user's initials.
*
*
* @param initials
* Updates the user's initials.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withInitials(String initials) {
setInitials(initials);
return this;
}
/**
*
* Updates the user's contact details.
*
*
* @param telephone
* Updates the user's contact details.
*/
public void setTelephone(String telephone) {
this.telephone = telephone;
}
/**
*
* Updates the user's contact details.
*
*
* @return Updates the user's contact details.
*/
public String getTelephone() {
return this.telephone;
}
/**
*
* Updates the user's contact details.
*
*
* @param telephone
* Updates the user's contact details.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withTelephone(String telephone) {
setTelephone(telephone);
return this;
}
/**
*
* Updates the user's street address.
*
*
* @param street
* Updates the user's street address.
*/
public void setStreet(String street) {
this.street = street;
}
/**
*
* Updates the user's street address.
*
*
* @return Updates the user's street address.
*/
public String getStreet() {
return this.street;
}
/**
*
* Updates the user's street address.
*
*
* @param street
* Updates the user's street address.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withStreet(String street) {
setStreet(street);
return this;
}
/**
*
* Updates the user's job title.
*
*
* @param jobTitle
* Updates the user's job title.
*/
public void setJobTitle(String jobTitle) {
this.jobTitle = jobTitle;
}
/**
*
* Updates the user's job title.
*
*
* @return Updates the user's job title.
*/
public String getJobTitle() {
return this.jobTitle;
}
/**
*
* Updates the user's job title.
*
*
* @param jobTitle
* Updates the user's job title.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withJobTitle(String jobTitle) {
setJobTitle(jobTitle);
return this;
}
/**
*
* Updates the user's city.
*
*
* @param city
* Updates the user's city.
*/
public void setCity(String city) {
this.city = city;
}
/**
*
* Updates the user's city.
*
*
* @return Updates the user's city.
*/
public String getCity() {
return this.city;
}
/**
*
* Updates the user's city.
*
*
* @param city
* Updates the user's city.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withCity(String city) {
setCity(city);
return this;
}
/**
*
* Updates the user's company.
*
*
* @param company
* Updates the user's company.
*/
public void setCompany(String company) {
this.company = company;
}
/**
*
* Updates the user's company.
*
*
* @return Updates the user's company.
*/
public String getCompany() {
return this.company;
}
/**
*
* Updates the user's company.
*
*
* @param company
* Updates the user's company.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withCompany(String company) {
setCompany(company);
return this;
}
/**
*
* Updates the user's zipcode.
*
*
* @param zipCode
* Updates the user's zipcode.
*/
public void setZipCode(String zipCode) {
this.zipCode = zipCode;
}
/**
*
* Updates the user's zipcode.
*
*
* @return Updates the user's zipcode.
*/
public String getZipCode() {
return this.zipCode;
}
/**
*
* Updates the user's zipcode.
*
*
* @param zipCode
* Updates the user's zipcode.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withZipCode(String zipCode) {
setZipCode(zipCode);
return this;
}
/**
*
* Updates the user's department.
*
*
* @param department
* Updates the user's department.
*/
public void setDepartment(String department) {
this.department = department;
}
/**
*
* Updates the user's department.
*
*
* @return Updates the user's department.
*/
public String getDepartment() {
return this.department;
}
/**
*
* Updates the user's department.
*
*
* @param department
* Updates the user's department.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withDepartment(String department) {
setDepartment(department);
return this;
}
/**
*
* Updates the user's country.
*
*
* @param country
* Updates the user's country.
*/
public void setCountry(String country) {
this.country = country;
}
/**
*
* Updates the user's country.
*
*
* @return Updates the user's country.
*/
public String getCountry() {
return this.country;
}
/**
*
* Updates the user's country.
*
*
* @param country
* Updates the user's country.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withCountry(String country) {
setCountry(country);
return this;
}
/**
*
* Updates the user's office.
*
*
* @param office
* Updates the user's office.
*/
public void setOffice(String office) {
this.office = office;
}
/**
*
* Updates the user's office.
*
*
* @return Updates the user's office.
*/
public String getOffice() {
return this.office;
}
/**
*
* Updates the user's office.
*
*
* @param office
* Updates the user's office.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateUserRequest withOffice(String office) {
setOffice(office);
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 (getOrganizationId() != null)
sb.append("OrganizationId: ").append(getOrganizationId()).append(",");
if (getUserId() != null)
sb.append("UserId: ").append(getUserId()).append(",");
if (getRole() != null)
sb.append("Role: ").append(getRole()).append(",");
if (getDisplayName() != null)
sb.append("DisplayName: ").append("***Sensitive Data Redacted***").append(",");
if (getFirstName() != null)
sb.append("FirstName: ").append("***Sensitive Data Redacted***").append(",");
if (getLastName() != null)
sb.append("LastName: ").append("***Sensitive Data Redacted***").append(",");
if (getHiddenFromGlobalAddressList() != null)
sb.append("HiddenFromGlobalAddressList: ").append(getHiddenFromGlobalAddressList()).append(",");
if (getInitials() != null)
sb.append("Initials: ").append("***Sensitive Data Redacted***").append(",");
if (getTelephone() != null)
sb.append("Telephone: ").append("***Sensitive Data Redacted***").append(",");
if (getStreet() != null)
sb.append("Street: ").append("***Sensitive Data Redacted***").append(",");
if (getJobTitle() != null)
sb.append("JobTitle: ").append("***Sensitive Data Redacted***").append(",");
if (getCity() != null)
sb.append("City: ").append("***Sensitive Data Redacted***").append(",");
if (getCompany() != null)
sb.append("Company: ").append("***Sensitive Data Redacted***").append(",");
if (getZipCode() != null)
sb.append("ZipCode: ").append("***Sensitive Data Redacted***").append(",");
if (getDepartment() != null)
sb.append("Department: ").append("***Sensitive Data Redacted***").append(",");
if (getCountry() != null)
sb.append("Country: ").append("***Sensitive Data Redacted***").append(",");
if (getOffice() != null)
sb.append("Office: ").append("***Sensitive Data Redacted***");
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateUserRequest == false)
return false;
UpdateUserRequest other = (UpdateUserRequest) obj;
if (other.getOrganizationId() == null ^ this.getOrganizationId() == null)
return false;
if (other.getOrganizationId() != null && other.getOrganizationId().equals(this.getOrganizationId()) == false)
return false;
if (other.getUserId() == null ^ this.getUserId() == null)
return false;
if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == false)
return false;
if (other.getRole() == null ^ this.getRole() == null)
return false;
if (other.getRole() != null && other.getRole().equals(this.getRole()) == false)
return false;
if (other.getDisplayName() == null ^ this.getDisplayName() == null)
return false;
if (other.getDisplayName() != null && other.getDisplayName().equals(this.getDisplayName()) == false)
return false;
if (other.getFirstName() == null ^ this.getFirstName() == null)
return false;
if (other.getFirstName() != null && other.getFirstName().equals(this.getFirstName()) == false)
return false;
if (other.getLastName() == null ^ this.getLastName() == null)
return false;
if (other.getLastName() != null && other.getLastName().equals(this.getLastName()) == false)
return false;
if (other.getHiddenFromGlobalAddressList() == null ^ this.getHiddenFromGlobalAddressList() == null)
return false;
if (other.getHiddenFromGlobalAddressList() != null && other.getHiddenFromGlobalAddressList().equals(this.getHiddenFromGlobalAddressList()) == false)
return false;
if (other.getInitials() == null ^ this.getInitials() == null)
return false;
if (other.getInitials() != null && other.getInitials().equals(this.getInitials()) == false)
return false;
if (other.getTelephone() == null ^ this.getTelephone() == null)
return false;
if (other.getTelephone() != null && other.getTelephone().equals(this.getTelephone()) == false)
return false;
if (other.getStreet() == null ^ this.getStreet() == null)
return false;
if (other.getStreet() != null && other.getStreet().equals(this.getStreet()) == false)
return false;
if (other.getJobTitle() == null ^ this.getJobTitle() == null)
return false;
if (other.getJobTitle() != null && other.getJobTitle().equals(this.getJobTitle()) == false)
return false;
if (other.getCity() == null ^ this.getCity() == null)
return false;
if (other.getCity() != null && other.getCity().equals(this.getCity()) == false)
return false;
if (other.getCompany() == null ^ this.getCompany() == null)
return false;
if (other.getCompany() != null && other.getCompany().equals(this.getCompany()) == false)
return false;
if (other.getZipCode() == null ^ this.getZipCode() == null)
return false;
if (other.getZipCode() != null && other.getZipCode().equals(this.getZipCode()) == false)
return false;
if (other.getDepartment() == null ^ this.getDepartment() == null)
return false;
if (other.getDepartment() != null && other.getDepartment().equals(this.getDepartment()) == false)
return false;
if (other.getCountry() == null ^ this.getCountry() == null)
return false;
if (other.getCountry() != null && other.getCountry().equals(this.getCountry()) == false)
return false;
if (other.getOffice() == null ^ this.getOffice() == null)
return false;
if (other.getOffice() != null && other.getOffice().equals(this.getOffice()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode());
hashCode = prime * hashCode + ((getRole() == null) ? 0 : getRole().hashCode());
hashCode = prime * hashCode + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
hashCode = prime * hashCode + ((getFirstName() == null) ? 0 : getFirstName().hashCode());
hashCode = prime * hashCode + ((getLastName() == null) ? 0 : getLastName().hashCode());
hashCode = prime * hashCode + ((getHiddenFromGlobalAddressList() == null) ? 0 : getHiddenFromGlobalAddressList().hashCode());
hashCode = prime * hashCode + ((getInitials() == null) ? 0 : getInitials().hashCode());
hashCode = prime * hashCode + ((getTelephone() == null) ? 0 : getTelephone().hashCode());
hashCode = prime * hashCode + ((getStreet() == null) ? 0 : getStreet().hashCode());
hashCode = prime * hashCode + ((getJobTitle() == null) ? 0 : getJobTitle().hashCode());
hashCode = prime * hashCode + ((getCity() == null) ? 0 : getCity().hashCode());
hashCode = prime * hashCode + ((getCompany() == null) ? 0 : getCompany().hashCode());
hashCode = prime * hashCode + ((getZipCode() == null) ? 0 : getZipCode().hashCode());
hashCode = prime * hashCode + ((getDepartment() == null) ? 0 : getDepartment().hashCode());
hashCode = prime * hashCode + ((getCountry() == null) ? 0 : getCountry().hashCode());
hashCode = prime * hashCode + ((getOffice() == null) ? 0 : getOffice().hashCode());
return hashCode;
}
@Override
public UpdateUserRequest clone() {
return (UpdateUserRequest) super.clone();
}
}