mimic-browser 0.1.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.
@@ -0,0 +1,878 @@
1
+ # Generated by generator/generate.py; DO NOT EDIT.
2
+ # Schema SHA-256: ea792e2f194bf831f5494bedd65a7112881e45695b3af3d504367c317684e7a6
3
+
4
+ module MimicSDK
5
+ module Generated
6
+ SCHEMA_SHA256 = "ea792e2f194bf831f5494bedd65a7112881e45695b3af3d504367c317684e7a6"
7
+
8
+ UNSET = Object.new.freeze
9
+ def self.to_wire(value)
10
+ case value
11
+ when Model then value.to_wire
12
+ when Hash then value.each_with_object({}) { |(key, child), result| result[key] = to_wire(child) unless child.equal?(UNSET) }
13
+ when Array then value.map { |child| raise ArgumentError, 'UNSET in array' if child.equal?(UNSET); to_wire(child) }
14
+ else value
15
+ end
16
+ end
17
+ class Model
18
+ def self.from_wire(value)
19
+ raise ArgumentError, 'Expected object' unless value.is_a?(Hash)
20
+ options = {}
21
+ self::FIELDS.each do |name, wire|
22
+ next unless value.key?(wire)
23
+ options[name] = Generated.decode(self::TYPES[name], value[wire])
24
+ end
25
+ new(**options)
26
+ end
27
+ def initialize(**options)
28
+ unknown = options.keys - self.class::FIELDS.keys
29
+ raise ArgumentError, "Unknown fields: #{unknown}" unless unknown.empty?
30
+ self.class::FIELDS.each { |name, _wire| instance_variable_set("@#{name}", options.fetch(name, UNSET)) }
31
+ end
32
+ def to_wire
33
+ self.class::FIELDS.each_with_object({}) do |(name, wire), result|
34
+ value = instance_variable_get("@#{name}")
35
+ raise ArgumentError, "Missing required field: #{name}" if value.equal?(UNSET) && self.class::REQUIRED.include?(name)
36
+ result[wire] = Generated.to_wire(value) unless value.equal?(UNSET)
37
+ end
38
+ end
39
+ end
40
+ def self.decode(type, value)
41
+ return nil if value.nil?
42
+ if type.is_a?(Array)
43
+ return value.map { |child| decode(type[1], child) } if type[0] == :array
44
+ return value.transform_values { |child| decode(type[1], child) } if type[0] == :map
45
+ end
46
+ return const_get(type).from_wire(value) if type.is_a?(String) && const_defined?(type) && const_get(type).is_a?(Class) && const_get(type) < Model
47
+ value
48
+ end
49
+
50
+ class CameraFormat < Model
51
+ FIELDS = {width: "width", height: "height", frame_rate: "frameRate"}.freeze
52
+ TYPES = {width: nil, height: nil, frame_rate: nil}.freeze
53
+ REQUIRED = [:width, :height, :frame_rate].freeze
54
+ attr_accessor(*FIELDS.keys)
55
+ end
56
+ class CancelExecutionParams < Model
57
+ FIELDS = {}.freeze
58
+ TYPES = {}.freeze
59
+ REQUIRED = [].freeze
60
+ attr_accessor(*FIELDS.keys)
61
+ end
62
+ class CancelExecutionResult < Model
63
+ FIELDS = {cancelled: "cancelled"}.freeze
64
+ TYPES = {cancelled: nil}.freeze
65
+ REQUIRED = [:cancelled].freeze
66
+ attr_accessor(*FIELDS.keys)
67
+ end
68
+ class CaptureSnapshotParams < Model
69
+ FIELDS = {interrupt: "interrupt"}.freeze
70
+ TYPES = {interrupt: nil}.freeze
71
+ REQUIRED = [].freeze
72
+ attr_accessor(*FIELDS.keys)
73
+ end
74
+ class CaptureSnapshotResult < Model
75
+ FIELDS = {url: "url", files: "files", warnings: "warnings", timings_ms: "timingsMs"}.freeze
76
+ TYPES = {url: nil, files: [:map, nil], warnings: [:array, nil], timings_ms: [:map, nil]}.freeze
77
+ REQUIRED = [:url, :files, :warnings, :timings_ms].freeze
78
+ attr_accessor(*FIELDS.keys)
79
+ end
80
+ class ClearTraceParams < Model
81
+ FIELDS = {}.freeze
82
+ TYPES = {}.freeze
83
+ REQUIRED = [].freeze
84
+ attr_accessor(*FIELDS.keys)
85
+ end
86
+ class ClearTraceResult < Model
87
+ FIELDS = {}.freeze
88
+ TYPES = {}.freeze
89
+ REQUIRED = [].freeze
90
+ attr_accessor(*FIELDS.keys)
91
+ end
92
+ class ConfigureContextParams < Model
93
+ FIELDS = {profile: "profile", proxy: "proxy", resource_policy: "resourcePolicy", media: "media", browser_context_id: "browserContextId"}.freeze
94
+ TYPES = {profile: "ProfileSelection", proxy: "Proxy", resource_policy: "ResourcePolicy", media: "MediaConfiguration", browser_context_id: nil}.freeze
95
+ REQUIRED = [:browser_context_id].freeze
96
+ attr_accessor(*FIELDS.keys)
97
+ end
98
+ class ConfigureContextResult < Model
99
+ FIELDS = {profile: "profile", profile_id: "profileId", mode: "mode", warnings: "warnings", browser_context_id: "browserContextId", media: "media"}.freeze
100
+ TYPES = {profile: nil, profile_id: nil, mode: nil, warnings: [:array, nil], browser_context_id: nil, media: "MediaProfile"}.freeze
101
+ REQUIRED = [:profile, :profile_id, :mode, :warnings, :browser_context_id].freeze
102
+ attr_accessor(*FIELDS.keys)
103
+ end
104
+ class CreateContextParams < Model
105
+ FIELDS = {profile: "profile", proxy: "proxy", resource_policy: "resourcePolicy", dispose_on_detach: "disposeOnDetach", media: "media"}.freeze
106
+ TYPES = {profile: "ProfileSelection", proxy: "Proxy", resource_policy: "ResourcePolicy", dispose_on_detach: nil, media: "MediaConfiguration"}.freeze
107
+ REQUIRED = [].freeze
108
+ attr_accessor(*FIELDS.keys)
109
+ end
110
+ class CreateContextResult < Model
111
+ FIELDS = {profile: "profile", profile_id: "profileId", mode: "mode", warnings: "warnings", browser_context_id: "browserContextId", media: "media"}.freeze
112
+ TYPES = {profile: nil, profile_id: nil, mode: nil, warnings: [:array, nil], browser_context_id: nil, media: "MediaProfile"}.freeze
113
+ REQUIRED = [:profile, :profile_id, :mode, :warnings, :browser_context_id].freeze
114
+ attr_accessor(*FIELDS.keys)
115
+ end
116
+ class DiagnosticCost < Model
117
+ FIELDS = {count: "count", ns: "ns"}.freeze
118
+ TYPES = {count: nil, ns: nil}.freeze
119
+ REQUIRED = [:count, :ns].freeze
120
+ attr_accessor(*FIELDS.keys)
121
+ end
122
+ class Diagnostics < Model
123
+ FIELDS = {enabled: "enabled", host_only: "hostOnly", costs: "costs", cpu_profiles: "cpu_profiles", realms: "realms"}.freeze
124
+ TYPES = {enabled: nil, host_only: nil, costs: [:map, "DiagnosticCost"], cpu_profiles: [:map, nil], realms: [:array, "RealmDiagnostics"]}.freeze
125
+ REQUIRED = [:enabled].freeze
126
+ attr_accessor(*FIELDS.keys)
127
+ end
128
+ class Empty < Model
129
+ FIELDS = {}.freeze
130
+ TYPES = {}.freeze
131
+ REQUIRED = [].freeze
132
+ attr_accessor(*FIELDS.keys)
133
+ end
134
+ class EnvironmentAudio < Model
135
+ FIELDS = {sample_rate: "sampleRate", channels: "channels", buffer_duration: "bufferDuration", max_buffer_frames: "maxBufferFrames"}.freeze
136
+ TYPES = {sample_rate: nil, channels: nil, buffer_duration: nil, max_buffer_frames: nil}.freeze
137
+ REQUIRED = [].freeze
138
+ attr_accessor(*FIELDS.keys)
139
+ end
140
+ class EnvironmentCapabilities < Model
141
+ FIELDS = {storage_quota_bytes: "storageQuotaBytes", devices: "devices", media: "media", keyboard_layout: "keyboardLayout"}.freeze
142
+ TYPES = {storage_quota_bytes: nil, devices: "EnvironmentDeviceCapabilities", media: "EnvironmentMediaCapabilities", keyboard_layout: [:map, nil]}.freeze
143
+ REQUIRED = [].freeze
144
+ attr_accessor(*FIELDS.keys)
145
+ end
146
+ class EnvironmentDeviceCapabilities < Model
147
+ FIELDS = {bluetooth_available: "bluetoothAvailable", posture: "posture"}.freeze
148
+ TYPES = {bluetooth_available: nil, posture: nil}.freeze
149
+ REQUIRED = [].freeze
150
+ attr_accessor(*FIELDS.keys)
151
+ end
152
+ class EnvironmentDisplay < Model
153
+ FIELDS = {width: "width", height: "height", available_width: "availableWidth", available_height: "availableHeight", device_scale_factor: "deviceScaleFactor", color_depth: "colorDepth", orientation: "orientation"}.freeze
154
+ TYPES = {width: nil, height: nil, available_width: nil, available_height: nil, device_scale_factor: nil, color_depth: nil, orientation: "EnvironmentScreenOrientation"}.freeze
155
+ REQUIRED = [].freeze
156
+ attr_accessor(*FIELDS.keys)
157
+ end
158
+ class EnvironmentFonts < Model
159
+ FIELDS = {serif: "serif", sans_serif: "sansSerif", monospace: "monospace", system_u_i: "systemUI", system: "system", fallback: "fallback"}.freeze
160
+ TYPES = {serif: nil, sans_serif: nil, monospace: nil, system_u_i: nil, system: [:map, nil], fallback: [:array, nil]}.freeze
161
+ REQUIRED = [].freeze
162
+ attr_accessor(*FIELDS.keys)
163
+ end
164
+ class EnvironmentGPUAdapter < Model
165
+ FIELDS = {vendor: "vendor", architecture: "architecture", device: "device", description: "description", subgroup_min_size: "subgroupMinSize", subgroup_max_size: "subgroupMaxSize", is_fallback_adapter: "isFallbackAdapter", features: "features", limits: "limits", wgsl_language_features: "wgslLanguageFeatures", initialization_delay_millis: "initializationDelayMillis"}.freeze
166
+ TYPES = {vendor: nil, architecture: nil, device: nil, description: nil, subgroup_min_size: nil, subgroup_max_size: nil, is_fallback_adapter: nil, features: [:array, nil], limits: [:map, nil], wgsl_language_features: [:array, nil], initialization_delay_millis: nil}.freeze
167
+ REQUIRED = [].freeze
168
+ attr_accessor(*FIELDS.keys)
169
+ end
170
+ class EnvironmentGraphics < Model
171
+ FIELDS = {vendor: "vendor", renderer: "renderer", max_texture_size: "maxTextureSize", web_g_l_capabilities_j_s_o_n: "webGLCapabilitiesJSON", web_g_p_u: "webGPU", web_g_p_u_adapters: "webGPUAdapters"}.freeze
172
+ TYPES = {vendor: nil, renderer: nil, max_texture_size: nil, web_g_l_capabilities_j_s_o_n: nil, web_g_p_u: "EnvironmentGPUAdapter", web_g_p_u_adapters: [:map, "EnvironmentGPUAdapter"]}.freeze
173
+ REQUIRED = [].freeze
174
+ attr_accessor(*FIELDS.keys)
175
+ end
176
+ class EnvironmentHardware < Model
177
+ FIELDS = {cpu_performance: "cpuPerformance", cpu_performance_known: "cpuPerformanceKnown", logical_processors: "logicalProcessors", device_memory_g_b: "deviceMemoryGB"}.freeze
178
+ TYPES = {cpu_performance: nil, cpu_performance_known: nil, logical_processors: nil, device_memory_g_b: nil}.freeze
179
+ REQUIRED = [].freeze
180
+ attr_accessor(*FIELDS.keys)
181
+ end
182
+ class EnvironmentICEProfile < Model
183
+ FIELDS = {host_candidate_count: "hostCandidateCount", reflexive_candidate_count: "reflexiveCandidateCount", port_offsets: "portOffsets", reflexive_port_offsets: "reflexivePortOffsets", public_address: "publicAddress", network_cost: "networkCost", host_delay_millis: "hostDelayMillis", reflexive_delay_millis: "reflexiveDelayMillis", end_delay_millis: "endDelayMillis"}.freeze
184
+ TYPES = {host_candidate_count: nil, reflexive_candidate_count: nil, port_offsets: [:array, nil], reflexive_port_offsets: [:array, nil], public_address: nil, network_cost: nil, host_delay_millis: nil, reflexive_delay_millis: nil, end_delay_millis: nil}.freeze
185
+ REQUIRED = [].freeze
186
+ attr_accessor(*FIELDS.keys)
187
+ end
188
+ class EnvironmentIdentity < Model
189
+ FIELDS = {user_agent: "userAgent", platform: "platform", metadata: "metadata"}.freeze
190
+ TYPES = {user_agent: nil, platform: nil, metadata: "EnvironmentUserAgentMetadata"}.freeze
191
+ REQUIRED = [].freeze
192
+ attr_accessor(*FIELDS.keys)
193
+ end
194
+ class EnvironmentLocale < Model
195
+ FIELDS = {reduce_accept_language: "reduceAcceptLanguage", languages: "languages", intl_locale: "intlLocale", timezone: "timezone"}.freeze
196
+ TYPES = {reduce_accept_language: nil, languages: [:array, nil], intl_locale: nil, timezone: nil}.freeze
197
+ REQUIRED = [].freeze
198
+ attr_accessor(*FIELDS.keys)
199
+ end
200
+ class EnvironmentMediaCapabilities < Model
201
+ FIELDS = {rtp: "rtp", formats: "formats", kinds: "kinds", supported_constraints: "supportedConstraints"}.freeze
202
+ TYPES = {rtp: [:map, "EnvironmentRTPMediaCatalog"], formats: "EnvironmentMediaFormatCatalog", kinds: [:array, nil], supported_constraints: [:array, nil]}.freeze
203
+ REQUIRED = [].freeze
204
+ attr_accessor(*FIELDS.keys)
205
+ end
206
+ class EnvironmentMediaContainerPolicy < Model
207
+ FIELDS = {codecs: "codecs", default_codec: "defaultCodec", media_source: "mediaSource"}.freeze
208
+ TYPES = {codecs: [:array, nil], default_codec: nil, media_source: nil}.freeze
209
+ REQUIRED = [].freeze
210
+ attr_accessor(*FIELDS.keys)
211
+ end
212
+ class EnvironmentMediaFormatCatalog < Model
213
+ FIELDS = {containers: "containers", efficient_video: "efficientVideo"}.freeze
214
+ TYPES = {containers: [:map, "EnvironmentMediaContainerPolicy"], efficient_video: [:array, nil]}.freeze
215
+ REQUIRED = [].freeze
216
+ attr_accessor(*FIELDS.keys)
217
+ end
218
+ class EnvironmentNetwork < Model
219
+ FIELDS = {save_data: "saveData", online: "online", effective_type: "effectiveType", downlink_mbps: "downlinkMbps", rtt_millis: "rttMillis", cookies_enabled: "cookiesEnabled", wire_profile: "wireProfile", ice: "ice", proxy: "proxy"}.freeze
220
+ TYPES = {save_data: nil, online: nil, effective_type: nil, downlink_mbps: nil, rtt_millis: nil, cookies_enabled: nil, wire_profile: nil, ice: "EnvironmentICEProfile", proxy: "EnvironmentProxy"}.freeze
221
+ REQUIRED = [].freeze
222
+ attr_accessor(*FIELDS.keys)
223
+ end
224
+ class EnvironmentPreferences < Model
225
+ FIELDS = {color_scheme: "colorScheme", system_colors: "systemColors", reduced_motion: "reducedMotion", do_not_track: "doNotTrack"}.freeze
226
+ TYPES = {color_scheme: nil, system_colors: [:map, [:map, nil]], reduced_motion: nil, do_not_track: nil}.freeze
227
+ REQUIRED = [].freeze
228
+ attr_accessor(*FIELDS.keys)
229
+ end
230
+ class EnvironmentProfile < Model
231
+ FIELDS = {schema_version: "schemaVersion", base_profile: "baseProfile", identity: "identity", display: "display", window: "window", hardware: "hardware", locale: "locale", graphics: "graphics", audio: "audio", fonts: "fonts", preferences: "preferences", network: "network", permissions: "permissions", capabilities: "capabilities", features: "features", timing: "timing"}.freeze
232
+ TYPES = {schema_version: nil, base_profile: nil, identity: "EnvironmentIdentity", display: "EnvironmentDisplay", window: "EnvironmentWindow", hardware: "EnvironmentHardware", locale: "EnvironmentLocale", graphics: "EnvironmentGraphics", audio: "EnvironmentAudio", fonts: "EnvironmentFonts", preferences: "EnvironmentPreferences", network: "EnvironmentNetwork", permissions: [:map, nil], capabilities: "EnvironmentCapabilities", features: [:map, nil], timing: "EnvironmentTiming"}.freeze
233
+ REQUIRED = [].freeze
234
+ attr_accessor(*FIELDS.keys)
235
+ end
236
+ class EnvironmentProxy < Model
237
+ FIELDS = {server: "server", username: "username", password: "password"}.freeze
238
+ TYPES = {server: nil, username: nil, password: nil}.freeze
239
+ REQUIRED = [].freeze
240
+ attr_accessor(*FIELDS.keys)
241
+ end
242
+ class EnvironmentRTPCodec < Model
243
+ FIELDS = {name: "name", clock_rate: "clockRate", channels: "channels", parameters: "parameters", sender_parameters: "senderParameters", feedback: "feedback", payload: "payload", rtx_payload: "rtxPayload", redundant: "redundant"}.freeze
244
+ TYPES = {name: nil, clock_rate: nil, channels: nil, parameters: nil, sender_parameters: nil, feedback: [:array, nil], payload: nil, rtx_payload: nil, redundant: [:array, nil]}.freeze
245
+ REQUIRED = [].freeze
246
+ attr_accessor(*FIELDS.keys)
247
+ end
248
+ class EnvironmentRTPMediaCatalog < Model
249
+ FIELDS = {codecs: "codecs", sender_order: "senderOrder", receiver_order: "receiverOrder", offer_order: "offerOrder", header_extensions: "headerExtensions", receiver_r_t_t: "receiverRTT"}.freeze
250
+ TYPES = {codecs: [:map, "EnvironmentRTPCodec"], sender_order: [:array, nil], receiver_order: [:array, nil], offer_order: [:array, nil], header_extensions: [:array, nil], receiver_r_t_t: nil}.freeze
251
+ REQUIRED = [].freeze
252
+ attr_accessor(*FIELDS.keys)
253
+ end
254
+ class EnvironmentScreenOrientation < Model
255
+ FIELDS = {type: "type", angle: "angle"}.freeze
256
+ TYPES = {type: nil, angle: nil}.freeze
257
+ REQUIRED = [].freeze
258
+ attr_accessor(*FIELDS.keys)
259
+ end
260
+ class EnvironmentTiming < Model
261
+ FIELDS = {execution_scale: "executionScale", navigation_scale: "navigationScale", network_scale: "networkScale"}.freeze
262
+ TYPES = {execution_scale: nil, navigation_scale: nil, network_scale: nil}.freeze
263
+ REQUIRED = [].freeze
264
+ attr_accessor(*FIELDS.keys)
265
+ end
266
+ class EnvironmentUserAgentBrand < Model
267
+ FIELDS = {brand: "brand", version: "version", full_version: "fullVersion"}.freeze
268
+ TYPES = {brand: nil, version: nil, full_version: nil}.freeze
269
+ REQUIRED = [].freeze
270
+ attr_accessor(*FIELDS.keys)
271
+ end
272
+ class EnvironmentUserAgentMetadata < Model
273
+ FIELDS = {brands: "brands", full_version_list: "fullVersionList", form_factors: "formFactors", full_version: "fullVersion", platform: "platform", platform_version: "platformVersion", architecture: "architecture", model: "model", bitness: "bitness", mobile: "mobile", wow64: "wow64"}.freeze
274
+ TYPES = {brands: [:array, "EnvironmentUserAgentBrand"], full_version_list: [:array, "EnvironmentUserAgentBrand"], form_factors: [:array, nil], full_version: nil, platform: nil, platform_version: nil, architecture: nil, model: nil, bitness: nil, mobile: nil, wow64: nil}.freeze
275
+ REQUIRED = [].freeze
276
+ attr_accessor(*FIELDS.keys)
277
+ end
278
+ class EnvironmentWindow < Model
279
+ FIELDS = {x: "x", y: "y", outer_width: "outerWidth", outer_height: "outerHeight", viewport_width: "viewportWidth", viewport_height: "viewportHeight"}.freeze
280
+ TYPES = {x: nil, y: nil, outer_width: nil, outer_height: nil, viewport_width: nil, viewport_height: nil}.freeze
281
+ REQUIRED = [].freeze
282
+ attr_accessor(*FIELDS.keys)
283
+ end
284
+ class ExecutionStatus < Model
285
+ FIELDS = {running: "running", task_id: "taskId", source: "source", phase: "phase", elapsed_ms: "elapsedMs"}.freeze
286
+ TYPES = {running: nil, task_id: nil, source: nil, phase: nil, elapsed_ms: nil}.freeze
287
+ REQUIRED = [:running, :task_id, :source, :phase, :elapsed_ms].freeze
288
+ attr_accessor(*FIELDS.keys)
289
+ end
290
+ class ExportProfileParams < Model
291
+ FIELDS = {profile: "profile"}.freeze
292
+ TYPES = {profile: nil}.freeze
293
+ REQUIRED = [:profile].freeze
294
+ attr_accessor(*FIELDS.keys)
295
+ end
296
+ class ExportProfileResult < Model
297
+ FIELDS = {profile: "profile", warnings: "warnings"}.freeze
298
+ TYPES = {profile: "ProfileDescriptor", warnings: [:array, nil]}.freeze
299
+ REQUIRED = [:profile, :warnings].freeze
300
+ attr_accessor(*FIELDS.keys)
301
+ end
302
+ class GenerateProfileOptions < Model
303
+ FIELDS = {browser: "browser", version: "version", platform: "platform", seed: "seed"}.freeze
304
+ TYPES = {browser: nil, version: nil, platform: nil, seed: nil}.freeze
305
+ REQUIRED = [].freeze
306
+ attr_accessor(*FIELDS.keys)
307
+ end
308
+ class GenerateProfileParams < Model
309
+ FIELDS = {browser: "browser", version: "version", platform: "platform", seed: "seed"}.freeze
310
+ TYPES = {browser: nil, version: nil, platform: nil, seed: nil}.freeze
311
+ REQUIRED = [].freeze
312
+ attr_accessor(*FIELDS.keys)
313
+ end
314
+ class GenerateProfileResult < Model
315
+ FIELDS = {profile: "profile", profile_id: "profileId", mode: "mode", warnings: "warnings"}.freeze
316
+ TYPES = {profile: nil, profile_id: nil, mode: nil, warnings: [:array, nil]}.freeze
317
+ REQUIRED = [:profile, :profile_id, :mode, :warnings].freeze
318
+ attr_accessor(*FIELDS.keys)
319
+ end
320
+ class GenerateProfileSelection < Model
321
+ FIELDS = {generate: "generate"}.freeze
322
+ TYPES = {generate: "GenerateProfileOptions"}.freeze
323
+ REQUIRED = [:generate].freeze
324
+ attr_accessor(*FIELDS.keys)
325
+ end
326
+ class GetCompatibilityMatrixParams < Model
327
+ FIELDS = {}.freeze
328
+ TYPES = {}.freeze
329
+ REQUIRED = [].freeze
330
+ attr_accessor(*FIELDS.keys)
331
+ end
332
+ class GetCompatibilityMatrixResult < Model
333
+ FIELDS = {chrome_version: "chromeVersion", protocol: "protocol", extensions: "extensions"}.freeze
334
+ TYPES = {chrome_version: nil, protocol: [:array, "ProtocolCoverage"], extensions: [:array, "ProtocolCoverage"]}.freeze
335
+ REQUIRED = [:chrome_version, :protocol, :extensions].freeze
336
+ attr_accessor(*FIELDS.keys)
337
+ end
338
+ class GetDiagnosticsParams < Model
339
+ FIELDS = {}.freeze
340
+ TYPES = {}.freeze
341
+ REQUIRED = [].freeze
342
+ attr_accessor(*FIELDS.keys)
343
+ end
344
+ class GetDiagnosticsResult < Model
345
+ FIELDS = {enabled: "enabled", host_only: "hostOnly", costs: "costs", cpu_profiles: "cpu_profiles", realms: "realms"}.freeze
346
+ TYPES = {enabled: nil, host_only: nil, costs: [:map, "DiagnosticCost"], cpu_profiles: [:map, nil], realms: [:array, "RealmDiagnostics"]}.freeze
347
+ REQUIRED = [:enabled].freeze
348
+ attr_accessor(*FIELDS.keys)
349
+ end
350
+ class GetMediaPresetsParams < Model
351
+ FIELDS = {browser_context_id: "browserContextId"}.freeze
352
+ TYPES = {browser_context_id: nil}.freeze
353
+ REQUIRED = [].freeze
354
+ attr_accessor(*FIELDS.keys)
355
+ end
356
+ class GetMediaPresetsResult < Model
357
+ FIELDS = {presets: "presets"}.freeze
358
+ TYPES = {presets: [:array, "MediaPreset"]}.freeze
359
+ REQUIRED = [:presets].freeze
360
+ attr_accessor(*FIELDS.keys)
361
+ end
362
+ class GetMediaProfileParams < Model
363
+ FIELDS = {browser_context_id: "browserContextId"}.freeze
364
+ TYPES = {browser_context_id: nil}.freeze
365
+ REQUIRED = [].freeze
366
+ attr_accessor(*FIELDS.keys)
367
+ end
368
+ class GetMediaProfileResult < Model
369
+ FIELDS = {profile: "profile", diagnostics: "diagnostics"}.freeze
370
+ TYPES = {profile: "MediaProfile", diagnostics: [:map, nil]}.freeze
371
+ REQUIRED = [:profile, :diagnostics].freeze
372
+ attr_accessor(*FIELDS.keys)
373
+ end
374
+ class GetMediaSourcesParams < Model
375
+ FIELDS = {browser_context_id: "browserContextId"}.freeze
376
+ TYPES = {browser_context_id: nil}.freeze
377
+ REQUIRED = [].freeze
378
+ attr_accessor(*FIELDS.keys)
379
+ end
380
+ class GetMediaSourcesResult < Model
381
+ FIELDS = {sources: "sources", diagnostics: "diagnostics"}.freeze
382
+ TYPES = {sources: [:array, "MediaSource"], diagnostics: [:map, nil]}.freeze
383
+ REQUIRED = [:sources, :diagnostics].freeze
384
+ attr_accessor(*FIELDS.keys)
385
+ end
386
+ class GetProfileParams < Model
387
+ FIELDS = {browser_context_id: "browserContextId", target_id: "targetId"}.freeze
388
+ TYPES = {browser_context_id: nil, target_id: nil}.freeze
389
+ REQUIRED = [].freeze
390
+ attr_accessor(*FIELDS.keys)
391
+ end
392
+ class GetProfileResult < Model
393
+ FIELDS = {profile: "profile", limitations: "limitations"}.freeze
394
+ TYPES = {profile: "EnvironmentProfile", limitations: [:array, nil]}.freeze
395
+ REQUIRED = [:profile, :limitations].freeze
396
+ attr_accessor(*FIELDS.keys)
397
+ end
398
+ class GetProfileSchemaParams < Model
399
+ FIELDS = {}.freeze
400
+ TYPES = {}.freeze
401
+ REQUIRED = [].freeze
402
+ attr_accessor(*FIELDS.keys)
403
+ end
404
+ class GetProfileSchemaResult < Model
405
+ FIELDS = {schema: "schema", base_profiles: "baseProfiles", limitations: "limitations"}.freeze
406
+ TYPES = {schema: [:map, nil], base_profiles: [:array, nil], limitations: [:array, nil]}.freeze
407
+ REQUIRED = [:schema, :base_profiles, :limitations].freeze
408
+ attr_accessor(*FIELDS.keys)
409
+ end
410
+ class GetResourcePolicyParams < Model
411
+ FIELDS = {browser_context_id: "browserContextId"}.freeze
412
+ TYPES = {browser_context_id: nil}.freeze
413
+ REQUIRED = [:browser_context_id].freeze
414
+ attr_accessor(*FIELDS.keys)
415
+ end
416
+ class GetResourcePolicyResult < Model
417
+ FIELDS = {policy: "policy", enabled: "enabled", generation: "generation"}.freeze
418
+ TYPES = {policy: "ResourcePolicy", enabled: nil, generation: nil}.freeze
419
+ REQUIRED = [:policy, :enabled, :generation].freeze
420
+ attr_accessor(*FIELDS.keys)
421
+ end
422
+ class GetResourcePolicySchemaParams < Model
423
+ FIELDS = {}.freeze
424
+ TYPES = {}.freeze
425
+ REQUIRED = [].freeze
426
+ attr_accessor(*FIELDS.keys)
427
+ end
428
+ class GetResourcePolicySchemaResult < Model
429
+ FIELDS = {schema: "schema"}.freeze
430
+ TYPES = {schema: [:map, nil]}.freeze
431
+ REQUIRED = [:schema].freeze
432
+ attr_accessor(*FIELDS.keys)
433
+ end
434
+ class GetResourcePolicyStatsParams < Model
435
+ FIELDS = {browser_context_id: "browserContextId"}.freeze
436
+ TYPES = {browser_context_id: nil}.freeze
437
+ REQUIRED = [:browser_context_id].freeze
438
+ attr_accessor(*FIELDS.keys)
439
+ end
440
+ class GetResourcePolicyStatsResult < Model
441
+ FIELDS = {stats: "stats"}.freeze
442
+ TYPES = {stats: "ResourcePolicyStats"}.freeze
443
+ REQUIRED = [:stats].freeze
444
+ attr_accessor(*FIELDS.keys)
445
+ end
446
+ class GetStatusParams < Model
447
+ FIELDS = {}.freeze
448
+ TYPES = {}.freeze
449
+ REQUIRED = [].freeze
450
+ attr_accessor(*FIELDS.keys)
451
+ end
452
+ class GetStatusResult < Model
453
+ FIELDS = {execution: "execution"}.freeze
454
+ TYPES = {execution: "ExecutionStatus"}.freeze
455
+ REQUIRED = [:execution].freeze
456
+ attr_accessor(*FIELDS.keys)
457
+ end
458
+ class GetTraceParams < Model
459
+ FIELDS = {}.freeze
460
+ TYPES = {}.freeze
461
+ REQUIRED = [].freeze
462
+ attr_accessor(*FIELDS.keys)
463
+ end
464
+ class GetTraceResult < Model
465
+ FIELDS = {events: "events", crash_reports: "crashReports"}.freeze
466
+ TYPES = {events: [:array, "TraceEvent"], crash_reports: [:map, nil]}.freeze
467
+ REQUIRED = [:events, :crash_reports].freeze
468
+ attr_accessor(*FIELDS.keys)
469
+ end
470
+ class GetVersionParams < Model
471
+ FIELDS = {}.freeze
472
+ TYPES = {}.freeze
473
+ REQUIRED = [].freeze
474
+ attr_accessor(*FIELDS.keys)
475
+ end
476
+ class GetVersionResult < Model
477
+ FIELDS = {version: "version", chrome_version: "chromeVersion", base_profile: "baseProfile"}.freeze
478
+ TYPES = {version: nil, chrome_version: nil, base_profile: nil}.freeze
479
+ REQUIRED = [:version, :chrome_version, :base_profile].freeze
480
+ attr_accessor(*FIELDS.keys)
481
+ end
482
+ class ImportProfileParams < Model
483
+ FIELDS = {profile: "profile", mode: "mode"}.freeze
484
+ TYPES = {profile: nil, mode: nil}.freeze
485
+ REQUIRED = [:profile].freeze
486
+ attr_accessor(*FIELDS.keys)
487
+ end
488
+ class ImportProfileResult < Model
489
+ FIELDS = {profile: "profile", profile_id: "profileId", mode: "mode", warnings: "warnings"}.freeze
490
+ TYPES = {profile: nil, profile_id: nil, mode: nil, warnings: [:array, nil]}.freeze
491
+ REQUIRED = [:profile, :profile_id, :mode, :warnings].freeze
492
+ attr_accessor(*FIELDS.keys)
493
+ end
494
+ class ManualNetwork < Model
495
+ FIELDS = {save_data: "saveData", online: "online", effective_type: "effectiveType", downlink_mbps: "downlinkMbps", rtt_millis: "rttMillis", cookies_enabled: "cookiesEnabled", wire_profile: "wireProfile", ice: "ice"}.freeze
496
+ TYPES = {save_data: nil, online: nil, effective_type: nil, downlink_mbps: nil, rtt_millis: nil, cookies_enabled: nil, wire_profile: nil, ice: "EnvironmentICEProfile"}.freeze
497
+ REQUIRED = [].freeze
498
+ attr_accessor(*FIELDS.keys)
499
+ end
500
+ class ManualProfile < Model
501
+ FIELDS = {identity: "identity", display: "display", window: "window", hardware: "hardware", locale: "locale", graphics: "graphics", audio: "audio", fonts: "fonts", preferences: "preferences", network: "network", permissions: "permissions", capabilities: "capabilities", features: "features", timing: "timing"}.freeze
502
+ TYPES = {identity: "EnvironmentIdentity", display: "EnvironmentDisplay", window: "EnvironmentWindow", hardware: "EnvironmentHardware", locale: "EnvironmentLocale", graphics: "EnvironmentGraphics", audio: "EnvironmentAudio", fonts: "EnvironmentFonts", preferences: "EnvironmentPreferences", network: "ManualNetwork", permissions: [:map, nil], capabilities: "EnvironmentCapabilities", features: [:map, nil], timing: "EnvironmentTiming"}.freeze
503
+ REQUIRED = [].freeze
504
+ attr_accessor(*FIELDS.keys)
505
+ end
506
+ class MediaCameraRequest < Model
507
+ FIELDS = {source: "source", profile: "profile", overrides: "overrides"}.freeze
508
+ TYPES = {source: "MediaSourceSelector", profile: nil, overrides: "MediaDeviceOverride"}.freeze
509
+ REQUIRED = [].freeze
510
+ attr_accessor(*FIELDS.keys)
511
+ end
512
+ class MediaConfiguration < Model
513
+ FIELDS = {seed: "seed", camera: "camera", microphone: "microphone", devices: "devices"}.freeze
514
+ TYPES = {seed: nil, camera: "MediaCameraRequest", microphone: "MediaMicrophoneRequest", devices: [:array, "MediaDeviceProfile"]}.freeze
515
+ REQUIRED = [].freeze
516
+ attr_accessor(*FIELDS.keys)
517
+ end
518
+ class MediaDeviceOverride < Model
519
+ FIELDS = {label: "label", modes: "modes", default_mode: "defaultMode", processing: "processing"}.freeze
520
+ TYPES = {label: nil, modes: [:array, "CameraFormat"], default_mode: "CameraFormat", processing: "MediaProcessing"}.freeze
521
+ REQUIRED = [].freeze
522
+ attr_accessor(*FIELDS.keys)
523
+ end
524
+ class MediaDeviceProfile < Model
525
+ FIELDS = {key: "key", kind: "kind", source: "source", profile: "profile", label: "label", group: "group", modes: "modes", default_mode: "defaultMode", processing: "processing"}.freeze
526
+ TYPES = {key: nil, kind: nil, source: "MediaSourceSelector", profile: nil, label: nil, group: nil, modes: [:array, "CameraFormat"], default_mode: "CameraFormat", processing: "MediaProcessing"}.freeze
527
+ REQUIRED = [:key, :kind, :source, :label].freeze
528
+ attr_accessor(*FIELDS.keys)
529
+ end
530
+ class MediaMicrophoneRequest < Model
531
+ FIELDS = {source: "source", profile: "profile"}.freeze
532
+ TYPES = {source: "MediaSourceSelector", profile: nil}.freeze
533
+ REQUIRED = [].freeze
534
+ attr_accessor(*FIELDS.keys)
535
+ end
536
+ class MediaPreset < Model
537
+ FIELDS = {id: "id", label: "label", class_: "class", variants: "variants"}.freeze
538
+ TYPES = {id: nil, label: nil, class_: nil, variants: [:array, nil]}.freeze
539
+ REQUIRED = [:id, :label, :class_, :variants].freeze
540
+ attr_accessor(*FIELDS.keys)
541
+ end
542
+ class MediaProcessing < Model
543
+ FIELDS = {resize: "resize", noise: "noise"}.freeze
544
+ TYPES = {resize: nil, noise: nil}.freeze
545
+ REQUIRED = [].freeze
546
+ attr_accessor(*FIELDS.keys)
547
+ end
548
+ class MediaProfile < Model
549
+ FIELDS = {seed: "seed", devices: "devices"}.freeze
550
+ TYPES = {seed: nil, devices: [:array, "MediaDeviceProfile"]}.freeze
551
+ REQUIRED = [:seed, :devices].freeze
552
+ attr_accessor(*FIELDS.keys)
553
+ end
554
+ class MediaSource < Model
555
+ FIELDS = {source_id: "sourceId", kind: "kind", label: "label", default: "default"}.freeze
556
+ TYPES = {source_id: nil, kind: nil, label: nil, default: nil}.freeze
557
+ REQUIRED = [:source_id, :kind, :label, :default].freeze
558
+ attr_accessor(*FIELDS.keys)
559
+ end
560
+ class PauseParams < Model
561
+ FIELDS = {}.freeze
562
+ TYPES = {}.freeze
563
+ REQUIRED = [].freeze
564
+ attr_accessor(*FIELDS.keys)
565
+ end
566
+ class PauseResult < Model
567
+ FIELDS = {}.freeze
568
+ TYPES = {}.freeze
569
+ REQUIRED = [].freeze
570
+ attr_accessor(*FIELDS.keys)
571
+ end
572
+ class ProfileDescriptor < Model
573
+ FIELDS = {mode: "mode", base_profile: "baseProfile", seed: "seed", profile_id: "profileId", environment: "environment"}.freeze
574
+ TYPES = {mode: nil, base_profile: nil, seed: nil, profile_id: nil, environment: "ManualProfile"}.freeze
575
+ REQUIRED = [:mode, :base_profile, :profile_id].freeze
576
+ attr_accessor(*FIELDS.keys)
577
+ end
578
+ class ProfileErrorData < Model
579
+ FIELDS = {path: "path", reason: "reason", message: "message"}.freeze
580
+ TYPES = {path: nil, reason: nil, message: nil}.freeze
581
+ REQUIRED = [:path, :reason, :message].freeze
582
+ attr_accessor(*FIELDS.keys)
583
+ end
584
+ class ProfilePatch < Model
585
+ FIELDS = {identity: "identity", display: "display", window: "window", hardware: "hardware", locale: "locale", graphics: "graphics", audio: "audio", fonts: "fonts", preferences: "preferences", network: "network", permissions: "permissions", capabilities: "capabilities", features: "features", timing: "timing"}.freeze
586
+ TYPES = {identity: "EnvironmentIdentity", display: "EnvironmentDisplay", window: "EnvironmentWindow", hardware: "EnvironmentHardware", locale: "EnvironmentLocale", graphics: "EnvironmentGraphics", audio: "EnvironmentAudio", fonts: "EnvironmentFonts", preferences: "EnvironmentPreferences", network: "ManualNetwork", permissions: [:map, nil], capabilities: "EnvironmentCapabilities", features: [:map, nil], timing: "EnvironmentTiming"}.freeze
587
+ REQUIRED = [].freeze
588
+ attr_accessor(*FIELDS.keys)
589
+ end
590
+ class ProtocolCoverage < Model
591
+ FIELDS = {name: "name", kind: "kind", surface_registered: "surfaceRegistered", wire_schema_generated: "wireSchemaGenerated", status: "status", notes: "notes", tests: "tests", semantics_implemented: "semanticsImplemented", semantics_verified: "semanticsVerified"}.freeze
592
+ TYPES = {name: nil, kind: nil, surface_registered: nil, wire_schema_generated: nil, status: nil, notes: nil, tests: [:array, nil], semantics_implemented: nil, semantics_verified: nil}.freeze
593
+ REQUIRED = [:name, :kind, :surface_registered, :wire_schema_generated, :status, :semantics_implemented, :semantics_verified].freeze
594
+ attr_accessor(*FIELDS.keys)
595
+ end
596
+ class ProtocolError < Model
597
+ FIELDS = {code: "code", message: "message", data: "data"}.freeze
598
+ TYPES = {code: nil, message: nil, data: nil}.freeze
599
+ REQUIRED = [:code, :message].freeze
600
+ attr_accessor(*FIELDS.keys)
601
+ end
602
+ class Proxy < Model
603
+ FIELDS = {server: "server", username: "username", password: "password"}.freeze
604
+ TYPES = {server: nil, username: nil, password: nil}.freeze
605
+ REQUIRED = [].freeze
606
+ attr_accessor(*FIELDS.keys)
607
+ end
608
+ class RealmDiagnostics < Model
609
+ FIELDS = {realm: "realm", diagnostics: "diagnostics"}.freeze
610
+ TYPES = {realm: nil, diagnostics: "Diagnostics"}.freeze
611
+ REQUIRED = [:realm, :diagnostics].freeze
612
+ attr_accessor(*FIELDS.keys)
613
+ end
614
+ class ResetProfileOverridesParams < Model
615
+ FIELDS = {target_id: "targetId"}.freeze
616
+ TYPES = {target_id: nil}.freeze
617
+ REQUIRED = [:target_id].freeze
618
+ attr_accessor(*FIELDS.keys)
619
+ end
620
+ class ResetProfileOverridesResult < Model
621
+ FIELDS = {profile: "profile"}.freeze
622
+ TYPES = {profile: "EnvironmentProfile"}.freeze
623
+ REQUIRED = [:profile].freeze
624
+ attr_accessor(*FIELDS.keys)
625
+ end
626
+ class ResourceBudgets < Model
627
+ FIELDS = {max_requests: "maxRequests", max_concurrent: "maxConcurrent", max_wire_bytes: "maxWireBytes", max_body_bytes: "maxBodyBytes", max_response_bytes: "maxResponseBytes", max_decoded_bytes: "maxDecodedBytes", max_retained_bytes: "maxRetainedBytes"}.freeze
628
+ TYPES = {max_requests: nil, max_concurrent: nil, max_wire_bytes: nil, max_body_bytes: nil, max_response_bytes: nil, max_decoded_bytes: nil, max_retained_bytes: nil}.freeze
629
+ REQUIRED = [].freeze
630
+ attr_accessor(*FIELDS.keys)
631
+ end
632
+ class ResourceMatch < Model
633
+ FIELDS = {kinds: "kinds", hosts: "hosts", origins: "origins", url_glob: "urlGlob", owners: "owners", mechanisms: "mechanisms", top_level_site: "topLevelSite"}.freeze
634
+ TYPES = {kinds: [:array, nil], hosts: [:array, nil], origins: [:array, nil], url_glob: nil, owners: [:array, nil], mechanisms: [:array, nil], top_level_site: nil}.freeze
635
+ REQUIRED = [].freeze
636
+ attr_accessor(*FIELDS.keys)
637
+ end
638
+ class ResourcePolicy < Model
639
+ FIELDS = {report_only: "reportOnly", presets: "presets", rules: "rules", budgets: "budgets"}.freeze
640
+ TYPES = {report_only: nil, presets: [:array, nil], rules: [:array, "ResourceRule"], budgets: "ResourceBudgets"}.freeze
641
+ REQUIRED = [].freeze
642
+ attr_accessor(*FIELDS.keys)
643
+ end
644
+ class ResourcePolicyStats < Model
645
+ FIELDS = {generation: "generation", requests: "requests", network_acquisitions: "networkAcquisitions", cache_hits: "cacheHits", blocked: "blocked", header_only: "headerOnly", prefixes: "prefixes", wire_bytes_known: "wireBytesKnown", encoded_network_body_bytes: "encodedNetworkBodyBytes", body_bytes_consumed: "bodyBytesConsumed", retained_body_bytes: "retainedBodyBytes", decoded_pixel_work_bytes: "decodedPixelWorkBytes", known_avoided_body_read_bytes: "knownAvoidedBodyReadBytes", unknown_avoided_body_requests: "unknownAvoidedBodyRequests", would_block: "wouldBlock", would_bypass_cache: "wouldBypassCache", budget_denied: "budgetDenied", by_rule: "byRule"}.freeze
646
+ TYPES = {generation: nil, requests: nil, network_acquisitions: nil, cache_hits: nil, blocked: nil, header_only: nil, prefixes: nil, wire_bytes_known: nil, encoded_network_body_bytes: nil, body_bytes_consumed: nil, retained_body_bytes: nil, decoded_pixel_work_bytes: nil, known_avoided_body_read_bytes: nil, unknown_avoided_body_requests: nil, would_block: nil, would_bypass_cache: nil, budget_denied: nil, by_rule: [:map, nil]}.freeze
647
+ REQUIRED = [:generation, :requests, :network_acquisitions, :cache_hits, :blocked, :header_only, :prefixes, :wire_bytes_known, :encoded_network_body_bytes, :body_bytes_consumed, :retained_body_bytes, :decoded_pixel_work_bytes, :known_avoided_body_read_bytes, :unknown_avoided_body_requests, :would_block, :would_bypass_cache, :budget_denied, :by_rule].freeze
648
+ attr_accessor(*FIELDS.keys)
649
+ end
650
+ class ResourceRule < Model
651
+ FIELDS = {id: "id", match: "match", work: "work"}.freeze
652
+ TYPES = {id: nil, match: "ResourceMatch", work: "ResourceWork"}.freeze
653
+ REQUIRED = [:id].freeze
654
+ attr_accessor(*FIELDS.keys)
655
+ end
656
+ class ResourceWork < Model
657
+ FIELDS = {cache_read: "cacheRead", network: "network", body: "body", prefix_bytes: "prefixBytes", decode: "decode", cache_retain: "cacheRetain", debug_retain: "debugRetain"}.freeze
658
+ TYPES = {cache_read: nil, network: nil, body: nil, prefix_bytes: nil, decode: nil, cache_retain: nil, debug_retain: nil}.freeze
659
+ REQUIRED = [].freeze
660
+ attr_accessor(*FIELDS.keys)
661
+ end
662
+ class ResumeParams < Model
663
+ FIELDS = {}.freeze
664
+ TYPES = {}.freeze
665
+ REQUIRED = [].freeze
666
+ attr_accessor(*FIELDS.keys)
667
+ end
668
+ class ResumeResult < Model
669
+ FIELDS = {}.freeze
670
+ TYPES = {}.freeze
671
+ REQUIRED = [].freeze
672
+ attr_accessor(*FIELDS.keys)
673
+ end
674
+ class SetMediaProfileParams < Model
675
+ FIELDS = {seed: "seed", camera: "camera", microphone: "microphone", devices: "devices", browser_context_id: "browserContextId"}.freeze
676
+ TYPES = {seed: nil, camera: "MediaCameraRequest", microphone: "MediaMicrophoneRequest", devices: [:array, "MediaDeviceProfile"], browser_context_id: nil}.freeze
677
+ REQUIRED = [].freeze
678
+ attr_accessor(*FIELDS.keys)
679
+ end
680
+ class SetMediaProfileResult < Model
681
+ FIELDS = {profile: "profile", native_modes_verified: "nativeModesVerified"}.freeze
682
+ TYPES = {profile: "MediaProfile", native_modes_verified: nil}.freeze
683
+ REQUIRED = [:profile, :native_modes_verified].freeze
684
+ attr_accessor(*FIELDS.keys)
685
+ end
686
+ class SetViewportParams < Model
687
+ FIELDS = {width: "width", height: "height"}.freeze
688
+ TYPES = {width: nil, height: nil}.freeze
689
+ REQUIRED = [:width, :height].freeze
690
+ attr_accessor(*FIELDS.keys)
691
+ end
692
+ class SetViewportResult < Model
693
+ FIELDS = {}.freeze
694
+ TYPES = {}.freeze
695
+ REQUIRED = [].freeze
696
+ attr_accessor(*FIELDS.keys)
697
+ end
698
+ class StartTraceParams < Model
699
+ FIELDS = {}.freeze
700
+ TYPES = {}.freeze
701
+ REQUIRED = [].freeze
702
+ attr_accessor(*FIELDS.keys)
703
+ end
704
+ class StartTraceResult < Model
705
+ FIELDS = {}.freeze
706
+ TYPES = {}.freeze
707
+ REQUIRED = [].freeze
708
+ attr_accessor(*FIELDS.keys)
709
+ end
710
+ class StopTraceParams < Model
711
+ FIELDS = {}.freeze
712
+ TYPES = {}.freeze
713
+ REQUIRED = [].freeze
714
+ attr_accessor(*FIELDS.keys)
715
+ end
716
+ class StopTraceResult < Model
717
+ FIELDS = {}.freeze
718
+ TYPES = {}.freeze
719
+ REQUIRED = [].freeze
720
+ attr_accessor(*FIELDS.keys)
721
+ end
722
+ class TraceEvent < Model
723
+ FIELDS = {sequence: "sequence", time: "time", kind: "kind", name: "name", data: "data"}.freeze
724
+ TYPES = {sequence: nil, time: nil, kind: nil, name: nil, data: [:map, nil]}.freeze
725
+ REQUIRED = [:sequence, :time, :kind, :name].freeze
726
+ attr_accessor(*FIELDS.keys)
727
+ end
728
+ class UpdateProfileParams < Model
729
+ FIELDS = {target_id: "targetId", patch: "patch"}.freeze
730
+ TYPES = {target_id: nil, patch: "ProfilePatch"}.freeze
731
+ REQUIRED = [:target_id, :patch].freeze
732
+ attr_accessor(*FIELDS.keys)
733
+ end
734
+ class UpdateProfileResult < Model
735
+ FIELDS = {profile: "profile"}.freeze
736
+ TYPES = {profile: "EnvironmentProfile"}.freeze
737
+ REQUIRED = [:profile].freeze
738
+ attr_accessor(*FIELDS.keys)
739
+ end
740
+ class UpdateResourcePolicyParams < Model
741
+ FIELDS = {browser_context_id: "browserContextId", policy: "policy"}.freeze
742
+ TYPES = {browser_context_id: nil, policy: "ResourcePolicy"}.freeze
743
+ REQUIRED = [:browser_context_id, :policy].freeze
744
+ attr_accessor(*FIELDS.keys)
745
+ end
746
+ class UpdateResourcePolicyResult < Model
747
+ FIELDS = {generation: "generation"}.freeze
748
+ TYPES = {generation: nil}.freeze
749
+ REQUIRED = [:generation].freeze
750
+ attr_accessor(*FIELDS.keys)
751
+ end
752
+ class ValidateMediaProfileParams < Model
753
+ FIELDS = {seed: "seed", camera: "camera", microphone: "microphone", devices: "devices", browser_context_id: "browserContextId"}.freeze
754
+ TYPES = {seed: nil, camera: "MediaCameraRequest", microphone: "MediaMicrophoneRequest", devices: [:array, "MediaDeviceProfile"], browser_context_id: nil}.freeze
755
+ REQUIRED = [].freeze
756
+ attr_accessor(*FIELDS.keys)
757
+ end
758
+ class ValidateMediaProfileResult < Model
759
+ FIELDS = {profile: "profile", native_modes_verified: "nativeModesVerified"}.freeze
760
+ TYPES = {profile: "MediaProfile", native_modes_verified: nil}.freeze
761
+ REQUIRED = [:profile, :native_modes_verified].freeze
762
+ attr_accessor(*FIELDS.keys)
763
+ end
764
+ class ValidateResourcePolicyParams < Model
765
+ FIELDS = {policy: "policy"}.freeze
766
+ TYPES = {policy: "ResourcePolicy"}.freeze
767
+ REQUIRED = [:policy].freeze
768
+ attr_accessor(*FIELDS.keys)
769
+ end
770
+ class ValidateResourcePolicyResult < Model
771
+ FIELDS = {policy: "policy"}.freeze
772
+ TYPES = {policy: "ResourcePolicy"}.freeze
773
+ REQUIRED = [:policy].freeze
774
+ attr_accessor(*FIELDS.keys)
775
+ end
776
+ class MimicCommands
777
+ def initialize(sender)
778
+ @sender = sender
779
+ end
780
+ def cancel_execution(params = {})
781
+ CancelExecutionResult.from_wire(@sender.call("Mimic.cancelExecution", Generated.to_wire(params)))
782
+ end
783
+ def capture_snapshot(params = {})
784
+ CaptureSnapshotResult.from_wire(@sender.call("Mimic.captureSnapshot", Generated.to_wire(params)))
785
+ end
786
+ def clear_trace(params = {})
787
+ ClearTraceResult.from_wire(@sender.call("Mimic.clearTrace", Generated.to_wire(params)))
788
+ end
789
+ def configure_context(params)
790
+ ConfigureContextResult.from_wire(@sender.call("Mimic.configureContext", Generated.to_wire(params)))
791
+ end
792
+ def create_context(params = {})
793
+ CreateContextResult.from_wire(@sender.call("Mimic.createContext", Generated.to_wire(params)))
794
+ end
795
+ def export_profile(params)
796
+ ExportProfileResult.from_wire(@sender.call("Mimic.exportProfile", Generated.to_wire(params)))
797
+ end
798
+ def generate_profile(params = {})
799
+ GenerateProfileResult.from_wire(@sender.call("Mimic.generateProfile", Generated.to_wire(params)))
800
+ end
801
+ def get_compatibility_matrix(params = {})
802
+ GetCompatibilityMatrixResult.from_wire(@sender.call("Mimic.getCompatibilityMatrix", Generated.to_wire(params)))
803
+ end
804
+ def get_diagnostics(params = {})
805
+ GetDiagnosticsResult.from_wire(@sender.call("Mimic.getDiagnostics", Generated.to_wire(params)))
806
+ end
807
+ def get_media_presets(params = {})
808
+ GetMediaPresetsResult.from_wire(@sender.call("Mimic.getMediaPresets", Generated.to_wire(params)))
809
+ end
810
+ def get_media_profile(params = {})
811
+ GetMediaProfileResult.from_wire(@sender.call("Mimic.getMediaProfile", Generated.to_wire(params)))
812
+ end
813
+ def get_media_sources(params = {})
814
+ GetMediaSourcesResult.from_wire(@sender.call("Mimic.getMediaSources", Generated.to_wire(params)))
815
+ end
816
+ def get_profile(params)
817
+ GetProfileResult.from_wire(@sender.call("Mimic.getProfile", Generated.to_wire(params)))
818
+ end
819
+ def get_profile_schema(params = {})
820
+ GetProfileSchemaResult.from_wire(@sender.call("Mimic.getProfileSchema", Generated.to_wire(params)))
821
+ end
822
+ def get_resource_policy(params)
823
+ GetResourcePolicyResult.from_wire(@sender.call("Mimic.getResourcePolicy", Generated.to_wire(params)))
824
+ end
825
+ def get_resource_policy_schema(params = {})
826
+ GetResourcePolicySchemaResult.from_wire(@sender.call("Mimic.getResourcePolicySchema", Generated.to_wire(params)))
827
+ end
828
+ def get_resource_policy_stats(params)
829
+ GetResourcePolicyStatsResult.from_wire(@sender.call("Mimic.getResourcePolicyStats", Generated.to_wire(params)))
830
+ end
831
+ def get_status(params = {})
832
+ GetStatusResult.from_wire(@sender.call("Mimic.getStatus", Generated.to_wire(params)))
833
+ end
834
+ def get_trace(params = {})
835
+ GetTraceResult.from_wire(@sender.call("Mimic.getTrace", Generated.to_wire(params)))
836
+ end
837
+ def get_version(params = {})
838
+ GetVersionResult.from_wire(@sender.call("Mimic.getVersion", Generated.to_wire(params)))
839
+ end
840
+ def import_profile(params)
841
+ ImportProfileResult.from_wire(@sender.call("Mimic.importProfile", Generated.to_wire(params)))
842
+ end
843
+ def pause(params = {})
844
+ PauseResult.from_wire(@sender.call("Mimic.pause", Generated.to_wire(params)))
845
+ end
846
+ def reset_profile_overrides(params)
847
+ ResetProfileOverridesResult.from_wire(@sender.call("Mimic.resetProfileOverrides", Generated.to_wire(params)))
848
+ end
849
+ def resume(params = {})
850
+ ResumeResult.from_wire(@sender.call("Mimic.resume", Generated.to_wire(params)))
851
+ end
852
+ def set_media_profile(params)
853
+ SetMediaProfileResult.from_wire(@sender.call("Mimic.setMediaProfile", Generated.to_wire(params)))
854
+ end
855
+ def set_viewport(params)
856
+ SetViewportResult.from_wire(@sender.call("Mimic.setViewport", Generated.to_wire(params)))
857
+ end
858
+ def start_trace(params = {})
859
+ StartTraceResult.from_wire(@sender.call("Mimic.startTrace", Generated.to_wire(params)))
860
+ end
861
+ def stop_trace(params = {})
862
+ StopTraceResult.from_wire(@sender.call("Mimic.stopTrace", Generated.to_wire(params)))
863
+ end
864
+ def update_profile(params)
865
+ UpdateProfileResult.from_wire(@sender.call("Mimic.updateProfile", Generated.to_wire(params)))
866
+ end
867
+ def update_resource_policy(params)
868
+ UpdateResourcePolicyResult.from_wire(@sender.call("Mimic.updateResourcePolicy", Generated.to_wire(params)))
869
+ end
870
+ def validate_media_profile(params)
871
+ ValidateMediaProfileResult.from_wire(@sender.call("Mimic.validateMediaProfile", Generated.to_wire(params)))
872
+ end
873
+ def validate_resource_policy(params)
874
+ ValidateResourcePolicyResult.from_wire(@sender.call("Mimic.validateResourcePolicy", Generated.to_wire(params)))
875
+ end
876
+ end
877
+ end
878
+ end