All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.athena.model.AthenaError Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Athena module holds the client classes that are used for communicating with Amazon Athena Service

The newest version!
/*
 * 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.athena.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Provides information about an Athena query error. The AthenaError feature provides standardized error * information to help you understand failed queries and take steps after a query failure occurs. * AthenaError includes an ErrorCategory field that specifies whether the cause of the failed * query is due to system error, user error, or other error. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AthenaError implements Serializable, Cloneable, StructuredPojo { /** *

* An integer value that specifies the category of a query failure error. The following list shows the category for * each integer value. *

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other *

*/ private Integer errorCategory; /** *

* An integer value that provides specific information about an Athena query error. For the meaning of specific * values, see the Error Type Reference in the Amazon Athena User Guide. *

*/ private Integer errorType; /** *

* True if the query might succeed if resubmitted. *

*/ private Boolean retryable; /** *

* Contains a short description of the error that occurred. *

*/ private String errorMessage; /** *

* An integer value that specifies the category of a query failure error. The following list shows the category for * each integer value. *

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other *

* * @param errorCategory * An integer value that specifies the category of a query failure error. The following list shows the * category for each integer value.

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other */ public void setErrorCategory(Integer errorCategory) { this.errorCategory = errorCategory; } /** *

* An integer value that specifies the category of a query failure error. The following list shows the category for * each integer value. *

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other *

* * @return An integer value that specifies the category of a query failure error. The following list shows the * category for each integer value.

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other */ public Integer getErrorCategory() { return this.errorCategory; } /** *

* An integer value that specifies the category of a query failure error. The following list shows the category for * each integer value. *

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other *

* * @param errorCategory * An integer value that specifies the category of a query failure error. The following list shows the * category for each integer value.

*

* 1 - System *

*

* 2 - User *

*

* 3 - Other * @return Returns a reference to this object so that method calls can be chained together. */ public AthenaError withErrorCategory(Integer errorCategory) { setErrorCategory(errorCategory); return this; } /** *

* An integer value that provides specific information about an Athena query error. For the meaning of specific * values, see the Error Type Reference in the Amazon Athena User Guide. *

* * @param errorType * An integer value that provides specific information about an Athena query error. For the meaning of * specific values, see the Error Type Reference in the Amazon Athena User Guide. */ public void setErrorType(Integer errorType) { this.errorType = errorType; } /** *

* An integer value that provides specific information about an Athena query error. For the meaning of specific * values, see the Error Type Reference in the Amazon Athena User Guide. *

* * @return An integer value that provides specific information about an Athena query error. For the meaning of * specific values, see the Error Type Reference in the Amazon Athena User Guide. */ public Integer getErrorType() { return this.errorType; } /** *

* An integer value that provides specific information about an Athena query error. For the meaning of specific * values, see the Error Type Reference in the Amazon Athena User Guide. *

* * @param errorType * An integer value that provides specific information about an Athena query error. For the meaning of * specific values, see the Error Type Reference in the Amazon Athena User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public AthenaError withErrorType(Integer errorType) { setErrorType(errorType); return this; } /** *

* True if the query might succeed if resubmitted. *

* * @param retryable * True if the query might succeed if resubmitted. */ public void setRetryable(Boolean retryable) { this.retryable = retryable; } /** *

* True if the query might succeed if resubmitted. *

* * @return True if the query might succeed if resubmitted. */ public Boolean getRetryable() { return this.retryable; } /** *

* True if the query might succeed if resubmitted. *

* * @param retryable * True if the query might succeed if resubmitted. * @return Returns a reference to this object so that method calls can be chained together. */ public AthenaError withRetryable(Boolean retryable) { setRetryable(retryable); return this; } /** *

* True if the query might succeed if resubmitted. *

* * @return True if the query might succeed if resubmitted. */ public Boolean isRetryable() { return this.retryable; } /** *

* Contains a short description of the error that occurred. *

* * @param errorMessage * Contains a short description of the error that occurred. */ public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } /** *

* Contains a short description of the error that occurred. *

* * @return Contains a short description of the error that occurred. */ public String getErrorMessage() { return this.errorMessage; } /** *

* Contains a short description of the error that occurred. *

* * @param errorMessage * Contains a short description of the error that occurred. * @return Returns a reference to this object so that method calls can be chained together. */ public AthenaError withErrorMessage(String errorMessage) { setErrorMessage(errorMessage); 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 (getErrorCategory() != null) sb.append("ErrorCategory: ").append(getErrorCategory()).append(","); if (getErrorType() != null) sb.append("ErrorType: ").append(getErrorType()).append(","); if (getRetryable() != null) sb.append("Retryable: ").append(getRetryable()).append(","); if (getErrorMessage() != null) sb.append("ErrorMessage: ").append(getErrorMessage()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AthenaError == false) return false; AthenaError other = (AthenaError) obj; if (other.getErrorCategory() == null ^ this.getErrorCategory() == null) return false; if (other.getErrorCategory() != null && other.getErrorCategory().equals(this.getErrorCategory()) == false) return false; if (other.getErrorType() == null ^ this.getErrorType() == null) return false; if (other.getErrorType() != null && other.getErrorType().equals(this.getErrorType()) == false) return false; if (other.getRetryable() == null ^ this.getRetryable() == null) return false; if (other.getRetryable() != null && other.getRetryable().equals(this.getRetryable()) == false) return false; if (other.getErrorMessage() == null ^ this.getErrorMessage() == null) return false; if (other.getErrorMessage() != null && other.getErrorMessage().equals(this.getErrorMessage()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getErrorCategory() == null) ? 0 : getErrorCategory().hashCode()); hashCode = prime * hashCode + ((getErrorType() == null) ? 0 : getErrorType().hashCode()); hashCode = prime * hashCode + ((getRetryable() == null) ? 0 : getRetryable().hashCode()); hashCode = prime * hashCode + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode()); return hashCode; } @Override public AthenaError clone() { try { return (AthenaError) 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.athena.model.transform.AthenaErrorMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy