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.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/ngrokapi/models/tunnel_session.rb', line 23

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']
  unless @attrs['uri'].nil?
    @uri = URI(@attrs['uri'])
  end
end

Instance Attribute Details

#agent_versionObject (readonly)

Returns the value of attribute agent_version.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def agent_version
  @agent_version
end

#attrsObject (readonly)

Returns the value of attribute attrs.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def client
  @client
end

#credentialObject (readonly)

Returns the value of attribute credential.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def credential
  @credential
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def id
  @id
end

#ipObject (readonly)

Returns the value of attribute ip.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def ip
  @ip
end

#metadataObject (readonly)

Returns the value of attribute metadata.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def 
  @metadata
end

#osObject (readonly)

Returns the value of attribute os.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def os
  @os
end

#regionObject (readonly)

Returns the value of attribute region.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def region
  @region
end

#started_atObject (readonly)

Returns the value of attribute started_at.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def started_at
  @started_at
end

#transportObject (readonly)

Returns the value of attribute transport.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def transport
  @transport
end

#uriObject (readonly)

Returns the value of attribute uri.



10
11
12
# File 'lib/ngrokapi/models/tunnel_session.rb', line 10

def uri
  @uri
end

Instance Method Details

#==(other) ⇒ Object



40
41
42
# File 'lib/ngrokapi/models/tunnel_session.rb', line 40

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

#to_hObject



48
49
50
# File 'lib/ngrokapi/models/tunnel_session.rb', line 48

def to_h
  @attrs.to_h
end

#to_sObject



44
45
46
# File 'lib/ngrokapi/models/tunnel_session.rb', line 44

def to_s
  @attrs.to_s
end