Class: Copilot::CanvasDeclaration
- Inherits:
-
Struct
- Object
- Struct
- Copilot::CanvasDeclaration
- Defined in:
- lib/copilot/types.rb
Overview
Declarative metadata for a canvas.
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#description ⇒ Object
Returns the value of attribute description.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#input_schema ⇒ Object
Returns the value of attribute input_schema.
Instance Method Summary collapse
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions
88 89 90 |
# File 'lib/copilot/types.rb', line 88 def actions @actions end |
#description ⇒ Object
Returns the value of attribute description
88 89 90 |
# File 'lib/copilot/types.rb', line 88 def description @description end |
#display_name ⇒ Object
Returns the value of attribute display_name
88 89 90 |
# File 'lib/copilot/types.rb', line 88 def display_name @display_name end |
#id ⇒ Object
Returns the value of attribute id
88 89 90 |
# File 'lib/copilot/types.rb', line 88 def id @id end |
#input_schema ⇒ Object
Returns the value of attribute input_schema
88 89 90 |
# File 'lib/copilot/types.rb', line 88 def input_schema @input_schema end |
Instance Method Details
#to_h ⇒ Object
92 93 94 95 96 97 |
# File 'lib/copilot/types.rb', line 92 def to_h h = { id: id, displayName: display_name, description: description } h[:inputSchema] = input_schema unless input_schema.nil? h[:actions] = actions.map { |action| action.respond_to?(:to_h) ? action.to_h : action } unless actions.nil? h end |