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

package com.azure.resourcemanager.advisor.models;

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

/** Advisor Digest configuration entity. */
@Fluent
public final class DigestConfig {
    /*
     * Name of digest configuration. Value is case-insensitive and must be unique within a subscription.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * Action group resource id used by digest.
     */
    @JsonProperty(value = "actionGroupResourceId")
    private String actionGroupResourceId;

    /*
     * Frequency that digest will be triggered, in days. Value must be between 7 and 30 days inclusive.
     */
    @JsonProperty(value = "frequency")
    private Integer frequency;

    /*
     * Categories to send digest for. If categories are not provided, then digest will be sent for all categories.
     */
    @JsonProperty(value = "categories")
    private List<Category> categories;

    /*
     * Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages.
     * Otherwise, it will be converted into one. Default value is English (en).
     */
    @JsonProperty(value = "language")
    private String language;

    /*
     * State of digest configuration.
     */
    @JsonProperty(value = "state")
    private DigestConfigState state;

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

    /**
     * Get the name property: Name of digest configuration. Value is case-insensitive and must be unique within a
     * subscription.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: Name of digest configuration. Value is case-insensitive and must be unique within a
     * subscription.
     *
     * @param name the name value to set.
     * @return the DigestConfig object itself.
     */
    public DigestConfig withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the actionGroupResourceId property: Action group resource id used by digest.
     *
     * @return the actionGroupResourceId value.
     */
    public String actionGroupResourceId() {
        return this.actionGroupResourceId;
    }

    /**
     * Set the actionGroupResourceId property: Action group resource id used by digest.
     *
     * @param actionGroupResourceId the actionGroupResourceId value to set.
     * @return the DigestConfig object itself.
     */
    public DigestConfig withActionGroupResourceId(String actionGroupResourceId) {
        this.actionGroupResourceId = actionGroupResourceId;
        return this;
    }

    /**
     * Get the frequency property: Frequency that digest will be triggered, in days. Value must be between 7 and 30 days
     * inclusive.
     *
     * @return the frequency value.
     */
    public Integer frequency() {
        return this.frequency;
    }

    /**
     * Set the frequency property: Frequency that digest will be triggered, in days. Value must be between 7 and 30 days
     * inclusive.
     *
     * @param frequency the frequency value to set.
     * @return the DigestConfig object itself.
     */
    public DigestConfig withFrequency(Integer frequency) {
        this.frequency = frequency;
        return this;
    }

    /**
     * Get the categories property: Categories to send digest for. If categories are not provided, then digest will be
     * sent for all categories.
     *
     * @return the categories value.
     */
    public List<Category> categories() {
        return this.categories;
    }

    /**
     * Set the categories property: Categories to send digest for. If categories are not provided, then digest will be
     * sent for all categories.
     *
     * @param categories the categories value to set.
     * @return the DigestConfig object itself.
     */
    public DigestConfig withCategories(List<Category> categories) {
        this.categories = categories;
        return this;
    }

    /**
     * Get the language property: Language for digest content body. Value must be ISO 639-1 code for one of Azure portal
     * supported languages. Otherwise, it will be converted into one. Default value is English (en).
     *
     * @return the language value.
     */
    public String language() {
        return this.language;
    }

    /**
     * Set the language property: Language for digest content body. Value must be ISO 639-1 code for one of Azure portal
     * supported languages. Otherwise, it will be converted into one. Default value is English (en).
     *
     * @param language the language value to set.
     * @return the DigestConfig object itself.
     */
    public DigestConfig withLanguage(String language) {
        this.language = language;
        return this;
    }

    /**
     * Get the state property: State of digest configuration.
     *
     * @return the state value.
     */
    public DigestConfigState state() {
        return this.state;
    }

    /**
     * Set the state property: State of digest configuration.
     *
     * @param state the state value to set.
     * @return the DigestConfig object itself.
     */
    public DigestConfig withState(DigestConfigState state) {
        this.state = state;
        return this;
    }

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