// 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.resourcemanager.security.models.AuthenticationDetailsProperties;
import com.azure.resourcemanager.security.models.HybridComputeSettingsProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Describes properties of a connector setting. */
@Fluent
public final class ConnectorSettingProperties {
    /*
     * Settings for hybrid compute management. These settings are relevant only for Arc autoProvision (Hybrid Compute).
     */
    @JsonProperty(value = "hybridComputeSettings")
    private HybridComputeSettingsProperties hybridComputeSettings;

    /*
     * Settings for authentication management, these settings are relevant only for the cloud connector.
     */
    @JsonProperty(value = "authenticationDetails")
    private AuthenticationDetailsProperties authenticationDetails;

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

    /**
     * Get the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only
     * for Arc autoProvision (Hybrid Compute).
     *
     * @return the hybridComputeSettings value.
     */
    public HybridComputeSettingsProperties hybridComputeSettings() {
        return this.hybridComputeSettings;
    }

    /**
     * Set the hybridComputeSettings property: Settings for hybrid compute management. These settings are relevant only
     * for Arc autoProvision (Hybrid Compute).
     *
     * @param hybridComputeSettings the hybridComputeSettings value to set.
     * @return the ConnectorSettingProperties object itself.
     */
    public ConnectorSettingProperties withHybridComputeSettings(HybridComputeSettingsProperties hybridComputeSettings) {
        this.hybridComputeSettings = hybridComputeSettings;
        return this;
    }

    /**
     * Get the authenticationDetails property: Settings for authentication management, these settings are relevant only
     * for the cloud connector.
     *
     * @return the authenticationDetails value.
     */
    public AuthenticationDetailsProperties authenticationDetails() {
        return this.authenticationDetails;
    }

    /**
     * Set the authenticationDetails property: Settings for authentication management, these settings are relevant only
     * for the cloud connector.
     *
     * @param authenticationDetails the authenticationDetails value to set.
     * @return the ConnectorSettingProperties object itself.
     */
    public ConnectorSettingProperties withAuthenticationDetails(AuthenticationDetailsProperties authenticationDetails) {
        this.authenticationDetails = authenticationDetails;
        return this;
    }

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