SecurityUserRulePropertiesFormat Class

  • java.lang.Object
    • com.azure.resourcemanager.network.fluent.models.SecurityUserRulePropertiesFormat

Implements

public final class SecurityUserRulePropertiesFormat
implements JsonSerializable<SecurityUserRulePropertiesFormat>

Security rule resource.

Constructor Summary

Constructor Description
SecurityUserRulePropertiesFormat()

Creates an instance of SecurityUserRulePropertiesFormat class.

Method Summary

Modifier and Type Method and Description
String description()

Get the description property: A description for this rule.

List<String> destinationPortRanges()

Get the destinationPortRanges property: The destination port ranges.

List<AddressPrefixItem> destinations()

Get the destinations property: The destination address prefixes.

SecurityConfigurationRuleDirection direction()

Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

static SecurityUserRulePropertiesFormat fromJson(JsonReader jsonReader)

Reads an instance of SecurityUserRulePropertiesFormat from the JsonReader.

SecurityConfigurationRuleProtocol protocol()

Get the protocol property: Network protocol this rule applies to.

ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the security configuration user rule resource.

String resourceGuid()

Get the resourceGuid property: Unique identifier for this resource.

List<String> sourcePortRanges()

Get the sourcePortRanges property: The source port ranges.

List<AddressPrefixItem> sources()

Get the sources property: The CIDR or source IP ranges.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

SecurityUserRulePropertiesFormat withDescription(String description)

Set the description property: A description for this rule.

SecurityUserRulePropertiesFormat withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

SecurityUserRulePropertiesFormat withDestinations(List<AddressPrefixItem> destinations)

Set the destinations property: The destination address prefixes.

SecurityUserRulePropertiesFormat withDirection(SecurityConfigurationRuleDirection direction)

Set the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

SecurityUserRulePropertiesFormat withProtocol(SecurityConfigurationRuleProtocol protocol)

Set the protocol property: Network protocol this rule applies to.

SecurityUserRulePropertiesFormat withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

SecurityUserRulePropertiesFormat withSources(List<AddressPrefixItem> sources)

Set the sources property: The CIDR or source IP ranges.

Methods inherited from java.lang.Object

Constructor Details

SecurityUserRulePropertiesFormat

public SecurityUserRulePropertiesFormat()

Creates an instance of SecurityUserRulePropertiesFormat class.

Method Details

description

public String description()

Get the description property: A description for this rule.

Returns:

the description value.

destinationPortRanges

public List<String> destinationPortRanges()

Get the destinationPortRanges property: The destination port ranges.

Returns:

the destinationPortRanges value.

destinations

public List<AddressPrefixItem> destinations()

Get the destinations property: The destination address prefixes. CIDR or destination IP ranges.

Returns:

the destinations value.

direction

public SecurityConfigurationRuleDirection direction()

Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

Returns:

the direction value.

fromJson

public static SecurityUserRulePropertiesFormat fromJson(JsonReader jsonReader)

Reads an instance of SecurityUserRulePropertiesFormat from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

protocol

public SecurityConfigurationRuleProtocol protocol()

Get the protocol property: Network protocol this rule applies to.

Returns:

the protocol value.

provisioningState

public ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the security configuration user rule resource.

Returns:

the provisioningState value.

resourceGuid

public String resourceGuid()

Get the resourceGuid property: Unique identifier for this resource.

Returns:

the resourceGuid value.

sourcePortRanges

public List<String> sourcePortRanges()

Get the sourcePortRanges property: The source port ranges.

Returns:

the sourcePortRanges value.

sources

public List<AddressPrefixItem> sources()

Get the sources property: The CIDR or source IP ranges.

Returns:

the sources value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withDescription

public SecurityUserRulePropertiesFormat withDescription(String description)

Set the description property: A description for this rule.

Parameters:

description - the description value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

withDestinationPortRanges

public SecurityUserRulePropertiesFormat withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

Parameters:

destinationPortRanges - the destinationPortRanges value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

withDestinations

public SecurityUserRulePropertiesFormat withDestinations(List<AddressPrefixItem> destinations)

Set the destinations property: The destination address prefixes. CIDR or destination IP ranges.

Parameters:

destinations - the destinations value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

withDirection

public SecurityUserRulePropertiesFormat withDirection(SecurityConfigurationRuleDirection direction)

Set the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

Parameters:

direction - the direction value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

withProtocol

public SecurityUserRulePropertiesFormat withProtocol(SecurityConfigurationRuleProtocol protocol)

Set the protocol property: Network protocol this rule applies to.

Parameters:

protocol - the protocol value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

withSourcePortRanges

public SecurityUserRulePropertiesFormat withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

Parameters:

sourcePortRanges - the sourcePortRanges value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

withSources

public SecurityUserRulePropertiesFormat withSources(List<AddressPrefixItem> sources)

Set the sources property: The CIDR or source IP ranges.

Parameters:

sources - the sources value to set.

Returns:

the SecurityUserRulePropertiesFormat object itself.

Applies to