com.azure.resourcemanager.security.models.HealthDataClassification 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.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 classification of the health report.
*/
@Fluent
public final class HealthDataClassification implements JsonSerializable {
/*
* The component describes the name of the agent/service that scans the issue
*/
private String component;
/*
* The scenario describes the health scenario issue of the component
*/
private String scenario;
/*
* The resource scope of the health report
*/
private String scope;
/**
* Creates an instance of HealthDataClassification class.
*/
public HealthDataClassification() {
}
/**
* Get the component property: The component describes the name of the agent/service that scans the issue.
*
* @return the component value.
*/
public String component() {
return this.component;
}
/**
* Set the component property: The component describes the name of the agent/service that scans the issue.
*
* @param component the component value to set.
* @return the HealthDataClassification object itself.
*/
public HealthDataClassification withComponent(String component) {
this.component = component;
return this;
}
/**
* Get the scenario property: The scenario describes the health scenario issue of the component.
*
* @return the scenario value.
*/
public String scenario() {
return this.scenario;
}
/**
* Set the scenario property: The scenario describes the health scenario issue of the component.
*
* @param scenario the scenario value to set.
* @return the HealthDataClassification object itself.
*/
public HealthDataClassification withScenario(String scenario) {
this.scenario = scenario;
return this;
}
/**
* Get the scope property: The resource scope of the health report.
*
* @return the scope value.
*/
public String scope() {
return this.scope;
}
/**
* Set the scope property: The resource scope of the health report.
*
* @param scope the scope value to set.
* @return the HealthDataClassification object itself.
*/
public HealthDataClassification withScope(String scope) {
this.scope = scope;
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.writeStringField("component", this.component);
jsonWriter.writeStringField("scenario", this.scenario);
jsonWriter.writeStringField("scope", this.scope);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of HealthDataClassification from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of HealthDataClassification 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 HealthDataClassification.
*/
public static HealthDataClassification fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
HealthDataClassification deserializedHealthDataClassification = new HealthDataClassification();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("component".equals(fieldName)) {
deserializedHealthDataClassification.component = reader.getString();
} else if ("scenario".equals(fieldName)) {
deserializedHealthDataClassification.scenario = reader.getString();
} else if ("scope".equals(fieldName)) {
deserializedHealthDataClassification.scope = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedHealthDataClassification;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy