deeprails 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/README.md +26 -40
  4. data/lib/deeprails/internal/transport/base_client.rb +7 -1
  5. data/lib/deeprails/internal/transport/pooled_net_requester.rb +6 -2
  6. data/lib/deeprails/internal/type/base_model.rb +5 -5
  7. data/lib/deeprails/models/defend_create_response.rb +51 -0
  8. data/lib/deeprails/models/defend_create_workflow_params.rb +19 -19
  9. data/lib/deeprails/models/defend_response.rb +278 -38
  10. data/lib/deeprails/models/defend_retrieve_workflow_params.rb +13 -1
  11. data/lib/deeprails/models/defend_update_response.rb +51 -0
  12. data/lib/deeprails/models/file_response.rb +6 -22
  13. data/lib/deeprails/models/file_upload_params.rb +3 -3
  14. data/lib/deeprails/models/monitor_create_response.rb +51 -0
  15. data/lib/deeprails/models/monitor_detail_response.rb +69 -70
  16. data/lib/deeprails/models/monitor_event_detail_response.rb +182 -0
  17. data/lib/deeprails/models/monitor_event_response.rb +1 -9
  18. data/lib/deeprails/models/monitor_retrieve_params.rb +6 -2
  19. data/lib/deeprails/models/monitor_update_params.rb +11 -11
  20. data/lib/deeprails/models/monitor_update_response.rb +51 -0
  21. data/lib/deeprails/models/workflow_event_detail_response.rb +314 -0
  22. data/lib/deeprails/models/workflow_event_response.rb +29 -30
  23. data/lib/deeprails/models.rb +12 -2
  24. data/lib/deeprails/resources/defend.rb +20 -13
  25. data/lib/deeprails/resources/files.rb +1 -1
  26. data/lib/deeprails/resources/monitor.rb +11 -8
  27. data/lib/deeprails/version.rb +1 -1
  28. data/lib/deeprails.rb +7 -1
  29. data/manifest.yaml +1 -0
  30. data/rbi/deeprails/internal/transport/base_client.rbi +5 -0
  31. data/rbi/deeprails/internal/transport/pooled_net_requester.rbi +6 -2
  32. data/rbi/deeprails/internal/type/base_model.rbi +8 -4
  33. data/rbi/deeprails/models/defend_create_response.rbi +83 -0
  34. data/rbi/deeprails/models/defend_create_workflow_params.rbi +33 -27
  35. data/rbi/deeprails/models/defend_response.rbi +555 -72
  36. data/rbi/deeprails/models/defend_retrieve_workflow_params.rbi +23 -5
  37. data/rbi/deeprails/models/defend_update_response.rbi +83 -0
  38. data/rbi/deeprails/models/file_response.rbi +11 -39
  39. data/rbi/deeprails/models/file_upload_params.rbi +3 -6
  40. data/rbi/deeprails/models/monitor_create_response.rbi +83 -0
  41. data/rbi/deeprails/models/monitor_detail_response.rbi +144 -104
  42. data/rbi/deeprails/models/monitor_event_detail_response.rbi +383 -0
  43. data/rbi/deeprails/models/monitor_event_response.rbi +4 -18
  44. data/rbi/deeprails/models/monitor_retrieve_params.rbi +4 -2
  45. data/rbi/deeprails/models/monitor_update_params.rbi +21 -38
  46. data/rbi/deeprails/models/monitor_update_response.rbi +83 -0
  47. data/rbi/deeprails/models/workflow_event_detail_response.rbi +685 -0
  48. data/rbi/deeprails/models/workflow_event_response.rbi +49 -42
  49. data/rbi/deeprails/models.rbi +12 -2
  50. data/rbi/deeprails/resources/defend.rbi +17 -12
  51. data/rbi/deeprails/resources/files.rbi +1 -1
  52. data/rbi/deeprails/resources/monitor.rbi +8 -8
  53. data/sig/deeprails/internal/transport/base_client.rbs +2 -0
  54. data/sig/deeprails/internal/transport/pooled_net_requester.rbs +4 -1
  55. data/sig/deeprails/models/defend_create_response.rbs +41 -0
  56. data/sig/deeprails/models/defend_create_workflow_params.rbs +7 -7
  57. data/sig/deeprails/models/defend_response.rbs +297 -28
  58. data/sig/deeprails/models/defend_retrieve_workflow_params.rbs +13 -3
  59. data/sig/deeprails/models/defend_update_response.rbs +41 -0
  60. data/sig/deeprails/models/file_response.rbs +5 -27
  61. data/sig/deeprails/models/file_upload_params.rbs +4 -5
  62. data/sig/deeprails/models/monitor_create_response.rbs +41 -0
  63. data/sig/deeprails/models/monitor_detail_response.rbs +72 -61
  64. data/sig/deeprails/models/monitor_event_detail_response.rbs +181 -0
  65. data/sig/deeprails/models/monitor_event_response.rbs +2 -15
  66. data/sig/deeprails/models/monitor_update_params.rbs +13 -13
  67. data/sig/deeprails/models/monitor_update_response.rbs +41 -0
  68. data/sig/deeprails/models/workflow_event_detail_response.rbs +315 -0
  69. data/sig/deeprails/models/workflow_event_response.rbs +24 -24
  70. data/sig/deeprails/models.rbs +12 -2
  71. data/sig/deeprails/resources/defend.rbs +5 -4
  72. data/sig/deeprails/resources/files.rbs +1 -1
  73. data/sig/deeprails/resources/monitor.rbs +3 -3
  74. metadata +20 -5
  75. data/lib/deeprails/models/monitor_response.rb +0 -83
  76. data/rbi/deeprails/models/monitor_response.rbi +0 -142
  77. data/sig/deeprails/models/monitor_response.rbs +0 -73
@@ -0,0 +1,383 @@
1
+ # typed: strong
2
+
3
+ module Deeprails
4
+ module Models
5
+ class MonitorEventDetailResponse < Deeprails::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Deeprails::MonitorEventDetailResponse,
10
+ Deeprails::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The capabilities associated with the monitor event.
15
+ sig do
16
+ returns(
17
+ T.nilable(T::Array[Deeprails::MonitorEventDetailResponse::Capability])
18
+ )
19
+ end
20
+ attr_reader :capabilities
21
+
22
+ sig do
23
+ params(
24
+ capabilities:
25
+ T::Array[Deeprails::MonitorEventDetailResponse::Capability::OrHash]
26
+ ).void
27
+ end
28
+ attr_writer :capabilities
29
+
30
+ # The time spent on the evaluation in seconds.
31
+ sig { returns(T.nilable(String)) }
32
+ attr_reader :eval_time
33
+
34
+ sig { params(eval_time: String).void }
35
+ attr_writer :eval_time
36
+
37
+ # The result of the evaluation of the monitor event.
38
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
39
+ attr_reader :evaluation_result
40
+
41
+ sig { params(evaluation_result: T::Hash[Symbol, T.anything]).void }
42
+ attr_writer :evaluation_result
43
+
44
+ # A unique monitor event ID.
45
+ sig { returns(T.nilable(String)) }
46
+ attr_reader :event_id
47
+
48
+ sig { params(event_id: String).void }
49
+ attr_writer :event_id
50
+
51
+ # The files associated with the monitor event.
52
+ sig do
53
+ returns(
54
+ T.nilable(T::Array[Deeprails::MonitorEventDetailResponse::File])
55
+ )
56
+ end
57
+ attr_reader :files
58
+
59
+ sig do
60
+ params(
61
+ files: T::Array[Deeprails::MonitorEventDetailResponse::File::OrHash]
62
+ ).void
63
+ end
64
+ attr_writer :files
65
+
66
+ # The guardrail metrics evaluated by the monitor event.
67
+ sig { returns(T.nilable(T::Array[String])) }
68
+ attr_reader :guardrail_metrics
69
+
70
+ sig { params(guardrail_metrics: T::Array[String]).void }
71
+ attr_writer :guardrail_metrics
72
+
73
+ # The model input used to create the monitor event.
74
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
75
+ attr_reader :model_input
76
+
77
+ sig { params(model_input: T::Hash[Symbol, T.anything]).void }
78
+ attr_writer :model_input
79
+
80
+ # The output evaluated by the monitor event.
81
+ sig { returns(T.nilable(String)) }
82
+ attr_reader :model_output
83
+
84
+ sig { params(model_output: String).void }
85
+ attr_writer :model_output
86
+
87
+ # Monitor ID associated with this event.
88
+ sig { returns(T.nilable(String)) }
89
+ attr_reader :monitor_id
90
+
91
+ sig { params(monitor_id: String).void }
92
+ attr_writer :monitor_id
93
+
94
+ # A human-readable tag for the monitor event.
95
+ sig { returns(T.nilable(String)) }
96
+ attr_reader :nametag
97
+
98
+ sig { params(nametag: String).void }
99
+ attr_writer :nametag
100
+
101
+ # The run mode used to evaluate the monitor event.
102
+ sig do
103
+ returns(
104
+ T.nilable(Deeprails::MonitorEventDetailResponse::RunMode::OrSymbol)
105
+ )
106
+ end
107
+ attr_reader :run_mode
108
+
109
+ sig do
110
+ params(
111
+ run_mode: Deeprails::MonitorEventDetailResponse::RunMode::OrSymbol
112
+ ).void
113
+ end
114
+ attr_writer :run_mode
115
+
116
+ # Status of the monitor event's evaluation.
117
+ sig do
118
+ returns(
119
+ T.nilable(Deeprails::MonitorEventDetailResponse::Status::OrSymbol)
120
+ )
121
+ end
122
+ attr_reader :status
123
+
124
+ sig do
125
+ params(
126
+ status: Deeprails::MonitorEventDetailResponse::Status::OrSymbol
127
+ ).void
128
+ end
129
+ attr_writer :status
130
+
131
+ # The time the monitor event was created in UTC.
132
+ sig { returns(T.nilable(Time)) }
133
+ attr_reader :timestamp
134
+
135
+ sig { params(timestamp: Time).void }
136
+ attr_writer :timestamp
137
+
138
+ sig do
139
+ params(
140
+ capabilities:
141
+ T::Array[Deeprails::MonitorEventDetailResponse::Capability::OrHash],
142
+ eval_time: String,
143
+ evaluation_result: T::Hash[Symbol, T.anything],
144
+ event_id: String,
145
+ files: T::Array[Deeprails::MonitorEventDetailResponse::File::OrHash],
146
+ guardrail_metrics: T::Array[String],
147
+ model_input: T::Hash[Symbol, T.anything],
148
+ model_output: String,
149
+ monitor_id: String,
150
+ nametag: String,
151
+ run_mode: Deeprails::MonitorEventDetailResponse::RunMode::OrSymbol,
152
+ status: Deeprails::MonitorEventDetailResponse::Status::OrSymbol,
153
+ timestamp: Time
154
+ ).returns(T.attached_class)
155
+ end
156
+ def self.new(
157
+ # The capabilities associated with the monitor event.
158
+ capabilities: nil,
159
+ # The time spent on the evaluation in seconds.
160
+ eval_time: nil,
161
+ # The result of the evaluation of the monitor event.
162
+ evaluation_result: nil,
163
+ # A unique monitor event ID.
164
+ event_id: nil,
165
+ # The files associated with the monitor event.
166
+ files: nil,
167
+ # The guardrail metrics evaluated by the monitor event.
168
+ guardrail_metrics: nil,
169
+ # The model input used to create the monitor event.
170
+ model_input: nil,
171
+ # The output evaluated by the monitor event.
172
+ model_output: nil,
173
+ # Monitor ID associated with this event.
174
+ monitor_id: nil,
175
+ # A human-readable tag for the monitor event.
176
+ nametag: nil,
177
+ # The run mode used to evaluate the monitor event.
178
+ run_mode: nil,
179
+ # Status of the monitor event's evaluation.
180
+ status: nil,
181
+ # The time the monitor event was created in UTC.
182
+ timestamp: nil
183
+ )
184
+ end
185
+
186
+ sig do
187
+ override.returns(
188
+ {
189
+ capabilities:
190
+ T::Array[Deeprails::MonitorEventDetailResponse::Capability],
191
+ eval_time: String,
192
+ evaluation_result: T::Hash[Symbol, T.anything],
193
+ event_id: String,
194
+ files: T::Array[Deeprails::MonitorEventDetailResponse::File],
195
+ guardrail_metrics: T::Array[String],
196
+ model_input: T::Hash[Symbol, T.anything],
197
+ model_output: String,
198
+ monitor_id: String,
199
+ nametag: String,
200
+ run_mode: Deeprails::MonitorEventDetailResponse::RunMode::OrSymbol,
201
+ status: Deeprails::MonitorEventDetailResponse::Status::OrSymbol,
202
+ timestamp: Time
203
+ }
204
+ )
205
+ end
206
+ def to_hash
207
+ end
208
+
209
+ class Capability < Deeprails::Internal::Type::BaseModel
210
+ OrHash =
211
+ T.type_alias do
212
+ T.any(
213
+ Deeprails::MonitorEventDetailResponse::Capability,
214
+ Deeprails::Internal::AnyHash
215
+ )
216
+ end
217
+
218
+ # The type of capability.
219
+ sig { returns(T.nilable(String)) }
220
+ attr_reader :capability
221
+
222
+ sig { params(capability: String).void }
223
+ attr_writer :capability
224
+
225
+ sig { params(capability: String).returns(T.attached_class) }
226
+ def self.new(
227
+ # The type of capability.
228
+ capability: nil
229
+ )
230
+ end
231
+
232
+ sig { override.returns({ capability: String }) }
233
+ def to_hash
234
+ end
235
+ end
236
+
237
+ class File < Deeprails::Internal::Type::BaseModel
238
+ OrHash =
239
+ T.type_alias do
240
+ T.any(
241
+ Deeprails::MonitorEventDetailResponse::File,
242
+ Deeprails::Internal::AnyHash
243
+ )
244
+ end
245
+
246
+ # The ID of the file.
247
+ sig { returns(T.nilable(String)) }
248
+ attr_reader :file_id
249
+
250
+ sig { params(file_id: String).void }
251
+ attr_writer :file_id
252
+
253
+ # The name of the file.
254
+ sig { returns(T.nilable(String)) }
255
+ attr_reader :file_name
256
+
257
+ sig { params(file_name: String).void }
258
+ attr_writer :file_name
259
+
260
+ # The size of the file in bytes.
261
+ sig { returns(T.nilable(Integer)) }
262
+ attr_reader :file_size
263
+
264
+ sig { params(file_size: Integer).void }
265
+ attr_writer :file_size
266
+
267
+ sig do
268
+ params(
269
+ file_id: String,
270
+ file_name: String,
271
+ file_size: Integer
272
+ ).returns(T.attached_class)
273
+ end
274
+ def self.new(
275
+ # The ID of the file.
276
+ file_id: nil,
277
+ # The name of the file.
278
+ file_name: nil,
279
+ # The size of the file in bytes.
280
+ file_size: nil
281
+ )
282
+ end
283
+
284
+ sig do
285
+ override.returns(
286
+ { file_id: String, file_name: String, file_size: Integer }
287
+ )
288
+ end
289
+ def to_hash
290
+ end
291
+ end
292
+
293
+ # The run mode used to evaluate the monitor event.
294
+ module RunMode
295
+ extend Deeprails::Internal::Type::Enum
296
+
297
+ TaggedSymbol =
298
+ T.type_alias do
299
+ T.all(Symbol, Deeprails::MonitorEventDetailResponse::RunMode)
300
+ end
301
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
302
+
303
+ PRECISION_PLUS =
304
+ T.let(
305
+ :precision_plus,
306
+ Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol
307
+ )
308
+ PRECISION =
309
+ T.let(
310
+ :precision,
311
+ Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol
312
+ )
313
+ SMART =
314
+ T.let(
315
+ :smart,
316
+ Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol
317
+ )
318
+ ECONOMY =
319
+ T.let(
320
+ :economy,
321
+ Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol
322
+ )
323
+
324
+ sig do
325
+ override.returns(
326
+ T::Array[
327
+ Deeprails::MonitorEventDetailResponse::RunMode::TaggedSymbol
328
+ ]
329
+ )
330
+ end
331
+ def self.values
332
+ end
333
+ end
334
+
335
+ # Status of the monitor event's evaluation.
336
+ module Status
337
+ extend Deeprails::Internal::Type::Enum
338
+
339
+ TaggedSymbol =
340
+ T.type_alias do
341
+ T.all(Symbol, Deeprails::MonitorEventDetailResponse::Status)
342
+ end
343
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
344
+
345
+ IN_PROGRESS =
346
+ T.let(
347
+ :in_progress,
348
+ Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol
349
+ )
350
+ COMPLETED =
351
+ T.let(
352
+ :completed,
353
+ Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol
354
+ )
355
+ CANCELED =
356
+ T.let(
357
+ :canceled,
358
+ Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol
359
+ )
360
+ QUEUED =
361
+ T.let(
362
+ :queued,
363
+ Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol
364
+ )
365
+ FAILED =
366
+ T.let(
367
+ :failed,
368
+ Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol
369
+ )
370
+
371
+ sig do
372
+ override.returns(
373
+ T::Array[
374
+ Deeprails::MonitorEventDetailResponse::Status::TaggedSymbol
375
+ ]
376
+ )
377
+ end
378
+ def self.values
379
+ end
380
+ end
381
+ end
382
+ end
383
+ end
@@ -8,10 +8,6 @@ module Deeprails
8
8
  T.any(Deeprails::MonitorEventResponse, Deeprails::Internal::AnyHash)
9
9
  end
10
10
 
11
- # A unique evaluation ID associated with this event.
12
- sig { returns(String) }
13
- attr_accessor :evaluation_id
14
-
15
11
  # A unique monitor event ID.
16
12
  sig { returns(String) }
17
13
  attr_accessor :event_id
@@ -28,16 +24,11 @@ module Deeprails
28
24
  attr_writer :created_at
29
25
 
30
26
  sig do
31
- params(
32
- evaluation_id: String,
33
- event_id: String,
34
- monitor_id: String,
35
- created_at: Time
36
- ).returns(T.attached_class)
27
+ params(event_id: String, monitor_id: String, created_at: Time).returns(
28
+ T.attached_class
29
+ )
37
30
  end
38
31
  def self.new(
39
- # A unique evaluation ID associated with this event.
40
- evaluation_id:,
41
32
  # A unique monitor event ID.
42
33
  event_id:,
43
34
  # Monitor ID associated with this event.
@@ -49,12 +40,7 @@ module Deeprails
49
40
 
50
41
  sig do
51
42
  override.returns(
52
- {
53
- evaluation_id: String,
54
- event_id: String,
55
- monitor_id: String,
56
- created_at: Time
57
- }
43
+ { event_id: String, monitor_id: String, created_at: Time }
58
44
  )
59
45
  end
60
46
  def to_hash
@@ -11,7 +11,8 @@ module Deeprails
11
11
  T.any(Deeprails::MonitorRetrieveParams, Deeprails::Internal::AnyHash)
12
12
  end
13
13
 
14
- # Limit the returned events associated with this monitor. Defaults to 10.
14
+ # Limit the number of returned evaluations associated with this monitor. Defaults
15
+ # to 10.
15
16
  sig { returns(T.nilable(Integer)) }
16
17
  attr_reader :limit
17
18
 
@@ -25,7 +26,8 @@ module Deeprails
25
26
  ).returns(T.attached_class)
