|
| 1 | +# typed: strong |
| 2 | + |
| 3 | +module Openlayer |
| 4 | + module Models |
| 5 | + class InferencePipelineRetrieveUsersResponse < Openlayer::Internal::Type::BaseModel |
| 6 | + OrHash = |
| 7 | + T.type_alias do |
| 8 | + T.any( |
| 9 | + Openlayer::Models::InferencePipelineRetrieveUsersResponse, |
| 10 | + Openlayer::Internal::AnyHash |
| 11 | + ) |
| 12 | + end |
| 13 | + |
| 14 | + # Array of user aggregation data |
| 15 | + sig do |
| 16 | + returns( |
| 17 | + T::Array[ |
| 18 | + Openlayer::Models::InferencePipelineRetrieveUsersResponse::Item |
| 19 | + ] |
| 20 | + ) |
| 21 | + end |
| 22 | + attr_accessor :items |
| 23 | + |
| 24 | + sig do |
| 25 | + params( |
| 26 | + items: |
| 27 | + T::Array[ |
| 28 | + Openlayer::Models::InferencePipelineRetrieveUsersResponse::Item::OrHash |
| 29 | + ] |
| 30 | + ).returns(T.attached_class) |
| 31 | + end |
| 32 | + def self.new( |
| 33 | + # Array of user aggregation data |
| 34 | + items: |
| 35 | + ) |
| 36 | + end |
| 37 | + |
| 38 | + sig do |
| 39 | + override.returns( |
| 40 | + { |
| 41 | + items: |
| 42 | + T::Array[ |
| 43 | + Openlayer::Models::InferencePipelineRetrieveUsersResponse::Item |
| 44 | + ] |
| 45 | + } |
| 46 | + ) |
| 47 | + end |
| 48 | + def to_hash |
| 49 | + end |
| 50 | + |
| 51 | + class Item < Openlayer::Internal::Type::BaseModel |
| 52 | + OrHash = |
| 53 | + T.type_alias do |
| 54 | + T.any( |
| 55 | + Openlayer::Models::InferencePipelineRetrieveUsersResponse::Item, |
| 56 | + Openlayer::Internal::AnyHash |
| 57 | + ) |
| 58 | + end |
| 59 | + |
| 60 | + # The unique user identifier |
| 61 | + sig { returns(String) } |
| 62 | + attr_accessor :id |
| 63 | + |
| 64 | + # Total cost for this user |
| 65 | + sig { returns(Float) } |
| 66 | + attr_accessor :cost |
| 67 | + |
| 68 | + # Timestamp of the user's first event/trace |
| 69 | + sig { returns(Time) } |
| 70 | + attr_accessor :date_of_first_record |
| 71 | + |
| 72 | + # Timestamp of the user's last event/trace |
| 73 | + sig { returns(Time) } |
| 74 | + attr_accessor :date_of_last_record |
| 75 | + |
| 76 | + # Total number of traces/rows for this user |
| 77 | + sig { returns(Integer) } |
| 78 | + attr_accessor :records |
| 79 | + |
| 80 | + # Count of unique sessions for this user |
| 81 | + sig { returns(Integer) } |
| 82 | + attr_accessor :sessions |
| 83 | + |
| 84 | + # Total token count for this user |
| 85 | + sig { returns(Float) } |
| 86 | + attr_accessor :tokens |
| 87 | + |
| 88 | + sig do |
| 89 | + params( |
| 90 | + id: String, |
| 91 | + cost: Float, |
| 92 | + date_of_first_record: Time, |
| 93 | + date_of_last_record: Time, |
| 94 | + records: Integer, |
| 95 | + sessions: Integer, |
| 96 | + tokens: Float |
| 97 | + ).returns(T.attached_class) |
| 98 | + end |
| 99 | + def self.new( |
| 100 | + # The unique user identifier |
| 101 | + id:, |
| 102 | + # Total cost for this user |
| 103 | + cost:, |
| 104 | + # Timestamp of the user's first event/trace |
| 105 | + date_of_first_record:, |
| 106 | + # Timestamp of the user's last event/trace |
| 107 | + date_of_last_record:, |
| 108 | + # Total number of traces/rows for this user |
| 109 | + records:, |
| 110 | + # Count of unique sessions for this user |
| 111 | + sessions:, |
| 112 | + # Total token count for this user |
| 113 | + tokens: |
| 114 | + ) |
| 115 | + end |
| 116 | + |
| 117 | + sig do |
| 118 | + override.returns( |
| 119 | + { |
| 120 | + id: String, |
| 121 | + cost: Float, |
| 122 | + date_of_first_record: Time, |
| 123 | + date_of_last_record: Time, |
| 124 | + records: Integer, |
| 125 | + sessions: Integer, |
| 126 | + tokens: Float |
| 127 | + } |
| 128 | + ) |
| 129 | + end |
| 130 | + def to_hash |
| 131 | + end |
| 132 | + end |
| 133 | + end |
| 134 | + end |
| 135 | +end |
0 commit comments