// 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.PeeringServicePrefixInner;
import java.util.List;

/** An immutable client-side representation of PeeringServicePrefix. */
public interface PeeringServicePrefix {
    /**
     * 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 prefix from which your traffic originates.
     *
     * @return the prefix value.
     */
    String prefix();

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

    /**
     * Gets the learnedType property: The prefix learned type.
     *
     * @return the learnedType value.
     */
    LearnedType learnedType();

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

    /**
     * Gets the events property: The list of events for peering service prefix.
     *
     * @return the events value.
     */
    List<PeeringServicePrefixEvent> events();

    /**
     * Gets the peeringServicePrefixKey property: The peering service prefix key.
     *
     * @return the peeringServicePrefixKey value.
     */
    String peeringServicePrefixKey();

    /**
     * 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.PeeringServicePrefixInner object.
     *
     * @return the inner object.
     */
    PeeringServicePrefixInner innerModel();

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

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

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

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

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