FrontendIpConfigurationInner.java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.network.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.SubResource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.network.models.IpAllocationMethod;
import com.azure.resourcemanager.network.models.IpVersion;
import com.azure.resourcemanager.network.models.ProvisioningState;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Frontend IP address of the load balancer. */
@JsonFlatten
@Fluent
public class FrontendIpConfigurationInner extends SubResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(FrontendIpConfigurationInner.class);
/*
* The name of the resource that is unique within the set of frontend IP
* configurations used by the load balancer. This name can be used to
* access the resource.
*/
@JsonProperty(value = "name")
private String name;
/*
* A unique read-only string that changes whenever the resource is updated.
*/
@JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
private String etag;
/*
* Type of the resource.
*/
@JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;
/*
* A list of availability zones denoting the IP allocated for the resource
* needs to come from.
*/
@JsonProperty(value = "zones")
private List<String> zones;
/*
* An array of references to inbound rules that use this frontend IP.
*/
@JsonProperty(value = "properties.inboundNatRules", access = JsonProperty.Access.WRITE_ONLY)
private List<SubResource> inboundNatRules;
/*
* An array of references to inbound pools that use this frontend IP.
*/
@JsonProperty(value = "properties.inboundNatPools", access = JsonProperty.Access.WRITE_ONLY)
private List<SubResource> inboundNatPools;
/*
* An array of references to outbound rules that use this frontend IP.
*/
@JsonProperty(value = "properties.outboundRules", access = JsonProperty.Access.WRITE_ONLY)
private List<SubResource> outboundRules;
/*
* An array of references to load balancing rules that use this frontend
* IP.
*/
@JsonProperty(value = "properties.loadBalancingRules", access = JsonProperty.Access.WRITE_ONLY)
private List<SubResource> loadBalancingRules;
/*
* The private IP address of the IP configuration.
*/
@JsonProperty(value = "properties.privateIPAddress")
private String privateIpAddress;
/*
* The Private IP allocation method.
*/
@JsonProperty(value = "properties.privateIPAllocationMethod")
private IpAllocationMethod privateIpAllocationMethod;
/*
* Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken
* as IPv4.
*/
@JsonProperty(value = "properties.privateIPAddressVersion")
private IpVersion privateIpAddressVersion;
/*
* The reference to the subnet resource.
*/
@JsonProperty(value = "properties.subnet")
private SubnetInner subnet;
/*
* The reference to the Public IP resource.
*/
@JsonProperty(value = "properties.publicIPAddress")
private PublicIpAddressInner publicIpAddress;
/*
* The reference to the Public IP Prefix resource.
*/
@JsonProperty(value = "properties.publicIPPrefix")
private SubResource publicIpPrefix;
/*
* The provisioning state of the frontend IP configuration resource.
*/
@JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningState provisioningState;
/**
* Get the name property: The name of the resource that is unique within the set of frontend IP configurations used
* by the load balancer. This name can be used to access the resource.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: The name of the resource that is unique within the set of frontend IP configurations used
* by the load balancer. This name can be used to access the resource.
*
* @param name the name value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withName(String name) {
this.name = name;
return this;
}
/**
* Get the etag property: A unique read-only string that changes whenever the resource is updated.
*
* @return the etag value.
*/
public String etag() {
return this.etag;
}
/**
* Get the type property: Type of the resource.
*
* @return the type value.
*/
public String type() {
return this.type;
}
/**
* Get the zones property: A list of availability zones denoting the IP allocated for the resource needs to come
* from.
*
* @return the zones value.
*/
public List<String> zones() {
return this.zones;
}
/**
* Set the zones property: A list of availability zones denoting the IP allocated for the resource needs to come
* from.
*
* @param zones the zones value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withZones(List<String> zones) {
this.zones = zones;
return this;
}
/**
* Get the inboundNatRules property: An array of references to inbound rules that use this frontend IP.
*
* @return the inboundNatRules value.
*/
public List<SubResource> inboundNatRules() {
return this.inboundNatRules;
}
/**
* Get the inboundNatPools property: An array of references to inbound pools that use this frontend IP.
*
* @return the inboundNatPools value.
*/
public List<SubResource> inboundNatPools() {
return this.inboundNatPools;
}
/**
* Get the outboundRules property: An array of references to outbound rules that use this frontend IP.
*
* @return the outboundRules value.
*/
public List<SubResource> outboundRules() {
return this.outboundRules;
}
/**
* Get the loadBalancingRules property: An array of references to load balancing rules that use this frontend IP.
*
* @return the loadBalancingRules value.
*/
public List<SubResource> loadBalancingRules() {
return this.loadBalancingRules;
}
/**
* Get the privateIpAddress property: The private IP address of the IP configuration.
*
* @return the privateIpAddress value.
*/
public String privateIpAddress() {
return this.privateIpAddress;
}
/**
* Set the privateIpAddress property: The private IP address of the IP configuration.
*
* @param privateIpAddress the privateIpAddress value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withPrivateIpAddress(String privateIpAddress) {
this.privateIpAddress = privateIpAddress;
return this;
}
/**
* Get the privateIpAllocationMethod property: The Private IP allocation method.
*
* @return the privateIpAllocationMethod value.
*/
public IpAllocationMethod privateIpAllocationMethod() {
return this.privateIpAllocationMethod;
}
/**
* Set the privateIpAllocationMethod property: The Private IP allocation method.
*
* @param privateIpAllocationMethod the privateIpAllocationMethod value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withPrivateIpAllocationMethod(IpAllocationMethod privateIpAllocationMethod) {
this.privateIpAllocationMethod = privateIpAllocationMethod;
return this;
}
/**
* Get the privateIpAddressVersion property: Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken
* as IPv4.
*
* @return the privateIpAddressVersion value.
*/
public IpVersion privateIpAddressVersion() {
return this.privateIpAddressVersion;
}
/**
* Set the privateIpAddressVersion property: Whether the specific ipconfiguration is IPv4 or IPv6. Default is taken
* as IPv4.
*
* @param privateIpAddressVersion the privateIpAddressVersion value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withPrivateIpAddressVersion(IpVersion privateIpAddressVersion) {
this.privateIpAddressVersion = privateIpAddressVersion;
return this;
}
/**
* Get the subnet property: The reference to the subnet resource.
*
* @return the subnet value.
*/
public SubnetInner subnet() {
return this.subnet;
}
/**
* Set the subnet property: The reference to the subnet resource.
*
* @param subnet the subnet value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withSubnet(SubnetInner subnet) {
this.subnet = subnet;
return this;
}
/**
* Get the publicIpAddress property: The reference to the Public IP resource.
*
* @return the publicIpAddress value.
*/
public PublicIpAddressInner publicIpAddress() {
return this.publicIpAddress;
}
/**
* Set the publicIpAddress property: The reference to the Public IP resource.
*
* @param publicIpAddress the publicIpAddress value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withPublicIpAddress(PublicIpAddressInner publicIpAddress) {
this.publicIpAddress = publicIpAddress;
return this;
}
/**
* Get the publicIpPrefix property: The reference to the Public IP Prefix resource.
*
* @return the publicIpPrefix value.
*/
public SubResource publicIpPrefix() {
return this.publicIpPrefix;
}
/**
* Set the publicIpPrefix property: The reference to the Public IP Prefix resource.
*
* @param publicIpPrefix the publicIpPrefix value to set.
* @return the FrontendIpConfigurationInner object itself.
*/
public FrontendIpConfigurationInner withPublicIpPrefix(SubResource publicIpPrefix) {
this.publicIpPrefix = publicIpPrefix;
return this;
}
/**
* Get the provisioningState property: The provisioning state of the frontend IP configuration resource.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
return this.provisioningState;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (subnet() != null) {
subnet().validate();
}
if (publicIpAddress() != null) {
publicIpAddress().validate();
}
}
}