다음을 통해 공유


IpRule Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.IpRule

Implements

public final class IpRule
implements JsonSerializable<IpRule>

IP rule with specific IP or IP range in CIDR format.

Constructor Summary

Constructor Description
IpRule()

Creates an instance of IpRule class.

Method Summary

Modifier and Type Method and Description
Action action()

Get the action property: The action of IP ACL rule.

static IpRule fromJson(JsonReader jsonReader)

Reads an instance of IpRule from the JsonReader.

String ipAddressOrRange()

Get the ipAddressOrRange property: Specifies the IP or IP range in CIDR format.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

IpRule withAction(Action action)

Set the action property: The action of IP ACL rule.

IpRule withIpAddressOrRange(String ipAddressOrRange)

Set the ipAddressOrRange property: Specifies the IP or IP range in CIDR format.

Methods inherited from java.lang.Object

Constructor Details

IpRule

public IpRule()

Creates an instance of IpRule class.

Method Details

action

public Action action()

Get the action property: The action of IP ACL rule.

Returns:

the action value.

fromJson

public static IpRule fromJson(JsonReader jsonReader)

Reads an instance of IpRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of IpRule 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.

ipAddressOrRange

public String ipAddressOrRange()

Get the ipAddressOrRange property: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.

Returns:

the ipAddressOrRange value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAction

public IpRule withAction(Action action)

Set the action property: The action of IP ACL rule.

Parameters:

action - the action value to set.

Returns:

the IpRule object itself.

withIpAddressOrRange

public IpRule withIpAddressOrRange(String ipAddressOrRange)

Set the ipAddressOrRange property: Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.

Parameters:

ipAddressOrRange - the ipAddressOrRange value to set.

Returns:

the IpRule object itself.

Applies to