All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.security.models.DefenderCspmAwsOffering Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for Security Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. API spec for Microsoft.Security (Azure Security Center) resource provider. Package tag package-composite-v3.

There is a newer version: 1.0.0
Show newest version
// 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.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
 * The CSPM P1 for AWS offering.
 */
@Fluent
public final class DefenderCspmAwsOffering extends CloudOffering {
    /*
     * The type of the security offering.
     */
    private OfferingType offeringType = OfferingType.DEFENDER_CSPM_AWS;

    /*
     * The Microsoft Defender for CSPM offering VM scanning configuration
     */
    private DefenderCspmAwsOfferingVmScanners vmScanners;

    /*
     * The Microsoft Defender Data Sensitivity discovery configuration
     */
    private DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery;

    /*
     * The databases DSPM configuration
     */
    private DefenderCspmAwsOfferingDatabasesDspm databasesDspm;

    /*
     * Defenders CSPM Permissions Management offering configurations
     */
    private DefenderCspmAwsOfferingCiem ciem;

    /*
     * The Microsoft Defender container image assessment configuration
     */
    private DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment;

    /*
     * The Microsoft Defender container agentless discovery K8s configuration
     */
    private DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S;

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

    /**
     * Get the offeringType property: The type of the security offering.
     * 
     * @return the offeringType value.
     */
    @Override
    public OfferingType offeringType() {
        return this.offeringType;
    }

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

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

    /**
     * Get the dataSensitivityDiscovery property: The Microsoft Defender Data Sensitivity discovery configuration.
     * 
     * @return the dataSensitivityDiscovery value.
     */
    public DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery() {
        return this.dataSensitivityDiscovery;
    }

    /**
     * Set the dataSensitivityDiscovery property: The Microsoft Defender Data Sensitivity discovery configuration.
     * 
     * @param dataSensitivityDiscovery the dataSensitivityDiscovery value to set.
     * @return the DefenderCspmAwsOffering object itself.
     */
    public DefenderCspmAwsOffering
        withDataSensitivityDiscovery(DefenderCspmAwsOfferingDataSensitivityDiscovery dataSensitivityDiscovery) {
        this.dataSensitivityDiscovery = dataSensitivityDiscovery;
        return this;
    }

    /**
     * Get the databasesDspm property: The databases DSPM configuration.
     * 
     * @return the databasesDspm value.
     */
    public DefenderCspmAwsOfferingDatabasesDspm databasesDspm() {
        return this.databasesDspm;
    }

    /**
     * Set the databasesDspm property: The databases DSPM configuration.
     * 
     * @param databasesDspm the databasesDspm value to set.
     * @return the DefenderCspmAwsOffering object itself.
     */
    public DefenderCspmAwsOffering withDatabasesDspm(DefenderCspmAwsOfferingDatabasesDspm databasesDspm) {
        this.databasesDspm = databasesDspm;
        return this;
    }

    /**
     * Get the ciem property: Defenders CSPM Permissions Management offering configurations.
     * 
     * @return the ciem value.
     */
    public DefenderCspmAwsOfferingCiem ciem() {
        return this.ciem;
    }

    /**
     * Set the ciem property: Defenders CSPM Permissions Management offering configurations.
     * 
     * @param ciem the ciem value to set.
     * @return the DefenderCspmAwsOffering object itself.
     */
    public DefenderCspmAwsOffering withCiem(DefenderCspmAwsOfferingCiem ciem) {
        this.ciem = ciem;
        return this;
    }

    /**
     * Get the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration.
     * 
     * @return the mdcContainersImageAssessment value.
     */
    public DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment() {
        return this.mdcContainersImageAssessment;
    }

    /**
     * Set the mdcContainersImageAssessment property: The Microsoft Defender container image assessment configuration.
     * 
     * @param mdcContainersImageAssessment the mdcContainersImageAssessment value to set.
     * @return the DefenderCspmAwsOffering object itself.
     */
    public DefenderCspmAwsOffering withMdcContainersImageAssessment(
        DefenderCspmAwsOfferingMdcContainersImageAssessment mdcContainersImageAssessment) {
        this.mdcContainersImageAssessment = mdcContainersImageAssessment;
        return this;
    }

