Package com.ngrok.definitions

# Class IpRestriction

java.lang.Object
com.ngrok.definitions.IpRestriction

public class IpRestriction extends Object
A class encapsulating the `IpRestriction` resource.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IpRestriction(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, Boolean enforced, String type, List<Ref> ipPolicies)`
  Creates a new instance of `IpRestriction`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `OffsetDateTime`
  `getCreatedAt()`
  timestamp when the IP restriction was created, RFC 3339 format
  `String`
  `getDescription()`
  human-readable description of this IP restriction.
  `boolean`
  `getEnforced()`
  true if the IP restriction will be enforced.
  `String`
  `getId()`
  unique identifier for this IP restriction
  `List<Ref>`
  `getIpPolicies()`
  the set of IP policies that are used to enforce the restriction
  `String`
  `getMetadata()`
  arbitrary user-defined machine-readable data of this IP restriction.
  `String`
  `getType()`
  the type of IP restriction.
  `URI`
  `getUri()`
  URI of the IP restriction API resource
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### IpRestriction

    public IpRestriction(String id, URI uri, OffsetDateTime createdAt, String description, String metadata, Boolean enforced, String type, List<Ref> ipPolicies)
    Creates a new instance of `IpRestriction`.
    Parameters:
      `id` - unique identifier for this IP restriction
      `uri` - URI of the IP restriction API resource
      `createdAt` - timestamp when the IP restriction was created, RFC 3339 format
      `description` - human-readable description of this IP restriction. optional, max 255 bytes.
      `metadata` - arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.
      `enforced` - true if the IP restriction will be enforced. if false, only warnings will be issued
      `type` - the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: `dashboard`, `api`, `agent`, and `endpoints`
      `ipPolicies` - the set of IP policies that are used to enforce the restriction

- ## Method Details

  - ### getId

    public String getId()
    unique identifier for this IP restriction
    Returns:
      the value of the property as a `String`

  - ### getUri

    public URI getUri()
    URI of the IP restriction API resource
    Returns:
      the value of the property as a `URI`

  - ### getCreatedAt

    public OffsetDateTime getCreatedAt()
    timestamp when the IP restriction was created, RFC 3339 format
    Returns:
      the value of the property as a `OffsetDateTime`

  - ### getDescription

    public String getDescription()
    human-readable description of this IP restriction. 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 restriction. optional, max 4096 bytes.
    Returns:
      the value of the property as a `String`

  - ### getEnforced

    public boolean getEnforced()
    true if the IP restriction will be enforced. if false, only warnings will be issued
    Returns:
      the value of the property as a `boolean`

  - ### getType

    public String getType()
    the type of IP restriction. this defines what traffic will be restricted with the attached policies. four values are currently supported: `dashboard`, `api`, `agent`, and `endpoints`
    Returns:
      the value of the property as a `String`

  - ### getIpPolicies

    public List<Ref> getIpPolicies()
    the set of IP policies that are used to enforce the restriction
    Returns:
      the value of the property as a `List` of `Ref`

  - ### 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`