// 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 com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/** The Defender for Servers AWS offering. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType")
@JsonTypeName("DefenderForServersAws")
@Fluent
public final class DefenderForServersAwsOffering extends CloudOffering {
    /*
     * The Defender for servers connection configuration
     */
    @JsonProperty(value = "defenderForServers")
    private DefenderForServersAwsOfferingDefenderForServers defenderForServers;

    /*
     * The ARC autoprovisioning configuration
     */
    @JsonProperty(value = "arcAutoProvisioning")
    private DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning;

    /*
     * The Vulnerability Assessment autoprovisioning configuration
     */
    @JsonProperty(value = "vaAutoProvisioning")
    private DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning;

    /*
     * The Microsoft Defender for Endpoint autoprovisioning configuration
     */
    @JsonProperty(value = "mdeAutoProvisioning")
    private DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning;

    /*
     * configuration for the servers offering subPlan
     */
    @JsonProperty(value = "subPlan")
    private DefenderForServersAwsOfferingSubPlan subPlan;

    /*
     * The Microsoft Defender for Server VM scanning configuration
     */
    @JsonProperty(value = "vmScanners")
    private DefenderForServersAwsOfferingVmScanners vmScanners;

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

    /**
     * Get the defenderForServers property: The Defender for servers connection configuration.
     *
     * @return the defenderForServers value.
     */
    public DefenderForServersAwsOfferingDefenderForServers defenderForServers() {
        return this.defenderForServers;
    }

    /**
     * Set the defenderForServers property: The Defender for servers connection configuration.
     *
     * @param defenderForServers the defenderForServers value to set.
     * @return the DefenderForServersAwsOffering object itself.
     */
    public DefenderForServersAwsOffering withDefenderForServers(
        DefenderForServersAwsOfferingDefenderForServers defenderForServers) {
        this.defenderForServers = defenderForServers;
        return this;
    }

    /**
     * Get the arcAutoProvisioning property: The ARC autoprovisioning configuration.
     *
     * @return the arcAutoProvisioning value.
     */
    public DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning() {
        return this.arcAutoProvisioning;
    }

    /**
     * Set the arcAutoProvisioning property: The ARC autoprovisioning configuration.
     *
     * @param arcAutoProvisioning the arcAutoProvisioning value to set.
     * @return the DefenderForServersAwsOffering object itself.
     */
    public DefenderForServersAwsOffering withArcAutoProvisioning(
        DefenderForServersAwsOfferingArcAutoProvisioning arcAutoProvisioning) {
        this.arcAutoProvisioning = arcAutoProvisioning;
        return this;
    }

    /**
     * Get the vaAutoProvisioning property: The Vulnerability Assessment autoprovisioning configuration.
     *
     * @return the vaAutoProvisioning value.
     */
    public DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning() {
        return this.vaAutoProvisioning;
    }

    /**
     * Set the vaAutoProvisioning property: The Vulnerability Assessment autoprovisioning configuration.
     *
     * @param vaAutoProvisioning the vaAutoProvisioning value to set.
     * @return the DefenderForServersAwsOffering object itself.
     */
    public DefenderForServersAwsOffering withVaAutoProvisioning(
        DefenderForServersAwsOfferingVaAutoProvisioning vaAutoProvisioning) {
        this.vaAutoProvisioning = vaAutoProvisioning;
        return this;
    }

    /**
     * Get the mdeAutoProvisioning property: The Microsoft Defender for Endpoint autoprovisioning configuration.
     *
     * @return the mdeAutoProvisioning value.
     */
    public DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning() {
        return this.mdeAutoProvisioning;
    }

    /**
     * Set the mdeAutoProvisioning property: The Microsoft Defender for Endpoint autoprovisioning configuration.
     *
     * @param mdeAutoProvisioning the mdeAutoProvisioning value to set.
     * @return the DefenderForServersAwsOffering object itself.
     */
    public DefenderForServersAwsOffering withMdeAutoProvisioning(
        DefenderForServersAwsOfferingMdeAutoProvisioning mdeAutoProvisioning) {
        this.mdeAutoProvisioning = mdeAutoProvisioning;
        return this;
    }

    /**
     * Get the subPlan property: configuration for the servers offering subPlan.
     *
     * @return the subPlan value.
     */
    public DefenderForServersAwsOfferingSubPlan subPlan() {
        return this.subPlan;
    }

    /**
     * Set the subPlan property: configuration for the servers offering subPlan.
     *
     * @param subPlan the subPlan value to set.
     * @return the DefenderForServersAwsOffering object itself.
     */
    public DefenderForServersAwsOffering withSubPlan(DefenderForServersAwsOfferingSubPlan subPlan) {
        this.subPlan = subPlan;
        return this;
    }

    /**
     * Get the vmScanners property: The Microsoft Defender for Server VM scanning configuration.
     *
     * @return the vmScanners value.
     */
    public DefenderForServersAwsOfferingVmScanners vmScanners() {
        return this.vmScanners;
    }

    /**
     * Set the vmScanners property: The Microsoft Defender for Server VM scanning configuration.
     *
     * @param vmScanners the vmScanners value to set.
     * @return the DefenderForServersAwsOffering object itself.
     */
    public DefenderForServersAwsOffering withVmScanners(DefenderForServersAwsOfferingVmScanners vmScanners) {
        this.vmScanners = vmScanners;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
        if (defenderForServers() != null) {
            defenderForServers().validate();
        }
        if (arcAutoProvisioning() != null) {
            arcAutoProvisioning().validate();
        }
        if (vaAutoProvisioning() != null) {
            vaAutoProvisioning().validate();
        }
        if (mdeAutoProvisioning() != null) {
            mdeAutoProvisioning().validate();
        }
        if (subPlan() != null) {
            subPlan().validate();
        }
        if (vmScanners() != null) {
            vmScanners().validate();
        }
    }
}