    /**
     * Get the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s
     * configuration.
     * 
     * @return the mdcContainersAgentlessDiscoveryK8S value.
     */
    public DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S() {
        return this.mdcContainersAgentlessDiscoveryK8S;
    }

    /**
     * Set the mdcContainersAgentlessDiscoveryK8S property: The Microsoft Defender container agentless discovery K8s
     * configuration.
     * 
     * @param mdcContainersAgentlessDiscoveryK8S the mdcContainersAgentlessDiscoveryK8S value to set.
     * @return the DefenderCspmAwsOffering object itself.
     */
    public DefenderCspmAwsOffering withMdcContainersAgentlessDiscoveryK8S(
        DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S mdcContainersAgentlessDiscoveryK8S) {
        this.mdcContainersAgentlessDiscoveryK8S = mdcContainersAgentlessDiscoveryK8S;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        if (vmScanners() != null) {
            vmScanners().validate();
        }
        if (dataSensitivityDiscovery() != null) {
            dataSensitivityDiscovery().validate();
        }
        if (databasesDspm() != null) {
            databasesDspm().validate();
        }
        if (ciem() != null) {
            ciem().validate();
        }
        if (mdcContainersImageAssessment() != null) {
            mdcContainersImageAssessment().validate();
        }
        if (mdcContainersAgentlessDiscoveryK8S() != null) {
            mdcContainersAgentlessDiscoveryK8S().validate();
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeStringField("offeringType", this.offeringType == null ? null : this.offeringType.toString());
        jsonWriter.writeJsonField("vmScanners", this.vmScanners);
        jsonWriter.writeJsonField("dataSensitivityDiscovery", this.dataSensitivityDiscovery);
        jsonWriter.writeJsonField("databasesDspm", this.databasesDspm);
        jsonWriter.writeJsonField("ciem", this.ciem);
        jsonWriter.writeJsonField("mdcContainersImageAssessment", this.mdcContainersImageAssessment);
        jsonWriter.writeJsonField("mdcContainersAgentlessDiscoveryK8s", this.mdcContainersAgentlessDiscoveryK8S);
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of DefenderCspmAwsOffering from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of DefenderCspmAwsOffering if the JsonReader was pointing to an instance of it, or null if it
     * was pointing to JSON null.
     * @throws IOException If an error occurs while reading the DefenderCspmAwsOffering.
     */
    public static DefenderCspmAwsOffering fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            DefenderCspmAwsOffering deserializedDefenderCspmAwsOffering = new DefenderCspmAwsOffering();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("description".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.withDescription(reader.getString());
                } else if ("offeringType".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.offeringType = OfferingType.fromString(reader.getString());
                } else if ("vmScanners".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.vmScanners = DefenderCspmAwsOfferingVmScanners.fromJson(reader);
                } else if ("dataSensitivityDiscovery".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.dataSensitivityDiscovery
                        = DefenderCspmAwsOfferingDataSensitivityDiscovery.fromJson(reader);
                } else if ("databasesDspm".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.databasesDspm
                        = DefenderCspmAwsOfferingDatabasesDspm.fromJson(reader);
                } else if ("ciem".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.ciem = DefenderCspmAwsOfferingCiem.fromJson(reader);
                } else if ("mdcContainersImageAssessment".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.mdcContainersImageAssessment
                        = DefenderCspmAwsOfferingMdcContainersImageAssessment.fromJson(reader);
                } else if ("mdcContainersAgentlessDiscoveryK8s".equals(fieldName)) {
                    deserializedDefenderCspmAwsOffering.mdcContainersAgentlessDiscoveryK8S
                        = DefenderCspmAwsOfferingMdcContainersAgentlessDiscoveryK8S.fromJson(reader);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedDefenderCspmAwsOffering;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy