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

com.azure.resourcemanager.security.models.DefenderFoDatabasesAwsOffering 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 Defender for Databases AWS offering.
 */
@Fluent
public final class DefenderFoDatabasesAwsOffering extends CloudOffering {
    /*
     * The type of the security offering.
     */
    private OfferingType offeringType = OfferingType.DEFENDER_FOR_DATABASES_AWS;

    /*
     * The ARC autoprovisioning configuration
     */
    private DefenderFoDatabasesAwsOfferingArcAutoProvisioning arcAutoProvisioning;

    /*
     * The RDS configuration
     */
    private DefenderFoDatabasesAwsOfferingRds rds;

    /*
     * The databases data security posture management (DSPM) configuration
     */
    private DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm;

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

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

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

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

    /**
     * Get the rds property: The RDS configuration.
     * 
     * @return the rds value.
     */
    public DefenderFoDatabasesAwsOfferingRds rds() {
        return this.rds;
    }

    /**
     * Set the rds property: The RDS configuration.
     * 
     * @param rds the rds value to set.
     * @return the DefenderFoDatabasesAwsOffering object itself.
     */
    public DefenderFoDatabasesAwsOffering withRds(DefenderFoDatabasesAwsOfferingRds rds) {
        this.rds = rds;
        return this;
    }

    /**
     * Get the databasesDspm property: The databases data security posture management (DSPM) configuration.
     * 
     * @return the databasesDspm value.
     */
    public DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm() {
        return this.databasesDspm;
    }

    /**
     * Set the databasesDspm property: The databases data security posture management (DSPM) configuration.
     * 
     * @param databasesDspm the databasesDspm value to set.
     * @return the DefenderFoDatabasesAwsOffering object itself.
     */
    public DefenderFoDatabasesAwsOffering withDatabasesDspm(DefenderFoDatabasesAwsOfferingDatabasesDspm databasesDspm) {
        this.databasesDspm = databasesDspm;
        return this;
    }

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

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

    /**
     * Reads an instance of DefenderFoDatabasesAwsOffering from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of DefenderFoDatabasesAwsOffering 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 DefenderFoDatabasesAwsOffering.
     */
    public static DefenderFoDatabasesAwsOffering fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            DefenderFoDatabasesAwsOffering deserializedDefenderFoDatabasesAwsOffering
                = new DefenderFoDatabasesAwsOffering();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("description".equals(fieldName)) {
                    deserializedDefenderFoDatabasesAwsOffering.withDescription(reader.getString());
                } else if ("offeringType".equals(fieldName)) {
                    deserializedDefenderFoDatabasesAwsOffering.offeringType
                        = OfferingType.fromString(reader.getString());
                } else if ("arcAutoProvisioning".equals(fieldName)) {
                    deserializedDefenderFoDatabasesAwsOffering.arcAutoProvisioning
                        = DefenderFoDatabasesAwsOfferingArcAutoProvisioning.fromJson(reader);
                } else if ("rds".equals(fieldName)) {
                    deserializedDefenderFoDatabasesAwsOffering.rds = DefenderFoDatabasesAwsOfferingRds.fromJson(reader);
                } else if ("databasesDspm".equals(fieldName)) {
                    deserializedDefenderFoDatabasesAwsOffering.databasesDspm
                        = DefenderFoDatabasesAwsOfferingDatabasesDspm.fromJson(reader);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedDefenderFoDatabasesAwsOffering;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy