VirtualNetworkRule Class

  • java.lang.Object
    • com.azure.resourcemanager.storage.models.VirtualNetworkRule

Implements

public final class VirtualNetworkRule
implements JsonSerializable<VirtualNetworkRule>

Virtual Network rule.

Constructor Summary

Constructor Description
VirtualNetworkRule()

Creates an instance of VirtualNetworkRule class.

Method Summary

Modifier and Type Method and Description
Action action()

Get the action property: The action of virtual network rule.

static VirtualNetworkRule fromJson(JsonReader jsonReader)

Reads an instance of VirtualNetworkRule from the JsonReader.

State state()

Get the state property: Gets the state of virtual network rule.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String virtualNetworkResourceId()

Get the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.

VirtualNetworkRule withAction(Action action)

Set the action property: The action of virtual network rule.

VirtualNetworkRule withState(State state)

Set the state property: Gets the state of virtual network rule.

VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkResourceId)

Set the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.

Methods inherited from java.lang.Object

Constructor Details

VirtualNetworkRule

public VirtualNetworkRule()

Creates an instance of VirtualNetworkRule class.

Method Details

action

public Action action()

Get the action property: The action of virtual network rule.

Returns:

the action value.

fromJson

public static VirtualNetworkRule fromJson(JsonReader jsonReader)

Reads an instance of VirtualNetworkRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualNetworkRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

state

public State state()

Get the state property: Gets the state of virtual network rule.

Returns:

the state value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

virtualNetworkResourceId

public String virtualNetworkResourceId()

Get the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.

Returns:

the virtualNetworkResourceId value.

withAction

public VirtualNetworkRule withAction(Action action)

Set the action property: The action of virtual network rule.

Parameters:

action - the action value to set.

Returns:

the VirtualNetworkRule object itself.

withState

public VirtualNetworkRule withState(State state)

Set the state property: Gets the state of virtual network rule.

Parameters:

state - the state value to set.

Returns:

the VirtualNetworkRule object itself.

withVirtualNetworkResourceId

public VirtualNetworkRule withVirtualNetworkResourceId(String virtualNetworkResourceId)

Set the virtualNetworkResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.

Parameters:

virtualNetworkResourceId - the virtualNetworkResourceId value to set.

Returns:

the VirtualNetworkRule object itself.

Applies to