Class: NgrokAPI::Models::Endpoint

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Endpoint.



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

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  @region = @attrs['region']
  @created_at = @attrs['created_at']
  @updated_at = @attrs['updated_at']
  @public_url = @attrs['public_url']
  @proto = @attrs['proto']
  @hostport = @attrs['hostport']
  @type = @attrs['type']
  @metadata = @attrs['metadata']
  @domain = @attrs['domain']
  @tcp_addr = @attrs['tcp_addr']
  @tunnel = @attrs['tunnel']
  @edge = @attrs['edge']
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



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

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



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

def client
  @client
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#domainObject (readonly)

Returns the value of attribute domain.



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

def domain
  @domain
end

#edgeObject (readonly)

Returns the value of attribute edge.



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

def edge
  @edge
end

#hostportObject (readonly)

Returns the value of attribute hostport.



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

def hostport
  @hostport
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end

#protoObject (readonly)

Returns the value of attribute proto.



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

def proto
  @proto
end

#public_urlObject (readonly)

Returns the value of attribute public_url.



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

def public_url
  @public_url
end

#regionObject (readonly)

Returns the value of attribute region.



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

def region
  @region
end

#tcp_addrObject (readonly)

Returns the value of attribute tcp_addr.



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

def tcp_addr
  @tcp_addr
end

#tunnelObject (readonly)

Returns the value of attribute tunnel.



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

def tunnel
  @tunnel
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

Instance Method Details

#==(other) ⇒ Object



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

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

#to_hObject



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

def to_h
  @attrs.to_h
end

#to_sObject



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

def to_s
  @attrs.to_s
end