com.amazonaws.services.augmentedairuntime.model.DescribeHumanLoopResult 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.augmentedairuntime.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
 * 
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeHumanLoopResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
    /**
     * 
     * The creation time when Amazon Augmented AI created the human loop.
     * 
     */
    private java.util.Date creationTime;
    /**
     * 
     * The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     * Failed.
     * 
     */
    private String failureReason;
    /**
     * 
     * A failure code that identifies the type of failure.
     * 
     * 
     * Possible values: ValidationError, Expired, InternalError
     * 
     */
    private String failureCode;
    /**
     * 
     * The status of the human loop.
     * 
     */
    private String humanLoopStatus;
    /**
     * 
     * The name of the human loop. The name must be lowercase, unique within the Region in your account, and can have up
     * to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     * 
     */
    private String humanLoopName;
    /**
     * 
     * The Amazon Resource Name (ARN) of the human loop.
     * 
     */
    private String humanLoopArn;
    /**
     * 
     * The Amazon Resource Name (ARN) of the flow definition.
     * 
     */
    private String flowDefinitionArn;
    /**
     * 
     * An object that contains information about the output of the human loop.
     * 
     */
    private HumanLoopOutput humanLoopOutput;
    /**
     * 
     * The creation time when Amazon Augmented AI created the human loop.
     * 
     * 
     * @param creationTime
     *        The creation time when Amazon Augmented AI created the human loop.
     */
    public void setCreationTime(java.util.Date creationTime) {
        this.creationTime = creationTime;
    }
    /**
     * 
     * The creation time when Amazon Augmented AI created the human loop.
     * 
     * 
     * @return The creation time when Amazon Augmented AI created the human loop.
     */
    public java.util.Date getCreationTime() {
        return this.creationTime;
    }
    /**
     * 
     * The creation time when Amazon Augmented AI created the human loop.
     * 
     * 
     * @param creationTime
     *        The creation time when Amazon Augmented AI created the human loop.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withCreationTime(java.util.Date creationTime) {
        setCreationTime(creationTime);
        return this;
    }
    /**
     * 
     * The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     * Failed.
     * 
     * 
     * @param failureReason
     *        The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     *        Failed.
     */
    public void setFailureReason(String failureReason) {
        this.failureReason = failureReason;
    }
    /**
     * 
     * The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     * Failed.
     * 
     * 
     * @return The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     *         Failed.
     */
    public String getFailureReason() {
        return this.failureReason;
    }
    /**
     * 
     * The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     * Failed.
     * 
     * 
     * @param failureReason
     *        The reason why a human loop failed. The failure reason is returned when the status of the human loop is
     *        Failed.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withFailureReason(String failureReason) {
        setFailureReason(failureReason);
        return this;
    }
    /**
     * 
     * A failure code that identifies the type of failure.
     * 
     * 
     * Possible values: ValidationError, Expired, InternalError
     * 
     * 
     * @param failureCode
     *        A failure code that identifies the type of failure.
     *        
     *        Possible values: ValidationError, Expired, InternalError
     */
    public void setFailureCode(String failureCode) {
        this.failureCode = failureCode;
    }
    /**
     * 
     * A failure code that identifies the type of failure.
     * 
     * 
     * Possible values: ValidationError, Expired, InternalError
     * 
     * 
     * @return A failure code that identifies the type of failure.
     *         
     *         Possible values: ValidationError, Expired, InternalError
     */
    public String getFailureCode() {
        return this.failureCode;
    }
    /**
     * 
     * A failure code that identifies the type of failure.
     * 
     * 
     * Possible values: ValidationError, Expired, InternalError
     * 
     * 
     * @param failureCode
     *        A failure code that identifies the type of failure.
     *        
     *        Possible values: ValidationError, Expired, InternalError
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withFailureCode(String failureCode) {
        setFailureCode(failureCode);
        return this;
    }
    /**
     * 
     * The status of the human loop.
     * 
     * 
     * @param humanLoopStatus
     *        The status of the human loop.
     * @see HumanLoopStatus
     */
    public void setHumanLoopStatus(String humanLoopStatus) {
        this.humanLoopStatus = humanLoopStatus;
    }
    /**
     * 
     * The status of the human loop.
     * 
     * 
     * @return The status of the human loop.
     * @see HumanLoopStatus
     */
    public String getHumanLoopStatus() {
        return this.humanLoopStatus;
    }
    /**
     * 
     * The status of the human loop.
     * 
     * 
     * @param humanLoopStatus
     *        The status of the human loop.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see HumanLoopStatus
     */
    public DescribeHumanLoopResult withHumanLoopStatus(String humanLoopStatus) {
        setHumanLoopStatus(humanLoopStatus);
        return this;
    }
    /**
     * 
     * The status of the human loop.
     * 
     * 
     * @param humanLoopStatus
     *        The status of the human loop.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see HumanLoopStatus
     */
    public DescribeHumanLoopResult withHumanLoopStatus(HumanLoopStatus humanLoopStatus) {
        this.humanLoopStatus = humanLoopStatus.toString();
        return this;
    }
    /**
     * 
     * The name of the human loop. The name must be lowercase, unique within the Region in your account, and can have up
     * to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     * 
     * 
     * @param humanLoopName
     *        The name of the human loop. The name must be lowercase, unique within the Region in your account, and can
     *        have up to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     */
    public void setHumanLoopName(String humanLoopName) {
        this.humanLoopName = humanLoopName;
    }
    /**
     * 
     * The name of the human loop. The name must be lowercase, unique within the Region in your account, and can have up
     * to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     * 
     * 
     * @return The name of the human loop. The name must be lowercase, unique within the Region in your account, and can
     *         have up to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     */
    public String getHumanLoopName() {
        return this.humanLoopName;
    }
    /**
     * 
     * The name of the human loop. The name must be lowercase, unique within the Region in your account, and can have up
     * to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     * 
     * 
     * @param humanLoopName
     *        The name of the human loop. The name must be lowercase, unique within the Region in your account, and can
     *        have up to 63 characters. Valid characters: a-z, 0-9, and - (hyphen).
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withHumanLoopName(String humanLoopName) {
        setHumanLoopName(humanLoopName);
        return this;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) of the human loop.
     * 
     * 
     * @param humanLoopArn
     *        The Amazon Resource Name (ARN) of the human loop.
     */
    public void setHumanLoopArn(String humanLoopArn) {
        this.humanLoopArn = humanLoopArn;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) of the human loop.
     * 
     * 
     * @return The Amazon Resource Name (ARN) of the human loop.
     */
    public String getHumanLoopArn() {
        return this.humanLoopArn;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) of the human loop.
     * 
     * 
     * @param humanLoopArn
     *        The Amazon Resource Name (ARN) of the human loop.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withHumanLoopArn(String humanLoopArn) {
        setHumanLoopArn(humanLoopArn);
        return this;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) of the flow definition.
     * 
     * 
     * @param flowDefinitionArn
     *        The Amazon Resource Name (ARN) of the flow definition.
     */
    public void setFlowDefinitionArn(String flowDefinitionArn) {
        this.flowDefinitionArn = flowDefinitionArn;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) of the flow definition.
     * 
     * 
     * @return The Amazon Resource Name (ARN) of the flow definition.
     */
    public String getFlowDefinitionArn() {
        return this.flowDefinitionArn;
    }
    /**
     * 
     * The Amazon Resource Name (ARN) of the flow definition.
     * 
     * 
     * @param flowDefinitionArn
     *        The Amazon Resource Name (ARN) of the flow definition.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withFlowDefinitionArn(String flowDefinitionArn) {
        setFlowDefinitionArn(flowDefinitionArn);
        return this;
    }
    /**
     * 
     * An object that contains information about the output of the human loop.
     * 
     * 
     * @param humanLoopOutput
     *        An object that contains information about the output of the human loop.
     */
    public void setHumanLoopOutput(HumanLoopOutput humanLoopOutput) {
        this.humanLoopOutput = humanLoopOutput;
    }
    /**
     * 
     * An object that contains information about the output of the human loop.
     * 
     * 
     * @return An object that contains information about the output of the human loop.
     */
    public HumanLoopOutput getHumanLoopOutput() {
        return this.humanLoopOutput;
    }
    /**
     * 
     * An object that contains information about the output of the human loop.
     * 
     * 
     * @param humanLoopOutput
     *        An object that contains information about the output of the human loop.
     * @return Returns a reference to this object so that method calls can be chained together.
     */
    public DescribeHumanLoopResult withHumanLoopOutput(HumanLoopOutput humanLoopOutput) {
        setHumanLoopOutput(humanLoopOutput);
        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 (getCreationTime() != null)
            sb.append("CreationTime: ").append(getCreationTime()).append(",");
        if (getFailureReason() != null)
            sb.append("FailureReason: ").append(getFailureReason()).append(",");
        if (getFailureCode() != null)
            sb.append("FailureCode: ").append(getFailureCode()).append(",");
        if (getHumanLoopStatus() != null)
            sb.append("HumanLoopStatus: ").append(getHumanLoopStatus()).append(",");
        if (getHumanLoopName() != null)
            sb.append("HumanLoopName: ").append(getHumanLoopName()).append(",");
        if (getHumanLoopArn() != null)
            sb.append("HumanLoopArn: ").append(getHumanLoopArn()).append(",");
        if (getFlowDefinitionArn() != null)
            sb.append("FlowDefinitionArn: ").append(getFlowDefinitionArn()).append(",");
        if (getHumanLoopOutput() != null)
            sb.append("HumanLoopOutput: ").append(getHumanLoopOutput());
        sb.append("}");
        return sb.toString();
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (obj instanceof DescribeHumanLoopResult == false)
            return false;
        DescribeHumanLoopResult other = (DescribeHumanLoopResult) obj;
        if (other.getCreationTime() == null ^ this.getCreationTime() == null)
            return false;
        if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == 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.getFailureCode() == null ^ this.getFailureCode() == null)
            return false;
        if (other.getFailureCode() != null && other.getFailureCode().equals(this.getFailureCode()) == false)
            return false;
        if (other.getHumanLoopStatus() == null ^ this.getHumanLoopStatus() == null)
            return false;
        if (other.getHumanLoopStatus() != null && other.getHumanLoopStatus().equals(this.getHumanLoopStatus()) == false)
            return false;
        if (other.getHumanLoopName() == null ^ this.getHumanLoopName() == null)
            return false;
        if (other.getHumanLoopName() != null && other.getHumanLoopName().equals(this.getHumanLoopName()) == false)
            return false;
        if (other.getHumanLoopArn() == null ^ this.getHumanLoopArn() == null)
            return false;
        if (other.getHumanLoopArn() != null && other.getHumanLoopArn().equals(this.getHumanLoopArn()) == false)
            return false;
        if (other.getFlowDefinitionArn() == null ^ this.getFlowDefinitionArn() == null)
            return false;
        if (other.getFlowDefinitionArn() != null && other.getFlowDefinitionArn().equals(this.getFlowDefinitionArn()) == false)
            return false;
        if (other.getHumanLoopOutput() == null ^ this.getHumanLoopOutput() == null)
            return false;
        if (other.getHumanLoopOutput() != null && other.getHumanLoopOutput().equals(this.getHumanLoopOutput()) == false)
            return false;
        return true;
    }
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
        hashCode = prime * hashCode + ((getFailureReason() == null) ? 0 : getFailureReason().hashCode());
        hashCode = prime * hashCode + ((getFailureCode() == null) ? 0 : getFailureCode().hashCode());
        hashCode = prime * hashCode + ((getHumanLoopStatus() == null) ? 0 : getHumanLoopStatus().hashCode());
        hashCode = prime * hashCode + ((getHumanLoopName() == null) ? 0 : getHumanLoopName().hashCode());
        hashCode = prime * hashCode + ((getHumanLoopArn() == null) ? 0 : getHumanLoopArn().hashCode());
        hashCode = prime * hashCode + ((getFlowDefinitionArn() == null) ? 0 : getFlowDefinitionArn().hashCode());
        hashCode = prime * hashCode + ((getHumanLoopOutput() == null) ? 0 : getHumanLoopOutput().hashCode());
        return hashCode;
    }
    @Override
    public DescribeHumanLoopResult clone() {
        try {
            return (DescribeHumanLoopResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }
}