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

package com.azure.resourcemanager.security.models;

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

/**
 * Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on
 * the subscription.
 */
@Fluent
public final class SecurityContactPropertiesNotificationsByRole {
    /*
     * Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC
     * roles on the subscription.
     */
    @JsonProperty(value = "state")
    private State state;

    /*
     * Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC
     * roles:
     */
    @JsonProperty(value = "roles")
    private List<Roles> roles;

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

    /**
     * Get the state property: Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons
     * with specific RBAC roles on the subscription.
     *
     * @return the state value.
     */
    public State state() {
        return this.state;
    }

    /**
     * Set the state property: Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons
     * with specific RBAC roles on the subscription.
     *
     * @param state the state value to set.
     * @return the SecurityContactPropertiesNotificationsByRole object itself.
     */
    public SecurityContactPropertiesNotificationsByRole withState(State state) {
        this.state = state;
        return this;
    }

    /**
     * Get the roles property: Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud.
     * List of allowed RBAC roles:.
     *
     * @return the roles value.
     */
    public List<Roles> roles() {
        return this.roles;
    }

    /**
     * Set the roles property: Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud.
     * List of allowed RBAC roles:.
     *
     * @param roles the roles value to set.
     * @return the SecurityContactPropertiesNotificationsByRole object itself.
     */
    public SecurityContactPropertiesNotificationsByRole withRoles(List<Roles> roles) {
        this.roles = roles;
        return this;
    }

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