// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.analytics.purview.sharing.models;

import java.util.List;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The purview share error body model.
 */
@Fluent
public final class PurviewShareErrorInfo {
    /*
     * Code of the error
     */
    @JsonProperty(value = "code", required = true)
    private String code;

    /*
     * Nested details of the error model
     */
    @JsonProperty(value = "details")
    private List<PurviewShareErrorInfo> details;

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

    /*
     * Target of the error
     */
    @JsonProperty(value = "target")
    private String target;

    /**
     * Creates an instance of PurviewShareErrorInfo class.
     */
    public PurviewShareErrorInfo() {
    }

    /**
     * Get the code property: Code of the error.
     * 
     * @return the code value.
     */
    public String getCode() {
        return this.code;
    }

    /**
     * Set the code property: Code of the error.
     * 
     * @param code the code value to set.
     * @return the PurviewShareErrorInfo object itself.
     */
    public PurviewShareErrorInfo setCode(String code) {
        this.code = code;
        return this;
    }

    /**
     * Get the details property: Nested details of the error model.
     * 
     * @return the details value.
     */
    public List<PurviewShareErrorInfo> getDetails() {
        return this.details;
    }

    /**
     * Set the details property: Nested details of the error model.
     * 
     * @param details the details value to set.
     * @return the PurviewShareErrorInfo object itself.
     */
    public PurviewShareErrorInfo setDetails(List<PurviewShareErrorInfo> details) {
        this.details = details;
        return this;
    }

    /**
     * Get the message property: Message of the error.
     * 
     * @return the message value.
     */
    public String getMessage() {
        return this.message;
    }

    /**
     * Set the message property: Message of the error.
     * 
     * @param message the message value to set.
     * @return the PurviewShareErrorInfo object itself.
     */
    public PurviewShareErrorInfo setMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Get the target property: Target of the error.
     * 
     * @return the target value.
     */
    public String getTarget() {
        return this.target;
    }

    /**
     * Set the target property: Target of the error.
     * 
     * @param target the target value to set.
     * @return the PurviewShareErrorInfo object itself.
     */
    public PurviewShareErrorInfo setTarget(String target) {
        this.target = target;
        return this;
    }
}
