Class ActiveDefaultSecurityAdminRule

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

public final class ActiveDefaultSecurityAdminRule extends ActiveBaseSecurityAdminRule
Network default admin rule.
  • Constructor Details

    • ActiveDefaultSecurityAdminRule

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

    • kind

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

      Set the id property: Resource ID.
      Overrides:
      withId in class ActiveBaseSecurityAdminRule
      Parameters:
      id - the id value to set.
      Returns:
      the ActiveBaseSecurityAdminRule object itself.
    • withCommitTime

      public ActiveDefaultSecurityAdminRule withCommitTime(OffsetDateTime commitTime)
      Set the commitTime property: Deployment time string.
      Overrides:
      withCommitTime in class ActiveBaseSecurityAdminRule
      Parameters:
      commitTime - the commitTime value to set.
      Returns:
      the ActiveBaseSecurityAdminRule object itself.
    • withRegion

      public ActiveDefaultSecurityAdminRule withRegion(String region)
      Set the region property: Deployment region.
      Overrides:
      withRegion in class ActiveBaseSecurityAdminRule
      Parameters:
      region - the region value to set.
      Returns:
      the ActiveBaseSecurityAdminRule object itself.
    • withConfigurationDescription

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

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

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

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

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

      public String flag()
      Get the flag property: Default rule flag.
      Returns:
      the flag value.
    • withFlag

      public ActiveDefaultSecurityAdminRule withFlag(String flag)
      Set the flag property: Default rule flag.
      Parameters:
      flag - the flag value to set.
      Returns:
      the ActiveDefaultSecurityAdminRule object itself.
    • protocol

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

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

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

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

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

      Get the access property: Indicates the access allowed for this particular rule.
      Returns:
      the access value.
    • 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.
    • direction

      Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.
      Returns:
      the direction value.
    • 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 ActiveBaseSecurityAdminRule
      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<ActiveBaseSecurityAdminRule>
      Overrides:
      toJson in class ActiveBaseSecurityAdminRule
      Throws:
      IOException
    • fromJson

      public static ActiveDefaultSecurityAdminRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ActiveDefaultSecurityAdminRule from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ActiveDefaultSecurityAdminRule 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 ActiveDefaultSecurityAdminRule.