![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.desktopvirtualization.models.SessionHostHealthCheckReport Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-desktopvirtualization Show documentation
Show all versions of azure-resourcemanager-desktopvirtualization Show documentation
This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-04.
The 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.desktopvirtualization.models;
import com.azure.core.annotation.Immutable;
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 report for session host information.
*/
@Immutable
public final class SessionHostHealthCheckReport implements JsonSerializable {
/*
* Represents the name of the health check operation performed.
*/
private HealthCheckName healthCheckName;
/*
* Represents the Health state of the health check we performed.
*/
private HealthCheckResult healthCheckResult;
/*
* Additional detailed information on the failure.
*/
private SessionHostHealthCheckFailureDetails additionalFailureDetails;
/**
* Creates an instance of SessionHostHealthCheckReport class.
*/
public SessionHostHealthCheckReport() {
}
/**
* Get the healthCheckName property: Represents the name of the health check operation performed.
*
* @return the healthCheckName value.
*/
public HealthCheckName healthCheckName() {
return this.healthCheckName;
}
/**
* Get the healthCheckResult property: Represents the Health state of the health check we performed.
*
* @return the healthCheckResult value.
*/
public HealthCheckResult healthCheckResult() {
return this.healthCheckResult;
}
/**
* Get the additionalFailureDetails property: Additional detailed information on the failure.
*
* @return the additionalFailureDetails value.
*/
public SessionHostHealthCheckFailureDetails additionalFailureDetails() {
return this.additionalFailureDetails;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (additionalFailureDetails() != null) {
additionalFailureDetails().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of SessionHostHealthCheckReport from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of SessionHostHealthCheckReport 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 SessionHostHealthCheckReport.
*/
public static SessionHostHealthCheckReport fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
SessionHostHealthCheckReport deserializedSessionHostHealthCheckReport = new SessionHostHealthCheckReport();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("healthCheckName".equals(fieldName)) {
deserializedSessionHostHealthCheckReport.healthCheckName
= HealthCheckName.fromString(reader.getString());
} else if ("healthCheckResult".equals(fieldName)) {
deserializedSessionHostHealthCheckReport.healthCheckResult
= HealthCheckResult.fromString(reader.getString());
} else if ("additionalFailureDetails".equals(fieldName)) {
deserializedSessionHostHealthCheckReport.additionalFailureDetails
= SessionHostHealthCheckFailureDetails.fromJson(reader);
} else {
reader.skipChildren();
}
}
return deserializedSessionHostHealthCheckReport;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy