Class: NgrokAPI::Models::EndpointConfiguration
- Inherits:
-
Object
- Object
- NgrokAPI::Models::EndpointConfiguration
- Defined in:
- lib/ngrokapi/models/endpoint_configuration.rb
Overview
A resource representing data from the endpoint_configuration API
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#delete ⇒ nil
Delete this endpoint configuration.
-
#initialize(client:, result:) ⇒ EndpointConfiguration
constructor
A new instance of EndpointConfiguration.
- #to_s ⇒ Object
-
#update(description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Update this endpoint configuration.
Constructor Details
#initialize(client:, result:) ⇒ EndpointConfiguration
Returns a new instance of EndpointConfiguration.
16 17 18 19 20 21 22 23 24 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 16 def initialize(client:, result:) @client = client @result = result @created_at = @result['created_at'] @id = @result['id'] @description = @result['description'] = @result['metadata'] @uri = @result['uri'] end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def client @client end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def result @result end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
8 9 10 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 8 def uri @uri end |
Instance Method Details
#==(other) ⇒ Object
26 27 28 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 26 def ==(other) @result == other.result end |
#delete ⇒ nil
Delete this endpoint configuration.
40 41 42 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 40 def delete @client.delete(id: @id) end |
#to_s ⇒ Object
30 31 32 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 30 def to_s @result.to_s end |
#update(description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil) ⇒ NgrokAPI::Models::EndpointConfiguration
Update this endpoint configuration. 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.
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 |
# File 'lib/ngrokapi/models/endpoint_configuration.rb', line 68 def update( description: nil, metadata: nil, circuit_breaker: nil, compression: nil, request_headers: nil, response_headers: nil, ip_policy: nil, mutual_tls: nil, tls_termination: nil, webhook_validation: nil, oauth: nil, logging: nil, saml: nil, oidc: nil ) @description = description if description = if @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 @ip_policy = ip_policy if ip_policy @mutual_tls = mutual_tls if mutual_tls @tls_termination = tls_termination if tls_termination @webhook_validation = webhook_validation if webhook_validation @oauth = oauth if oauth @logging = logging if logging @saml = saml if saml @oidc = oidc if oidc @client.update( id: @id, description: description, metadata: , circuit_breaker: circuit_breaker, compression: compression, request_headers: request_headers, response_headers: response_headers, ip_policy: ip_policy, mutual_tls: mutual_tls, tls_termination: tls_termination, webhook_validation: webhook_validation, oauth: oauth, logging: logging, saml: saml, oidc: oidc ) end |