VirtualNetworkRule Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.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.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

String virtualNetworkSubnetResourceId()

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

VirtualNetworkRule withAction(Action action)

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

VirtualNetworkRule withVirtualNetworkSubnetResourceId(String virtualNetworkSubnetResourceId)

Set the virtualNetworkSubnetResourceId property: Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

virtualNetworkSubnetResourceId

public String virtualNetworkSubnetResourceId()

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

Returns:

the virtualNetworkSubnetResourceId 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.

withVirtualNetworkSubnetResourceId

public VirtualNetworkRule withVirtualNetworkSubnetResourceId(String virtualNetworkSubnetResourceId)

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

Parameters:

virtualNetworkSubnetResourceId - the virtualNetworkSubnetResourceId value to set.

Returns:

the VirtualNetworkRule object itself.

Applies to