com.azure.resourcemanager.storagecache.models.AmlFilesystemArchiveStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-storagecache Show documentation
Show all versions of azure-resourcemanager-storagecache Show documentation
This package contains Microsoft Azure SDK for StorageCache Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Managed Lustre provides a fully managed Lustre® file system, integrated with Blob storage, for use on demand. These operations create and manage Azure Managed Lustre file systems. Package tag package-2024-03.
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.storagecache.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.time.OffsetDateTime;
/**
* The status of the archive.
*/
@Immutable
public final class AmlFilesystemArchiveStatus implements JsonSerializable {
/*
* The state of the archive operation
*/
private ArchiveStatusType state;
/*
* The time of the last completed archive operation
*/
private OffsetDateTime lastCompletionTime;
/*
* The time the latest archive operation started
*/
private OffsetDateTime lastStartedTime;
/*
* The completion percentage of the archive operation
*/
private Integer percentComplete;
/*
* Server-defined error code for the archive operation
*/
private String errorCode;
/*
* Server-defined error message for the archive operation
*/
private String errorMessage;
/**
* Creates an instance of AmlFilesystemArchiveStatus class.
*/
public AmlFilesystemArchiveStatus() {
}
/**
* Get the state property: The state of the archive operation.
*
* @return the state value.
*/
public ArchiveStatusType state() {
return this.state;
}
/**
* Get the lastCompletionTime property: The time of the last completed archive operation.
*
* @return the lastCompletionTime value.
*/
public OffsetDateTime lastCompletionTime() {
return this.lastCompletionTime;
}
/**
* Get the lastStartedTime property: The time the latest archive operation started.
*
* @return the lastStartedTime value.
*/
public OffsetDateTime lastStartedTime() {
return this.lastStartedTime;
}
/**
* Get the percentComplete property: The completion percentage of the archive operation.
*
* @return the percentComplete value.
*/
public Integer percentComplete() {
return this.percentComplete;
}
/**
* Get the errorCode property: Server-defined error code for the archive operation.
*
* @return the errorCode value.
*/
public String errorCode() {
return this.errorCode;
}
/**
* Get the errorMessage property: Server-defined error message for the archive operation.
*
* @return the errorMessage value.
*/
public String errorMessage() {
return this.errorMessage;
}
/**
* 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 AmlFilesystemArchiveStatus from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AmlFilesystemArchiveStatus 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 AmlFilesystemArchiveStatus.
*/
public static AmlFilesystemArchiveStatus fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AmlFilesystemArchiveStatus deserializedAmlFilesystemArchiveStatus = new AmlFilesystemArchiveStatus();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("state".equals(fieldName)) {
deserializedAmlFilesystemArchiveStatus.state = ArchiveStatusType.fromString(reader.getString());
} else if ("lastCompletionTime".equals(fieldName)) {
deserializedAmlFilesystemArchiveStatus.lastCompletionTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("lastStartedTime".equals(fieldName)) {
deserializedAmlFilesystemArchiveStatus.lastStartedTime = reader
.getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
} else if ("percentComplete".equals(fieldName)) {
deserializedAmlFilesystemArchiveStatus.percentComplete = reader.getNullable(JsonReader::getInt);
} else if ("errorCode".equals(fieldName)) {
deserializedAmlFilesystemArchiveStatus.errorCode = reader.getString();
} else if ("errorMessage".equals(fieldName)) {
deserializedAmlFilesystemArchiveStatus.errorMessage = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedAmlFilesystemArchiveStatus;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy