Class: NgrokAPI::Models::TunnelSession

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/models/tunnel_session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: nil, attrs: {}) ⇒ TunnelSession

Returns a new instance of TunnelSession.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/ngrokapi/models/tunnel_session.rb', line 19

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @agent_version = @attrs['agent_version']
  @credential = @attrs['credential']
  @id = @attrs['id']
  @ip = @attrs['ip']
  @metadata = @attrs['metadata']
  @os = @attrs['os']
  @region = @attrs['region']
  @started_at = @attrs['started_at']
  @transport = @attrs['transport']
  @uri = @attrs['uri']
end

Instance Attribute Details

#agent_versionObject (readonly)

Returns the value of attribute agent_version.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def agent_version
  @agent_version
end

#attrsObject (readonly)

Returns the value of attribute attrs.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def client
  @client
end

#credentialObject (readonly)

Returns the value of attribute credential.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def credential
  @credential
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def id
  @id
end

#ipObject (readonly)

Returns the value of attribute ip.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def ip
  @ip
end

#metadataObject (readonly)

Returns the value of attribute metadata.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def 
  @metadata
end

#osObject (readonly)

Returns the value of attribute os.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def os
  @os
end

#regionObject (readonly)

Returns the value of attribute region.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def region
  @region
end

#started_atObject (readonly)

Returns the value of attribute started_at.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def started_at
  @started_at
end

#transportObject (readonly)

Returns the value of attribute transport.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def transport
  @transport
end

#uriObject (readonly)

Returns the value of attribute uri.



6
7
8
# File 'lib/ngrokapi/models/tunnel_session.rb', line 6

def uri
  @uri
end

Instance Method Details

#==(other) ⇒ Object



34
35
36
# File 'lib/ngrokapi/models/tunnel_session.rb', line 34

def ==(other)
  @attrs == other.attrs
end

#to_hObject



42
43
44
# File 'lib/ngrokapi/models/tunnel_session.rb', line 42

def to_h
  @attrs.to_h
end

#to_sObject



38
39
40
# File 'lib/ngrokapi/models/tunnel_session.rb', line 38

def to_s
  @attrs.to_s
end