/* * 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.ssoadmin.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The status of the creation or deletion operation of an assignment that a principal needs to access an account. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AccountAssignmentOperationStatus implements Serializable, Cloneable, StructuredPojo { /** ** The status of the permission set provisioning process. *
*/ private String status; /** ** The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) * workflow. *
*/ private String requestId; /** ** The message that contains an error or exception in case of an operation failure. *
*/ private String failureReason; /** ** TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). *
*/ private String targetId; /** ** The entity type for which the assignment will be created. *
*/ private String targetType; /** ** The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. *
*/ private String permissionSetArn; /** ** The entity type for which the assignment will be created. *
*/ private String principalType; /** ** An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, * f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API * Reference. *
*/ private String principalId; /** ** The date that the permission set was created. *
*/ private java.util.Date createdDate; /** ** The status of the permission set provisioning process. *
* * @param status * The status of the permission set provisioning process. * @see StatusValues */ public void setStatus(String status) { this.status = status; } /** ** The status of the permission set provisioning process. *
* * @return The status of the permission set provisioning process. * @see StatusValues */ public String getStatus() { return this.status; } /** ** The status of the permission set provisioning process. *
* * @param status * The status of the permission set provisioning process. * @return Returns a reference to this object so that method calls can be chained together. * @see StatusValues */ public AccountAssignmentOperationStatus withStatus(String status) { setStatus(status); return this; } /** ** The status of the permission set provisioning process. *
* * @param status * The status of the permission set provisioning process. * @return Returns a reference to this object so that method calls can be chained together. * @see StatusValues */ public AccountAssignmentOperationStatus withStatus(StatusValues status) { this.status = status.toString(); return this; } /** ** The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) * workflow. *
* * @param requestId * The identifier for tracking the request operation that is generated by the universally unique identifier * (UUID) workflow. */ public void setRequestId(String requestId) { this.requestId = requestId; } /** ** The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) * workflow. *
* * @return The identifier for tracking the request operation that is generated by the universally unique identifier * (UUID) workflow. */ public String getRequestId() { return this.requestId; } /** ** The identifier for tracking the request operation that is generated by the universally unique identifier (UUID) * workflow. *
* * @param requestId * The identifier for tracking the request operation that is generated by the universally unique identifier * (UUID) workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountAssignmentOperationStatus withRequestId(String requestId) { setRequestId(requestId); return this; } /** ** The message that contains an error or exception in case of an operation failure. *
* * @param failureReason * The message that contains an error or exception in case of an operation failure. */ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } /** ** The message that contains an error or exception in case of an operation failure. *
* * @return The message that contains an error or exception in case of an operation failure. */ public String getFailureReason() { return this.failureReason; } /** ** The message that contains an error or exception in case of an operation failure. *
* * @param failureReason * The message that contains an error or exception in case of an operation failure. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountAssignmentOperationStatus withFailureReason(String failureReason) { setFailureReason(failureReason); return this; } /** ** TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). *
* * @param targetId * TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). */ public void setTargetId(String targetId) { this.targetId = targetId; } /** ** TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). *
* * @return TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). */ public String getTargetId() { return this.targetId; } /** ** TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). *
* * @param targetId * TargetID is an AWS account identifier, typically a 10-12 digit string (For example, 123456789012). * @return Returns a reference to this object so that method calls can be chained together. */ public AccountAssignmentOperationStatus withTargetId(String targetId) { setTargetId(targetId); return this; } /** ** The entity type for which the assignment will be created. *
* * @param targetType * The entity type for which the assignment will be created. * @see TargetType */ public void setTargetType(String targetType) { this.targetType = targetType; } /** ** The entity type for which the assignment will be created. *
* * @return The entity type for which the assignment will be created. * @see TargetType */ public String getTargetType() { return this.targetType; } /** ** The entity type for which the assignment will be created. *
* * @param targetType * The entity type for which the assignment will be created. * @return Returns a reference to this object so that method calls can be chained together. * @see TargetType */ public AccountAssignmentOperationStatus withTargetType(String targetType) { setTargetType(targetType); return this; } /** ** The entity type for which the assignment will be created. *
* * @param targetType * The entity type for which the assignment will be created. * @return Returns a reference to this object so that method calls can be chained together. * @see TargetType */ public AccountAssignmentOperationStatus withTargetType(TargetType targetType) { this.targetType = targetType.toString(); return this; } /** ** The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. *
* * @param permissionSetArn * The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. */ public void setPermissionSetArn(String permissionSetArn) { this.permissionSetArn = permissionSetArn; } /** ** The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. *
* * @return The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. */ public String getPermissionSetArn() { return this.permissionSetArn; } /** ** The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. *
* * @param permissionSetArn * The ARN of the permission set. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service * Namespaces in the AWS General Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountAssignmentOperationStatus withPermissionSetArn(String permissionSetArn) { setPermissionSetArn(permissionSetArn); return this; } /** ** The entity type for which the assignment will be created. *
* * @param principalType * The entity type for which the assignment will be created. * @see PrincipalType */ public void setPrincipalType(String principalType) { this.principalType = principalType; } /** ** The entity type for which the assignment will be created. *
* * @return The entity type for which the assignment will be created. * @see PrincipalType */ public String getPrincipalType() { return this.principalType; } /** ** The entity type for which the assignment will be created. *
* * @param principalType * The entity type for which the assignment will be created. * @return Returns a reference to this object so that method calls can be chained together. * @see PrincipalType */ public AccountAssignmentOperationStatus withPrincipalType(String principalType) { setPrincipalType(principalType); return this; } /** ** The entity type for which the assignment will be created. *
* * @param principalType * The entity type for which the assignment will be created. * @return Returns a reference to this object so that method calls can be chained together. * @see PrincipalType */ public AccountAssignmentOperationStatus withPrincipalType(PrincipalType principalType) { this.principalType = principalType.toString(); return this; } /** ** An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, * f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API * Reference. *
* * @param principalId * An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For * example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity * Center, see the IAM Identity Center * Identity Store API Reference. */ public void setPrincipalId(String principalId) { this.principalId = principalId; } /** ** An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, * f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API * Reference. *
* * @return An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For * example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity * Center, see the IAM Identity Center * Identity Store API Reference. */ public String getPrincipalId() { return this.principalId; } /** ** An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For example, * f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity Center, see the IAM Identity Center Identity Store API * Reference. *
* * @param principalId * An identifier for an object in IAM Identity Center, such as a user or group. PrincipalIds are GUIDs (For * example, f81d4fae-7dec-11d0-a765-00a0c91e6bf6). For more information about PrincipalIds in IAM Identity * Center, see the IAM Identity Center * Identity Store API Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountAssignmentOperationStatus withPrincipalId(String principalId) { setPrincipalId(principalId); return this; } /** ** The date that the permission set was created. *
* * @param createdDate * The date that the permission set was created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** ** The date that the permission set was created. *
* * @return The date that the permission set was created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** ** The date that the permission set was created. *
* * @param createdDate * The date that the permission set was created. * @return Returns a reference to this object so that method calls can be chained together. */ public AccountAssignmentOperationStatus withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); 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 (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getRequestId() != null) sb.append("RequestId: ").append(getRequestId()).append(","); if (getFailureReason() != null) sb.append("FailureReason: ").append(getFailureReason()).append(","); if (getTargetId() != null) sb.append("TargetId: ").append(getTargetId()).append(","); if (getTargetType() != null) sb.append("TargetType: ").append(getTargetType()).append(","); if (getPermissionSetArn() != null) sb.append("PermissionSetArn: ").append(getPermissionSetArn()).append(","); if (getPrincipalType() != null) sb.append("PrincipalType: ").append(getPrincipalType()).append(","); if (getPrincipalId() != null) sb.append("PrincipalId: ").append(getPrincipalId()).append(","); if (getCreatedDate() != null) sb.append("CreatedDate: ").append(getCreatedDate()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AccountAssignmentOperationStatus == false) return false; AccountAssignmentOperationStatus other = (AccountAssignmentOperationStatus) obj; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getRequestId() == null ^ this.getRequestId() == null) return false; if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == false) return false; if (other.getFailureReason() == null ^ this.getFailureReason() == null) return false; if (other.getFailureReason() != null && other.getFailureReason().equals(this.getFailureReason()) == false) return false; if (other.getTargetId() == null ^ this.getTargetId() == null) return false; if (other.getTargetId() != null && other.getTargetId().equals(this.getTargetId()) == false) return false; if (other.getTargetType() == null ^ this.getTargetType() == null) return false; if (other.getTargetType() != null && other.getTargetType().equals(this.getTargetType()) == false) return false; if (other.getPermissionSetArn() == null ^ this.getPermissionSetArn() == null) return false; if (other.getPermissionSetArn() != null && other.getPermissionSetArn().equals(this.getPermissionSetArn()) == false) return false; if (other.getPrincipalType() == null ^ this.getPrincipalType() == null) return false; if (other.getPrincipalType() != null && other.getPrincipalType().equals(this.getPrincipalType()) == false) return false; if (other.getPrincipalId() == null ^ this.getPrincipalId() == null) return false; if (other.getPrincipalId() != null && other.getPrincipalId().equals(this.getPrincipalId()) == false) return false; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getRequestId() == null) ? 0 : getRequestId().hashCode()); hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode()); hashCode = prime * hashCode + ((getTargetId() == null) ? 0 : getTargetId().hashCode()); hashCode = prime * hashCode + ((getTargetType() == null) ? 0 : getTargetType().hashCode()); hashCode = prime * hashCode + ((getPermissionSetArn() == null) ? 0 : getPermissionSetArn().hashCode()); hashCode = prime * hashCode + ((getPrincipalType() == null) ? 0 : getPrincipalType().hashCode()); hashCode = prime * hashCode + ((getPrincipalId() == null) ? 0 : getPrincipalId().hashCode()); hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); return hashCode; } @Override public AccountAssignmentOperationStatus clone() { try { return (AccountAssignmentOperationStatus) 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.ssoadmin.model.transform.AccountAssignmentOperationStatusMarshaller.getInstance().marshall(this, protocolMarshaller); } }