// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.dnsresolver.models;

import com.azure.core.management.SubResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkInner;
import java.util.Map;

/** An immutable client-side representation of VirtualNetworkLink. */
public interface VirtualNetworkLink {
    /**
     * Gets the id property: Fully qualified resource Id for the resource.
     *
     * @return the id value.
     */
    String id();

    /**
     * Gets the name property: The name of the resource.
     *
     * @return the name value.
     */
    String name();

    /**
     * Gets the type property: The type of the resource.
     *
     * @return the type value.
     */
    String type();

    /**
     * Gets the etag property: ETag of the virtual network link.
     *
     * @return the etag value.
     */
    String etag();

    /**
     * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
     *
     * @return the systemData value.
     */
    SystemData systemData();

    /**
     * Gets the virtualNetwork property: The reference to the virtual network. This cannot be changed after creation.
     *
     * @return the virtualNetwork value.
     */
    SubResource virtualNetwork();

    /**
     * Gets the metadata property: Metadata attached to the virtual network link.
     *
     * @return the metadata value.
     */
    Map<String, String> metadata();

    /**
     * Gets the provisioningState property: The current provisioning state of the virtual network link. This is a
     * read-only property and any attempt to set this value will be ignored.
     *
     * @return the provisioningState value.
     */
    ProvisioningState provisioningState();

    /**
     * Gets the name of the resource group.
     *
     * @return the name of the resource group.
     */
    String resourceGroupName();

    /**
     * Gets the inner com.azure.resourcemanager.dnsresolver.fluent.models.VirtualNetworkLinkInner object.
     *
     * @return the inner object.
     */
    VirtualNetworkLinkInner innerModel();

    /** The entirety of the VirtualNetworkLink definition. */
    interface Definition
        extends DefinitionStages.Blank,
            DefinitionStages.WithParentResource,
            DefinitionStages.WithVirtualNetwork,
            DefinitionStages.WithCreate {
    }
    /** The VirtualNetworkLink definition stages. */
    interface DefinitionStages {
        /** The first stage of the VirtualNetworkLink definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the VirtualNetworkLink definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, dnsForwardingRulesetName.
             *
             * @param resourceGroupName The name of the resource group. The name is case insensitive.
             * @param dnsForwardingRulesetName The name of the DNS forwarding ruleset.
             * @return the next definition stage.
             */
            WithVirtualNetwork withExistingDnsForwardingRuleset(
                String resourceGroupName, String dnsForwardingRulesetName);
        }
        /** The stage of the VirtualNetworkLink definition allowing to specify virtualNetwork. */
        interface WithVirtualNetwork {
            /**
             * Specifies the virtualNetwork property: The reference to the virtual network. This cannot be changed after
             * creation..
             *
             * @param virtualNetwork The reference to the virtual network. This cannot be changed after creation.
             * @return the next definition stage.
             */
            WithCreate withVirtualNetwork(SubResource virtualNetwork);
        }
        /**
         * The stage of the VirtualNetworkLink definition which contains all the minimum required properties for the
         * resource to be created, but also allows for any other optional properties to be specified.
         */
        interface WithCreate
            extends DefinitionStages.WithMetadata, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            VirtualNetworkLink create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            VirtualNetworkLink create(Context context);
        }
        /** The stage of the VirtualNetworkLink definition allowing to specify metadata. */
        interface WithMetadata {
            /**
             * Specifies the metadata property: Metadata attached to the virtual network link..
             *
             * @param metadata Metadata attached to the virtual network link.
             * @return the next definition stage.
             */
            WithCreate withMetadata(Map<String, String> metadata);
        }
        /** The stage of the VirtualNetworkLink definition allowing to specify ifMatch. */
        interface WithIfMatch {
            /**
             * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current
             * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes..
             *
             * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify
             *     the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
             * @return the next definition stage.
             */
            WithCreate withIfMatch(String ifMatch);
        }
        /** The stage of the VirtualNetworkLink definition allowing to specify ifNoneMatch. */
        interface WithIfNoneMatch {
            /**
             * Specifies the ifNoneMatch property: Set to '*' to allow a new resource to be created, but to prevent
             * updating an existing resource. Other values will be ignored..
             *
             * @param ifNoneMatch Set to '*' to allow a new resource to be created, but to prevent updating an existing
             *     resource. Other values will be ignored.
             * @return the next definition stage.
             */
            WithCreate withIfNoneMatch(String ifNoneMatch);
        }
    }
    /**
     * Begins update for the VirtualNetworkLink resource.
     *
     * @return the stage of resource update.
     */
    VirtualNetworkLink.Update update();

    /** The template for VirtualNetworkLink update. */
    interface Update extends UpdateStages.WithMetadata, UpdateStages.WithIfMatch {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        VirtualNetworkLink apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        VirtualNetworkLink apply(Context context);
    }
    /** The VirtualNetworkLink update stages. */
    interface UpdateStages {
        /** The stage of the VirtualNetworkLink update allowing to specify metadata. */
        interface WithMetadata {
            /**
             * Specifies the metadata property: Metadata attached to the virtual network link..
             *
             * @param metadata Metadata attached to the virtual network link.
             * @return the next definition stage.
             */
            Update withMetadata(Map<String, String> metadata);
        }
        /** The stage of the VirtualNetworkLink update allowing to specify ifMatch. */
        interface WithIfMatch {
            /**
             * Specifies the ifMatch property: ETag of the resource. Omit this value to always overwrite the current
             * resource. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes..
             *
             * @param ifMatch ETag of the resource. Omit this value to always overwrite the current resource. Specify
             *     the last-seen ETag value to prevent accidentally overwriting any concurrent changes.
             * @return the next definition stage.
             */
            Update withIfMatch(String ifMatch);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    VirtualNetworkLink refresh();

    /**
     * Refreshes the resource to sync with Azure.
     *
     * @param context The context to associate with this operation.
     * @return the refreshed resource.
     */
    VirtualNetworkLink refresh(Context context);
}
