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

/** An immutable client-side representation of PeeringRegisteredPrefix. */
public interface PeeringRegisteredPrefix {
    /**
     * 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 prefix property: The customer's prefix from which traffic originates.
     *
     * @return the prefix value.
     */
    String prefix();

    /**
     * Gets the prefixValidationState property: The prefix validation state.
     *
     * @return the prefixValidationState value.
     */
    PrefixValidationState prefixValidationState();

    /**
     * Gets the peeringServicePrefixKey property: The peering service prefix key that is to be shared with the customer.
     *
     * @return the peeringServicePrefixKey value.
     */
    String peeringServicePrefixKey();

    /**
     * Gets the errorMessage property: The error message associated with the validation state, if any.
     *
     * @return the errorMessage value.
     */
    String errorMessage();

    /**
     * Gets the provisioningState property: The provisioning state of the resource.
     *
     * @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.peering.fluent.models.PeeringRegisteredPrefixInner object.
     *
     * @return the inner object.
     */
    PeeringRegisteredPrefixInner innerModel();

    /** The entirety of the PeeringRegisteredPrefix definition. */
    interface Definition
        extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
    }
    /** The PeeringRegisteredPrefix definition stages. */
    interface DefinitionStages {
        /** The first stage of the PeeringRegisteredPrefix definition. */
        interface Blank extends WithParentResource {
        }
        /** The stage of the PeeringRegisteredPrefix definition allowing to specify parent resource. */
        interface WithParentResource {
            /**
             * Specifies resourceGroupName, peeringName.
             *
             * @param resourceGroupName The name of the resource group.
             * @param peeringName The name of the peering.
             * @return the next definition stage.
             */
            WithCreate withExistingPeering(String resourceGroupName, String peeringName);
        }
        /**
         * The stage of the PeeringRegisteredPrefix 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.WithPrefix {
            /**
             * Executes the create request.
             *
             * @return the created resource.
             */
            PeeringRegisteredPrefix create();

            /**
             * Executes the create request.
             *
             * @param context The context to associate with this operation.
             * @return the created resource.
             */
            PeeringRegisteredPrefix create(Context context);
        }
        /** The stage of the PeeringRegisteredPrefix definition allowing to specify prefix. */
        interface WithPrefix {
            /**
             * Specifies the prefix property: The customer's prefix from which traffic originates..
             *
             * @param prefix The customer's prefix from which traffic originates.
             * @return the next definition stage.
             */
            WithCreate withPrefix(String prefix);
        }
    }
    /**
     * Begins update for the PeeringRegisteredPrefix resource.
     *
     * @return the stage of resource update.
     */
    PeeringRegisteredPrefix.Update update();

    /** The template for PeeringRegisteredPrefix update. */
    interface Update extends UpdateStages.WithPrefix {
        /**
         * Executes the update request.
         *
         * @return the updated resource.
         */
        PeeringRegisteredPrefix apply();

        /**
         * Executes the update request.
         *
         * @param context The context to associate with this operation.
         * @return the updated resource.
         */
        PeeringRegisteredPrefix apply(Context context);
    }
    /** The PeeringRegisteredPrefix update stages. */
    interface UpdateStages {
        /** The stage of the PeeringRegisteredPrefix update allowing to specify prefix. */
        interface WithPrefix {
            /**
             * Specifies the prefix property: The customer's prefix from which traffic originates..
             *
             * @param prefix The customer's prefix from which traffic originates.
             * @return the next definition stage.
             */
            Update withPrefix(String prefix);
        }
    }
    /**
     * Refreshes the resource to sync with Azure.
     *
     * @return the refreshed resource.
     */
    PeeringRegisteredPrefix refresh();

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