// 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 Databases GCP offering configurations. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType")
@JsonTypeName("DefenderForDatabasesGcp")
@Fluent
public final class DefenderForDatabasesGcpOffering extends CloudOffering {
    /*
     * The ARC autoprovisioning configuration
     */
    @JsonProperty(value = "arcAutoProvisioning")
    private DefenderForDatabasesGcpOfferingArcAutoProvisioning arcAutoProvisioning;

    /*
     * The native cloud connection configuration
     */
    @JsonProperty(value = "defenderForDatabasesArcAutoProvisioning")
    private DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning
        defenderForDatabasesArcAutoProvisioning;

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

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

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

    /**
     * Get the defenderForDatabasesArcAutoProvisioning property: The native cloud connection configuration.
     *
     * @return the defenderForDatabasesArcAutoProvisioning value.
     */
    public DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning
        defenderForDatabasesArcAutoProvisioning() {
        return this.defenderForDatabasesArcAutoProvisioning;
    }

    /**
     * Set the defenderForDatabasesArcAutoProvisioning property: The native cloud connection configuration.
     *
     * @param defenderForDatabasesArcAutoProvisioning the defenderForDatabasesArcAutoProvisioning value to set.
     * @return the DefenderForDatabasesGcpOffering object itself.
     */
    public DefenderForDatabasesGcpOffering withDefenderForDatabasesArcAutoProvisioning(
        DefenderForDatabasesGcpOfferingDefenderForDatabasesArcAutoProvisioning
            defenderForDatabasesArcAutoProvisioning) {
        this.defenderForDatabasesArcAutoProvisioning = defenderForDatabasesArcAutoProvisioning;
        return this;
    }

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