Class: AgentCliRuntime::AuthConfiguration
- Inherits:
-
Data
- Object
- Data
- AgentCliRuntime::AuthConfiguration
- Defined in:
- lib/agent_cli_runtime/values.rb
Constant Summary collapse
- STATUSES =
%i[configured missing not_checked].freeze
Instance Attribute Summary collapse
-
#diagnostic ⇒ Object
readonly
Returns the value of attribute diagnostic.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #configured? ⇒ Boolean
-
#initialize(status:, source: nil, diagnostic: nil) ⇒ AuthConfiguration
constructor
A new instance of AuthConfiguration.
Constructor Details
#initialize(status:, source: nil, diagnostic: nil) ⇒ AuthConfiguration
Returns a new instance of AuthConfiguration.
114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/agent_cli_runtime/values.rb', line 114 def initialize(status:, source: nil, diagnostic: nil) normalized_status = status.to_sym unless STATUSES.include?(normalized_status) raise ArgumentError, "unknown auth configuration status #{status.inspect}; valid: #{STATUSES.inspect}" end super( status: normalized_status, source: source.nil? ? nil : Immutable.string(source), diagnostic: diagnostic.nil? ? nil : Immutable.string(diagnostic) ) end |
Instance Attribute Details
#diagnostic ⇒ Object (readonly)
Returns the value of attribute diagnostic
111 112 113 |
# File 'lib/agent_cli_runtime/values.rb', line 111 def diagnostic @diagnostic end |
#source ⇒ Object (readonly)
Returns the value of attribute source
111 112 113 |
# File 'lib/agent_cli_runtime/values.rb', line 111 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status
111 112 113 |
# File 'lib/agent_cli_runtime/values.rb', line 111 def status @status end |
Instance Method Details
#configured? ⇒ Boolean
128 129 130 |
# File 'lib/agent_cli_runtime/values.rb', line 128 def configured? status == :configured end |