Class TunnelSession

java.lang.Object
com.ngrok.definitions.TunnelSession

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

    • TunnelSession

      public TunnelSession(String agentVersion, Ref credential, String id, String ip, String metadata, String os, String region, OffsetDateTime startedAt, String transport, URI uri)
      Creates a new instance of TunnelSession.
      Parameters:
      agentVersion - version of the ngrok agent that started this ngrok tunnel session
      credential - reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session
      id - unique tunnel session resource identifier
      ip - source ip address of the tunnel session
      metadata - arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option
      os - operating system of the host the ngrok agent is running on
      region - the ngrok region identifier in which this tunnel session was started
      startedAt - time when the tunnel session first connected to the ngrok servers
      transport - the transport protocol used to start the tunnel session. Either ngrok/v2 or ssh
      uri - URI to the API resource of the tunnel session
  • Method Details

    • getAgentVersion

      public String getAgentVersion()
      version of the ngrok agent that started this ngrok tunnel session
      Returns:
      the value of the property as a String
    • getCredential

      public Ref getCredential()
      reference to the tunnel credential or ssh credential used by the ngrok agent to start this tunnel session
      Returns:
      the value of the property as a Ref
    • getId

      public String getId()
      unique tunnel session resource identifier
      Returns:
      the value of the property as a String
    • getIp

      public String getIp()
      source ip address of the tunnel session
      Returns:
      the value of the property as a String
    • getMetadata

      public String getMetadata()
      arbitrary user-defined data specified in the metadata property in the ngrok configuration file. See the metadata configuration option
      Returns:
      the value of the property as a String
    • getOs

      public String getOs()
      operating system of the host the ngrok agent is running on
      Returns:
      the value of the property as a String
    • getRegion

      public String getRegion()
      the ngrok region identifier in which this tunnel session was started
      Returns:
      the value of the property as a String
    • getStartedAt

      public OffsetDateTime getStartedAt()
      time when the tunnel session first connected to the ngrok servers
      Returns:
      the value of the property as a OffsetDateTime
    • getTransport

      public String getTransport()
      the transport protocol used to start the tunnel session. Either ngrok/v2 or ssh
      Returns:
      the value of the property as a String
    • getUri

      public URI getUri()
      URI to the API resource of the tunnel session
      Returns:
      the value of the property as a URI
    • 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