/* * Copyright 2018-2023 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.connect.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about the returned users. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UserSearchSummary implements Serializable, Cloneable, StructuredPojo { /** ** The Amazon Resource Name (ARN) of the user. *
*/ private String arn; /** ** The directory identifier of the user. *
*/ private String directoryUserId; /** ** The identifier of the user's hierarchy group. *
*/ private String hierarchyGroupId; /** ** The identifier of the user's summary. *
*/ private String id; /** ** The user's first name and last name. *
*/ private UserIdentityInfoLite identityInfo; private UserPhoneConfig phoneConfig; /** ** The identifier of the user's routing profile. *
*/ private String routingProfileId; /** ** The identifiers of the user's security profiles. *
*/ private java.util.List* The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
*/ private java.util.Map* The name of the user. *
*/ private String username; /** ** 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 UserSearchSummary withArn(String arn) { setArn(arn); return this; } /** ** The directory identifier of the user. *
* * @param directoryUserId * The directory identifier of the user. */ public void setDirectoryUserId(String directoryUserId) { this.directoryUserId = directoryUserId; } /** ** The directory identifier of the user. *
* * @return The directory identifier of the user. */ public String getDirectoryUserId() { return this.directoryUserId; } /** ** The directory identifier of the user. *
* * @param directoryUserId * The directory identifier of the user. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withDirectoryUserId(String directoryUserId) { setDirectoryUserId(directoryUserId); return this; } /** ** The identifier of the user's hierarchy group. *
* * @param hierarchyGroupId * The identifier of the user's hierarchy group. */ public void setHierarchyGroupId(String hierarchyGroupId) { this.hierarchyGroupId = hierarchyGroupId; } /** ** The identifier of the user's hierarchy group. *
* * @return The identifier of the user's hierarchy group. */ public String getHierarchyGroupId() { return this.hierarchyGroupId; } /** ** The identifier of the user's hierarchy group. *
* * @param hierarchyGroupId * The identifier of the user's hierarchy group. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withHierarchyGroupId(String hierarchyGroupId) { setHierarchyGroupId(hierarchyGroupId); return this; } /** ** The identifier of the user's summary. *
* * @param id * The identifier of the user's summary. */ public void setId(String id) { this.id = id; } /** ** The identifier of the user's summary. *
* * @return The identifier of the user's summary. */ public String getId() { return this.id; } /** ** The identifier of the user's summary. *
* * @param id * The identifier of the user's summary. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withId(String id) { setId(id); return this; } /** ** The user's first name and last name. *
* * @param identityInfo * The user's first name and last name. */ public void setIdentityInfo(UserIdentityInfoLite identityInfo) { this.identityInfo = identityInfo; } /** ** The user's first name and last name. *
* * @return The user's first name and last name. */ public UserIdentityInfoLite getIdentityInfo() { return this.identityInfo; } /** ** The user's first name and last name. *
* * @param identityInfo * The user's first name and last name. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withIdentityInfo(UserIdentityInfoLite identityInfo) { setIdentityInfo(identityInfo); return this; } /** * @param phoneConfig */ public void setPhoneConfig(UserPhoneConfig phoneConfig) { this.phoneConfig = phoneConfig; } /** * @return */ public UserPhoneConfig getPhoneConfig() { return this.phoneConfig; } /** * @param phoneConfig * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withPhoneConfig(UserPhoneConfig phoneConfig) { setPhoneConfig(phoneConfig); return this; } /** ** The identifier of the user's routing profile. *
* * @param routingProfileId * The identifier of the user's routing profile. */ public void setRoutingProfileId(String routingProfileId) { this.routingProfileId = routingProfileId; } /** ** The identifier of the user's routing profile. *
* * @return The identifier of the user's routing profile. */ public String getRoutingProfileId() { return this.routingProfileId; } /** ** The identifier of the user's routing profile. *
* * @param routingProfileId * The identifier of the user's routing profile. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withRoutingProfileId(String routingProfileId) { setRoutingProfileId(routingProfileId); return this; } /** ** The identifiers of the user's security profiles. *
* * @return The identifiers of the user's security profiles. */ public java.util.List* The identifiers of the user's security profiles. *
* * @param securityProfileIds * The identifiers of the user's security profiles. */ public void setSecurityProfileIds(java.util.Collection* The identifiers of the user's security profiles. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityProfileIds(java.util.Collection)} or {@link #withSecurityProfileIds(java.util.Collection)} if * you want to override the existing values. *
* * @param securityProfileIds * The identifiers of the user's security profiles. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withSecurityProfileIds(String... securityProfileIds) { if (this.securityProfileIds == null) { setSecurityProfileIds(new java.util.ArrayList* The identifiers of the user's security profiles. *
* * @param securityProfileIds * The identifiers of the user's security profiles. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withSecurityProfileIds(java.util.Collection* The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
* * @return The tags used to organize, track, or control access for this resource. For example, { "tags": * {"key1":"value1", "key2":"value2"} }. */ public java.util.Map* The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
* * @param tags * The tags used to organize, track, or control access for this resource. For example, { "tags": * {"key1":"value1", "key2":"value2"} }. */ public void setTags(java.util.Map* The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
* * @param tags * The tags used to organize, track, or control access for this resource. For example, { "tags": * {"key1":"value1", "key2":"value2"} }. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary withTags(java.util.Map* The name of the user. *
* * @param username * The name of the user. */ public void setUsername(String username) { this.username = username; } /** ** The name of the user. *
* * @return The name of the user. */ public String getUsername() { return this.username; } /** ** The name of the user. *
* * @param username * The name of the user. * @return Returns a reference to this object so that method calls can be chained together. */ public UserSearchSummary 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getDirectoryUserId() != null) sb.append("DirectoryUserId: ").append(getDirectoryUserId()).append(","); if (getHierarchyGroupId() != null) sb.append("HierarchyGroupId: ").append(getHierarchyGroupId()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getIdentityInfo() != null) sb.append("IdentityInfo: ").append(getIdentityInfo()).append(","); if (getPhoneConfig() != null) sb.append("PhoneConfig: ").append(getPhoneConfig()).append(","); if (getRoutingProfileId() != null) sb.append("RoutingProfileId: ").append(getRoutingProfileId()).append(","); if (getSecurityProfileIds() != null) sb.append("SecurityProfileIds: ").append(getSecurityProfileIds()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).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 UserSearchSummary == false) return false; UserSearchSummary other = (UserSearchSummary) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getDirectoryUserId() == null ^ this.getDirectoryUserId() == null) return false; if (other.getDirectoryUserId() != null && other.getDirectoryUserId().equals(this.getDirectoryUserId()) == false) return false; if (other.getHierarchyGroupId() == null ^ this.getHierarchyGroupId() == null) return false; if (other.getHierarchyGroupId() != null && other.getHierarchyGroupId().equals(this.getHierarchyGroupId()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getIdentityInfo() == null ^ this.getIdentityInfo() == null) return false; if (other.getIdentityInfo() != null && other.getIdentityInfo().equals(this.getIdentityInfo()) == false) return false; if (other.getPhoneConfig() == null ^ this.getPhoneConfig() == null) return false; if (other.getPhoneConfig() != null && other.getPhoneConfig().equals(this.getPhoneConfig()) == false) return false; if (other.getRoutingProfileId() == null ^ this.getRoutingProfileId() == null) return false; if (other.getRoutingProfileId() != null && other.getRoutingProfileId().equals(this.getRoutingProfileId()) == false) return false; if (other.getSecurityProfileIds() == null ^ this.getSecurityProfileIds() == null) return false; if (other.getSecurityProfileIds() != null && other.getSecurityProfileIds().equals(this.getSecurityProfileIds()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == 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 + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getDirectoryUserId() == null) ? 0 : getDirectoryUserId().hashCode()); hashCode = prime * hashCode + ((getHierarchyGroupId() == null) ? 0 : getHierarchyGroupId().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getIdentityInfo() == null) ? 0 : getIdentityInfo().hashCode()); hashCode = prime * hashCode + ((getPhoneConfig() == null) ? 0 : getPhoneConfig().hashCode()); hashCode = prime * hashCode + ((getRoutingProfileId() == null) ? 0 : getRoutingProfileId().hashCode()); hashCode = prime * hashCode + ((getSecurityProfileIds() == null) ? 0 : getSecurityProfileIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); return hashCode; } @Override public UserSearchSummary clone() { try { return (UserSearchSummary) 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.connect.model.transform.UserSearchSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }