Class EffectiveSecurityAdminRule

java.lang.Object
com.azure.resourcemanager.network.models.EffectiveBaseSecurityAdminRule
com.azure.resourcemanager.network.models.EffectiveSecurityAdminRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<EffectiveBaseSecurityAdminRule>

public final class EffectiveSecurityAdminRule extends EffectiveBaseSecurityAdminRule
Network admin rule.
  • Constructor Details

    • EffectiveSecurityAdminRule

      public EffectiveSecurityAdminRule()
      Creates an instance of EffectiveSecurityAdminRule class.
  • Method Details

    • kind

      public EffectiveAdminRuleKind kind()
      Get the kind property: Whether the rule is custom or default.
      Overrides:
      kind in class EffectiveBaseSecurityAdminRule
      Returns:
      the kind value.
    • withId

      public EffectiveSecurityAdminRule withId(String id)
      Set the id property: Resource ID.
      Overrides:
      withId in class EffectiveBaseSecurityAdminRule
      Parameters:
      id - the id value to set.
      Returns:
      the EffectiveBaseSecurityAdminRule object itself.
    • withConfigurationDescription

      public EffectiveSecurityAdminRule withConfigurationDescription(String configurationDescription)
      Set the configurationDescription property: A description of the security admin configuration.
      Overrides:
      withConfigurationDescription in class EffectiveBaseSecurityAdminRule
      Parameters:
      configurationDescription - the configurationDescription value to set.
      Returns:
      the EffectiveBaseSecurityAdminRule object itself.
    • withRuleCollectionDescription

      public EffectiveSecurityAdminRule withRuleCollectionDescription(String ruleCollectionDescription)
      Set the ruleCollectionDescription property: A description of the rule collection.
      Overrides:
      withRuleCollectionDescription in class EffectiveBaseSecurityAdminRule
      Parameters:
      ruleCollectionDescription - the ruleCollectionDescription value to set.
      Returns:
      the EffectiveBaseSecurityAdminRule object itself.
    • withRuleCollectionAppliesToGroups

      public EffectiveSecurityAdminRule withRuleCollectionAppliesToGroups(List<NetworkManagerSecurityGroupItem> ruleCollectionAppliesToGroups)
      Set the ruleCollectionAppliesToGroups property: Groups for rule collection.
      Overrides:
      withRuleCollectionAppliesToGroups in class EffectiveBaseSecurityAdminRule
      Parameters:
      ruleCollectionAppliesToGroups - the ruleCollectionAppliesToGroups value to set.
      Returns:
      the EffectiveBaseSecurityAdminRule object itself.
    • withRuleGroups

      public EffectiveSecurityAdminRule withRuleGroups(List<ConfigurationGroup> ruleGroups)
      Set the ruleGroups property: Effective configuration groups.
      Overrides:
      withRuleGroups in class EffectiveBaseSecurityAdminRule
      Parameters:
      ruleGroups - the ruleGroups value to set.
      Returns:
      the EffectiveBaseSecurityAdminRule object itself.
    • description

      public String description()
      Get the description property: A description for this rule. Restricted to 140 chars.
      Returns:
      the description value.
    • withDescription

      public EffectiveSecurityAdminRule withDescription(String description)
      Set the description property: A description for this rule. Restricted to 140 chars.
      Parameters:
      description - the description value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • protocol

      Get the protocol property: Network protocol this rule applies to.
      Returns:
      the protocol value.
    • withProtocol

      Set the protocol property: Network protocol this rule applies to.
      Parameters:
      protocol - the protocol value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • sources

      public List<AddressPrefixItem> sources()
      Get the sources property: The CIDR or source IP ranges.
      Returns:
      the sources value.
    • withSources

      public EffectiveSecurityAdminRule withSources(List<AddressPrefixItem> sources)
      Set the sources property: The CIDR or source IP ranges.
      Parameters:
      sources - the sources value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • destinations

      public List<AddressPrefixItem> destinations()
      Get the destinations property: The destination address prefixes. CIDR or destination IP ranges.
      Returns:
      the destinations value.
    • withDestinations

      public EffectiveSecurityAdminRule 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 EffectiveSecurityAdminRule object itself.
    • sourcePortRanges

      public List<String> sourcePortRanges()
      Get the sourcePortRanges property: The source port ranges.
      Returns:
      the sourcePortRanges value.
    • withSourcePortRanges

      public EffectiveSecurityAdminRule withSourcePortRanges(List<String> sourcePortRanges)
      Set the sourcePortRanges property: The source port ranges.
      Parameters:
      sourcePortRanges - the sourcePortRanges value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • destinationPortRanges

      public List<String> destinationPortRanges()
      Get the destinationPortRanges property: The destination port ranges.
      Returns:
      the destinationPortRanges value.
    • withDestinationPortRanges

      public EffectiveSecurityAdminRule withDestinationPortRanges(List<String> destinationPortRanges)
      Set the destinationPortRanges property: The destination port ranges.
      Parameters:
      destinationPortRanges - the destinationPortRanges value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • access

      Get the access property: Indicates the access allowed for this particular rule.
      Returns:
      the access value.
    • withAccess

      Set the access property: Indicates the access allowed for this particular rule.
      Parameters:
      access - the access value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • priority

      public Integer priority()
      Get the priority property: The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
      Returns:
      the priority value.
    • withPriority

      public EffectiveSecurityAdminRule withPriority(Integer priority)
      Set the priority property: The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.
      Parameters:
      priority - the priority value to set.
      Returns:
      the EffectiveSecurityAdminRule object itself.
    • direction

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

      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 EffectiveSecurityAdminRule object itself.
    • provisioningState

      public ProvisioningState provisioningState()
      Get the provisioningState property: The provisioning state of the resource.
      Returns:
      the provisioningState value.
    • resourceGuid

      public String resourceGuid()
      Get the resourceGuid property: Unique identifier for this resource.
      Returns:
      the resourceGuid value.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class EffectiveBaseSecurityAdminRule
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<EffectiveBaseSecurityAdminRule>
      Overrides:
      toJson in class EffectiveBaseSecurityAdminRule
      Throws:
      IOException
    • fromJson

      public static EffectiveSecurityAdminRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of EffectiveSecurityAdminRule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of EffectiveSecurityAdminRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the EffectiveSecurityAdminRule.