// 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 containers GCP offering. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "offeringType")
@JsonTypeName("DefenderForContainersGcp")
@Fluent
public final class DefenderForContainersGcpOffering extends CloudOffering {
    /*
     * The native cloud connection configuration
     */
    @JsonProperty(value = "nativeCloudConnection")
    private DefenderForContainersGcpOfferingNativeCloudConnection nativeCloudConnection;

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

    /*
     * Is audit logs data collection enabled
     */
    @JsonProperty(value = "auditLogsAutoProvisioningFlag")
    private Boolean auditLogsAutoProvisioningFlag;

    /*
     * Is Microsoft Defender for Cloud Kubernetes agent auto provisioning enabled
     */
    @JsonProperty(value = "defenderAgentAutoProvisioningFlag")
    private Boolean defenderAgentAutoProvisioningFlag;

    /*
     * Is Policy Kubernetes agent auto provisioning enabled
     */
    @JsonProperty(value = "policyAgentAutoProvisioningFlag")
    private Boolean policyAgentAutoProvisioningFlag;

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

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

    /**
     * Set the nativeCloudConnection property: The native cloud connection configuration.
     *
     * @param nativeCloudConnection the nativeCloudConnection value to set.
     * @return the DefenderForContainersGcpOffering object itself.
     */
    public DefenderForContainersGcpOffering withNativeCloudConnection(
        DefenderForContainersGcpOfferingNativeCloudConnection nativeCloudConnection) {
        this.nativeCloudConnection = nativeCloudConnection;
        return this;
    }

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

    /**
     * Set the dataPipelineNativeCloudConnection property: The native cloud connection configuration.
     *
     * @param dataPipelineNativeCloudConnection the dataPipelineNativeCloudConnection value to set.
     * @return the DefenderForContainersGcpOffering object itself.
     */
    public DefenderForContainersGcpOffering withDataPipelineNativeCloudConnection(
        DefenderForContainersGcpOfferingDataPipelineNativeCloudConnection dataPipelineNativeCloudConnection) {
        this.dataPipelineNativeCloudConnection = dataPipelineNativeCloudConnection;
        return this;
    }

    /**
     * Get the auditLogsAutoProvisioningFlag property: Is audit logs data collection enabled.
     *
     * @return the auditLogsAutoProvisioningFlag value.
     */
    public Boolean auditLogsAutoProvisioningFlag() {
        return this.auditLogsAutoProvisioningFlag;
    }

    /**
     * Set the auditLogsAutoProvisioningFlag property: Is audit logs data collection enabled.
     *
     * @param auditLogsAutoProvisioningFlag the auditLogsAutoProvisioningFlag value to set.
     * @return the DefenderForContainersGcpOffering object itself.
     */
    public DefenderForContainersGcpOffering withAuditLogsAutoProvisioningFlag(Boolean auditLogsAutoProvisioningFlag) {
        this.auditLogsAutoProvisioningFlag = auditLogsAutoProvisioningFlag;
        return this;
    }

    /**
     * Get the defenderAgentAutoProvisioningFlag property: Is Microsoft Defender for Cloud Kubernetes agent auto
     * provisioning enabled.
     *
     * @return the defenderAgentAutoProvisioningFlag value.
     */
    public Boolean defenderAgentAutoProvisioningFlag() {
        return this.defenderAgentAutoProvisioningFlag;
    }

    /**
     * Set the defenderAgentAutoProvisioningFlag property: Is Microsoft Defender for Cloud Kubernetes agent auto
     * provisioning enabled.
     *
     * @param defenderAgentAutoProvisioningFlag the defenderAgentAutoProvisioningFlag value to set.
     * @return the DefenderForContainersGcpOffering object itself.
     */
    public DefenderForContainersGcpOffering withDefenderAgentAutoProvisioningFlag(
        Boolean defenderAgentAutoProvisioningFlag) {
        this.defenderAgentAutoProvisioningFlag = defenderAgentAutoProvisioningFlag;
        return this;
    }

    /**
     * Get the policyAgentAutoProvisioningFlag property: Is Policy Kubernetes agent auto provisioning enabled.
     *
     * @return the policyAgentAutoProvisioningFlag value.
     */
    public Boolean policyAgentAutoProvisioningFlag() {
        return this.policyAgentAutoProvisioningFlag;
    }

    /**
     * Set the policyAgentAutoProvisioningFlag property: Is Policy Kubernetes agent auto provisioning enabled.
     *
     * @param policyAgentAutoProvisioningFlag the policyAgentAutoProvisioningFlag value to set.
     * @return the DefenderForContainersGcpOffering object itself.
     */
    public DefenderForContainersGcpOffering withPolicyAgentAutoProvisioningFlag(
        Boolean policyAgentAutoProvisioningFlag) {
        this.policyAgentAutoProvisioningFlag = policyAgentAutoProvisioningFlag;
        return this;
    }

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