com.azure.resourcemanager.security.fluent.models.RegulatoryComplianceControlProperties 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 control data.
*/
@Fluent
public final class RegulatoryComplianceControlProperties
implements JsonSerializable {
/*
* The description of the regulatory compliance control
*/
private String description;
/*
* Aggregative state based on the control's supported assessments states
*/
private State state;
/*
* The number of supported regulatory compliance assessments of the given control with a passed state
*/
private Integer passedAssessments;
/*
* The number of supported regulatory compliance assessments of the given control with a failed state
*/
private Integer failedAssessments;
/*
* The number of supported regulatory compliance assessments of the given control with a skipped state
*/
private Integer skippedAssessments;
/**
* Creates an instance of RegulatoryComplianceControlProperties class.
*/
public RegulatoryComplianceControlProperties() {
}
/**
* Get the description property: The description of the regulatory compliance control.
*
* @return the description value.
*/
public String description() {
return this.description;
}
/**
* Get the state property: Aggregative state based on the control's supported assessments states.
*
* @return the state value.
*/
public State state() {
return this.state;
}
/**
* Set the state property: Aggregative state based on the control's supported assessments states.
*
* @param state the state value to set.
* @return the RegulatoryComplianceControlProperties object itself.
*/
public RegulatoryComplianceControlProperties withState(State state) {
this.state = state;
return this;
}
/**
* Get the passedAssessments property: The number of supported regulatory compliance assessments of the given
* control with a passed state.
*
* @return the passedAssessments value.
*/
public Integer passedAssessments() {
return this.passedAssessments;
}
/**
* Get the failedAssessments property: The number of supported regulatory compliance assessments of the given
* control with a failed state.
*
* @return the failedAssessments value.
*/
public Integer failedAssessments() {
return this.failedAssessments;
}
/**
* Get the skippedAssessments property: The number of supported regulatory compliance assessments of the given
* control with a skipped state.
*
* @return the skippedAssessments value.
*/
public Integer skippedAssessments() {
return this.skippedAssessments;
}
/**
* 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 RegulatoryComplianceControlProperties from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of RegulatoryComplianceControlProperties 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 RegulatoryComplianceControlProperties.
*/
public static RegulatoryComplianceControlProperties fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
RegulatoryComplianceControlProperties deserializedRegulatoryComplianceControlProperties
= new RegulatoryComplianceControlProperties();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("description".equals(fieldName)) {
deserializedRegulatoryComplianceControlProperties.description = reader.getString();
} else if ("state".equals(fieldName)) {
deserializedRegulatoryComplianceControlProperties.state = State.fromString(reader.getString());
} else if ("passedAssessments".equals(fieldName)) {
deserializedRegulatoryComplianceControlProperties.passedAssessments
= reader.getNullable(JsonReader::getInt);
} else if ("failedAssessments".equals(fieldName)) {
deserializedRegulatoryComplianceControlProperties.failedAssessments
= reader.getNullable(JsonReader::getInt);
} else if ("skippedAssessments".equals(fieldName)) {
deserializedRegulatoryComplianceControlProperties.skippedAssessments
= reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedRegulatoryComplianceControlProperties;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy