![JAR search and dependency download from the Maven repository](/logo.png)
com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner 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-2021-06.
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.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction;
import com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionSummary;
import java.io.IOException;
import java.util.List;
/**
* The execution details of a script action.
*/
@Fluent
public final class RuntimeScriptActionDetailInner extends RuntimeScriptAction {
/*
* The execution id of the script action.
*/
private Long scriptExecutionId;
/*
* The start time of script action execution.
*/
private String startTime;
/*
* The end time of script action execution.
*/
private String endTime;
/*
* The current execution status of the script action.
*/
private String status;
/*
* The reason why the script action was executed.
*/
private String operation;
/*
* The summary of script action execution result.
*/
private List executionSummary;
/*
* The script action execution debug information.
*/
private String debugInformation;
/*
* The application name of the script action, if any.
*/
private String applicationName;
/**
* Creates an instance of RuntimeScriptActionDetailInner class.
*/
public RuntimeScriptActionDetailInner() {
}
/**
* Get the scriptExecutionId property: The execution id of the script action.
*
* @return the scriptExecutionId value.
*/
public Long scriptExecutionId() {
return this.scriptExecutionId;
}
/**
* Get the startTime property: The start time of script action execution.
*
* @return the startTime value.
*/
public String startTime() {
return this.startTime;
}
/**
* Get the endTime property: The end time of script action execution.
*
* @return the endTime value.
*/
public String endTime() {
return this.endTime;
}
/**
* Get the status property: The current execution status of the script action.
*
* @return the status value.
*/
public String status() {
return this.status;
}
/**
* Get the operation property: The reason why the script action was executed.
*
* @return the operation value.
*/
public String operation() {
return this.operation;
}
/**
* Get the executionSummary property: The summary of script action execution result.
*
* @return the executionSummary value.
*/
public List executionSummary() {
return this.executionSummary;
}
/**
* Get the debugInformation property: The script action execution debug information.
*
* @return the debugInformation value.
*/
public String debugInformation() {
return this.debugInformation;
}
/**
* Get the applicationName property: The application name of the script action, if any.
*
* @return the applicationName value.
*/
@Override
public String applicationName() {
return this.applicationName;
}
/**
* {@inheritDoc}
*/
@Override
public RuntimeScriptActionDetailInner withName(String name) {
super.withName(name);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public RuntimeScriptActionDetailInner withUri(String uri) {
super.withUri(uri);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public RuntimeScriptActionDetailInner withParameters(String parameters) {
super.withParameters(parameters);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public RuntimeScriptActionDetailInner withRoles(List roles) {
super.withRoles(roles);
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
@Override
public void validate() {
super.validate();
if (executionSummary() != null) {
executionSummary().forEach(e -> e.validate());
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("name", name());
jsonWriter.writeStringField("uri", uri());
jsonWriter.writeArrayField("roles", roles(), (writer, element) -> writer.writeString(element));
jsonWriter.writeStringField("parameters", parameters());
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of RuntimeScriptActionDetailInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of RuntimeScriptActionDetailInner if the JsonReader was pointing to an instance of it, or
* null if it was pointing to JSON null.
* @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the RuntimeScriptActionDetailInner.
*/
public static RuntimeScriptActionDetailInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
RuntimeScriptActionDetailInner deserializedRuntimeScriptActionDetailInner
= new RuntimeScriptActionDetailInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.withName(reader.getString());
} else if ("uri".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.withUri(reader.getString());
} else if ("roles".equals(fieldName)) {
List roles = reader.readArray(reader1 -> reader1.getString());
deserializedRuntimeScriptActionDetailInner.withRoles(roles);
} else if ("parameters".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.withParameters(reader.getString());
} else if ("applicationName".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.applicationName = reader.getString();
} else if ("scriptExecutionId".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.scriptExecutionId
= reader.getNullable(JsonReader::getLong);
} else if ("startTime".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.startTime = reader.getString();
} else if ("endTime".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.endTime = reader.getString();
} else if ("status".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.status = reader.getString();
} else if ("operation".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.operation = reader.getString();
} else if ("executionSummary".equals(fieldName)) {
List executionSummary
= reader.readArray(reader1 -> ScriptActionExecutionSummary.fromJson(reader1));
deserializedRuntimeScriptActionDetailInner.executionSummary = executionSummary;
} else if ("debugInformation".equals(fieldName)) {
deserializedRuntimeScriptActionDetailInner.debugInformation = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedRuntimeScriptActionDetailInner;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy