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

com.microsoft.bing.autosuggest.models.Error Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.bing.autosuggest.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Defines the error that occurred.
 */
public class Error {
    /**
     * The error code that identifies the category of error. Possible values
     * include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded',
     * 'InvalidAuthorization', 'InsufficientAuthorization'.
     */
    @JsonProperty(value = "code", required = true)
    private ErrorCode code;

    /**
     * A description of the error.
     */
    @JsonProperty(value = "message", required = true)
    private String message;

    /**
     * A description that provides additional information about the error.
     */
    @JsonProperty(value = "moreDetails", access = JsonProperty.Access.WRITE_ONLY)
    private String moreDetails;

    /**
     * The parameter in the request that caused the error.
     */
    @JsonProperty(value = "parameter", access = JsonProperty.Access.WRITE_ONLY)
    private String parameter;

    /**
     * The parameter's value in the request that was not valid.
     */
    @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
    private String value;

    /**
     * The _type property.
     */
    @JsonProperty(value = "_type")
    private String _type;

    /**
     * Get the error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'.
     *
     * @return the code value
     */
    public ErrorCode code() {
        return this.code;
    }

    /**
     * Set the error code that identifies the category of error. Possible values include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded', 'InvalidAuthorization', 'InsufficientAuthorization'.
     *
     * @param code the code value to set
     * @return the Error object itself.
     */
    public Error withCode(ErrorCode code) {
        this.code = code;
        return this;
    }

    /**
     * Get a description of the error.
     *
     * @return the message value
     */
    public String message() {
        return this.message;
    }

    /**
     * Set a description of the error.
     *
     * @param message the message value to set
     * @return the Error object itself.
     */
    public Error withMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Get a description that provides additional information about the error.
     *
     * @return the moreDetails value
     */
    public String moreDetails() {
        return this.moreDetails;
    }

    /**
     * Get the parameter in the request that caused the error.
     *
     * @return the parameter value
     */
    public String parameter() {
        return this.parameter;
    }

    /**
     * Get the parameter's value in the request that was not valid.
     *
     * @return the value value
     */
    public String value() {
        return this.value;
    }

    /**
     * Get the _type value.
     *
     * @return the _type value
     */
    public String _type() {
        return this._type;
    }

    /**
     * Set the _type value.
     *
     * @param _type the _type value to set
     * @return the Error object itself.
     */
    public Error with_type(String _type) {
        this._type = _type;
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy