Class: NgrokAPI::Models::EndpointCircuitBreaker

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of EndpointCircuitBreaker.



17
18
19
20
21
22
23
24
25
26
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 17

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @enabled = @attrs['enabled']
  @tripped_duration = @attrs['tripped_duration']
  @rolling_window = @attrs['rolling_window']
  @num_buckets = @attrs['num_buckets']
  @volume_threshold = @attrs['volume_threshold']
  @error_threshold_percentage = @attrs['error_threshold_percentage']
end

Instance Attribute Details

#attrsObject (readonly)

Returns the value of attribute attrs.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def attrs
  @attrs
end

#clientObject (readonly)

Returns the value of attribute client.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def client
  @client
end

#enabledObject (readonly)

Returns the value of attribute enabled.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def enabled
  @enabled
end

#error_threshold_percentageObject (readonly)

Returns the value of attribute error_threshold_percentage.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def error_threshold_percentage
  @error_threshold_percentage
end

#num_bucketsObject (readonly)

Returns the value of attribute num_buckets.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def num_buckets
  @num_buckets
end

#rolling_windowObject (readonly)

Returns the value of attribute rolling_window.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def rolling_window
  @rolling_window
end

#tripped_durationObject (readonly)

Returns the value of attribute tripped_duration.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def tripped_duration
  @tripped_duration
end

#volume_thresholdObject (readonly)

Returns the value of attribute volume_threshold.



8
9
10
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 8

def volume_threshold
  @volume_threshold
end

Instance Method Details

#==(other) ⇒ Object



28
29
30
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 28

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

#to_hObject



36
37
38
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 36

def to_h
  @attrs.to_h
end

#to_sObject



32
33
34
# File 'lib/ngrokapi/models/endpoint_circuit_breaker.rb', line 32

def to_s
  @attrs.to_s
end