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



775
776
777
# File 'lib/copilot/types.rb', line 775

def 
  @metadata
end

#session_idObject

Returns the value of attribute session_id

Returns:

  • (Object)

    the current value of session_id



775
776
777
# File 'lib/copilot/types.rb', line 775

def session_id
  @session_id
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



775
776
777
# File 'lib/copilot/types.rb', line 775

def type
  @type
end

Class Method Details

.from_hash(h) ⇒ Object



776
777
778
779
780
781
782
# File 'lib/copilot/types.rb', line 776

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