com.amazonaws.services.finspacedata.model.UserByPermissionGroup Maven / Gradle / Ivy
/*
* 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.finspacedata.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The structure of a user associated with a permission group.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UserByPermissionGroup implements Serializable, Cloneable, StructuredPojo {
/**
*
* The unique identifier for the user.
*
*/
private String userId;
/**
*
* The current status of the user.
*
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
*
*/
private String status;
/**
*
* The first name of the user.
*
*/
private String firstName;
/**
*
* The last name of the user.
*
*/
private String lastName;
/**
*
* The email address of the user. The email address serves as a unique identifier for each user and cannot be
* changed after it's created.
*
*/
private String emailAddress;
/**
*
* Indicates the type of user.
*
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by
* adding them to a permission group.
*
*
*
*/
private String type;
/**
*
* Indicates whether the user can access FinSpace API operations.
*
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
*
*/
private String apiAccess;
/**
*
* The IAM ARN identifier that is attached to FinSpace API calls.
*
*/
private String apiAccessPrincipalArn;
/**
*
* Indicates the status of the user within a permission group.
*
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
*
*/
private String membershipStatus;
/**
*
* The unique identifier for the user.
*
*
* @param userId
* The unique identifier for the user.
*/
public void setUserId(String userId) {
this.userId = userId;
}
/**
*
* The unique identifier for the user.
*
*
* @return The unique identifier for the user.
*/
public String getUserId() {
return this.userId;
}
/**
*
* The unique identifier for the user.
*
*
* @param userId
* The unique identifier for the user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UserByPermissionGroup withUserId(String userId) {
setUserId(userId);
return this;
}
/**
*
* The current status of the user.
*
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
*
*
* @param status
* The current status of the user.
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
* @see UserStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current status of the user.
*
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
*
*
* @return The current status of the user.
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
* @see UserStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The current status of the user.
*
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
*
*
* @param status
* The current status of the user.
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see UserStatus
*/
public UserByPermissionGroup withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The current status of the user.
*
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
*
*
* @param status
* The current status of the user.
*
* -
*
* CREATING
– The user creation is in progress.
*
*
* -
*
* ENABLED
– The user is created and is currently active.
*
*
* -
*
* DISABLED
– The user is currently inactive.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see UserStatus
*/
public UserByPermissionGroup withStatus(UserStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The first name of the user.
*
*
* @param firstName
* The first name of the user.
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
*
* The first name of the user.
*
*
* @return The first name of the user.
*/
public String getFirstName() {
return this.firstName;
}
/**
*
* The first name of the user.
*
*
* @param firstName
* The first name of the user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UserByPermissionGroup withFirstName(String firstName) {
setFirstName(firstName);
return this;
}
/**
*
* The last name of the user.
*
*
* @param lastName
* The last name of the user.
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}
/**
*
* The last name of the user.
*
*
* @return The last name of the user.
*/
public String getLastName() {
return this.lastName;
}
/**
*
* The last name of the user.
*
*
* @param lastName
* The last name of the user.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UserByPermissionGroup withLastName(String lastName) {
setLastName(lastName);
return this;
}
/**
*
* The email address of the user. The email address serves as a unique identifier for each user and cannot be
* changed after it's created.
*
*
* @param emailAddress
* The email address of the user. The email address serves as a unique identifier for each user and cannot be
* changed after it's created.
*/
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
/**
*
* The email address of the user. The email address serves as a unique identifier for each user and cannot be
* changed after it's created.
*
*
* @return The email address of the user. The email address serves as a unique identifier for each user and cannot
* be changed after it's created.
*/
public String getEmailAddress() {
return this.emailAddress;
}
/**
*
* The email address of the user. The email address serves as a unique identifier for each user and cannot be
* changed after it's created.
*
*
* @param emailAddress
* The email address of the user. The email address serves as a unique identifier for each user and cannot be
* changed after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UserByPermissionGroup withEmailAddress(String emailAddress) {
setEmailAddress(emailAddress);
return this;
}
/**
*
* Indicates the type of user.
*
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by
* adding them to a permission group.
*
*
*
*
* @param type
* Indicates the type of user.
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions
* by adding them to a permission group.
*
*
* @see UserType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* Indicates the type of user.
*
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by
* adding them to a permission group.
*
*
*
*
* @return Indicates the type of user.
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions
* by adding them to a permission group.
*
*
* @see UserType
*/
public String getType() {
return this.type;
}
/**
*
* Indicates the type of user.
*
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by
* adding them to a permission group.
*
*
*
*
* @param type
* Indicates the type of user.
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions
* by adding them to a permission group.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see UserType
*/
public UserByPermissionGroup withType(String type) {
setType(type);
return this;
}
/**
*
* Indicates the type of user.
*
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions by
* adding them to a permission group.
*
*
*
*
* @param type
* Indicates the type of user.
*
* -
*
* SUPER_USER
– A user with permission to all the functionality and data in FinSpace.
*
*
* -
*
* APP_USER
– A user with specific permissions in FinSpace. The users are assigned permissions
* by adding them to a permission group.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see UserType
*/
public UserByPermissionGroup withType(UserType type) {
this.type = type.toString();
return this;
}
/**
*
* Indicates whether the user can access FinSpace API operations.
*
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
*
*
* @param apiAccess
* Indicates whether the user can access FinSpace API operations.
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
* @see ApiAccess
*/
public void setApiAccess(String apiAccess) {
this.apiAccess = apiAccess;
}
/**
*
* Indicates whether the user can access FinSpace API operations.
*
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
*
*
* @return Indicates whether the user can access FinSpace API operations.
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
* @see ApiAccess
*/
public String getApiAccess() {
return this.apiAccess;
}
/**
*
* Indicates whether the user can access FinSpace API operations.
*
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
*
*
* @param apiAccess
* Indicates whether the user can access FinSpace API operations.
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiAccess
*/
public UserByPermissionGroup withApiAccess(String apiAccess) {
setApiAccess(apiAccess);
return this;
}
/**
*
* Indicates whether the user can access FinSpace API operations.
*
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
*
*
* @param apiAccess
* Indicates whether the user can access FinSpace API operations.
*
* -
*
* ENABLED
– The user has permissions to use the API operations.
*
*
* -
*
* DISABLED
– The user does not have permissions to use any API operations.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ApiAccess
*/
public UserByPermissionGroup withApiAccess(ApiAccess apiAccess) {
this.apiAccess = apiAccess.toString();
return this;
}
/**
*
* The IAM ARN identifier that is attached to FinSpace API calls.
*
*
* @param apiAccessPrincipalArn
* The IAM ARN identifier that is attached to FinSpace API calls.
*/
public void setApiAccessPrincipalArn(String apiAccessPrincipalArn) {
this.apiAccessPrincipalArn = apiAccessPrincipalArn;
}
/**
*
* The IAM ARN identifier that is attached to FinSpace API calls.
*
*
* @return The IAM ARN identifier that is attached to FinSpace API calls.
*/
public String getApiAccessPrincipalArn() {
return this.apiAccessPrincipalArn;
}
/**
*
* The IAM ARN identifier that is attached to FinSpace API calls.
*
*
* @param apiAccessPrincipalArn
* The IAM ARN identifier that is attached to FinSpace API calls.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UserByPermissionGroup withApiAccessPrincipalArn(String apiAccessPrincipalArn) {
setApiAccessPrincipalArn(apiAccessPrincipalArn);
return this;
}
/**
*
* Indicates the status of the user within a permission group.
*
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
*
*
* @param membershipStatus
* Indicates the status of the user within a permission group.
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
* @see PermissionGroupMembershipStatus
*/
public void setMembershipStatus(String membershipStatus) {
this.membershipStatus = membershipStatus;
}
/**
*
* Indicates the status of the user within a permission group.
*
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
*
*
* @return Indicates the status of the user within a permission group.
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
* @see PermissionGroupMembershipStatus
*/
public String getMembershipStatus() {
return this.membershipStatus;
}
/**
*
* Indicates the status of the user within a permission group.
*
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
*
*
* @param membershipStatus
* Indicates the status of the user within a permission group.
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see PermissionGroupMembershipStatus
*/
public UserByPermissionGroup withMembershipStatus(String membershipStatus) {
setMembershipStatus(membershipStatus);
return this;
}
/**
*
* Indicates the status of the user within a permission group.
*
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
*
*
* @param membershipStatus
* Indicates the status of the user within a permission group.
*
* -
*
* ADDITION_IN_PROGRESS
– The user is currently being added to the permission group.
*
*
* -
*
* ADDITION_SUCCESS
– The user is successfully added to the permission group.
*
*
* -
*
* REMOVAL_IN_PROGRESS
– The user is currently being removed from the permission group.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see PermissionGroupMembershipStatus
*/
public UserByPermissionGroup withMembershipStatus(PermissionGroupMembershipStatus membershipStatus) {
this.membershipStatus = membershipStatus.toString();
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 (getUserId() != null)
sb.append("UserId: ").append(getUserId()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getFirstName() != null)
sb.append("FirstName: ").append("***Sensitive Data Redacted***").append(",");
if (getLastName() != null)
sb.append("LastName: ").append("***Sensitive Data Redacted***").append(",");
if (getEmailAddress() != null)
sb.append("EmailAddress: ").append("***Sensitive Data Redacted***").append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getApiAccess() != null)
sb.append("ApiAccess: ").append(getApiAccess()).append(",");
if (getApiAccessPrincipalArn() != null)
sb.append("ApiAccessPrincipalArn: ").append(getApiAccessPrincipalArn()).append(",");
if (getMembershipStatus() != null)
sb.append("MembershipStatus: ").append(getMembershipStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UserByPermissionGroup == false)
return false;
UserByPermissionGroup other = (UserByPermissionGroup) obj;
if (other.getUserId() == null ^ this.getUserId() == null)
return false;
if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == 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.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.getEmailAddress() == null ^ this.getEmailAddress() == null)
return false;
if (other.getEmailAddress() != null && other.getEmailAddress().equals(this.getEmailAddress()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getApiAccess() == null ^ this.getApiAccess() == null)
return false;
if (other.getApiAccess() != null && other.getApiAccess().equals(this.getApiAccess()) == false)
return false;
if (other.getApiAccessPrincipalArn() == null ^ this.getApiAccessPrincipalArn() == null)
return false;
if (other.getApiAccessPrincipalArn() != null && other.getApiAccessPrincipalArn().equals(this.getApiAccessPrincipalArn()) == false)
return false;
if (other.getMembershipStatus() == null ^ this.getMembershipStatus() == null)
return false;
if (other.getMembershipStatus() != null && other.getMembershipStatus().equals(this.getMembershipStatus()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getFirstName() == null) ? 0 : getFirstName().hashCode());
hashCode = prime * hashCode + ((getLastName() == null) ? 0 : getLastName().hashCode());
hashCode = prime * hashCode + ((getEmailAddress() == null) ? 0 : getEmailAddress().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getApiAccess() == null) ? 0 : getApiAccess().hashCode());
hashCode = prime * hashCode + ((getApiAccessPrincipalArn() == null) ? 0 : getApiAccessPrincipalArn().hashCode());
hashCode = prime * hashCode + ((getMembershipStatus() == null) ? 0 : getMembershipStatus().hashCode());
return hashCode;
}
@Override
public UserByPermissionGroup clone() {
try {
return (UserByPermissionGroup) 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.finspacedata.model.transform.UserByPermissionGroupMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}