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

com.azure.resourcemanager.security.models.DefenderForContainersAwsOfferingMdcContainersImageAssessment 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;

/**
 * The Microsoft Defender container image assessment configuration.
 */
@Fluent
public final class DefenderForContainersAwsOfferingMdcContainersImageAssessment
    implements JsonSerializable {
    /*
     * Is Microsoft Defender container image assessment enabled
     */
    private Boolean enabled;

    /*
     * The cloud role ARN in AWS for this feature
     */
    private String cloudRoleArn;

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

    /**
     * Get the enabled property: Is Microsoft Defender container image assessment enabled.
     * 
     * @return the enabled value.
     */
    public Boolean enabled() {
        return this.enabled;
    }

    /**
     * Set the enabled property: Is Microsoft Defender container image assessment enabled.
     * 
     * @param enabled the enabled value to set.
     * @return the DefenderForContainersAwsOfferingMdcContainersImageAssessment object itself.
     */
    public DefenderForContainersAwsOfferingMdcContainersImageAssessment withEnabled(Boolean enabled) {
        this.enabled = enabled;
        return this;
    }

    /**
     * Get the cloudRoleArn property: The cloud role ARN in AWS for this feature.
     * 
     * @return the cloudRoleArn value.
     */
    public String cloudRoleArn() {
        return this.cloudRoleArn;
    }

    /**
     * Set the cloudRoleArn property: The cloud role ARN in AWS for this feature.
     * 
     * @param cloudRoleArn the cloudRoleArn value to set.
     * @return the DefenderForContainersAwsOfferingMdcContainersImageAssessment object itself.
     */
    public DefenderForContainersAwsOfferingMdcContainersImageAssessment withCloudRoleArn(String cloudRoleArn) {
        this.cloudRoleArn = cloudRoleArn;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeBooleanField("enabled", this.enabled);
        jsonWriter.writeStringField("cloudRoleArn", this.cloudRoleArn);
        return jsonWriter.writeEndObject();
    }

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

                if ("enabled".equals(fieldName)) {
                    deserializedDefenderForContainersAwsOfferingMdcContainersImageAssessment.enabled
                        = reader.getNullable(JsonReader::getBoolean);
                } else if ("cloudRoleArn".equals(fieldName)) {
                    deserializedDefenderForContainersAwsOfferingMdcContainersImageAssessment.cloudRoleArn
                        = reader.getString();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedDefenderForContainersAwsOfferingMdcContainersImageAssessment;
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy