com.azure.resourcemanager.security.fluent.models.OperationResultAutoGeneratedInner Maven / Gradle / Ivy
// 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.fluent.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 com.azure.resourcemanager.security.models.OperationResult;
import java.io.IOException;
/**
* Long run operation status of governance rule over a given scope.
*/
@Immutable
public final class OperationResultAutoGeneratedInner implements JsonSerializable {
/*
* The status of the long run operation result of governance rule
*/
private OperationResult status;
/**
* Creates an instance of OperationResultAutoGeneratedInner class.
*/
public OperationResultAutoGeneratedInner() {
}
/**
* Get the status property: The status of the long run operation result of governance rule.
*
* @return the status value.
*/
public OperationResult status() {
return this.status;
}
/**
* 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 OperationResultAutoGeneratedInner from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of OperationResultAutoGeneratedInner 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 OperationResultAutoGeneratedInner.
*/
public static OperationResultAutoGeneratedInner fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
OperationResultAutoGeneratedInner deserializedOperationResultAutoGeneratedInner
= new OperationResultAutoGeneratedInner();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("status".equals(fieldName)) {
deserializedOperationResultAutoGeneratedInner.status
= OperationResult.fromString(reader.getString());
} else {
reader.skipChildren();
}
}
return deserializedOperationResultAutoGeneratedInner;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy