// 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.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.resourcemanager.security.models.State;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Regulatory compliance control details and state. */
@Fluent
public final class RegulatoryComplianceControlInner extends ProxyResource {
    /*
     * Regulatory compliance control data
     */
    @JsonProperty(value = "properties")
    private RegulatoryComplianceControlProperties innerProperties;

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

    /**
     * Get the innerProperties property: Regulatory compliance control data.
     *
     * @return the innerProperties value.
     */
    private RegulatoryComplianceControlProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the description property: The description of the regulatory compliance control.
     *
     * @return the description value.
     */
    public String description() {
        return this.innerProperties() == null ? null : this.innerProperties().description();
    }

    /**
     * Get the state property: Aggregative state based on the control's supported assessments states.
     *
     * @return the state value.
     */
    public State state() {
        return this.innerProperties() == null ? null : this.innerProperties().state();
    }

    /**
     * Set the state property: Aggregative state based on the control's supported assessments states.
     *
     * @param state the state value to set.
     * @return the RegulatoryComplianceControlInner object itself.
     */
    public RegulatoryComplianceControlInner withState(State state) {
        if (this.innerProperties() == null) {
            this.innerProperties = new RegulatoryComplianceControlProperties();
        }
        this.innerProperties().withState(state);
        return this;
    }

    /**
     * Get the passedAssessments property: The number of supported regulatory compliance assessments of the given
     * control with a passed state.
     *
     * @return the passedAssessments value.
     */
    public Integer passedAssessments() {
        return this.innerProperties() == null ? null : this.innerProperties().passedAssessments();
    }

    /**
     * Get the failedAssessments property: The number of supported regulatory compliance assessments of the given
     * control with a failed state.
     *
     * @return the failedAssessments value.
     */
    public Integer failedAssessments() {
        return this.innerProperties() == null ? null : this.innerProperties().failedAssessments();
    }

    /**
     * Get the skippedAssessments property: The number of supported regulatory compliance assessments of the given
     * control with a skipped state.
     *
     * @return the skippedAssessments value.
     */
    public Integer skippedAssessments() {
        return this.innerProperties() == null ? null : this.innerProperties().skippedAssessments();
    }

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