com.azure.resourcemanager.storagecache.models.AmlFilesystemSubnetInfo 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;
/**
* Information required to validate the subnet that will be used in AML file system create.
*/
@Fluent
public final class AmlFilesystemSubnetInfo implements JsonSerializable {
/*
* Subnet used for managing the AML file system and for client-facing operations. This subnet should have at least a
* /24 subnet mask within the VNET's address space.
*/
private String filesystemSubnet;
/*
* The size of the AML file system, in TiB.
*/
private Float storageCapacityTiB;
/*
* SKU for the resource.
*/
private SkuName sku;
/*
* Region that the AML file system will be created in.
*/
private String location;
/**
* Creates an instance of AmlFilesystemSubnetInfo class.
*/
public AmlFilesystemSubnetInfo() {
}
/**
* Get the filesystemSubnet property: Subnet used for managing the AML file system and for client-facing operations.
* This subnet should have at least a /24 subnet mask within the VNET's address space.
*
* @return the filesystemSubnet value.
*/
public String filesystemSubnet() {
return this.filesystemSubnet;
}
/**
* Set the filesystemSubnet property: Subnet used for managing the AML file system and for client-facing operations.
* This subnet should have at least a /24 subnet mask within the VNET's address space.
*
* @param filesystemSubnet the filesystemSubnet value to set.
* @return the AmlFilesystemSubnetInfo object itself.
*/
public AmlFilesystemSubnetInfo withFilesystemSubnet(String filesystemSubnet) {
this.filesystemSubnet = filesystemSubnet;
return this;
}
/**
* Get the storageCapacityTiB property: The size of the AML file system, in TiB.
*
* @return the storageCapacityTiB value.
*/
public Float storageCapacityTiB() {
return this.storageCapacityTiB;
}
/**
* Set the storageCapacityTiB property: The size of the AML file system, in TiB.
*
* @param storageCapacityTiB the storageCapacityTiB value to set.
* @return the AmlFilesystemSubnetInfo object itself.
*/
public AmlFilesystemSubnetInfo withStorageCapacityTiB(Float storageCapacityTiB) {
this.storageCapacityTiB = storageCapacityTiB;
return this;
}
/**
* Get the sku property: SKU for the resource.
*
* @return the sku value.
*/
public SkuName sku() {
return this.sku;
}
/**
* Set the sku property: SKU for the resource.
*
* @param sku the sku value to set.
* @return the AmlFilesystemSubnetInfo object itself.
*/
public AmlFilesystemSubnetInfo withSku(SkuName sku) {
this.sku = sku;
return this;
}
/**
* Get the location property: Region that the AML file system will be created in.
*
* @return the location value.
*/
public String location() {
return this.location;
}
/**
* Set the location property: Region that the AML file system will be created in.
*
* @param location the location value to set.
* @return the AmlFilesystemSubnetInfo object itself.
*/
public AmlFilesystemSubnetInfo withLocation(String location) {
this.location = location;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (sku() != null) {
sku().validate();
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("filesystemSubnet", this.filesystemSubnet);
jsonWriter.writeNumberField("storageCapacityTiB", this.storageCapacityTiB);
jsonWriter.writeJsonField("sku", this.sku);
jsonWriter.writeStringField("location", this.location);
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of AmlFilesystemSubnetInfo from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AmlFilesystemSubnetInfo 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 AmlFilesystemSubnetInfo.
*/
public static AmlFilesystemSubnetInfo fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AmlFilesystemSubnetInfo deserializedAmlFilesystemSubnetInfo = new AmlFilesystemSubnetInfo();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("filesystemSubnet".equals(fieldName)) {
deserializedAmlFilesystemSubnetInfo.filesystemSubnet = reader.getString();
} else if ("storageCapacityTiB".equals(fieldName)) {
deserializedAmlFilesystemSubnetInfo.storageCapacityTiB = reader.getNullable(JsonReader::getFloat);
} else if ("sku".equals(fieldName)) {
deserializedAmlFilesystemSubnetInfo.sku = SkuName.fromJson(reader);
} else if ("location".equals(fieldName)) {
deserializedAmlFilesystemSubnetInfo.location = reader.getString();
} else {
reader.skipChildren();
}
}
return deserializedAmlFilesystemSubnetInfo;
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy