com.azure.resourcemanager.hybridcompute.models.AvailablePatchCountByClassification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hybridcompute Show documentation
Show all versions of azure-resourcemanager-hybridcompute Show documentation
This package contains Microsoft Azure SDK for HybridCompute Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Hybrid Compute Management Client. Package tag package-preview-2024-07.
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.hybridcompute.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;
/**
* Summarization of patches available for installation on the machine by classification.
*/
@Immutable
public final class AvailablePatchCountByClassification
implements JsonSerializable {
/*
* Number of security patches available for installation.
*/
private Integer security;
/*
* Number of critical patches available for installation.
*/
private Integer critical;
/*
* Number of definition patches available for installation.
*/
private Integer definition;
/*
* Number of update Rollup patches available for installation.
*/
private Integer updateRollup;
/*
* Number of feature pack patches available for installation.
*/
private Integer featurePack;
/*
* Number of service pack patches available for installation.
*/
private Integer servicePack;
/*
* Number of tools patches available for installation.
*/
private Integer tools;
/*
* Number of updates category patches available for installation.
*/
private Integer updates;
/*
* Number of other patches available for installation.
*/
private Integer other;
/**
* Creates an instance of AvailablePatchCountByClassification class.
*/
public AvailablePatchCountByClassification() {
}
/**
* Get the security property: Number of security patches available for installation.
*
* @return the security value.
*/
public Integer security() {
return this.security;
}
/**
* Get the critical property: Number of critical patches available for installation.
*
* @return the critical value.
*/
public Integer critical() {
return this.critical;
}
/**
* Get the definition property: Number of definition patches available for installation.
*
* @return the definition value.
*/
public Integer definition() {
return this.definition;
}
/**
* Get the updateRollup property: Number of update Rollup patches available for installation.
*
* @return the updateRollup value.
*/
public Integer updateRollup() {
return this.updateRollup;
}
/**
* Get the featurePack property: Number of feature pack patches available for installation.
*
* @return the featurePack value.
*/
public Integer featurePack() {
return this.featurePack;
}
/**
* Get the servicePack property: Number of service pack patches available for installation.
*
* @return the servicePack value.
*/
public Integer servicePack() {
return this.servicePack;
}
/**
* Get the tools property: Number of tools patches available for installation.
*
* @return the tools value.
*/
public Integer tools() {
return this.tools;
}
/**
* Get the updates property: Number of updates category patches available for installation.
*
* @return the updates value.
*/
public Integer updates() {
return this.updates;
}
/**
* Get the other property: Number of other patches available for installation.
*
* @return the other value.
*/
public Integer other() {
return this.other;
}
/**
* 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();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AvailablePatchCountByClassification from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AvailablePatchCountByClassification 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 AvailablePatchCountByClassification.
*/
public static AvailablePatchCountByClassification fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AvailablePatchCountByClassification deserializedAvailablePatchCountByClassification
= new AvailablePatchCountByClassification();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("security".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.security = reader.getNullable(JsonReader::getInt);
} else if ("critical".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.critical = reader.getNullable(JsonReader::getInt);
} else if ("definition".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.definition = reader.getNullable(JsonReader::getInt);
} else if ("updateRollup".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.updateRollup
= reader.getNullable(JsonReader::getInt);
} else if ("featurePack".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.featurePack
= reader.getNullable(JsonReader::getInt);
} else if ("servicePack".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.servicePack
= reader.getNullable(JsonReader::getInt);
} else if ("tools".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.tools = reader.getNullable(JsonReader::getInt);
} else if ("updates".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.updates = reader.getNullable(JsonReader::getInt);
} else if ("other".equals(fieldName)) {
deserializedAvailablePatchCountByClassification.other = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedAvailablePatchCountByClassification;
});
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy