Class: A2A::Types::OAuth2SecurityScheme
- Inherits:
-
SecurityScheme
- Object
- BaseModel
- SecurityScheme
- A2A::Types::OAuth2SecurityScheme
- Defined in:
- lib/a2a/types/security.rb
Overview
OAuth 2.0 security scheme
Instance Attribute Summary collapse
-
#flows ⇒ Object
readonly
Returns the value of attribute flows.
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
Attributes inherited from SecurityScheme
Instance Method Summary collapse
-
#initialize(flows:, scopes: nil) ⇒ OAuth2SecurityScheme
constructor
Initialize a new OAuth 2.0 security scheme.
- #validate! ⇒ Object private
Methods inherited from SecurityScheme
Methods inherited from BaseModel
#==, #camelize, from_h, from_json, #hash, #to_h, #to_json, underscore, #valid?, #validate_array_type, #validate_inclusion, #validate_required, #validate_type
Constructor Details
#initialize(flows:, scopes: nil) ⇒ OAuth2SecurityScheme
Initialize a new OAuth 2.0 security scheme
117 118 119 120 121 |
# File 'lib/a2a/types/security.rb', line 117 def initialize(flows:, scopes: nil) @flows = flows @scopes = scopes super(type: SECURITY_TYPE_OAUTH2) end |
Instance Attribute Details
#flows ⇒ Object (readonly)
Returns the value of attribute flows.
110 111 112 |
# File 'lib/a2a/types/security.rb', line 110 def flows @flows end |
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
110 111 112 |
# File 'lib/a2a/types/security.rb', line 110 def scopes @scopes end |
Instance Method Details
#validate! ⇒ Object (private)
125 126 127 128 129 |
# File 'lib/a2a/types/security.rb', line 125 def validate! super validate_required(:flows) validate_type(:flows, Hash) end |