com.microsoft.azure.management.network.NicIPConfiguration Maven / Gradle / Ivy
/**
* 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.Beta;
import com.microsoft.azure.management.apigeneration.Beta.SinceVersion;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.network.implementation.NetworkInterfaceIPConfigurationInner;
import com.microsoft.azure.management.network.model.HasPrivateIPAddress;
import com.microsoft.azure.management.network.model.HasPublicIPAddress;
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.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.Settable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;
/**
* An IP configuration in a network interface.
*/
@Fluent()
public interface NicIPConfiguration extends
NicIPConfigurationBase,
HasInner,
ChildResource,
HasPublicIPAddress {
/**
* The entirety of the network interface IP configuration definition.
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface Definition extends
DefinitionStages.Blank,
DefinitionStages.WithAttach,
DefinitionStages.WithNetwork,
DefinitionStages.WithSubnet,
DefinitionStages.WithPrivateIP {
}
/**
* Grouping of network interface IP configuration definition stages applicable as part of a
* network interface update.
*/
interface DefinitionStages {
/**
* The first stage of network interface IP configuration definition.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface Blank extends WithNetwork {
}
/**
* The stage of the network interface IP configuration definition allowing to specify the virtual network.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface WithNetwork {
/**
* Create a new virtual network to associate with the network interface IP configuration,
* based on the provided definition.
*
* @param creatable a creatable definition for a new virtual network
* @return the next stage of the definition
*/
WithPrivateIP withNewNetwork(Creatable creatable);
/**
* Creates a new virtual network to associate with the network interface IP configuration.
*
* the virtual network will be created in the same resource group and region as of parent
* network interface, it will be created with the specified address space and a default subnet
* covering the entirety of the network IP address space.
*
* @param name the name of the new virtual network
* @param addressSpace the address space for rhe virtual network
* @return the next stage of the definition
*/
WithPrivateIP withNewNetwork(String name, String addressSpace);
/**
* Creates a new virtual network to associate with the network interface IP configuration.
*
* the virtual network will be created in the same resource group and region as of parent network interface,
* it will be created with the specified address space and a default subnet covering the entirety of the
* network IP address space.
*
* @param addressSpace the address space for the virtual network
* @return the next stage of the definition
*/
WithPrivateIP withNewNetwork(String addressSpace);
/**
* Associate an existing virtual network with the network interface IP configuration.
*
* @param network an existing virtual network
* @return the next stage of the definition
*/
WithSubnet withExistingNetwork(Network network);
}
/**
* The stage of the network interface IP configuration definition allowing to specify private IP address
* within a virtual network subnet.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface WithPrivateIP extends HasPrivateIPAddress.DefinitionStages.WithPrivateIPAddress> {
/**
* Specifies the IP version for the private IP address.
* @param ipVersion an IP version
* @return the next stage of the definition
*/
WithAttach withPrivateIPVersion(IPVersion ipVersion);
}
/**
* The stage of the network interface IP configuration definition allowing to specify subnet.
*
* @param the return type of the final {@link Attachable#attach()}
*/
interface WithSubnet {
/**
* Associate a subnet with the network interface IP configuration.
*
* @param name the subnet name
* @return the next stage of the definition
*/
WithPrivateIP withSubnet(String name);
}
/**
* The stage of the network interface IP configuration definition allowing to associate it with
* a public IP address.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface WithPublicIPAddress extends HasPublicIPAddress.DefinitionStages.WithPublicIPAddress> {
}
/**
* The stage of the network interface IP configuration definition allowing to specify the load balancer
* to associate this IP configuration with.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface WithLoadBalancer {
/**
* Specifies the load balancer backend to associate this IP configuration with.
* @param loadBalancer an existing load balancer
* @param backendName the name of an existing backend on that load balancer
* @return the next stage of the definition
*/
WithAttach withExistingLoadBalancerBackend(LoadBalancer loadBalancer, String backendName);
/**
* Specifies the load balancer inbound NAT rule to associate this IP configuration with.
* @param loadBalancer an existing load balancer
* @param inboundNatRuleName the name of an existing inbound NAT rule on the selected load balancer
* @return the next stage of the definition
*/
WithAttach withExistingLoadBalancerInboundNatRule(LoadBalancer loadBalancer, String inboundNatRuleName);
}
/**
* The stage of the network interface IP configuration definition allowing to specify the load balancer
* to associate this IP configuration with.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface WithApplicationGateway {
/**
* Specifies the application gateway backend to associate this IP configuration with.
* @param appGateway an existing application gateway
* @param backendName the name of an existing backend on the application gateway
* @return the next stage of the definition
*/
@Beta(SinceVersion.V1_4_0)
WithAttach withExistingApplicationGatewayBackend(ApplicationGateway appGateway, String backendName);
}
/**
* The final stage of network interface IP configuration.
*
* At this stage, any remaining optional settings can be specified, or the network interface IP configuration
* definition can be attached to the parent network interface definition.
*
* @param the stage of the parent network interface definition to return to after attaching this definition
*/
interface WithAttach
extends
Attachable.InDefinition,
WithPublicIPAddress,
WithLoadBalancer,
WithApplicationGateway {
}
}
/** The entirety of a network interface IP configuration definition as part of a network interface update.
* @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()}
*/
interface UpdateDefinition extends
UpdateDefinitionStages.Blank,
UpdateDefinitionStages.WithAttach,
UpdateDefinitionStages.WithNetwork,
UpdateDefinitionStages.WithPrivateIP,
UpdateDefinitionStages.WithSubnet,
UpdateDefinitionStages.WithPublicIPAddress {
}
/**
* Grouping of network interface IP configuration definition stages.
*/
interface UpdateDefinitionStages {
/**
* The first stage of network interface IP configuration definition.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface Blank extends WithNetwork {
}
/**
* The stage of the network interface IP configuration definition allowing to specify the virtual network.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithNetwork {
/**
* Create a new virtual network to associate with the network interface IP configuration,
* based on the provided definition.
*
* @param creatable a creatable definition for a new virtual network
* @return the next stage of the definition
*/
WithPrivateIP withNewNetwork(Creatable creatable);
/**
* Creates a new virtual network to associate with the network interface IP configuration.
*
* the virtual network will be created in the same resource group and region as of parent
* network interface, it will be created with the specified address space and a default subnet
* covering the entirety of the network IP address space.
*
* @param name the name of the new virtual network
* @param addressSpace the address space for rhe virtual network
* @return the next stage of the definition
*/
WithPrivateIP withNewNetwork(String name, String addressSpace);
/**
* Creates a new virtual network to associate with the network interface IP configuration.
*
* the virtual network will be created in the same resource group and region as of parent network interface,
* it will be created with the specified address space and a default subnet covering the entirety of the
* network IP address space.
*
* @param addressSpace the address space for the virtual network
* @return the next stage of the definition
*/
WithPrivateIP withNewNetwork(String addressSpace);
/**
* Associate an existing virtual network with the network interface IP configuration.
*
* @param network an existing virtual network
* @return the next stage of the definition
*/
WithSubnet withExistingNetwork(Network network);
}
/**
* The stage of the network interface IP configuration definition allowing to specify private IP address
* within a virtual network subnet.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithPrivateIP extends HasPrivateIPAddress.UpdateDefinitionStages.WithPrivateIPAddress> {
/**
* Specifies the IP version for the private IP address.
* @param ipVersion an IP version
* @return the next stage of the definition
*/
WithAttach withPrivateIPVersion(IPVersion ipVersion);
}
/**
* The stage of the network interface IP configuration definition allowing to specify subnet.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithSubnet {
/**
* Associate a subnet with the network interface IP configuration.
*
* @param name the subnet name
* @return the next stage of the definition
*/
WithPrivateIP withSubnet(String name);
}
/**
* The stage of the network interface IP configuration definition allowing to associate it with
* a public IP address.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithPublicIPAddress extends HasPublicIPAddress.UpdateDefinitionStages.WithPublicIPAddress> {
}
/**
* The stage of the network interface IP configuration definition allowing to specify the load balancer
* to associate this IP configuration with.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithLoadBalancer {
/**
* Specifies the load balancer to associate this IP configuration with.
* @param loadBalancer an existing load balancer
* @param backendName the name of an existing backend on that load balancer
* @return the next stage of the update
*/
WithAttach withExistingLoadBalancerBackend(LoadBalancer loadBalancer, String backendName);
/**
* Specifies the load balancer inbound NAT rule to associate this IP configuration with.
* @param loadBalancer an existing load balancer
* @param inboundNatRuleName the name of an existing inbound NAT rule on the selected load balancer
* @return the next stage of the update
*/
WithAttach withExistingLoadBalancerInboundNatRule(LoadBalancer loadBalancer, String inboundNatRuleName);
}
/**
* The stage of the network interface IP configuration definition allowing to specify the load balancer
* to associate this IP configuration with.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithApplicationGateway {
/**
* Specifies the application gateway backend to associate this IP configuration with.
* @param appGateway an existing application gateway
* @param backendName the name of an existing backend on the application gateway
* @return the next stage of the definition
*/
@Beta(SinceVersion.V1_4_0)
WithAttach withExistingApplicationGatewayBackend(ApplicationGateway appGateway, String backendName);
}
/**
* The final stage of network interface IP configuration.
*
* At this stage, any remaining optional settings can be specified, or the network interface IP configuration
* definition can be attached to the parent network interface definition using {@link WithAttach#attach()}.
*
* @param the stage of the parent network interface update to return to after attaching this definition
*/
interface WithAttach
extends
Attachable.InUpdate,
WithPublicIPAddress,
WithLoadBalancer,
WithApplicationGateway {
}
}
/**
* The entirety of a network interface IP configuration update as part of a network interface update.
*/
interface Update extends
Settable,
UpdateStages.WithSubnet,
UpdateStages.WithPrivateIP,
UpdateStages.WithPublicIPAddress,
UpdateStages.WithLoadBalancer,
UpdateStages.WithApplicationGateway {
}
/**
* Grouping of network interface IP configuration update stages.
*/
interface UpdateStages {
/**
* The stage of the network interface IP configuration update allowing to specify subnet.
*/
interface WithSubnet {
/**
* Associate a subnet with the network interface IP configuration.
*
* @param name the subnet name
* @return the next stage of the network interface IP configuration update
*/
Update withSubnet(String name);
}
/**
* The stage of the network interface IP configuration update allowing to specify private IP.
*/
interface WithPrivateIP extends HasPrivateIPAddress.UpdateStages.WithPrivateIPAddress {
/**
* Specifies the IP version for the private IP address.
* @param ipVersion an IP version
* @return the next stage of the update
*/
Update withPrivateIPVersion(IPVersion ipVersion);
}
/**
* The stage of the network interface IP configuration update allowing to specify public IP address.
*/
interface WithPublicIPAddress extends HasPublicIPAddress.UpdateStages.WithPublicIPAddress {
}
/**
* The stage of the network interface's IP configuration allowing to specify the load balancer
* to associate this IP configuration with.
*/
interface WithLoadBalancer {
/**
* Specifies the load balancer to associate this IP configuration with.
* @param loadBalancer an existing load balancer
* @param backendName the name of an existing backend on that load balancer
* @return the next stage of the update
*/
Update withExistingLoadBalancerBackend(LoadBalancer loadBalancer, String backendName);
/**
* Specifies the load balancer inbound NAT rule to associate this IP configuration with.
* @param loadBalancer an existing load balancer
* @param inboundNatRuleName the name of an existing inbound NAT rule on the selected load balancer
* @return the next stage of the update
*/
Update withExistingLoadBalancerInboundNatRule(LoadBalancer loadBalancer, String inboundNatRuleName);
/**
* Removes all the existing associations with load balancer backends.
* @return the next stage of the update
*/
Update withoutLoadBalancerBackends();
/**
* Removes all the existing associations with load balancer inbound NAT rules.
* @return the next stage of the update
*/
Update withoutLoadBalancerInboundNatRules();
}
/**
* The stage of the network interface IP configuration update allowing to specify the load balancer
* to associate this IP configuration with.
*/
interface WithApplicationGateway {
/**
* Specifies the application gateway backend to associate this IP configuration with.
* @param appGateway an existing application gateway
* @param backendName the name of an existing backend on the application gateway
* @return the next stage of the update
*/
@Beta(SinceVersion.V1_4_0)
Update withExistingApplicationGatewayBackend(ApplicationGateway appGateway, String backendName);
/**
* Removes all existing associations with application gateway backends.
* @return the next stage of the update
*/
@Beta(SinceVersion.V1_4_0)
Update withoutApplicationGatewayBackends();
}
}
}