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

com.azure.resourcemanager.azurestackhci.models.HciEdgeDeviceIntents 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.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 Intents of a cluster.
 */
@Immutable
public final class HciEdgeDeviceIntents implements JsonSerializable {
    /*
     * Scope for host network intent.
     */
    private Long scope;

    /*
     * IntentType for host network intent.
     */
    private Long intentType;

    /*
     * IsComputeIntentSet for host network intent.
     */
    private Boolean isComputeIntentSet;

    /*
     * IsStorageIntentSet for host network intent.
     */
    private Boolean isStorageIntentSet;

    /*
     * IntentType for host network intent.
     */
    private Boolean isOnlyStorage;

    /*
     * IsManagementIntentSet for host network intent.
     */
    private Boolean isManagementIntentSet;

    /*
     * IsStretchIntentSet for host network intent.
     */
    private Boolean isStretchIntentSet;

    /*
     * IsOnlyStretch for host network intent.
     */
    private Boolean isOnlyStretch;

    /*
     * IsNetworkIntentType for host network intent.
     */
    private Boolean isNetworkIntentType;

    /*
     * Name of the network intent you wish to create.
     */
    private String intentName;

    /*
     * Array of adapters used for the network intent.
     */
    private List intentAdapters;

    /*
     * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM
     * validation.
     */
    private Boolean overrideVirtualSwitchConfiguration;

    /*
     * Set virtualSwitch ConfigurationOverrides for cluster.
     */
    private HciEdgeDeviceVirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides;

    /*
     * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM
     * validation.
     */
    private Boolean overrideQosPolicy;

    /*
     * Set QoS PolicyOverrides for cluster.
     */
    private QosPolicyOverrides qosPolicyOverrides;

    /*
     * This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM
     * validation.
     */
    private Boolean overrideAdapterProperty;

    /*
     * Set Adapter PropertyOverrides for cluster.
     */
    private HciEdgeDeviceAdapterPropertyOverrides adapterPropertyOverrides;

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

    /**
     * Get the scope property: Scope for host network intent.
     * 
     * @return the scope value.
     */
    public Long scope() {
        return this.scope;
    }

    /**
     * Get the intentType property: IntentType for host network intent.
     * 
     * @return the intentType value.
     */
    public Long intentType() {
        return this.intentType;
    }

    /**
     * Get the isComputeIntentSet property: IsComputeIntentSet for host network intent.
     * 
     * @return the isComputeIntentSet value.
     */
    public Boolean isComputeIntentSet() {
        return this.isComputeIntentSet;
    }

    /**
     * Get the isStorageIntentSet property: IsStorageIntentSet for host network intent.
     * 
     * @return the isStorageIntentSet value.
     */
    public Boolean isStorageIntentSet() {
        return this.isStorageIntentSet;
    }

    /**
     * Get the isOnlyStorage property: IntentType for host network intent.
     * 
     * @return the isOnlyStorage value.
     */
    public Boolean isOnlyStorage() {
        return this.isOnlyStorage;
    }

    /**
     * Get the isManagementIntentSet property: IsManagementIntentSet for host network intent.
     * 
     * @return the isManagementIntentSet value.
     */
    public Boolean isManagementIntentSet() {
        return this.isManagementIntentSet;
    }

    /**
     * Get the isStretchIntentSet property: IsStretchIntentSet for host network intent.
     * 
     * @return the isStretchIntentSet value.
     */
    public Boolean isStretchIntentSet() {
        return this.isStretchIntentSet;
    }

    /**
     * Get the isOnlyStretch property: IsOnlyStretch for host network intent.
     * 
     * @return the isOnlyStretch value.
     */
    public Boolean isOnlyStretch() {
        return this.isOnlyStretch;
    }

    /**
     * Get the isNetworkIntentType property: IsNetworkIntentType for host network intent.
     * 
     * @return the isNetworkIntentType value.
     */
    public Boolean isNetworkIntentType() {
        return this.isNetworkIntentType;
    }

    /**
     * Get the intentName property: Name of the network intent you wish to create.
     * 
     * @return the intentName value.
     */
    public String intentName() {
        return this.intentName;
    }

    /**
     * Get the intentAdapters property: Array of adapters used for the network intent.
     * 
     * @return the intentAdapters value.
     */
    public List intentAdapters() {
        return this.intentAdapters;
    }

    /**
     * Get the overrideVirtualSwitchConfiguration property: This parameter should only be modified based on your OEM
     * guidance. Do not modify this parameter without OEM validation.
     * 
     * @return the overrideVirtualSwitchConfiguration value.
     */
    public Boolean overrideVirtualSwitchConfiguration() {
        return this.overrideVirtualSwitchConfiguration;
    }

    /**
     * Get the virtualSwitchConfigurationOverrides property: Set virtualSwitch ConfigurationOverrides for cluster.
     * 
     * @return the virtualSwitchConfigurationOverrides value.
     */
    public HciEdgeDeviceVirtualSwitchConfigurationOverrides virtualSwitchConfigurationOverrides() {
        return this.virtualSwitchConfigurationOverrides;
    }

    /**
     * Get the overrideQosPolicy property: This parameter should only be modified based on your OEM guidance. Do not
     * modify this parameter without OEM validation.
     * 
     * @return the overrideQosPolicy value.
     */
    public Boolean overrideQosPolicy() {
        return this.overrideQosPolicy;
    }

    /**
     * Get the qosPolicyOverrides property: Set QoS PolicyOverrides for cluster.
     * 
     * @return the qosPolicyOverrides value.
     */
    public QosPolicyOverrides qosPolicyOverrides() {
        return this.qosPolicyOverrides;
    }

    /**
     * Get the overrideAdapterProperty property: This parameter should only be modified based on your OEM guidance. Do
     * not modify this parameter without OEM validation.
     * 
     * @return the overrideAdapterProperty value.
     */
    public Boolean overrideAdapterProperty() {
        return this.overrideAdapterProperty;
    }

    /**
     * Get the adapterPropertyOverrides property: Set Adapter PropertyOverrides for cluster.
     * 
     * @return the adapterPropertyOverrides value.
     */
    public HciEdgeDeviceAdapterPropertyOverrides adapterPropertyOverrides() {
        return this.adapterPropertyOverrides;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (virtualSwitchConfigurationOverrides() != null) {
            virtualSwitchConfigurationOverrides().validate();
        }
        if (qosPolicyOverrides() != null) {
            qosPolicyOverrides().validate();
        }
        if (adapterPropertyOverrides() != null) {
            adapterPropertyOverrides().validate();
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
        jsonWriter.writeStartObject();
        return jsonWriter.writeEndObject();
    }

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

                if ("scope".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.scope = reader.getNullable(JsonReader::getLong);
                } else if ("intentType".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.intentType = reader.getNullable(JsonReader::getLong);
                } else if ("isComputeIntentSet".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isComputeIntentSet = reader.getNullable(JsonReader::getBoolean);
                } else if ("isStorageIntentSet".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isStorageIntentSet = reader.getNullable(JsonReader::getBoolean);
                } else if ("isOnlyStorage".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isOnlyStorage = reader.getNullable(JsonReader::getBoolean);
                } else if ("isManagementIntentSet".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isManagementIntentSet = reader.getNullable(JsonReader::getBoolean);
                } else if ("isStretchIntentSet".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isStretchIntentSet = reader.getNullable(JsonReader::getBoolean);
                } else if ("isOnlyStretch".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isOnlyStretch = reader.getNullable(JsonReader::getBoolean);
                } else if ("isNetworkIntentType".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.isNetworkIntentType = reader.getNullable(JsonReader::getBoolean);
                } else if ("intentName".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.intentName = reader.getString();
                } else if ("intentAdapters".equals(fieldName)) {
                    List intentAdapters = reader.readArray(reader1 -> reader1.getString());
                    deserializedHciEdgeDeviceIntents.intentAdapters = intentAdapters;
                } else if ("overrideVirtualSwitchConfiguration".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.overrideVirtualSwitchConfiguration
                        = reader.getNullable(JsonReader::getBoolean);
                } else if ("virtualSwitchConfigurationOverrides".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.virtualSwitchConfigurationOverrides
                        = HciEdgeDeviceVirtualSwitchConfigurationOverrides.fromJson(reader);
                } else if ("overrideQosPolicy".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.overrideQosPolicy = reader.getNullable(JsonReader::getBoolean);
                } else if ("qosPolicyOverrides".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.qosPolicyOverrides = QosPolicyOverrides.fromJson(reader);
                } else if ("overrideAdapterProperty".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.overrideAdapterProperty
                        = reader.getNullable(JsonReader::getBoolean);
                } else if ("adapterPropertyOverrides".equals(fieldName)) {
                    deserializedHciEdgeDeviceIntents.adapterPropertyOverrides
                        = HciEdgeDeviceAdapterPropertyOverrides.fromJson(reader);
                } else {
                    reader.skipChildren();
                }
            }

            return deserializedHciEdgeDeviceIntents;
        });
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy