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

package com.azure.resourcemanager.recoveryservicessiterecovery.models;

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

/** ASR error model. */
@Fluent
public final class ServiceError {
    /*
     * Error code.
     */
    @JsonProperty(value = "code")
    private String code;

    /*
     * Error message.
     */
    @JsonProperty(value = "message")
    private String message;

    /*
     * Possible causes of error.
     */
    @JsonProperty(value = "possibleCauses")
    private String possibleCauses;

    /*
     * Recommended action to resolve error.
     */
    @JsonProperty(value = "recommendedAction")
    private String recommendedAction;

    /*
     * Activity Id.
     */
    @JsonProperty(value = "activityId")
    private String activityId;

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

    /**
     * Get the code property: Error code.
     *
     * @return the code value.
     */
    public String code() {
        return this.code;
    }

    /**
     * Set the code property: Error code.
     *
     * @param code the code value to set.
     * @return the ServiceError object itself.
     */
    public ServiceError withCode(String code) {
        this.code = code;
        return this;
    }

    /**
     * Get the message property: Error message.
     *
     * @return the message value.
     */
    public String message() {
        return this.message;
    }

    /**
     * Set the message property: Error message.
     *
     * @param message the message value to set.
     * @return the ServiceError object itself.
     */
    public ServiceError withMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Get the possibleCauses property: Possible causes of error.
     *
     * @return the possibleCauses value.
     */
    public String possibleCauses() {
        return this.possibleCauses;
    }

    /**
     * Set the possibleCauses property: Possible causes of error.
     *
     * @param possibleCauses the possibleCauses value to set.
     * @return the ServiceError object itself.
     */
    public ServiceError withPossibleCauses(String possibleCauses) {
        this.possibleCauses = possibleCauses;
        return this;
    }

    /**
     * Get the recommendedAction property: Recommended action to resolve error.
     *
     * @return the recommendedAction value.
     */
    public String recommendedAction() {
        return this.recommendedAction;
    }

    /**
     * Set the recommendedAction property: Recommended action to resolve error.
     *
     * @param recommendedAction the recommendedAction value to set.
     * @return the ServiceError object itself.
     */
    public ServiceError withRecommendedAction(String recommendedAction) {
        this.recommendedAction = recommendedAction;
        return this;
    }

    /**
     * Get the activityId property: Activity Id.
     *
     * @return the activityId value.
     */
    public String activityId() {
        return this.activityId;
    }

    /**
     * Set the activityId property: Activity Id.
     *
     * @param activityId the activityId value to set.
     * @return the ServiceError object itself.
     */
    public ServiceError withActivityId(String activityId) {
        this.activityId = activityId;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }
}
