Class: Copilot::SessionLifecycleEvent

Inherits:
Struct
  • Object
show all
Defined in:
lib/copilot/types.rb

Overview

Session lifecycle event notification.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#metadataObject

Returns the value of attribute metadata

Returns:

  • (Object)

    the current value of metadata



523
524
525
# File 'lib/copilot/types.rb', line 523

def 
  @metadata
end

#session_idObject

Returns the value of attribute session_id

Returns:

  • (Object)

    the current value of session_id



523
524
525
# File 'lib/copilot/types.rb', line 523

def session_id
  @session_id
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



523
524
525
# File 'lib/copilot/types.rb', line 523

def type
  @type
end

Class Method Details

.from_hash(h) ⇒ Object



524
525
526
527
528
529
530
# File 'lib/copilot/types.rb', line 524

def self.from_hash(h)
  new(
    type: h["type"],
    session_id: h["sessionId"],
    metadata: h["metadata"]
  )
end