26
27
  end
27
28
  def self.new(
28
- # Limit the returned events associated with this monitor. Defaults to 10.
29
+ # Limit the number of returned evaluations associated with this monitor. Defaults
30
+ # to 10.
29
31
  limit: nil,
30
32
  request_options: {}
31
33
  )
@@ -18,47 +18,41 @@ module Deeprails
18
18
  sig { params(description: String).void }
19
19
  attr_writer :description
20
20
 
21
+ # Name of the monitor.
22
+ sig { returns(T.nilable(String)) }
23
+ attr_reader :name
24
+
25
+ sig { params(name: String).void }
26
+ attr_writer :name
27
+
21
28
  # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
22
29
  # longer record and evaluate events.
23
30
  sig do
24
- returns(
25
- T.nilable(Deeprails::MonitorUpdateParams::MonitorStatus::OrSymbol)
26
- )
31
+ returns(T.nilable(Deeprails::MonitorUpdateParams::Status::OrSymbol))
27
32
  end
28
- attr_reader :monitor_status
33
+ attr_reader :status
29
34
 
30
35
  sig do
31
- params(
32
- monitor_status:
33
- Deeprails::MonitorUpdateParams::MonitorStatus::OrSymbol
34
- ).void
36
+ params(status: Deeprails::MonitorUpdateParams::Status::OrSymbol).void
35
37
  end
36
- attr_writer :monitor_status
37
-
38
- # Name of the monitor.
39
- sig { returns(T.nilable(String)) }
40
- attr_reader :name
41
-
42
- sig { params(name: String).void }
43
- attr_writer :name
38
+ attr_writer :status
44
39
 
45
40
  sig do
46
41
  params(
47
42
  description: String,
48
- monitor_status:
49
- Deeprails::MonitorUpdateParams::MonitorStatus::OrSymbol,
50
43
  name: String,
44
+ status: Deeprails::MonitorUpdateParams::Status::OrSymbol,
51
45
  request_options: Deeprails::RequestOptions::OrHash
52
46
  ).returns(T.attached_class)
53
47
  end
54
48
  def self.new(
55
49
  # Description of the monitor.
56
50
  description: nil,
57
- # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
58
- # longer record and evaluate events.
59
- monitor_status: nil,
60
51
  # Name of the monitor.
61
52
  name: nil,
53
+ # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
54
+ # longer record and evaluate events.
55
+ status: nil,
62
56
  request_options: {}
63
57
  )
64
58
  end
@@ -67,9 +61,8 @@ module Deeprails
67
61
  override.returns(
68
62
  {
69
63
  description: String,
70
- monitor_status:
71
- Deeprails::MonitorUpdateParams::MonitorStatus::OrSymbol,
72
64
  name: String,
65
+ status: Deeprails::MonitorUpdateParams::Status::OrSymbol,
73
66
  request_options: Deeprails::RequestOptions
74
67
  }
75
68
  )
@@ -79,31 +72,21 @@ module Deeprails
79
72
 
80
73
  # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
81
74
  # longer record and evaluate events.
82
- module MonitorStatus
75
+ module Status
83
76
  extend Deeprails::Internal::Type::Enum
84
77
 
85
78
  TaggedSymbol =
86
- T.type_alias do
87
- T.all(Symbol, Deeprails::MonitorUpdateParams::MonitorStatus)
88
- end
79
+ T.type_alias { T.all(Symbol, Deeprails::MonitorUpdateParams::Status) }
89
80
  OrSymbol = T.type_alias { T.any(Symbol, String) }
90
81
 
91
82
  ACTIVE =
92
- T.let(
93
- :active,
94
- Deeprails::MonitorUpdateParams::MonitorStatus::TaggedSymbol
95
- )
83
+ T.let(:active, Deeprails::MonitorUpdateParams::Status::TaggedSymbol)
96
84
  INACTIVE =
97
- T.let(
98
- :inactive,
99
- Deeprails::MonitorUpdateParams::MonitorStatus::TaggedSymbol
100
- )
85
+ T.let(:inactive, Deeprails::MonitorUpdateParams::Status::TaggedSymbol)
101
86
 
102
87
  sig do
103
88
  override.returns(
104
- T::Array[
105
- Deeprails::MonitorUpdateParams::MonitorStatus::TaggedSymbol
106
- ]
89
+ T::Array[Deeprails::MonitorUpdateParams::Status::TaggedSymbol]
107
90
  )
108
91
  end
109
92
  def self.values
@@ -0,0 +1,83 @@
1
+ # typed: strong
2
+
3
+ module Deeprails
4
+ module Models
5
+ class MonitorUpdateResponse < Deeprails::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Deeprails::MonitorUpdateResponse, Deeprails::Internal::AnyHash)
9
+ end
10
+
11
+ # The time the monitor was last modified in UTC.
12
+ sig { returns(Time) }
13
+ attr_accessor :modified_at
14
+
15
+ # A unique monitor ID.
16
+ sig { returns(String) }
17
+ attr_accessor :monitor_id
18
+
19
+ # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
20
+ # longer record and evaluate events.
21
+ sig { returns(Deeprails::MonitorUpdateResponse::Status::TaggedSymbol) }
22
+ attr_accessor :status
23
+
24
+ sig do
25
+ params(
26
+ modified_at: Time,
27
+ monitor_id: String,
28
+ status: Deeprails::MonitorUpdateResponse::Status::OrSymbol
29
+ ).returns(T.attached_class)
30
+ end
31
+ def self.new(
32
+ # The time the monitor was last modified in UTC.
33
+ modified_at:,
34
+ # A unique monitor ID.
35
+ monitor_id:,
36
+ # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
37
+ # longer record and evaluate events.
38
+ status:
39
+ )
40
+ end
41
+
42
+ sig do
43
+ override.returns(
44
+ {
45
+ modified_at: Time,
46
+ monitor_id: String,
47
+ status: Deeprails::MonitorUpdateResponse::Status::TaggedSymbol
48
+ }
49
+ )
50
+ end
51
+ def to_hash
52
+ end
53
+
54
+ # Status of the monitor. Can be `active` or `inactive`. Inactive monitors no
55
+ # longer record and evaluate events.
56
+ module Status
57
+ extend Deeprails::Internal::Type::Enum
58
+
59
+ TaggedSymbol =
60
+ T.type_alias do
61
+ T.all(Symbol, Deeprails::MonitorUpdateResponse::Status)
62
+ end
63
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
64
+
65
+ ACTIVE =
66
+ T.let(:active, Deeprails::MonitorUpdateResponse::Status::TaggedSymbol)
67
+ INACTIVE =
68
+ T.let(
69
+ :inactive,
70
+ Deeprails::MonitorUpdateResponse::Status::TaggedSymbol
71
+ )
72
+
73
+ sig do
74
+ override.returns(
75
+ T::Array[Deeprails::MonitorUpdateResponse::Status::TaggedSymbol]
76
+ )
77
+ end
78
+ def self.values
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end