com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceStorageNetworks Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-azurestackhci Show documentation
Show all versions of azure-resourcemanager-azurestackhci Show documentation
This package contains Microsoft Azure SDK for AzureStackHci Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Stack HCI management service. Package tag package-2024-04.
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.azurestackhci.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 java.io.IOException;
import java.util.List;
/**
* The StorageNetworks of a cluster.
*/
@Immutable
public final class HciEdgeDeviceStorageNetworks implements JsonSerializable {
/*
* Name of the storage network.
*/
private String name;
/*
* Name of the storage network adapter.
*/
private String networkAdapterName;
/*
* ID specified for the VLAN storage network. This setting is applied to the network interfaces that route the
* storage and VM migration traffic.
*/
private String storageVlanId;
/*
* List of Storage adapter physical nodes config to deploy AzureStackHCI Cluster.
*/
private List storageAdapterIpInfo;
/**
* Creates an instance of HciEdgeDeviceStorageNetworks class.
*/
public HciEdgeDeviceStorageNetworks() {
}
/**
* Get the name property: Name of the storage network.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Get the networkAdapterName property: Name of the storage network adapter.
*
* @return the networkAdapterName value.
*/
public String networkAdapterName() {
return this.networkAdapterName;
}
/**
* Get the storageVlanId property: ID specified for the VLAN storage network. This setting is applied to the network
* interfaces that route the storage and VM migration traffic.
*
* @return the storageVlanId value.
*/
public String storageVlanId() {
return this.storageVlanId;
}
/**
* Get the storageAdapterIpInfo property: List of Storage adapter physical nodes config to deploy AzureStackHCI
* Cluster.
*
* @return the storageAdapterIpInfo value.
*/
public List storageAdapterIpInfo() {
return this.storageAdapterIpInfo;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (storageAdapterIpInfo() != null) {
storageAdapterIpInfo().forEach(e -> e.validate());
}
}
/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}
/**
* Reads an instance of HciEdgeDeviceStorageNetworks from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of HciEdgeDeviceStorageNetworks 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 HciEdgeDeviceStorageNetworks.
*/
public static HciEdgeDeviceStorageNetworks fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
HciEdgeDeviceStorageNetworks deserializedHciEdgeDeviceStorageNetworks = new HciEdgeDeviceStorageNetworks();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("name".equals(fieldName)) {
deserializedHciEdgeDeviceStorageNetworks.name = reader.getString();
} else if ("networkAdapterName".equals(fieldName)) {
deserializedHciEdgeDeviceStorageNetworks.networkAdapterName = reader.getString();
} else if ("storageVlanId".equals(fieldName)) {
deserializedHciEdgeDeviceStorageNetworks.storageVlanId = reader.getString();
} else if ("storageAdapterIPInfo".equals(fieldName)) {
List storageAdapterIpInfo
= reader.readArray(reader1 -> HciEdgeDeviceStorageAdapterIpInfo.fromJson(reader1));
deserializedHciEdgeDeviceStorageNetworks.storageAdapterIpInfo = storageAdapterIpInfo;
} else {
reader.skipChildren();
}
}
return deserializedHciEdgeDeviceStorageNetworks;
});
}
}