com.azure.resourcemanager.storagecache.models.BlobNfsTarget 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 BlobNfsTarget.
*/
@Fluent
public final class BlobNfsTarget implements JsonSerializable {
/*
* Resource ID of the storage container.
*/
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 BlobNfsTarget class.
*/
public BlobNfsTarget() {
}
/**
* Get the target property: Resource ID of the storage container.
*
* @return the target value.
*/
public String target() {
return this.target;
}
/**
* Set the target property: Resource ID of the storage container.
*
* @param target the target value to set.
* @return the BlobNfsTarget object itself.
*/
public BlobNfsTarget 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 BlobNfsTarget object itself.
*/
public BlobNfsTarget 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 BlobNfsTarget object itself.
*/
public BlobNfsTarget 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 BlobNfsTarget object itself.
*/
public BlobNfsTarget 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 BlobNfsTarget from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of BlobNfsTarget 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 BlobNfsTarget.
*/
public static BlobNfsTarget fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
BlobNfsTarget deserializedBlobNfsTarget = new BlobNfsTarget();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("target".equals(fieldName)) {
deserializedBlobNfsTarget.target = reader.getString();
} else if ("usageModel".equals(fieldName)) {
deserializedBlobNfsTarget.usageModel = reader.getString();
} else if ("verificationTimer".equals(fieldName)) {
deserializedBlobNfsTarget.verificationTimer = reader.getNullable(JsonReader::getInt);
} else if ("writeBackTimer".equals(fieldName)) {
deserializedBlobNfsTarget.writeBackTimer = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedBlobNfsTarget;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy