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

com.microsoft.azure.storage.StorageExtendedErrorInformation Maven / Gradle / Ivy

/**
 * Copyright Microsoft Corporation
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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.microsoft.azure.storage;

import java.io.Serializable;
import java.util.HashMap;

/**
 * Represents extended error information returned by the Microsoft Azure storage service.
 */
public final class StorageExtendedErrorInformation implements Serializable {
    /**
     * The serialization version number.
     */
    private static final long serialVersionUID = 1527013626991334677L;

    /**
     * Represents additional error details, as a java.util.HashMap object.
     */
    private HashMap additionalDetails;

    /**
     * Represents the storage service error code.
     */
    private String errorCode;

    /**
     * Represents the storage service error message.
     */
    private String errorMessage;

    /**
     * Creates an instance of the StorageExtendedErrorInformation class.
     */
    public StorageExtendedErrorInformation() {
        this.setAdditionalDetails(new HashMap());
    }

    /**
     * Gets additional error details, as a java.util.HashMap object.
     * 
     * @return A java.util.HashMap of key/value pairs which contain the additional error details.
     */
    public HashMap getAdditionalDetails() {
        return this.additionalDetails;
    }

    /**
     * Gets the storage service error code.
     * 
     * @return A String which contains the error code.
     *
     * @deprecated use the property on {@link RequestResult} instead.
     */
    @Deprecated
    public String getErrorCode() {
        return this.errorCode;
    }

    /**
     * Gets the storage service error message.
     * 
     * @return A String which contains the error message.
     */
    public String getErrorMessage() {
        return this.errorMessage;
    }

    /**
     * RESERVED FOR INTERNAL USE.
     * 
     * Sets additional error details.
     * 
     * @param additionalDetails
     *        A java.util.HashMap of key/value pairs which contain the additional error details.
     */
    public void setAdditionalDetails(final HashMap additionalDetails) {
        this.additionalDetails = additionalDetails;
    }

    /**
     * RESERVED FOR INTERNAL USE.
     * 
     * Sets the storage service error code.
     * 
     * @param errorCode
     *        A String which contains the error code.
     */
    public void setErrorCode(final String errorCode) {
        this.errorCode = errorCode;
    }

    /**
     * RESERVED FOR INTERNAL USE.
     * 
     * Sets the storage service error message.
     * 
     * @param errorMessage
     *        A String which contains the error message.
     */
    public void setErrorMessage(final String errorMessage) {
        this.errorMessage = errorMessage;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy