Class: NgrokAPI::Models::HTTPSEdgeRoute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:, result:) ⇒ HTTPSEdgeRoute

Returns a new instance of HTTPSEdgeRoute.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/ngrokapi/models/https_edge_route.rb', line 28

def initialize(client:, result:)
  @client = client
  @result = result
  @edge_id = @result['edge_id']
  @id = @result['id']
  @created_at = @result['created_at']
  @match_type = @result['match_type']
  @match = @result['match']
  @uri = @result['uri']
  @description = @result['description']
  @metadata = @result['metadata']
  @backend = @result['backend']
  @ip_restriction = @result['ip_restriction']
  @circuit_breaker = @result['circuit_breaker']
  @compression = @result['compression']
  @request_headers = @result['request_headers']
  @response_headers = @result['response_headers']
  @webhook_verification = @result['webhook_verification']
  @oauth = @result['oauth']
  @saml = @result['saml']
  @oidc = @result['oidc']
  @websocket_tcp_converter = @result['websocket_tcp_converter']
end

Instance Attribute Details

#backendObject (readonly)

Returns the value of attribute backend.



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

def backend
  @backend
end

#circuit_breakerObject (readonly)

Returns the value of attribute circuit_breaker.



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

def circuit_breaker
  @circuit_breaker
end

#clientObject (readonly)

Returns the value of attribute client.



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

def client
  @client
end

#compressionObject (readonly)

Returns the value of attribute compression.



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

def compression
  @compression
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#edge_idObject (readonly)

Returns the value of attribute edge_id.



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

def edge_id
  @edge_id
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#ip_restrictionObject (readonly)

Returns the value of attribute ip_restriction.



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

def ip_restriction
  @ip_restriction
end

#matchObject (readonly)

Returns the value of attribute match.



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

def match
  @match
end

#match_typeObject (readonly)

Returns the value of attribute match_type.



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

def match_type
  @match_type
end

#metadataObject (readonly)

Returns the value of attribute metadata.



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

def 
  @metadata
end

#oauthObject (readonly)

Returns the value of attribute oauth.



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

def oauth
  @oauth
end

#oidcObject (readonly)

Returns the value of attribute oidc.



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

def oidc
  @oidc
end

#request_headersObject (readonly)

Returns the value of attribute request_headers.



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

def request_headers
  @request_headers
end

#response_headersObject (readonly)

Returns the value of attribute response_headers.



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

def response_headers
  @response_headers
end

#resultObject (readonly)

Returns the value of attribute result.



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

def result
  @result
end

#samlObject (readonly)

Returns the value of attribute saml.



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

def saml
  @saml
end

#uriObject (readonly)

Returns the value of attribute uri.



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

def uri
  @uri
end

#webhook_verificationObject (readonly)

Returns the value of attribute webhook_verification.



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

def webhook_verification
  @webhook_verification
end

#websocket_tcp_converterObject (readonly)

Returns the value of attribute websocket_tcp_converter.



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

def websocket_tcp_converter
  @websocket_tcp_converter
end

Instance Method Details

#==(other) ⇒ Object



52
53
54
# File 'lib/ngrokapi/models/https_edge_route.rb', line 52

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

#deleteObject



124
125
126
127
128
129
130
# File 'lib/ngrokapi/models/https_edge_route.rb', line 124

def delete(
)
  @client.delete(
    edge_id: @edge_id,
    id: @id
  )
end

#to_sObject



56
57
58
# File 'lib/ngrokapi/models/https_edge_route.rb', line 56

def to_s
  @result.to_s
end

#update(match_type: "", match: "", description: "", metadata: "", backend: nil, ip_restriction: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, webhook_verification: nil, oauth: nil, saml: nil, oidc: nil, websocket_tcp_converter: nil) ⇒ Object

Updates an HTTPS Edge Route by ID. If a module is not specified in the update, it will not be modified. However, each module configuration that is specified will completely replace the existing value. There is no way to delete an existing module via this API, instead use the delete module API.

https://ngrok.com/docs/api#api-edges-https-routes-update



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/ngrokapi/models/https_edge_route.rb', line 67

def update(
  match_type: "",
  match: "",
  description: "",
  metadata: "",
  backend: nil,
  ip_restriction: nil,
  circuit_breaker: nil,
  compression: nil,
  request_headers: nil,
  response_headers: nil,
  webhook_verification: nil,
  oauth: nil,
  saml: nil,
  oidc: nil,
  websocket_tcp_converter: nil
)
  @match_type = match_type if match_type
  @match = match if match
  @description = description if description
  @metadata =  if 
  @backend = backend if backend
  @ip_restriction = ip_restriction if ip_restriction
  @circuit_breaker = circuit_breaker if circuit_breaker
  @compression = compression if compression
  @request_headers = request_headers if request_headers
  @response_headers = response_headers if response_headers
  @webhook_verification = webhook_verification if webhook_verification
  @oauth = oauth if oauth
  @saml = saml if saml
  @oidc = oidc if oidc
  @websocket_tcp_converter = websocket_tcp_converter if websocket_tcp_converter
  @client.update(
    edge_id: @edge_id,
    id: @id,
    match_type: match_type,
    match: match,
    description: description,
    metadata: ,
    backend: backend,
    ip_restriction: ip_restriction,
    circuit_breaker: circuit_breaker,
    compression: compression,
    request_headers: request_headers,
    response_headers: response_headers,
    webhook_verification: webhook_verification,
    oauth: oauth,
    saml: saml,
    oidc: oidc,
    websocket_tcp_converter: websocket_tcp_converter
  )
end