com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionSummary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-hdinsight Show documentation
Show all versions of azure-resourcemanager-hdinsight Show documentation
This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-2024-08-preview.
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.hdinsight.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 execution summary of a script action.
*/
@Immutable
public final class ScriptActionExecutionSummary implements JsonSerializable {
/*
* The status of script action execution.
*/
private String status;
/*
* The instance count for a given script action execution status.
*/
private Integer instanceCount;
/**
* Creates an instance of ScriptActionExecutionSummary class.
*/
public ScriptActionExecutionSummary() {
}
/**
* Get the status property: The status of script action execution.
*
* @return the status value.
*/
public String status() {
return this.status;
}
/**
* Get the instanceCount property: The instance count for a given script action execution status.
*
* @return the instanceCount value.
*/
public Integer instanceCount() {
return this.instanceCount;
}
/**
* 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 ScriptActionExecutionSummary from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of ScriptActionExecutionSummary 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 ScriptActionExecutionSummary.
*/
public static ScriptActionExecutionSummary fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
ScriptActionExecutionSummary deserializedScriptActionExecutionSummary = new ScriptActionExecutionSummary();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("status".equals(fieldName)) {
deserializedScriptActionExecutionSummary.status = reader.getString();
} else if ("instanceCount".equals(fieldName)) {
deserializedScriptActionExecutionSummary.instanceCount = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedScriptActionExecutionSummary;
});
}
}