다음을 통해 공유


NetworkRuleSet Class

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

Implements

public final class NetworkRuleSet
implements JsonSerializable<NetworkRuleSet>

The network rule set for a container registry.

Constructor Summary

Constructor Description
NetworkRuleSet()

Creates an instance of NetworkRuleSet class.

Method Summary

Modifier and Type Method and Description
DefaultAction defaultAction()

Get the defaultAction property: The default action of allow or deny when no other rules match.

static NetworkRuleSet fromJson(JsonReader jsonReader)

Reads an instance of NetworkRuleSet from the JsonReader.

List<IpRule> ipRules()

Get the ipRules property: The IP ACL rules.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

NetworkRuleSet withDefaultAction(DefaultAction defaultAction)

Set the defaultAction property: The default action of allow or deny when no other rules match.

NetworkRuleSet withIpRules(List<IpRule> ipRules)

Set the ipRules property: The IP ACL rules.

Methods inherited from java.lang.Object

Constructor Details

NetworkRuleSet

public NetworkRuleSet()

Creates an instance of NetworkRuleSet class.

Method Details

defaultAction

public DefaultAction defaultAction()

Get the defaultAction property: The default action of allow or deny when no other rules match.

Returns:

the defaultAction value.

fromJson

public static NetworkRuleSet fromJson(JsonReader jsonReader)

Reads an instance of NetworkRuleSet from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

ipRules

public List ipRules()

Get the ipRules property: The IP ACL rules.

Returns:

the ipRules value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDefaultAction

public NetworkRuleSet withDefaultAction(DefaultAction defaultAction)

Set the defaultAction property: The default action of allow or deny when no other rules match.

Parameters:

defaultAction - the defaultAction value to set.

Returns:

the NetworkRuleSet object itself.

withIpRules

public NetworkRuleSet withIpRules(List ipRules)

Set the ipRules property: The IP ACL rules.

Parameters:

ipRules - the ipRules value to set.

Returns:

the NetworkRuleSet object itself.

Applies to