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

package com.azure.resourcemanager.resourcehealth.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Recommended actions of event. */
@Fluent
public final class EventPropertiesRecommendedActions {
    /*
     * Recommended action title for the service health event.
     */
    @JsonProperty(value = "message")
    private String message;

    /*
     * Recommended actions for the service health event.
     */
    @JsonProperty(value = "actions")
    private List<EventPropertiesRecommendedActionsItem> actions;

    /*
     * Recommended action locale for the service health event.
     */
    @JsonProperty(value = "localeCode")
    private String localeCode;

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

    /**
     * Get the message property: Recommended action title for the service health event.
     *
     * @return the message value.
     */
    public String message() {
        return this.message;
    }

    /**
     * Set the message property: Recommended action title for the service health event.
     *
     * @param message the message value to set.
     * @return the EventPropertiesRecommendedActions object itself.
     */
    public EventPropertiesRecommendedActions withMessage(String message) {
        this.message = message;
        return this;
    }

    /**
     * Get the actions property: Recommended actions for the service health event.
     *
     * @return the actions value.
     */
    public List<EventPropertiesRecommendedActionsItem> actions() {
        return this.actions;
    }

    /**
     * Set the actions property: Recommended actions for the service health event.
     *
     * @param actions the actions value to set.
     * @return the EventPropertiesRecommendedActions object itself.
     */
    public EventPropertiesRecommendedActions withActions(List<EventPropertiesRecommendedActionsItem> actions) {
        this.actions = actions;
        return this;
    }

    /**
     * Get the localeCode property: Recommended action locale for the service health event.
     *
     * @return the localeCode value.
     */
    public String localeCode() {
        return this.localeCode;
    }

    /**
     * Set the localeCode property: Recommended action locale for the service health event.
     *
     * @param localeCode the localeCode value to set.
     * @return the EventPropertiesRecommendedActions object itself.
     */
    public EventPropertiesRecommendedActions withLocaleCode(String localeCode) {
        this.localeCode = localeCode;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (actions() != null) {
            actions().forEach(e -> e.validate());
        }
    }
}
