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

package com.azure.resourcemanager.peering.models;

import com.azure.core.util.Context;
import com.azure.resourcemanager.peering.fluent.models.PeerAsnInner;
import java.util.List;

/** An immutable client-side representation of PeerAsn. */
public interface PeerAsn {
    /**
     * 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 peerAsn property: The Autonomous System Number (ASN) of the peer.
     *
     * @return the peerAsn value.
     */
    Integer peerAsn();

    /**
     * Gets the peerContactDetail property: The contact details of the peer.
     *
     * @return the peerContactDetail value.
     */
    List<ContactDetail> peerContactDetail();

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

    /**
     * Gets the validationState property: The validation state of the ASN associated with the peer.
     *
     * @return the validationState value.
     */
    ValidationState validationState();

    /**
     * Gets the errorMessage property: The error message for the validation state.
     *
     * @return the errorMessage value.
     */
    String errorMessage();

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

    /** The entirety of the PeerAsn definition. */
    interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate {
    }
    /** The PeerAsn definition stages. */
    interface DefinitionStages {
        /** The first stage of the PeerAsn definition. */
        interface Blank extends WithCreate {
        }
        /**
         * The stage of the PeerAsn 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.WithPeerAsn,
                DefinitionStages.WithPeerContactDetail,
                DefinitionStages.WithPeerName,
                DefinitionStages.WithValidationState {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            PeerAsn create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            PeerAsn create(Context context);
        }
        /** The stage of the PeerAsn definition allowing to specify peerAsn. */
        interface WithPeerAsn {
            /**
             * Specifies the peerAsn property: The Autonomous System Number (ASN) of the peer..
             *
             * @param peerAsn The Autonomous System Number (ASN) of the peer.
             * @return the next definition stage.
             */
            WithCreate withPeerAsn(Integer peerAsn);
        }
        /** The stage of the PeerAsn definition allowing to specify peerContactDetail. */
        interface WithPeerContactDetail {
            /**
             * Specifies the peerContactDetail property: The contact details of the peer..
             *
             * @param peerContactDetail The contact details of the peer.
             * @return the next definition stage.
             */
            WithCreate withPeerContactDetail(List<ContactDetail> peerContactDetail);
        }
        /** The stage of the PeerAsn definition allowing to specify peerName. */
        interface WithPeerName {
            /**
             * Specifies the peerName property: The name of the peer..
             *
             * @param peerName The name of the peer.
             * @return the next definition stage.
             */
            WithCreate withPeerName(String peerName);
        }
        /** The stage of the PeerAsn definition allowing to specify validationState. */
        interface WithValidationState {
            /**
             * Specifies the validationState property: The validation state of the ASN associated with the peer..
             *
             * @param validationState The validation state of the ASN associated with the peer.
             * @return the next definition stage.
             */
            WithCreate withValidationState(ValidationState validationState);
        }
    }
    /**
     * Begins update for the PeerAsn resource.
     *
     * @return the stage of resource update.
     */
    PeerAsn.Update update();

    /** The template for PeerAsn update. */
    interface Update
        extends UpdateStages.WithPeerAsn,
            UpdateStages.WithPeerContactDetail,
            UpdateStages.WithPeerName,
            UpdateStages.WithValidationState {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        PeerAsn apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        PeerAsn apply(Context context);
    }
    /** The PeerAsn update stages. */
    interface UpdateStages {
        /** The stage of the PeerAsn update allowing to specify peerAsn. */
        interface WithPeerAsn {
            /**
             * Specifies the peerAsn property: The Autonomous System Number (ASN) of the peer..
             *
             * @param peerAsn The Autonomous System Number (ASN) of the peer.
             * @return the next definition stage.
             */
            Update withPeerAsn(Integer peerAsn);
        }
        /** The stage of the PeerAsn update allowing to specify peerContactDetail. */
        interface WithPeerContactDetail {
            /**
             * Specifies the peerContactDetail property: The contact details of the peer..
             *
             * @param peerContactDetail The contact details of the peer.
             * @return the next definition stage.
             */
            Update withPeerContactDetail(List<ContactDetail> peerContactDetail);
        }
        /** The stage of the PeerAsn update allowing to specify peerName. */
        interface WithPeerName {
            /**
             * Specifies the peerName property: The name of the peer..
             *
             * @param peerName The name of the peer.
             * @return the next definition stage.
             */
            Update withPeerName(String peerName);
        }
        /** The stage of the PeerAsn update allowing to specify validationState. */
        interface WithValidationState {
            /**
             * Specifies the validationState property: The validation state of the ASN associated with the peer..
             *
             * @param validationState The validation state of the ASN associated with the peer.
             * @return the next definition stage.
             */
            Update withValidationState(ValidationState validationState);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    PeerAsn refresh();

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