Class: A2A::Types::ApiKeySecurityScheme
- Inherits:
-
SecurityScheme
- Object
- BaseModel
- SecurityScheme
- A2A::Types::ApiKeySecurityScheme
- Defined in:
- lib/a2a/types/security.rb
Overview
API Key security scheme
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from SecurityScheme
Instance Method Summary collapse
-
#initialize(name:, location:) ⇒ ApiKeySecurityScheme
constructor
Initialize a new API key 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(name:, location:) ⇒ ApiKeySecurityScheme
Initialize a new API key security scheme
65 66 67 68 69 |
# File 'lib/a2a/types/security.rb', line 65 def initialize(name:, location:) @name = name @location = location super(type: SECURITY_TYPE_API_KEY) end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
58 59 60 |
# File 'lib/a2a/types/security.rb', line 58 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
58 59 60 |
# File 'lib/a2a/types/security.rb', line 58 def name @name end |
Instance Method Details
#validate! ⇒ Object (private)
73 74 75 76 77 |
# File 'lib/a2a/types/security.rb', line 73 def validate! super validate_required(:name, :location) validate_inclusion(:location, %w[query header cookie]) end |