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

package com.azure.resourcemanager.securityinsights.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.resourcemanager.securityinsights.models.ResourceWithEtag;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Sentinel onboarding state. */
@Fluent
public final class SentinelOnboardingStateInner extends ResourceWithEtag {
    /*
     * The Sentinel onboarding state object
     */
    @JsonProperty(value = "properties")
    private SentinelOnboardingStateProperties innerProperties;

    /**
     * Get the innerProperties property: The Sentinel onboarding state object.
     *
     * @return the innerProperties value.
     */
    private SentinelOnboardingStateProperties innerProperties() {
        return this.innerProperties;
    }

    /** {@inheritDoc} */
    @Override
    public SentinelOnboardingStateInner withEtag(String etag) {
        super.withEtag(etag);
        return this;
    }

    /**
     * Get the customerManagedKey property: Flag that indicates the status of the CMK setting.
     *
     * @return the customerManagedKey value.
     */
    public Boolean customerManagedKey() {
        return this.innerProperties() == null ? null : this.innerProperties().customerManagedKey();
    }

    /**
     * Set the customerManagedKey property: Flag that indicates the status of the CMK setting.
     *
     * @param customerManagedKey the customerManagedKey value to set.
     * @return the SentinelOnboardingStateInner object itself.
     */
    public SentinelOnboardingStateInner withCustomerManagedKey(Boolean customerManagedKey) {
        if (this.innerProperties() == null) {
            this.innerProperties = new SentinelOnboardingStateProperties();
        }
        this.innerProperties().withCustomerManagedKey(customerManagedKey);
        return this;
    }

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