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

com.azure.resourcemanager.security.models.DefenderCspmAwsOfferingCiem 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.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
 * Defenders CSPM Permissions Management offering configurations.
 */
@Fluent
public final class DefenderCspmAwsOfferingCiem implements JsonSerializable {
    /*
     * Defender CSPM Permissions Management discovery configuration
     */
    private DefenderCspmAwsOfferingCiemDiscovery ciemDiscovery;

    /*
     * AWS Defender CSPM Permissions Management OIDC (open id connect) connection configurations
     */
    private DefenderCspmAwsOfferingCiemOidc ciemOidc;

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

    /**
     * Get the ciemDiscovery property: Defender CSPM Permissions Management discovery configuration.
     * 
     * @return the ciemDiscovery value.
     */
    public DefenderCspmAwsOfferingCiemDiscovery ciemDiscovery() {
        return this.ciemDiscovery;
    }

    /**
     * Set the ciemDiscovery property: Defender CSPM Permissions Management discovery configuration.
     * 
     * @param ciemDiscovery the ciemDiscovery value to set.
     * @return the DefenderCspmAwsOfferingCiem object itself.
     */
    public DefenderCspmAwsOfferingCiem withCiemDiscovery(DefenderCspmAwsOfferingCiemDiscovery ciemDiscovery) {
        this.ciemDiscovery = ciemDiscovery;
        return this;
    }

    /**
     * Get the ciemOidc property: AWS Defender CSPM Permissions Management OIDC (open id connect) connection
     * configurations.
     * 
     * @return the ciemOidc value.
     */
    public DefenderCspmAwsOfferingCiemOidc ciemOidc() {
        return this.ciemOidc;
    }

    /**
     * Set the ciemOidc property: AWS Defender CSPM Permissions Management OIDC (open id connect) connection
     * configurations.
     * 
     * @param ciemOidc the ciemOidc value to set.
     * @return the DefenderCspmAwsOfferingCiem object itself.
     */
    public DefenderCspmAwsOfferingCiem withCiemOidc(DefenderCspmAwsOfferingCiemOidc ciemOidc) {
        this.ciemOidc = ciemOidc;
        return this;
    }

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

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeJsonField("ciemDiscovery", this.ciemDiscovery);
        jsonWriter.writeJsonField("ciemOidc", this.ciemOidc);
        return jsonWriter.writeEndObject();
    }

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

                if ("ciemDiscovery".equals(fieldName)) {
                    deserializedDefenderCspmAwsOfferingCiem.ciemDiscovery
                        = DefenderCspmAwsOfferingCiemDiscovery.fromJson(reader);
                } else if ("ciemOidc".equals(fieldName)) {
                    deserializedDefenderCspmAwsOfferingCiem.ciemOidc = DefenderCspmAwsOfferingCiemOidc.fromJson(reader);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedDefenderCspmAwsOfferingCiem;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy