com.azure.resourcemanager.security.fluent.models.RegulatoryComplianceStandardProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-security Show documentation
Show all versions of azure-resourcemanager-security Show documentation
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.
// 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.fluent.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 com.azure.resourcemanager.security.models.State;
import java.io.IOException;
/**
* Regulatory compliance standard data.
*/
@Fluent
public final class RegulatoryComplianceStandardProperties
implements JsonSerializable {
/*
* Aggregative state based on the standard's supported controls states
*/
private State state;
/*
* The number of supported regulatory compliance controls of the given standard with a passed state
*/
private Integer passedControls;
/*
* The number of supported regulatory compliance controls of the given standard with a failed state
*/
private Integer failedControls;
/*
* The number of supported regulatory compliance controls of the given standard with a skipped state
*/
private Integer skippedControls;
/*
* The number of regulatory compliance controls of the given standard which are unsupported by automated assessments
*/
private Integer unsupportedControls;
/**
* Creates an instance of RegulatoryComplianceStandardProperties class.
*/
public RegulatoryComplianceStandardProperties() {
}
/**
* Get the state property: Aggregative state based on the standard's supported controls states.
*
* @return the state value.
*/
public State state() {
return this.state;
}
/**
* Set the state property: Aggregative state based on the standard's supported controls states.
*
* @param state the state value to set.
* @return the RegulatoryComplianceStandardProperties object itself.
*/
public RegulatoryComplianceStandardProperties withState(State state) {
this.state = state;
return this;
}
/**
* Get the passedControls property: The number of supported regulatory compliance controls of the given standard
* with a passed state.
*
* @return the passedControls value.
*/
public Integer passedControls() {
return this.passedControls;
}
/**
* Get the failedControls property: The number of supported regulatory compliance controls of the given standard
* with a failed state.
*
* @return the failedControls value.
*/
public Integer failedControls() {
return this.failedControls;
}
/**
* Get the skippedControls property: The number of supported regulatory compliance controls of the given standard
* with a skipped state.
*
* @return the skippedControls value.
*/
public Integer skippedControls() {
return this.skippedControls;
}
/**
* Get the unsupportedControls property: The number of regulatory compliance controls of the given standard which
* are unsupported by automated assessments.
*
* @return the unsupportedControls value.
*/
public Integer unsupportedControls() {
return this.unsupportedControls;
}
/**
* 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.writeStringField("state", this.state == null ? null : this.state.toString());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of RegulatoryComplianceStandardProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of RegulatoryComplianceStandardProperties 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 RegulatoryComplianceStandardProperties.
*/
public static RegulatoryComplianceStandardProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
RegulatoryComplianceStandardProperties deserializedRegulatoryComplianceStandardProperties
= new RegulatoryComplianceStandardProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("state".equals(fieldName)) {
deserializedRegulatoryComplianceStandardProperties.state = State.fromString(reader.getString());
} else if ("passedControls".equals(fieldName)) {
deserializedRegulatoryComplianceStandardProperties.passedControls
= reader.getNullable(JsonReader::getInt);
} else if ("failedControls".equals(fieldName)) {
deserializedRegulatoryComplianceStandardProperties.failedControls
= reader.getNullable(JsonReader::getInt);
} else if ("skippedControls".equals(fieldName)) {
deserializedRegulatoryComplianceStandardProperties.skippedControls
= reader.getNullable(JsonReader::getInt);
} else if ("unsupportedControls".equals(fieldName)) {
deserializedRegulatoryComplianceStandardProperties.unsupportedControls
= reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedRegulatoryComplianceStandardProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy