// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.mssql;

import com.pulumi.azure.mssql.inputs.ServerVulnerabilityAssessmentRecurringScansArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ServerVulnerabilityAssessmentArgs extends com.pulumi.resources.ResourceArgs {

    public static final ServerVulnerabilityAssessmentArgs Empty = new ServerVulnerabilityAssessmentArgs();

    /**
     * The recurring scans settings. The `recurring_scans` block supports fields documented below.
     * 
     */
    @Import(name="recurringScans")
    private @Nullable Output<ServerVulnerabilityAssessmentRecurringScansArgs> recurringScans;

    /**
     * @return The recurring scans settings. The `recurring_scans` block supports fields documented below.
     * 
     */
    public Optional<Output<ServerVulnerabilityAssessmentRecurringScansArgs>> recurringScans() {
        return Optional.ofNullable(this.recurringScans);
    }

    /**
     * The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="serverSecurityAlertPolicyId", required=true)
    private Output<String> serverSecurityAlertPolicyId;

    /**
     * @return The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
     * 
     */
    public Output<String> serverSecurityAlertPolicyId() {
        return this.serverSecurityAlertPolicyId;
    }

    /**
     * Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storage_container_sas_key` isn&#39;t specified, `storage_account_access_key` is required.
     * 
     * &gt; **NOTE** The `storage_account_access_key` only applies if the storage account is not behind a virtual network or a firewall.
     * 
     */
    @Import(name="storageAccountAccessKey")
    private @Nullable Output<String> storageAccountAccessKey;

    /**
     * @return Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storage_container_sas_key` isn&#39;t specified, `storage_account_access_key` is required.
     * 
     * &gt; **NOTE** The `storage_account_access_key` only applies if the storage account is not behind a virtual network or a firewall.
     * 
     */
    public Optional<Output<String>> storageAccountAccessKey() {
        return Optional.ofNullable(this.storageAccountAccessKey);
    }

    /**
     * A blob storage container path to hold the scan results (e.g. &lt;https://example.blob.core.windows.net/VaScans/&gt;).
     * 
     */
    @Import(name="storageContainerPath", required=true)
    private Output<String> storageContainerPath;

    /**
     * @return A blob storage container path to hold the scan results (e.g. &lt;https://example.blob.core.windows.net/VaScans/&gt;).
     * 
     */
    public Output<String> storageContainerPath() {
        return this.storageContainerPath;
    }

    /**
     * A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn&#39;t specified, `storage_container_sas_key` is required.
     * 
     * &gt; **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall.
     * 
     */
    @Import(name="storageContainerSasKey")
    private @Nullable Output<String> storageContainerSasKey;

    /**
     * @return A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn&#39;t specified, `storage_container_sas_key` is required.
     * 
     * &gt; **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall.
     * 
     */
    public Optional<Output<String>> storageContainerSasKey() {
        return Optional.ofNullable(this.storageContainerSasKey);
    }

    private ServerVulnerabilityAssessmentArgs() {}

    private ServerVulnerabilityAssessmentArgs(ServerVulnerabilityAssessmentArgs $) {
        this.recurringScans = $.recurringScans;
        this.serverSecurityAlertPolicyId = $.serverSecurityAlertPolicyId;
        this.storageAccountAccessKey = $.storageAccountAccessKey;
        this.storageContainerPath = $.storageContainerPath;
        this.storageContainerSasKey = $.storageContainerSasKey;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ServerVulnerabilityAssessmentArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ServerVulnerabilityAssessmentArgs $;

        public Builder() {
            $ = new ServerVulnerabilityAssessmentArgs();
        }

        public Builder(ServerVulnerabilityAssessmentArgs defaults) {
            $ = new ServerVulnerabilityAssessmentArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param recurringScans The recurring scans settings. The `recurring_scans` block supports fields documented below.
         * 
         * @return builder
         * 
         */
        public Builder recurringScans(@Nullable Output<ServerVulnerabilityAssessmentRecurringScansArgs> recurringScans) {
            $.recurringScans = recurringScans;
            return this;
        }

        /**
         * @param recurringScans The recurring scans settings. The `recurring_scans` block supports fields documented below.
         * 
         * @return builder
         * 
         */
        public Builder recurringScans(ServerVulnerabilityAssessmentRecurringScansArgs recurringScans) {
            return recurringScans(Output.of(recurringScans));
        }

        /**
         * @param serverSecurityAlertPolicyId The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverSecurityAlertPolicyId(Output<String> serverSecurityAlertPolicyId) {
            $.serverSecurityAlertPolicyId = serverSecurityAlertPolicyId;
            return this;
        }

        /**
         * @param serverSecurityAlertPolicyId The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder serverSecurityAlertPolicyId(String serverSecurityAlertPolicyId) {
            return serverSecurityAlertPolicyId(Output.of(serverSecurityAlertPolicyId));
        }

        /**
         * @param storageAccountAccessKey Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storage_container_sas_key` isn&#39;t specified, `storage_account_access_key` is required.
         * 
         * &gt; **NOTE** The `storage_account_access_key` only applies if the storage account is not behind a virtual network or a firewall.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKey(@Nullable Output<String> storageAccountAccessKey) {
            $.storageAccountAccessKey = storageAccountAccessKey;
            return this;
        }

        /**
         * @param storageAccountAccessKey Specifies the identifier key of the storage account for vulnerability assessment scan results. If `storage_container_sas_key` isn&#39;t specified, `storage_account_access_key` is required.
         * 
         * &gt; **NOTE** The `storage_account_access_key` only applies if the storage account is not behind a virtual network or a firewall.
         * 
         * @return builder
         * 
         */
        public Builder storageAccountAccessKey(String storageAccountAccessKey) {
            return storageAccountAccessKey(Output.of(storageAccountAccessKey));
        }

        /**
         * @param storageContainerPath A blob storage container path to hold the scan results (e.g. &lt;https://example.blob.core.windows.net/VaScans/&gt;).
         * 
         * @return builder
         * 
         */
        public Builder storageContainerPath(Output<String> storageContainerPath) {
            $.storageContainerPath = storageContainerPath;
            return this;
        }

        /**
         * @param storageContainerPath A blob storage container path to hold the scan results (e.g. &lt;https://example.blob.core.windows.net/VaScans/&gt;).
         * 
         * @return builder
         * 
         */
        public Builder storageContainerPath(String storageContainerPath) {
            return storageContainerPath(Output.of(storageContainerPath));
        }

        /**
         * @param storageContainerSasKey A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn&#39;t specified, `storage_container_sas_key` is required.
         * 
         * &gt; **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall.
         * 
         * @return builder
         * 
         */
        public Builder storageContainerSasKey(@Nullable Output<String> storageContainerSasKey) {
            $.storageContainerSasKey = storageContainerSasKey;
            return this;
        }

        /**
         * @param storageContainerSasKey A shared access signature (SAS Key) that has write access to the blob container specified in `storage_container_path` parameter. If `storage_account_access_key` isn&#39;t specified, `storage_container_sas_key` is required.
         * 
         * &gt; **NOTE** The `storage_container_sas_key` only applies if the storage account is not behind a virtual network or a firewall.
         * 
         * @return builder
         * 
         */
        public Builder storageContainerSasKey(String storageContainerSasKey) {
            return storageContainerSasKey(Output.of(storageContainerSasKey));
        }

        public ServerVulnerabilityAssessmentArgs build() {
            $.serverSecurityAlertPolicyId = Objects.requireNonNull($.serverSecurityAlertPolicyId, "expected parameter 'serverSecurityAlertPolicyId' to be non-null");
            $.storageContainerPath = Objects.requireNonNull($.storageContainerPath, "expected parameter 'storageContainerPath' to be non-null");
            return $;
        }
    }

}
