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

com.microsoft.azure.management.network.Route Maven / Gradle / Ivy

There is a newer version: 1.41.4
Show newest version
/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 */
package com.microsoft.azure.management.network;

import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.network.implementation.RouteInner;
import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource;
import com.microsoft.azure.management.resources.fluentcore.model.Attachable;
import com.microsoft.azure.management.resources.fluentcore.model.Settable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;

/**
 * An immutable client-side representation of a route of a route table.
 */
@Fluent()
public interface Route extends
    HasInner,
    ChildResource {

    /**
     * @return the destination address prefix, expressed using the CIDR notation, to which the route applies
     */
    String destinationAddressPrefix();

    /**
     * @return the type of the next hop
     */
    RouteNextHopType nextHopType();

    /**
     * @return the IP address of the next hop
     */
    String nextHopIPAddress();

    // Grouping of route definition stages

    /**
     * Grouping of route definition stages.
     */
    interface DefinitionStages {
        /**
         * The first stage of a route definition.
         * @param  the stage of the parent definition to return to after attaching this definition
         */
        interface Blank extends WithDestinationAddressPrefix {
        }

        /** The final stage of a route definition.
         * 

* At this stage, any remaining optional settings can be specified, or the route definition * can be attached to the parent route table definition using {@link WithAttach#attach()}. * @param the return type of {@link WithAttach#attach()} */ interface WithAttach extends Attachable.InDefinition { } /** * The stage of a route definition allowing to specify the destination address prefix. * @param the return type of {@link WithAttach#attach()} */ interface WithDestinationAddressPrefix { /** * Specifies the destination address prefix to apply the route to. * @param cidr an address prefix expressed in the CIDR notation * @return the next stage of the definition */ WithNextHopType withDestinationAddressPrefix(String cidr); } /** * The stage of a route definition allowing to specify the next hop type. * @param the return type of {@link WithAttach#attach()} */ interface WithNextHopType { /** * Specifies the next hop type. *

* To use a virtual appliance, use {@link #withNextHopToVirtualAppliance(String)} instead and specify its IP address. * @param nextHopType a hop type * @return the next stage of the definition */ WithAttach withNextHop(RouteNextHopType nextHopType); /** * Specifies the IP address of the virtual appliance for the next hop to go to. * @param ipAddress an IP address of an existing virtual appliance (virtual machine) * @return the next stage of the definition */ WithAttach withNextHopToVirtualAppliance(String ipAddress); } } /** The entirety of a route definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, DefinitionStages.WithNextHopType, DefinitionStages.WithDestinationAddressPrefix { } /** * Grouping of route update stages. */ interface UpdateStages { /** * The stage of a route update allowing to modify the destination address prefix. */ interface WithDestinationAddressPrefix { /** * Specifies the destination address prefix to apply the route to. * @param cidr an address prefix expressed in the CIDR notation * @return the next stage of the update */ Update withDestinationAddressPrefix(String cidr); } /** * The stage of a route update allowing to specify the next hop type. */ interface WithNextHopType { /** * Specifies the next hop type. *

* To use a virtual appliance, use {@link #withNextHopToVirtualAppliance(String)} instead and specify its IP address. * @param nextHopType a hop type * @return the next stage of the update */ Update withNextHop(RouteNextHopType nextHopType); /** * Specifies the IP address of the virtual appliance for the next hop to go to. * @param ipAddress an IP address of an existing virtual appliance (virtual machine) * @return the next stage of the update */ Update withNextHopToVirtualAppliance(String ipAddress); } } /** * The entirety of a route update as part of a route table update. */ interface Update extends Settable, UpdateStages.WithDestinationAddressPrefix, UpdateStages.WithNextHopType { } /** * Grouping of route definition stages applicable as part of a route table update. */ interface UpdateDefinitionStages { /** * The first stage of a route definition. * @param the stage of the parent definition to return to after attaching this definition */ interface Blank extends WithDestinationAddressPrefix { } /** The final stage of a route definition. *

* At this stage, any remaining optional settings can be specified, or the route definition * can be attached to the parent route table definition using {@link WithAttach#attach()}. * @param the return type of {@link WithAttach#attach()} */ interface WithAttach extends Attachable.InUpdate { } /** * The stage of a route definition allowing to specify the destination address prefix. * @param the return type of {@link WithAttach#attach()} */ interface WithDestinationAddressPrefix { /** * Specifies the destination address prefix to apply the route to. * @param cidr an address prefix expressed in the CIDR notation * @return the next stage of the definition */ WithNextHopType withDestinationAddressPrefix(String cidr); } /** * The stage of a route definition allowing to specify the next hop type. * @param the return type of {@link WithAttach#attach()} */ interface WithNextHopType { /** * Specifies the next hop type. *

* To use a virtual appliance, use {@link #withNextHopToVirtualAppliance(String)} instead and specify its IP address. * @param nextHopType a hop type * @return the next stage of the definition */ WithAttach withNextHop(RouteNextHopType nextHopType); /** * Specifies the IP address of the virtual appliance for the next hop to go to. * @param ipAddress an IP address of an existing virtual appliance (virtual machine) * @return the next stage of the definition */ WithAttach withNextHopToVirtualAppliance(String ipAddress); } } /** The entirety of a route definition as part of a route table update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, UpdateDefinitionStages.WithNextHopType, UpdateDefinitionStages.WithDestinationAddressPrefix { } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy