com.azure.resourcemanager.storagecache.models.Nfs3Target 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.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
/**
* Properties pertaining to the Nfs3Target.
*/
@Fluent
public final class Nfs3Target implements JsonSerializable {
/*
* IP address or host name of an NFSv3 host (e.g., 10.0.44.44).
*/
private String target;
/*
* Identifies the StorageCache usage model to be used for this storage target.
*/
private String usageModel;
/*
* Amount of time (in seconds) the cache waits before it checks the back-end storage for file updates.
*/
private Integer verificationTimer;
/*
* Amount of time (in seconds) the cache waits after the last file change before it copies the changed file to
* back-end storage.
*/
private Integer writeBackTimer;
/**
* Creates an instance of Nfs3Target class.
*/
public Nfs3Target() {
}
/**
* Get the target property: IP address or host name of an NFSv3 host (e.g., 10.0.44.44).
*
* @return the target value.
*/
public String target() {
return this.target;
}
/**
* Set the target property: IP address or host name of an NFSv3 host (e.g., 10.0.44.44).
*
* @param target the target value to set.
* @return the Nfs3Target object itself.
*/
public Nfs3Target withTarget(String target) {
this.target = target;
return this;
}
/**
* Get the usageModel property: Identifies the StorageCache usage model to be used for this storage target.
*
* @return the usageModel value.
*/
public String usageModel() {
return this.usageModel;
}
/**
* Set the usageModel property: Identifies the StorageCache usage model to be used for this storage target.
*
* @param usageModel the usageModel value to set.
* @return the Nfs3Target object itself.
*/
public Nfs3Target withUsageModel(String usageModel) {
this.usageModel = usageModel;
return this;
}
/**
* Get the verificationTimer property: Amount of time (in seconds) the cache waits before it checks the back-end
* storage for file updates.
*
* @return the verificationTimer value.
*/
public Integer verificationTimer() {
return this.verificationTimer;
}
/**
* Set the verificationTimer property: Amount of time (in seconds) the cache waits before it checks the back-end
* storage for file updates.
*
* @param verificationTimer the verificationTimer value to set.
* @return the Nfs3Target object itself.
*/
public Nfs3Target withVerificationTimer(Integer verificationTimer) {
this.verificationTimer = verificationTimer;
return this;
}
/**
* Get the writeBackTimer property: Amount of time (in seconds) the cache waits after the last file change before it
* copies the changed file to back-end storage.
*
* @return the writeBackTimer value.
*/
public Integer writeBackTimer() {
return this.writeBackTimer;
}
/**
* Set the writeBackTimer property: Amount of time (in seconds) the cache waits after the last file change before it
* copies the changed file to back-end storage.
*
* @param writeBackTimer the writeBackTimer value to set.
* @return the Nfs3Target object itself.
*/
public Nfs3Target withWriteBackTimer(Integer writeBackTimer) {
this.writeBackTimer = writeBackTimer;
return this;
}
/**
* 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();
jsonWriter.writeStringField("target", this.target);
jsonWriter.writeStringField("usageModel", this.usageModel);
jsonWriter.writeNumberField("verificationTimer", this.verificationTimer);
jsonWriter.writeNumberField("writeBackTimer", this.writeBackTimer);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of Nfs3Target from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of Nfs3Target 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 Nfs3Target.
*/
public static Nfs3Target fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
Nfs3Target deserializedNfs3Target = new Nfs3Target();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("target".equals(fieldName)) {
deserializedNfs3Target.target = reader.getString();
} else if ("usageModel".equals(fieldName)) {
deserializedNfs3Target.usageModel = reader.getString();
} else if ("verificationTimer".equals(fieldName)) {
deserializedNfs3Target.verificationTimer = reader.getNullable(JsonReader::getInt);
} else if ("writeBackTimer".equals(fieldName)) {
deserializedNfs3Target.writeBackTimer = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedNfs3Target;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy