All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.azure.resourcemanager.netapp.fluent.models.NetworkSiblingSetInner Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-2024-03.

There is a newer version: 1.4.0
Show 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.netapp.fluent.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 com.azure.resourcemanager.netapp.models.NetworkFeatures;
import com.azure.resourcemanager.netapp.models.NetworkSiblingSetProvisioningState;
import com.azure.resourcemanager.netapp.models.NicInfo;
import java.io.IOException;
import java.util.List;

/**
 * Network sibling set
 * 
 * Describes the contents of a network sibling set.
 */
@Fluent
public final class NetworkSiblingSetInner implements JsonSerializable {
    /*
     * Network Sibling Set ID for a group of volumes sharing networking resources in a subnet.
     */
    private String networkSiblingSetId;

    /*
     * The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes. Example
     * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/
     * subnets/{mySubnet}
     */
    private String subnetId;

    /*
     * Network sibling set state Id identifying the current state of the sibling set.
     */
    private String networkSiblingSetStateId;

    /*
     * Network features available to the volume, or current state of update.
     */
    private NetworkFeatures networkFeatures;

    /*
     * Gets the status of the NetworkSiblingSet at the time the operation was called.
     */
    private NetworkSiblingSetProvisioningState provisioningState;

    /*
     * List of NIC information
     */
    private List nicInfoList;

    /**
     * Creates an instance of NetworkSiblingSetInner class.
     */
    public NetworkSiblingSetInner() {
    }

    /**
     * Get the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources
     * in a subnet.
     * 
     * @return the networkSiblingSetId value.
     */
    public String networkSiblingSetId() {
        return this.networkSiblingSetId;
    }

    /**
     * Set the networkSiblingSetId property: Network Sibling Set ID for a group of volumes sharing networking resources
     * in a subnet.
     * 
     * @param networkSiblingSetId the networkSiblingSetId value to set.
     * @return the NetworkSiblingSetInner object itself.
     */
    public NetworkSiblingSetInner withNetworkSiblingSetId(String networkSiblingSetId) {
        this.networkSiblingSetId = networkSiblingSetId;
        return this;
    }

    /**
     * Get the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation
     * Microsoft.NetApp/volumes. Example
     * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}.
     * 
     * @return the subnetId value.
     */
    public String subnetId() {
        return this.subnetId;
    }

    /**
     * Set the subnetId property: The Azure Resource URI for a delegated subnet. Must have the delegation
     * Microsoft.NetApp/volumes. Example
     * /subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/Microsoft.Network/virtualNetworks/testVnet/subnets/{mySubnet}.
     * 
     * @param subnetId the subnetId value to set.
     * @return the NetworkSiblingSetInner object itself.
     */
    public NetworkSiblingSetInner withSubnetId(String subnetId) {
        this.subnetId = subnetId;
        return this;
    }

    /**
     * Get the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the
     * sibling set.
     * 
     * @return the networkSiblingSetStateId value.
     */
    public String networkSiblingSetStateId() {
        return this.networkSiblingSetStateId;
    }

    /**
     * Set the networkSiblingSetStateId property: Network sibling set state Id identifying the current state of the
     * sibling set.
     * 
     * @param networkSiblingSetStateId the networkSiblingSetStateId value to set.
     * @return the NetworkSiblingSetInner object itself.
     */
    public NetworkSiblingSetInner withNetworkSiblingSetStateId(String networkSiblingSetStateId) {
        this.networkSiblingSetStateId = networkSiblingSetStateId;
        return this;
    }

    /**
     * Get the networkFeatures property: Network features available to the volume, or current state of update.
     * 
     * @return the networkFeatures value.
     */
    public NetworkFeatures networkFeatures() {
        return this.networkFeatures;
    }

    /**
     * Set the networkFeatures property: Network features available to the volume, or current state of update.
     * 
     * @param networkFeatures the networkFeatures value to set.
     * @return the NetworkSiblingSetInner object itself.
     */
    public NetworkSiblingSetInner withNetworkFeatures(NetworkFeatures networkFeatures) {
        this.networkFeatures = networkFeatures;
        return this;
    }

    /**
     * Get the provisioningState property: Gets the status of the NetworkSiblingSet at the time the operation was
     * called.
     * 
     * @return the provisioningState value.
     */
    public NetworkSiblingSetProvisioningState provisioningState() {
        return this.provisioningState;
    }

    /**
     * Get the nicInfoList property: List of NIC information.
     * 
     * @return the nicInfoList value.
     */
    public List nicInfoList() {
        return this.nicInfoList;
    }

    /**
     * Set the nicInfoList property: List of NIC information.
     * 
     * @param nicInfoList the nicInfoList value to set.
     * @return the NetworkSiblingSetInner object itself.
     */
    public NetworkSiblingSetInner withNicInfoList(List nicInfoList) {
        this.nicInfoList = nicInfoList;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (nicInfoList() != null) {
            nicInfoList().forEach(e -> e.validate());
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        jsonWriter.writeStringField("networkSiblingSetId", this.networkSiblingSetId);
        jsonWriter.writeStringField("subnetId", this.subnetId);
        jsonWriter.writeStringField("networkSiblingSetStateId", this.networkSiblingSetStateId);
        jsonWriter.writeStringField("networkFeatures",
            this.networkFeatures == null ? null : this.networkFeatures.toString());
        jsonWriter.writeArrayField("nicInfoList", this.nicInfoList, (writer, element) -> writer.writeJson(element));
        return jsonWriter.writeEndObject();
    }

    /**
     * Reads an instance of NetworkSiblingSetInner from the JsonReader.
     * 
     * @param jsonReader The JsonReader being read.
     * @return An instance of NetworkSiblingSetInner 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 NetworkSiblingSetInner.
     */
    public static NetworkSiblingSetInner fromJson(JsonReader jsonReader) throws IOException {
        return jsonReader.readObject(reader -> {
            NetworkSiblingSetInner deserializedNetworkSiblingSetInner = new NetworkSiblingSetInner();
            while (reader.nextToken() != JsonToken.END_OBJECT) {
                String fieldName = reader.getFieldName();
                reader.nextToken();

                if ("networkSiblingSetId".equals(fieldName)) {
                    deserializedNetworkSiblingSetInner.networkSiblingSetId = reader.getString();
                } else if ("subnetId".equals(fieldName)) {
                    deserializedNetworkSiblingSetInner.subnetId = reader.getString();
                } else if ("networkSiblingSetStateId".equals(fieldName)) {
                    deserializedNetworkSiblingSetInner.networkSiblingSetStateId = reader.getString();
                } else if ("networkFeatures".equals(fieldName)) {
                    deserializedNetworkSiblingSetInner.networkFeatures = NetworkFeatures.fromString(reader.getString());
                } else if ("provisioningState".equals(fieldName)) {
                    deserializedNetworkSiblingSetInner.provisioningState
                        = NetworkSiblingSetProvisioningState.fromString(reader.getString());
                } else if ("nicInfoList".equals(fieldName)) {
                    List nicInfoList = reader.readArray(reader1 -> NicInfo.fromJson(reader1));
                    deserializedNetworkSiblingSetInner.nicInfoList = nicInfoList;
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedNetworkSiblingSetInner;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy