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.
143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/agent_cli_runtime/values.rb', line 143 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
140 141 142 |
# File 'lib/agent_cli_runtime/values.rb', line 140 def diagnostic @diagnostic end |
#source ⇒ Object (readonly)
Returns the value of attribute source
140 141 142 |
# File 'lib/agent_cli_runtime/values.rb', line 140 def source @source end |
#status ⇒ Object (readonly)
Returns the value of attribute status
140 141 142 |
# File 'lib/agent_cli_runtime/values.rb', line 140 def status @status end |
Instance Method Details
#configured? ⇒ Boolean
157 158 159 |
# File 'lib/agent_cli_runtime/values.rb', line 157 def configured? status == :configured end |