Class IpPolicyRule

java.lang.Object
com.ngrok.definitions.IpPolicyRule

public class IpPolicyRule extends Object
A class encapsulating the IpPolicyRule resource.
  • Constructor Details

    • IpPolicyRule

      public IpPolicyRule(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, String cidr, Ref ipPolicy, String action)
      Creates a new instance of IpPolicyRule.
      Parameters:
      id - unique identifier for this IP policy rule
      uri - URI of the IP policy rule API resource
      createdAt - timestamp when the IP policy rule was created, RFC 3339 format
      description - human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
      metadata - arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
      cidr - an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
      ipPolicy - object describing the IP policy this IP Policy Rule belongs to
      action - the action to apply to the policy rule, either allow or deny
  • Method Details

    • getId

      public String getId()
      unique identifier for this IP policy rule
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI of the IP policy rule API resource
      Returns:
      the value of the property as a URI
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      timestamp when the IP policy rule was created, RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getDescription

      public String getDescription()
      human-readable description of the source IPs of this IP rule. optional, max 255 bytes.
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      arbitrary user-defined machine-readable data of this IP policy rule. optional, max 4096 bytes.
      Returns:
      the value of the property as a String
    • getCidr

      public String getCidr()
      an IP or IP range specified in CIDR notation. IPv4 and IPv6 are both supported.
      Returns:
      the value of the property as a String
    • getIpPolicy

      public Ref getIpPolicy()
      object describing the IP policy this IP Policy Rule belongs to
      Returns:
      the value of the property as a Ref
    • getAction

      public String getAction()
      the action to apply to the policy rule, either allow or deny
      Returns:
      the value of the property as a String
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object