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

com.azure.resourcemanager.azurestackhci.models.NetworkController 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;

/**
 * network controller config for SDN Integration to deploy AzureStackHCI Cluster.
 */
@Fluent
public final class NetworkController implements JsonSerializable {
    /*
     * macAddressPoolStart of network controller used for SDN Integration.
     */
    private String macAddressPoolStart;

    /*
     * macAddressPoolStop of network controller used for SDN Integration.
     */
    private String macAddressPoolStop;

    /*
     * NetworkVirtualizationEnabled of network controller used for SDN Integration.
     */
    private Boolean networkVirtualizationEnabled;

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

    /**
     * Get the macAddressPoolStart property: macAddressPoolStart of network controller used for SDN Integration.
     * 
     * @return the macAddressPoolStart value.
     */
    public String macAddressPoolStart() {
        return this.macAddressPoolStart;
    }

    /**
     * Set the macAddressPoolStart property: macAddressPoolStart of network controller used for SDN Integration.
     * 
     * @param macAddressPoolStart the macAddressPoolStart value to set.
     * @return the NetworkController object itself.
     */
    public NetworkController withMacAddressPoolStart(String macAddressPoolStart) {
        this.macAddressPoolStart = macAddressPoolStart;
        return this;
    }

    /**
     * Get the macAddressPoolStop property: macAddressPoolStop of network controller used for SDN Integration.
     * 
     * @return the macAddressPoolStop value.
     */
    public String macAddressPoolStop() {
        return this.macAddressPoolStop;
    }

    /**
     * Set the macAddressPoolStop property: macAddressPoolStop of network controller used for SDN Integration.
     * 
     * @param macAddressPoolStop the macAddressPoolStop value to set.
     * @return the NetworkController object itself.
     */
    public NetworkController withMacAddressPoolStop(String macAddressPoolStop) {
        this.macAddressPoolStop = macAddressPoolStop;
        return this;
    }

    /**
     * Get the networkVirtualizationEnabled property: NetworkVirtualizationEnabled of network controller used for SDN
     * Integration.
     * 
     * @return the networkVirtualizationEnabled value.
     */
    public Boolean networkVirtualizationEnabled() {
        return this.networkVirtualizationEnabled;
    }

    /**
     * Set the networkVirtualizationEnabled property: NetworkVirtualizationEnabled of network controller used for SDN
     * Integration.
     * 
     * @param networkVirtualizationEnabled the networkVirtualizationEnabled value to set.
     * @return the NetworkController object itself.
     */
    public NetworkController withNetworkVirtualizationEnabled(Boolean networkVirtualizationEnabled) {
        this.networkVirtualizationEnabled = networkVirtualizationEnabled;
        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("macAddressPoolStart", this.macAddressPoolStart);
        jsonWriter.writeStringField("macAddressPoolStop", this.macAddressPoolStop);
        jsonWriter.writeBooleanField("networkVirtualizationEnabled", this.networkVirtualizationEnabled);
        return jsonWriter.writeEndObject();
    }

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

                if ("macAddressPoolStart".equals(fieldName)) {
                    deserializedNetworkController.macAddressPoolStart = reader.getString();
                } else if ("macAddressPoolStop".equals(fieldName)) {
                    deserializedNetworkController.macAddressPoolStop = reader.getString();
                } else if ("networkVirtualizationEnabled".equals(fieldName)) {
                    deserializedNetworkController.networkVirtualizationEnabled
                        = reader.getNullable(JsonReader::getBoolean);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedNetworkController;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy