Class: Stagehand::Models::SessionReplayResponse::Data::Page

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stagehand/models/session_replay_response.rb

Defined Under Namespace

Classes: Action

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(pages:, client_language: nil) ⇒ Object

Parameters:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/stagehand/models/session_replay_response.rb', line 40

class Page < Stagehand::Internal::Type::BaseModel
  # @!attribute actions
  #
  #   @return [Array<Stagehand::Models::SessionReplayResponse::Data::Page::Action>]
  required :actions,
           -> { Stagehand::Internal::Type::ArrayOf[Stagehand::Models::SessionReplayResponse::Data::Page::Action] }

  # @!attribute duration
  #
  #   @return [Float]
  required :duration, Float

  # @!attribute timestamp
  #
  #   @return [Float]
  required :timestamp, Float

  # @!attribute url
  #
  #   @return [String]
  required :url, String

  # @!method initialize(actions:, duration:, timestamp:, url:)
  #   @param actions [Array<Stagehand::Models::SessionReplayResponse::Data::Page::Action>]
  #   @param duration [Float]
  #   @param timestamp [Float]
  #   @param url [String]

  class Action < Stagehand::Internal::Type::BaseModel
    # @!attribute method_
    #
    #   @return [String]
    required :method_, String, api_name: :method

    # @!attribute parameters
    #
    #   @return [Hash{Symbol=>Object}]
    required :parameters, Stagehand::Internal::Type::HashOf[Stagehand::Internal::Type::Unknown]

    # @!attribute result
    #
    #   @return [Hash{Symbol=>Object}]
    required :result, Stagehand::Internal::Type::HashOf[Stagehand::Internal::Type::Unknown]

    # @!attribute timestamp
    #
    #   @return [Float]
    required :timestamp, Float

    # @!attribute end_time
    #
    #   @return [Float, nil]
    optional :end_time, Float, api_name: :endTime

    # @!attribute token_usage
    #
    #   @return [Stagehand::Models::SessionReplayResponse::Data::Page::Action::TokenUsage, nil]
    optional :token_usage,
             -> { Stagehand::Models::SessionReplayResponse::Data::Page::Action::TokenUsage },
             api_name: :tokenUsage

    # @!method initialize(method_:, parameters:, result:, timestamp:, end_time: nil, token_usage: nil)
    #   @param method_ [String]
    #   @param parameters [Hash{Symbol=>Object}]
    #   @param result [Hash{Symbol=>Object}]
    #   @param timestamp [Float]
    #   @param end_time [Float]
    #   @param token_usage [Stagehand::Models::SessionReplayResponse::Data::Page::Action::TokenUsage]

    # @see Stagehand::Models::SessionReplayResponse::Data::Page::Action#token_usage
    class TokenUsage < Stagehand::Internal::Type::BaseModel
      # @!attribute cost
      #
      #   @return [Float, nil]
      optional :cost, Float

      # @!attribute input_tokens
      #
      #   @return [Float, nil]
      optional :input_tokens, Float, api_name: :inputTokens

      # @!attribute output_tokens
      #
      #   @return [Float, nil]
      optional :output_tokens, Float, api_name: :outputTokens

      # @!attribute time_ms
      #
      #   @return [Float, nil]
      optional :time_ms, Float, api_name: :timeMs

      # @!method initialize(cost: nil, input_tokens: nil, output_tokens: nil, time_ms: nil)
      #   @param cost [Float]
      #   @param input_tokens [Float]
      #   @param output_tokens [Float]
      #   @param time_ms [Float]
    end
  end
end

Instance Attribute Details

#actionsArray<Stagehand::Models::SessionReplayResponse::Data::Page::Action>



44
45
# File 'lib/stagehand/models/session_replay_response.rb', line 44

required :actions,
-> { Stagehand::Internal::Type::ArrayOf[Stagehand::Models::SessionReplayResponse::Data::Page::Action] }

#durationFloat

Returns:

  • (Float)


50
# File 'lib/stagehand/models/session_replay_response.rb', line 50

required :duration, Float

#timestampFloat

Returns:

  • (Float)


55
# File 'lib/stagehand/models/session_replay_response.rb', line 55

required :timestamp, Float

#urlString

Returns:

  • (String)


60
# File 'lib/stagehand/models/session_replay_response.rb', line 60

required :url, String