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

com.azure.resourcemanager.azurestackhci.models.DeploymentSettingStorageAdapterIpInfo Maven / Gradle / Ivy

Go to download

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.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;

/**
 * The StorageAdapter physical nodes of a cluster.
 */
@Fluent
public final class DeploymentSettingStorageAdapterIpInfo
    implements JsonSerializable {
    /*
     * storage adapter physical node name.
     */
    private String physicalNode;

    /*
     * The IPv4 address assigned to each storage adapter physical node on your Azure Stack HCI cluster.
     */
    private String ipv4Address;

    /*
     * The SubnetMask address assigned to each storage adapter physical node on your Azure Stack HCI cluster.
     */
    private String subnetMask;

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

    /**
     * Get the physicalNode property: storage adapter physical node name.
     * 
     * @return the physicalNode value.
     */
    public String physicalNode() {
        return this.physicalNode;
    }

    /**
     * Set the physicalNode property: storage adapter physical node name.
     * 
     * @param physicalNode the physicalNode value to set.
     * @return the DeploymentSettingStorageAdapterIpInfo object itself.
     */
    public DeploymentSettingStorageAdapterIpInfo withPhysicalNode(String physicalNode) {
        this.physicalNode = physicalNode;
        return this;
    }

    /**
     * Get the ipv4Address property: The IPv4 address assigned to each storage adapter physical node on your Azure Stack
     * HCI cluster.
     * 
     * @return the ipv4Address value.
     */
    public String ipv4Address() {
        return this.ipv4Address;
    }

    /**
     * Set the ipv4Address property: The IPv4 address assigned to each storage adapter physical node on your Azure Stack
     * HCI cluster.
     * 
     * @param ipv4Address the ipv4Address value to set.
     * @return the DeploymentSettingStorageAdapterIpInfo object itself.
     */
    public DeploymentSettingStorageAdapterIpInfo withIpv4Address(String ipv4Address) {
        this.ipv4Address = ipv4Address;
        return this;
    }

    /**
     * Get the subnetMask property: The SubnetMask address assigned to each storage adapter physical node on your Azure
     * Stack HCI cluster.
     * 
     * @return the subnetMask value.
     */
    public String subnetMask() {
        return this.subnetMask;
    }

    /**
     * Set the subnetMask property: The SubnetMask address assigned to each storage adapter physical node on your Azure
     * Stack HCI cluster.
     * 
     * @param subnetMask the subnetMask value to set.
     * @return the DeploymentSettingStorageAdapterIpInfo object itself.
     */
    public DeploymentSettingStorageAdapterIpInfo withSubnetMask(String subnetMask) {
        this.subnetMask = subnetMask;
        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("physicalNode", this.physicalNode);
        jsonWriter.writeStringField("ipv4Address", this.ipv4Address);
        jsonWriter.writeStringField("subnetMask", this.subnetMask);
        return jsonWriter.writeEndObject();
    }

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

                if ("physicalNode".equals(fieldName)) {
                    deserializedDeploymentSettingStorageAdapterIpInfo.physicalNode = reader.getString();
                } else if ("ipv4Address".equals(fieldName)) {
                    deserializedDeploymentSettingStorageAdapterIpInfo.ipv4Address = reader.getString();
                } else if ("subnetMask".equals(fieldName)) {
                    deserializedDeploymentSettingStorageAdapterIpInfo.subnetMask = reader.getString();
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedDeploymentSettingStorageAdapterIpInfo;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy