Class Endpoint

java.lang.Object
com.ngrok.definitions.Endpoint

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

    • Endpoint

      public Endpoint(String id, String region, OffsetDateTime createdAt, OffsetDateTime updatedAt, URI publicUrl, String proto, String hostport, String type, String metadata, Optional<Ref> domain, Optional<Ref> tcpAddr, Optional<Ref> tunnel, Optional<Ref> edge)
      Creates a new instance of Endpoint.
      Parameters:
      id - unique endpoint resource identifier
      region - identifier of the region this endpoint belongs to
      createdAt - timestamp when the endpoint was created in RFC 3339 format
      updatedAt - timestamp when the endpoint was updated in RFC 3339 format
      publicUrl - URL of the hostport served by this endpoint
      proto - protocol served by this endpoint. one of http, https, tcp, or tls
      hostport - hostport served by this endpoint (hostname:port)
      type - whether the endpoint is ephemeral (served directly by an agent-initiated tunnel) or edge (served by an edge)
      metadata - user-supplied metadata of the associated tunnel or edge object
      domain - the domain reserved for this endpoint
      tcpAddr - the address reserved for this endpoint
      tunnel - the tunnel serving requests to this endpoint, if this is an ephemeral endpoint
      edge - the edge serving requests to this endpoint, if this is an edge endpoint
  • Method Details

    • getId

      public String getId()
      unique endpoint resource identifier
      Returns:
      the value of the property as a String
    • getRegion

      public String getRegion()
      identifier of the region this endpoint belongs to
      Returns:
      the value of the property as a String
    • getCreatedAt

      public OffsetDateTime getCreatedAt()
      timestamp when the endpoint was created in RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getUpdatedAt

      public OffsetDateTime getUpdatedAt()
      timestamp when the endpoint was updated in RFC 3339 format
      Returns:
      the value of the property as a OffsetDateTime
    • getPublicUrl

      public URI getPublicUrl()
      URL of the hostport served by this endpoint
      Returns:
      the value of the property as a URI
    • getProto

      public String getProto()
      protocol served by this endpoint. one of http, https, tcp, or tls
      Returns:
      the value of the property as a String
    • getHostport

      public String getHostport()
      hostport served by this endpoint (hostname:port)
      Returns:
      the value of the property as a String
    • getType

      public String getType()
      whether the endpoint is ephemeral (served directly by an agent-initiated tunnel) or edge (served by an edge)
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      user-supplied metadata of the associated tunnel or edge object
      Returns:
      the value of the property as a String
    • getDomain

      public Optional<Ref> getDomain()
      the domain reserved for this endpoint
      Returns:
      the value of the property as a Ref wrapped in an Optional
    • getTcpAddr

      public Optional<Ref> getTcpAddr()
      the address reserved for this endpoint
      Returns:
      the value of the property as a Ref wrapped in an Optional
    • getTunnel

      public Optional<Ref> getTunnel()
      the tunnel serving requests to this endpoint, if this is an ephemeral endpoint
      Returns:
      the value of the property as a Ref wrapped in an Optional
    • getEdge

      public Optional<Ref> getEdge()
      the edge serving requests to this endpoint, if this is an edge endpoint
      Returns:
      the value of the property as a Ref wrapped in an Optional
    • 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