googleapis_tonic_google_devtools_testing_v1/vec_u8_hash_map/google.devtools.testing.v1.rs
1// This file is @generated by prost-build.
2/// A message returned from a device.
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct DeviceMessage {
5 #[prost(oneof = "device_message::Contents", tags = "1, 2, 3")]
6 pub contents: ::core::option::Option<device_message::Contents>,
7}
8/// Nested message and enum types in `DeviceMessage`.
9pub mod device_message {
10 #[derive(Clone, PartialEq, ::prost::Oneof)]
11 pub enum Contents {
12 /// Information about the device's state.
13 #[prost(message, tag = "1")]
14 StatusUpdate(super::StatusUpdate),
15 /// The result of a device stream from ADB.
16 #[prost(message, tag = "2")]
17 StreamStatus(super::StreamStatus),
18 /// Data from an open stream.
19 #[prost(message, tag = "3")]
20 StreamData(super::StreamData),
21 }
22}
23/// A message to an ADB server.
24#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
25pub struct AdbMessage {
26 #[prost(oneof = "adb_message::Contents", tags = "1, 2")]
27 pub contents: ::core::option::Option<adb_message::Contents>,
28}
29/// Nested message and enum types in `AdbMessage`.
30pub mod adb_message {
31 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
32 pub enum Contents {
33 /// Open a new stream.
34 #[prost(message, tag = "1")]
35 Open(super::Open),
36 /// Send data to a stream.
37 #[prost(message, tag = "2")]
38 StreamData(super::StreamData),
39 }
40}
41/// A StatusUpdate message given over the ADB protocol for the device state.
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct StatusUpdate {
44 /// The device's state
45 #[prost(enumeration = "status_update::DeviceState", tag = "1")]
46 pub state: i32,
47 /// A map of properties with information about this device.
48 #[prost(map = "string, string", tag = "2")]
49 pub properties: ::std::collections::HashMap<
50 ::prost::alloc::string::String,
51 ::prost::alloc::string::String,
52 >,
53 /// A comma-separated list of "features" that this device supports.
54 #[prost(string, tag = "3")]
55 pub features: ::prost::alloc::string::String,
56}
57/// Nested message and enum types in `StatusUpdate`.
58pub mod status_update {
59 /// The state displayed with the ADB Device when running "adb devices"
60 #[derive(
61 Clone,
62 Copy,
63 Debug,
64 PartialEq,
65 Eq,
66 Hash,
67 PartialOrd,
68 Ord,
69 ::prost::Enumeration
70 )]
71 #[repr(i32)]
72 pub enum DeviceState {
73 /// The device state is unknown.
74 Unspecified = 0,
75 /// The ADB device is in the "device" status.
76 Device = 1,
77 /// The ADB device is in the "recovery" status.
78 Recovery = 2,
79 /// The ADB device is in the "rescue" status.
80 Rescue = 3,
81 /// The ADB device is in the "sideload" status.
82 Sideload = 4,
83 /// The ADB device is in the "missing" status.
84 Missing = 10,
85 /// The ADB device is in the "offline" status.
86 Offline = 11,
87 /// The ADB device is in the "unauthorized" status.
88 Unauthorized = 12,
89 /// The ADB device is in the "authorizing" status.
90 Authorizing = 13,
91 /// The ADB device is in the "connecting" status.
92 Connecting = 14,
93 }
94 impl DeviceState {
95 /// String value of the enum field names used in the ProtoBuf definition.
96 ///
97 /// The values are not transformed in any way and thus are considered stable
98 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
99 pub fn as_str_name(&self) -> &'static str {
100 match self {
101 Self::Unspecified => "DEVICE_STATE_UNSPECIFIED",
102 Self::Device => "DEVICE",
103 Self::Recovery => "RECOVERY",
104 Self::Rescue => "RESCUE",
105 Self::Sideload => "SIDELOAD",
106 Self::Missing => "MISSING",
107 Self::Offline => "OFFLINE",
108 Self::Unauthorized => "UNAUTHORIZED",
109 Self::Authorizing => "AUTHORIZING",
110 Self::Connecting => "CONNECTING",
111 }
112 }
113 /// Creates an enum from field names used in the ProtoBuf definition.
114 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
115 match value {
116 "DEVICE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
117 "DEVICE" => Some(Self::Device),
118 "RECOVERY" => Some(Self::Recovery),
119 "RESCUE" => Some(Self::Rescue),
120 "SIDELOAD" => Some(Self::Sideload),
121 "MISSING" => Some(Self::Missing),
122 "OFFLINE" => Some(Self::Offline),
123 "UNAUTHORIZED" => Some(Self::Unauthorized),
124 "AUTHORIZING" => Some(Self::Authorizing),
125 "CONNECTING" => Some(Self::Connecting),
126 _ => None,
127 }
128 }
129 }
130}
131/// The result of a stream.
132#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
133pub struct StreamStatus {
134 /// The unique ID of this stream, assigned by the client.
135 #[prost(int32, tag = "1")]
136 pub stream_id: i32,
137 /// The result of the stream. Either "Okay" for success or "Fail" for failure.
138 #[prost(oneof = "stream_status::Status", tags = "2, 3")]
139 pub status: ::core::option::Option<stream_status::Status>,
140}
141/// Nested message and enum types in `StreamStatus`.
142pub mod stream_status {
143 /// The result of the stream. Either "Okay" for success or "Fail" for failure.
144 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
145 pub enum Status {
146 /// Okay for success.
147 #[prost(message, tag = "2")]
148 Okay(super::Okay),
149 /// Fail for failure.
150 #[prost(message, tag = "3")]
151 Fail(super::Fail),
152 }
153}
154/// Message for opening a new stream.
155#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
156pub struct Open {
157 /// The unique ID that will be used to talk to this stream. This should
158 /// probably just be a number that increments for each new Open request.
159 #[prost(int32, tag = "1")]
160 pub stream_id: i32,
161 /// An ADB service to use in the new stream.
162 #[prost(string, tag = "2")]
163 pub service: ::prost::alloc::string::String,
164}
165/// Data for a stream.
166#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
167pub struct StreamData {
168 /// The unique ID of this stream, assigned by the client.
169 #[prost(int32, tag = "1")]
170 pub stream_id: i32,
171 /// The data of the stream, either bytes or "Close", indicating that the stream
172 /// is done.
173 #[prost(oneof = "stream_data::Contents", tags = "2, 3")]
174 pub contents: ::core::option::Option<stream_data::Contents>,
175}
176/// Nested message and enum types in `StreamData`.
177pub mod stream_data {
178 /// The data of the stream, either bytes or "Close", indicating that the stream
179 /// is done.
180 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
181 pub enum Contents {
182 /// Data in the stream.
183 #[prost(bytes, tag = "2")]
184 Data(::prost::alloc::vec::Vec<u8>),
185 /// The stream is closing. EOF.
186 #[prost(message, tag = "3")]
187 Close(super::Close),
188 }
189}
190/// Message signifying that the stream is open
191#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
192pub struct Okay {}
193/// Message signifying that the stream failed to open
194#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
195pub struct Fail {
196 /// A user-displayable failure reason.
197 #[prost(string, tag = "1")]
198 pub reason: ::prost::alloc::string::String,
199}
200/// Message signifying that the stream closed.
201#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
202pub struct Close {}
203/// TestMatrix captures all details about a test. It contains the environment
204/// configuration, test specification, test executions and overall state and
205/// outcome.
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct TestMatrix {
208 /// Output only. Unique id set by the service.
209 #[prost(string, tag = "1")]
210 pub test_matrix_id: ::prost::alloc::string::String,
211 /// The cloud project that owns the test matrix.
212 #[prost(string, tag = "7")]
213 pub project_id: ::prost::alloc::string::String,
214 /// Information about the client which invoked the test.
215 #[prost(message, optional, tag = "10")]
216 pub client_info: ::core::option::Option<ClientInfo>,
217 /// Required. How to run the test.
218 #[prost(message, optional, tag = "3")]
219 pub test_specification: ::core::option::Option<TestSpecification>,
220 /// Required. The devices the tests are being executed on.
221 #[prost(message, optional, tag = "4")]
222 pub environment_matrix: ::core::option::Option<EnvironmentMatrix>,
223 /// Output only. The list of test executions that the service creates for
224 /// this matrix.
225 #[prost(message, repeated, tag = "5")]
226 pub test_executions: ::prost::alloc::vec::Vec<TestExecution>,
227 /// Required. Where the results for the matrix are written.
228 #[prost(message, optional, tag = "6")]
229 pub result_storage: ::core::option::Option<ResultStorage>,
230 /// Output only. Indicates the current progress of the test matrix.
231 #[prost(enumeration = "TestState", tag = "8")]
232 pub state: i32,
233 /// Output only. The time this test matrix was initially created.
234 #[prost(message, optional, tag = "9")]
235 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
236 /// Output only. Describes why the matrix is considered invalid.
237 /// Only useful for matrices in the INVALID state.
238 #[prost(enumeration = "InvalidMatrixDetails", tag = "11")]
239 pub invalid_matrix_details: i32,
240 /// Output only. Details about why a matrix was deemed invalid.
241 /// If multiple checks can be safely performed, they will be reported but no
242 /// assumptions should be made about the length of this list.
243 #[prost(message, repeated, tag = "22")]
244 pub extended_invalid_matrix_details: ::prost::alloc::vec::Vec<MatrixErrorDetail>,
245 /// The number of times a TestExecution should be re-attempted if one or more
246 /// of its test cases fail for any reason.
247 /// The maximum number of reruns allowed is 10.
248 ///
249 /// Default is 0, which implies no reruns.
250 #[prost(int32, tag = "13")]
251 pub flaky_test_attempts: i32,
252 /// Output Only. The overall outcome of the test.
253 /// Only set when the test matrix state is FINISHED.
254 #[prost(enumeration = "OutcomeSummary", tag = "14")]
255 pub outcome_summary: i32,
256 /// If true, only a single attempt at most will be made to run each
257 /// execution/shard in the matrix. Flaky test attempts are not affected.
258 ///
259 /// Normally, 2 or more attempts are made if a potential infrastructure issue
260 /// is detected.
261 ///
262 /// This feature is for latency sensitive workloads. The incidence of
263 /// execution failures may be significantly greater for fail-fast matrices
264 /// and support is more limited because of that expectation.
265 #[prost(bool, tag = "17")]
266 pub fail_fast: bool,
267}
268/// Describes a single error or issue with a matrix.
269#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
270pub struct MatrixErrorDetail {
271 /// Output only. The reason for the error. This is a constant value in
272 /// UPPER_SNAKE_CASE that identifies the cause of the error.
273 #[prost(string, tag = "1")]
274 pub reason: ::prost::alloc::string::String,
275 /// Output only. A human-readable message about how the error in the
276 /// TestMatrix. Expands on the `reason` field with additional details and
277 /// possible options to fix the issue.
278 #[prost(string, tag = "2")]
279 pub message: ::prost::alloc::string::String,
280}
281/// A single test executed in a single environment.
282#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct TestExecution {
284 /// Output only. Unique id set by the service.
285 #[prost(string, tag = "1")]
286 pub id: ::prost::alloc::string::String,
287 /// Output only. Id of the containing TestMatrix.
288 #[prost(string, tag = "9")]
289 pub matrix_id: ::prost::alloc::string::String,
290 /// Output only. The cloud project that owns the test execution.
291 #[prost(string, tag = "10")]
292 pub project_id: ::prost::alloc::string::String,
293 /// Output only. How to run the test.
294 #[prost(message, optional, tag = "3")]
295 pub test_specification: ::core::option::Option<TestSpecification>,
296 /// Output only. Details about the shard.
297 #[prost(message, optional, tag = "12")]
298 pub shard: ::core::option::Option<Shard>,
299 /// Output only. How the host machine(s) are configured.
300 #[prost(message, optional, tag = "4")]
301 pub environment: ::core::option::Option<Environment>,
302 /// Output only. Indicates the current progress of the test execution
303 /// (e.g., FINISHED).
304 #[prost(enumeration = "TestState", tag = "5")]
305 pub state: i32,
306 /// Output only. Where the results for this execution are written.
307 #[prost(message, optional, tag = "11")]
308 pub tool_results_step: ::core::option::Option<ToolResultsStep>,
309 /// Output only. The time this test execution was initially created.
310 #[prost(message, optional, tag = "7")]
311 pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
312 /// Output only. Additional details about the running test.
313 #[prost(message, optional, tag = "8")]
314 pub test_details: ::core::option::Option<TestDetails>,
315}
316/// A description of how to run the test.
317#[derive(Clone, PartialEq, ::prost::Message)]
318pub struct TestSpecification {
319 /// Max time a test execution is allowed to run before it is
320 /// automatically cancelled.
321 /// The default value is 5 min.
322 #[prost(message, optional, tag = "1")]
323 pub test_timeout: ::core::option::Option<::prost_types::Duration>,
324 /// Disables video recording. May reduce test latency.
325 #[prost(bool, tag = "10")]
326 pub disable_video_recording: bool,
327 /// Disables performance metrics recording. May reduce test latency.
328 #[prost(bool, tag = "11")]
329 pub disable_performance_metrics: bool,
330 /// Test setup requirements.
331 #[prost(oneof = "test_specification::Setup", tags = "6, 14")]
332 pub setup: ::core::option::Option<test_specification::Setup>,
333 /// Required. The type of test to run.
334 #[prost(oneof = "test_specification::Test", tags = "2, 3, 9, 13, 15, 17")]
335 pub test: ::core::option::Option<test_specification::Test>,
336}
337/// Nested message and enum types in `TestSpecification`.
338pub mod test_specification {
339 /// Test setup requirements.
340 #[derive(Clone, PartialEq, ::prost::Oneof)]
341 pub enum Setup {
342 /// Test setup requirements for Android e.g. files to install, bootstrap
343 /// scripts.
344 #[prost(message, tag = "6")]
345 TestSetup(super::TestSetup),
346 /// Test setup requirements for iOS.
347 #[prost(message, tag = "14")]
348 IosTestSetup(super::IosTestSetup),
349 }
350 /// Required. The type of test to run.
351 #[derive(Clone, PartialEq, ::prost::Oneof)]
352 pub enum Test {
353 /// An Android instrumentation test.
354 #[prost(message, tag = "2")]
355 AndroidInstrumentationTest(super::AndroidInstrumentationTest),
356 /// An Android robo test.
357 #[prost(message, tag = "3")]
358 AndroidRoboTest(super::AndroidRoboTest),
359 /// An Android Application with a Test Loop.
360 #[prost(message, tag = "9")]
361 AndroidTestLoop(super::AndroidTestLoop),
362 /// An iOS XCTest, via an .xctestrun file.
363 #[prost(message, tag = "13")]
364 IosXcTest(super::IosXcTest),
365 /// An iOS application with a test loop.
366 #[prost(message, tag = "15")]
367 IosTestLoop(super::IosTestLoop),
368 /// An iOS Robo test.
369 #[prost(message, tag = "17")]
370 IosRoboTest(super::IosRoboTest),
371 }
372}
373#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
374pub struct SystraceSetup {
375 /// Systrace duration in seconds.
376 /// Should be between 1 and 30 seconds. 0 disables systrace.
377 #[deprecated]
378 #[prost(int32, tag = "1")]
379 pub duration_seconds: i32,
380}
381/// A description of how to set up the Android device prior to running the test.
382#[derive(Clone, PartialEq, ::prost::Message)]
383pub struct TestSetup {
384 /// List of files to push to the device before starting the test.
385 #[prost(message, repeated, tag = "1")]
386 pub files_to_push: ::prost::alloc::vec::Vec<DeviceFile>,
387 /// List of directories on the device to upload to GCS at the end of the test;
388 /// they must be absolute paths under /sdcard, /storage or /data/local/tmp.
389 /// Path names are restricted to characters a-z A-Z 0-9 _ - . + and /
390 ///
391 /// Note: The paths /sdcard and /data will be made available and treated as
392 /// implicit path substitutions. E.g. if /sdcard on a particular device does
393 /// not map to external storage, the system will replace it with the external
394 /// storage path prefix for that device.
395 #[prost(string, repeated, tag = "2")]
396 pub directories_to_pull: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
397 /// Optional. Initial setup APKs to install before the app under test is
398 /// installed. Currently capped at 100.
399 #[prost(message, repeated, tag = "29")]
400 pub initial_setup_apks: ::prost::alloc::vec::Vec<Apk>,
401 /// APKs to install in addition to those being directly tested. These will be
402 /// installed after the app under test.
403 /// Currently capped at 100.
404 #[prost(message, repeated, tag = "3")]
405 pub additional_apks: ::prost::alloc::vec::Vec<Apk>,
406 /// The device will be logged in on this account for the duration of the test.
407 #[prost(message, optional, tag = "4")]
408 pub account: ::core::option::Option<Account>,
409 /// The network traffic profile used for running the test.
410 /// Available network profiles can be queried by using the
411 /// NETWORK_CONFIGURATION environment type when calling
412 /// TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.
413 #[prost(string, tag = "5")]
414 pub network_profile: ::prost::alloc::string::String,
415 /// Environment variables to set for the test (only applicable for
416 /// instrumentation tests).
417 #[prost(message, repeated, tag = "6")]
418 pub environment_variables: ::prost::alloc::vec::Vec<EnvironmentVariable>,
419 /// Systrace configuration for the run.
420 /// Deprecated: Systrace used Python 2 which was sunsetted on 2020-01-01.
421 /// Systrace is no longer supported in the Cloud Testing API, and no Systrace
422 /// file will be provided in the results.
423 #[deprecated]
424 #[prost(message, optional, tag = "9")]
425 pub systrace: ::core::option::Option<SystraceSetup>,
426 /// Whether to prevent all runtime permissions to be granted at app install
427 #[prost(bool, tag = "23")]
428 pub dont_autogrant_permissions: bool,
429}
430/// A description of how to set up an iOS device prior to running the test.
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct IosTestSetup {
433 /// The network traffic profile used for running the test.
434 /// Available network profiles can be queried by using the
435 /// NETWORK_CONFIGURATION environment type when calling
436 /// TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.
437 #[prost(string, tag = "1")]
438 pub network_profile: ::prost::alloc::string::String,
439 /// iOS apps to install in addition to those being directly tested.
440 #[prost(message, repeated, tag = "2")]
441 pub additional_ipas: ::prost::alloc::vec::Vec<FileReference>,
442 /// List of files to push to the device before starting the test.
443 #[prost(message, repeated, tag = "3")]
444 pub push_files: ::prost::alloc::vec::Vec<IosDeviceFile>,
445 /// List of directories on the device to upload to Cloud Storage at the end of
446 /// the test.
447 ///
448 /// Directories should either be in a shared directory (such as
449 /// /private/var/mobile/Media) or within an accessible directory inside the
450 /// app's filesystem (such as /Documents) by specifying the bundle ID.
451 #[prost(message, repeated, tag = "4")]
452 pub pull_directories: ::prost::alloc::vec::Vec<IosDeviceFile>,
453}
454/// A key-value pair passed as an environment variable to the test.
455#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
456pub struct EnvironmentVariable {
457 /// Key for the environment variable.
458 #[prost(string, tag = "1")]
459 pub key: ::prost::alloc::string::String,
460 /// Value for the environment variable.
461 #[prost(string, tag = "2")]
462 pub value: ::prost::alloc::string::String,
463}
464/// Identifies an account and how to log into it.
465#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
466pub struct Account {
467 /// Required. The type of account, based what it's for (e.g. Google) and what
468 /// its login mechanism is (e.g. username and password).
469 #[prost(oneof = "account::AccountType", tags = "1")]
470 pub account_type: ::core::option::Option<account::AccountType>,
471}
472/// Nested message and enum types in `Account`.
473pub mod account {
474 /// Required. The type of account, based what it's for (e.g. Google) and what
475 /// its login mechanism is (e.g. username and password).
476 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
477 pub enum AccountType {
478 /// An automatic google login account.
479 #[prost(message, tag = "1")]
480 GoogleAuto(super::GoogleAuto),
481 }
482}
483/// Enables automatic Google account login.
484/// If set, the service automatically generates a Google test account and adds
485/// it to the device, before executing the test. Note that test accounts might be
486/// reused.
487/// Many applications show their full set of functionalities when an account is
488/// present on the device. Logging into the device with these generated accounts
489/// allows testing more functionalities.
490#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
491pub struct GoogleAuto {}
492/// An Android package file to install.
493#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
494pub struct Apk {
495 /// The path to an APK to be installed on the device before the test begins.
496 #[prost(message, optional, tag = "1")]
497 pub location: ::core::option::Option<FileReference>,
498 /// The java package for the APK to be installed.
499 /// Value is determined by examining the application's manifest.
500 #[prost(string, tag = "2")]
501 pub package_name: ::prost::alloc::string::String,
502}
503/// An Android App Bundle file format, containing a BundleConfig.pb file,
504/// a base module directory, zero or more dynamic feature module directories.
505///
506/// <p>See <https://developer.android.com/guide/app-bundle/build> for guidance on
507/// building App Bundles.
508#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
509pub struct AppBundle {
510 /// Required. Bundle location information.
511 #[prost(oneof = "app_bundle::Bundle", tags = "1")]
512 pub bundle: ::core::option::Option<app_bundle::Bundle>,
513}
514/// Nested message and enum types in `AppBundle`.
515pub mod app_bundle {
516 /// Required. Bundle location information.
517 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
518 pub enum Bundle {
519 /// .aab file representing the app bundle under test.
520 #[prost(message, tag = "1")]
521 BundleLocation(super::FileReference),
522 }
523}
524/// A single device file description.
525#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
526pub struct DeviceFile {
527 /// Required.
528 #[prost(oneof = "device_file::DeviceFile", tags = "1, 2")]
529 pub device_file: ::core::option::Option<device_file::DeviceFile>,
530}
531/// Nested message and enum types in `DeviceFile`.
532pub mod device_file {
533 /// Required.
534 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
535 pub enum DeviceFile {
536 /// A reference to an opaque binary blob file.
537 #[prost(message, tag = "1")]
538 ObbFile(super::ObbFile),
539 /// A reference to a regular file.
540 #[prost(message, tag = "2")]
541 RegularFile(super::RegularFile),
542 }
543}
544/// An opaque binary blob file to install on the device before the test starts.
545#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
546pub struct ObbFile {
547 /// Required. OBB file name which must conform to the format as specified by
548 /// Android
549 /// e.g. \[main|patch\].0300110.com.example.android.obb
550 /// which will be installed into
551 /// \<shared-storage\>/Android/obb/\<package-name\>/
552 /// on the device.
553 #[prost(string, tag = "1")]
554 pub obb_file_name: ::prost::alloc::string::String,
555 /// Required. Opaque Binary Blob (OBB) file(s) to install on the device.
556 #[prost(message, optional, tag = "2")]
557 pub obb: ::core::option::Option<FileReference>,
558}
559/// A file or directory to install on the device before the test starts.
560#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
561pub struct RegularFile {
562 /// Required. The source file.
563 #[prost(message, optional, tag = "1")]
564 pub content: ::core::option::Option<FileReference>,
565 /// Required. Where to put the content on the device. Must be an absolute,
566 /// allowlisted path. If the file exists, it will be replaced.
567 /// The following device-side directories and any of their subdirectories are
568 /// allowlisted:
569 ///
570 /// <p>${EXTERNAL_STORAGE}, /sdcard, or /storage</p>
571 /// <p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p>
572 /// <p>Specifying a path outside of these directory trees is invalid.
573 ///
574 /// <p> The paths /sdcard and /data will be made available and treated as
575 /// implicit path substitutions. E.g. if /sdcard on a particular device does
576 /// not map to external storage, the system will replace it with the external
577 /// storage path prefix for that device and copy the file there.
578 ///
579 /// <p> It is strongly advised to use the <a href=
580 /// "<http://developer.android.com/reference/android/os/Environment.html">>
581 /// Environment API</a> in app and test code to access files on the device in a
582 /// portable way.
583 #[prost(string, tag = "2")]
584 pub device_path: ::prost::alloc::string::String,
585}
586/// A file or directory to install on the device before the test starts.
587#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
588pub struct IosDeviceFile {
589 /// The source file
590 #[prost(message, optional, tag = "1")]
591 pub content: ::core::option::Option<FileReference>,
592 /// The bundle id of the app where this file lives.
593 ///
594 /// iOS apps sandbox their own filesystem, so app files must specify which app
595 /// installed on the device.
596 #[prost(string, tag = "2")]
597 pub bundle_id: ::prost::alloc::string::String,
598 /// Location of the file on the device, inside the app's sandboxed filesystem
599 #[prost(string, tag = "3")]
600 pub device_path: ::prost::alloc::string::String,
601}
602/// A test of an Android Application with a Test Loop.
603/// The intent \<intent-name\> will be implicitly added, since Games is the only
604/// user of this api, for the time being.
605#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
606pub struct AndroidTestLoop {
607 /// The java package for the application under test.
608 /// The default is determined by examining the application's manifest.
609 #[prost(string, tag = "2")]
610 pub app_package_id: ::prost::alloc::string::String,
611 /// The list of scenarios that should be run during the test.
612 /// The default is all test loops, derived from the application's
613 /// manifest.
614 #[prost(int32, repeated, tag = "3")]
615 pub scenarios: ::prost::alloc::vec::Vec<i32>,
616 /// The list of scenario labels that should be run during the test.
617 /// The scenario labels should map to labels defined in the application's
618 /// manifest. For example, player_experience and
619 /// com.google.test.loops.player_experience add all of the loops labeled in the
620 /// manifest with the com.google.test.loops.player_experience name to the
621 /// execution.
622 /// Scenarios can also be specified in the scenarios field.
623 #[prost(string, repeated, tag = "4")]
624 pub scenario_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
625 /// Required. The Android package to test.
626 #[prost(oneof = "android_test_loop::AppUnderTest", tags = "1, 5")]
627 pub app_under_test: ::core::option::Option<android_test_loop::AppUnderTest>,
628}
629/// Nested message and enum types in `AndroidTestLoop`.
630pub mod android_test_loop {
631 /// Required. The Android package to test.
632 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
633 pub enum AppUnderTest {
634 /// The APK for the application under test.
635 #[prost(message, tag = "1")]
636 AppApk(super::FileReference),
637 /// A multi-apk app bundle for the application under test.
638 #[prost(message, tag = "5")]
639 AppBundle(super::AppBundle),
640 }
641}
642/// A test of an iOS application that uses the XCTest framework.
643/// Xcode supports the option to "build for testing", which generates an
644/// .xctestrun file that contains a test specification (arguments, test methods,
645/// etc). This test type accepts a zip file containing the .xctestrun file and
646/// the corresponding contents of the Build/Products directory that contains all
647/// the binaries needed to run the tests.
648#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
649pub struct IosXcTest {
650 /// Required. The .zip containing the .xctestrun file and the contents of the
651 /// DerivedData/Build/Products directory.
652 /// The .xctestrun file in this zip is ignored if the xctestrun field is
653 /// specified.
654 #[prost(message, optional, tag = "1")]
655 pub tests_zip: ::core::option::Option<FileReference>,
656 /// An .xctestrun file that will override the .xctestrun file in the
657 /// tests zip. Because the .xctestrun file contains environment variables along
658 /// with test methods to run and/or ignore, this can be useful for sharding
659 /// tests. Default is taken from the tests zip.
660 #[prost(message, optional, tag = "2")]
661 pub xctestrun: ::core::option::Option<FileReference>,
662 /// The Xcode version that should be used for the test.
663 /// Use the TestEnvironmentDiscoveryService to get supported options.
664 /// Defaults to the latest Xcode version Firebase Test Lab supports.
665 #[prost(string, tag = "3")]
666 pub xcode_version: ::prost::alloc::string::String,
667 /// Output only. The bundle id for the application under test.
668 #[prost(string, tag = "4")]
669 pub app_bundle_id: ::prost::alloc::string::String,
670 /// The option to test special app entitlements. Setting this would re-sign the
671 /// app having special entitlements with an explicit application-identifier.
672 /// Currently supports testing aps-environment entitlement.
673 #[prost(bool, tag = "6")]
674 pub test_special_entitlements: bool,
675}
676/// A test of an iOS application that implements one or more game loop scenarios.
677/// This test type accepts an archived application (.ipa file) and a list of
678/// integer scenarios that will be executed on the app sequentially.
679#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
680pub struct IosTestLoop {
681 /// Required. The .ipa of the application to test.
682 #[prost(message, optional, tag = "1")]
683 pub app_ipa: ::core::option::Option<FileReference>,
684 /// The list of scenarios that should be run during the test. Defaults to the
685 /// single scenario 0 if unspecified.
686 #[prost(int32, repeated, tag = "2")]
687 pub scenarios: ::prost::alloc::vec::Vec<i32>,
688 /// Output only. The bundle id for the application under test.
689 #[prost(string, tag = "3")]
690 pub app_bundle_id: ::prost::alloc::string::String,
691}
692/// A test that explores an iOS application on an iOS device.
693#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
694pub struct IosRoboTest {
695 /// Required. The ipa stored at this file should be used to run the test.
696 #[prost(message, optional, tag = "1")]
697 pub app_ipa: ::core::option::Option<FileReference>,
698 /// The bundle ID for the app-under-test.
699 /// This is determined by examining the application's "Info.plist" file.
700 #[prost(string, tag = "4")]
701 pub app_bundle_id: ::prost::alloc::string::String,
702 /// An optional Roboscript to customize the crawl. See
703 /// <https://firebase.google.com/docs/test-lab/android/robo-scripts-reference>
704 /// for more information about Roboscripts.
705 /// The maximum allowed file size of the roboscript is 10MiB.
706 #[prost(message, optional, tag = "5")]
707 pub robo_script: ::core::option::Option<FileReference>,
708}
709/// A test of an Android application that can control an Android component
710/// independently of its normal lifecycle.
711/// Android instrumentation tests run an application APK and test APK inside the
712/// same process on a virtual or physical AndroidDevice. They also specify
713/// a test runner class, such as com.google.GoogleTestRunner, which can vary
714/// on the specific instrumentation framework chosen.
715///
716/// See <<https://developer.android.com/training/testing/fundamentals>> for
717/// more information on types of Android tests.
718#[derive(Clone, PartialEq, ::prost::Message)]
719pub struct AndroidInstrumentationTest {
720 /// Required. The APK containing the test code to be executed.
721 #[prost(message, optional, tag = "2")]
722 pub test_apk: ::core::option::Option<FileReference>,
723 /// The java package for the application under test.
724 /// The default value is determined by examining the application's manifest.
725 #[prost(string, tag = "3")]
726 pub app_package_id: ::prost::alloc::string::String,
727 /// The java package for the test to be executed.
728 /// The default value is determined by examining the application's manifest.
729 #[prost(string, tag = "4")]
730 pub test_package_id: ::prost::alloc::string::String,
731 /// The InstrumentationTestRunner class.
732 /// The default value is determined by examining the application's manifest.
733 #[prost(string, tag = "5")]
734 pub test_runner_class: ::prost::alloc::string::String,
735 /// Each target must be fully qualified with the package name or class name,
736 /// in one of these formats:
737 ///
738 /// * "package package_name"
739 /// * "class package_name.class_name"
740 /// * "class package_name.class_name#method_name"
741 ///
742 /// If empty, all targets in the module will be run.
743 #[prost(string, repeated, tag = "6")]
744 pub test_targets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
745 /// The option of whether running each test within its own invocation of
746 /// instrumentation with Android Test Orchestrator or not.
747 /// \** Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or
748 /// higher! **
749 /// Orchestrator offers the following benefits:
750 ///
751 /// * No shared state
752 /// * Crashes are isolated
753 /// * Logs are scoped per test
754 ///
755 /// See
756 /// <<https://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator>>
757 /// for more information about Android Test Orchestrator.
758 ///
759 /// If not set, the test will be run without the orchestrator.
760 #[prost(enumeration = "OrchestratorOption", tag = "7")]
761 pub orchestrator_option: i32,
762 /// The option to run tests in multiple shards in parallel.
763 #[prost(message, optional, tag = "9")]
764 pub sharding_option: ::core::option::Option<ShardingOption>,
765 /// Required.
766 #[prost(oneof = "android_instrumentation_test::AppUnderTest", tags = "1, 8")]
767 pub app_under_test: ::core::option::Option<
768 android_instrumentation_test::AppUnderTest,
769 >,
770}
771/// Nested message and enum types in `AndroidInstrumentationTest`.
772pub mod android_instrumentation_test {
773 /// Required.
774 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
775 pub enum AppUnderTest {
776 /// The APK for the application under test.
777 #[prost(message, tag = "1")]
778 AppApk(super::FileReference),
779 /// A multi-apk app bundle for the application under test.
780 #[prost(message, tag = "8")]
781 AppBundle(super::AppBundle),
782 }
783}
784/// A test of an android application that explores the application on a virtual
785/// or physical Android Device, finding culprits and crashes as it goes.
786#[derive(Clone, PartialEq, ::prost::Message)]
787pub struct AndroidRoboTest {
788 /// The java package for the application under test.
789 /// The default value is determined by examining the application's manifest.
790 #[prost(string, tag = "2")]
791 pub app_package_id: ::prost::alloc::string::String,
792 /// The initial activity that should be used to start the app.
793 #[prost(string, tag = "3")]
794 pub app_initial_activity: ::prost::alloc::string::String,
795 /// The max depth of the traversal stack Robo can explore. Needs to be at least
796 /// 2 to make Robo explore the app beyond the first activity.
797 /// Default is 50.
798 #[deprecated]
799 #[prost(int32, tag = "7")]
800 pub max_depth: i32,
801 /// The max number of steps Robo can execute.
802 /// Default is no limit.
803 #[deprecated]
804 #[prost(int32, tag = "8")]
805 pub max_steps: i32,
806 /// A set of directives Robo should apply during the crawl.
807 /// This allows users to customize the crawl. For example, the username and
808 /// password for a test account can be provided.
809 #[prost(message, repeated, tag = "11")]
810 pub robo_directives: ::prost::alloc::vec::Vec<RoboDirective>,
811 /// The mode in which Robo should run. Most clients should allow the server to
812 /// populate this field automatically.
813 #[prost(enumeration = "RoboMode", tag = "14")]
814 pub robo_mode: i32,
815 /// A JSON file with a sequence of actions Robo should perform as a prologue
816 /// for the crawl.
817 #[prost(message, optional, tag = "13")]
818 pub robo_script: ::core::option::Option<FileReference>,
819 /// The intents used to launch the app for the crawl.
820 /// If none are provided, then the main launcher activity is launched.
821 /// If some are provided, then only those provided are launched (the main
822 /// launcher activity must be provided explicitly).
823 #[prost(message, repeated, tag = "15")]
824 pub starting_intents: ::prost::alloc::vec::Vec<RoboStartingIntent>,
825 /// Required.
826 #[prost(oneof = "android_robo_test::AppUnderTest", tags = "1, 16")]
827 pub app_under_test: ::core::option::Option<android_robo_test::AppUnderTest>,
828}
829/// Nested message and enum types in `AndroidRoboTest`.
830pub mod android_robo_test {
831 /// Required.
832 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
833 pub enum AppUnderTest {
834 /// The APK for the application under test.
835 #[prost(message, tag = "1")]
836 AppApk(super::FileReference),
837 /// A multi-apk app bundle for the application under test.
838 #[prost(message, tag = "16")]
839 AppBundle(super::AppBundle),
840 }
841}
842/// Directs Robo to interact with a specific UI element if it is encountered
843/// during the crawl. Currently, Robo can perform text entry or element click.
844#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
845pub struct RoboDirective {
846 /// Required. The android resource name of the target UI element.
847 /// For example,
848 /// in Java: R.string.foo
849 /// in xml: @string/foo
850 /// Only the "foo" part is needed.
851 /// Reference doc:
852 /// <https://developer.android.com/guide/topics/resources/accessing-resources.html>
853 #[prost(string, tag = "1")]
854 pub resource_name: ::prost::alloc::string::String,
855 /// The text that Robo is directed to set. If left empty, the directive will be
856 /// treated as a CLICK on the element matching the resource_name.
857 #[prost(string, tag = "2")]
858 pub input_text: ::prost::alloc::string::String,
859 /// Required. The type of action that Robo should perform on the specified
860 /// element.
861 #[prost(enumeration = "RoboActionType", tag = "3")]
862 pub action_type: i32,
863}
864/// Message for specifying the start activities to crawl.
865#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
866pub struct RoboStartingIntent {
867 /// Timeout in seconds for each intent.
868 #[prost(message, optional, tag = "3")]
869 pub timeout: ::core::option::Option<::prost_types::Duration>,
870 /// Required. Intent details to start an activity.
871 #[prost(oneof = "robo_starting_intent::StartingIntent", tags = "1, 2, 4")]
872 pub starting_intent: ::core::option::Option<robo_starting_intent::StartingIntent>,
873}
874/// Nested message and enum types in `RoboStartingIntent`.
875pub mod robo_starting_intent {
876 /// Required. Intent details to start an activity.
877 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
878 pub enum StartingIntent {
879 /// An intent that starts the main launcher activity.
880 #[prost(message, tag = "1")]
881 LauncherActivity(super::LauncherActivityIntent),
882 /// An intent that starts an activity with specific details.
883 #[prost(message, tag = "2")]
884 StartActivity(super::StartActivityIntent),
885 /// Skips the starting activity
886 #[prost(message, tag = "4")]
887 NoActivity(super::NoActivityIntent),
888 }
889}
890/// Specifies an intent that starts the main launcher activity.
891#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
892pub struct LauncherActivityIntent {}
893/// A starting intent specified by an action, uri, and categories.
894#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
895pub struct StartActivityIntent {
896 /// Action name.
897 /// Required for START_ACTIVITY.
898 #[prost(string, tag = "2")]
899 pub action: ::prost::alloc::string::String,
900 /// URI for the action.
901 #[prost(string, tag = "3")]
902 pub uri: ::prost::alloc::string::String,
903 /// Intent categories to set on the intent.
904 #[prost(string, repeated, tag = "4")]
905 pub categories: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
906}
907/// Skips the starting activity
908#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
909pub struct NoActivityIntent {}
910/// The matrix of environments in which the test is to be executed.
911#[derive(Clone, PartialEq, ::prost::Message)]
912pub struct EnvironmentMatrix {
913 /// Required. The environment matrix.
914 #[prost(oneof = "environment_matrix::EnvironmentMatrix", tags = "1, 2, 3")]
915 pub environment_matrix: ::core::option::Option<
916 environment_matrix::EnvironmentMatrix,
917 >,
918}
919/// Nested message and enum types in `EnvironmentMatrix`.
920pub mod environment_matrix {
921 /// Required. The environment matrix.
922 #[derive(Clone, PartialEq, ::prost::Oneof)]
923 pub enum EnvironmentMatrix {
924 /// A matrix of Android devices.
925 #[prost(message, tag = "1")]
926 AndroidMatrix(super::AndroidMatrix),
927 /// A list of Android devices; the test will be run only on the specified
928 /// devices.
929 #[prost(message, tag = "2")]
930 AndroidDeviceList(super::AndroidDeviceList),
931 /// A list of iOS devices.
932 #[prost(message, tag = "3")]
933 IosDeviceList(super::IosDeviceList),
934 }
935}
936/// A list of Android device configurations in which the test is to be executed.
937#[derive(Clone, PartialEq, ::prost::Message)]
938pub struct AndroidDeviceList {
939 /// Required. A list of Android devices.
940 #[prost(message, repeated, tag = "1")]
941 pub android_devices: ::prost::alloc::vec::Vec<AndroidDevice>,
942}
943/// A list of iOS device configurations in which the test is to be executed.
944#[derive(Clone, PartialEq, ::prost::Message)]
945pub struct IosDeviceList {
946 /// Required. A list of iOS devices.
947 #[prost(message, repeated, tag = "1")]
948 pub ios_devices: ::prost::alloc::vec::Vec<IosDevice>,
949}
950/// A set of Android device configuration permutations is defined by the
951/// the cross-product of the given axes. Internally, the given AndroidMatrix
952/// will be expanded into a set of AndroidDevices.
953///
954/// Only supported permutations will be instantiated. Invalid permutations
955/// (e.g., incompatible models/versions) are ignored.
956#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
957pub struct AndroidMatrix {
958 /// Required. The ids of the set of Android device to be used.
959 /// Use the TestEnvironmentDiscoveryService to get supported options.
960 #[prost(string, repeated, tag = "1")]
961 pub android_model_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
962 /// Required. The ids of the set of Android OS version to be used.
963 /// Use the TestEnvironmentDiscoveryService to get supported options.
964 #[prost(string, repeated, tag = "2")]
965 pub android_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
966 /// Required. The set of locales the test device will enable for testing.
967 /// Use the TestEnvironmentDiscoveryService to get supported options.
968 #[prost(string, repeated, tag = "3")]
969 pub locales: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
970 /// Required. The set of orientations to test with.
971 /// Use the TestEnvironmentDiscoveryService to get supported options.
972 #[prost(string, repeated, tag = "4")]
973 pub orientations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
974}
975/// Information about the client which invoked the test.
976#[derive(Clone, PartialEq, ::prost::Message)]
977pub struct ClientInfo {
978 /// Required. Client name, such as gcloud.
979 #[prost(string, tag = "1")]
980 pub name: ::prost::alloc::string::String,
981 /// The list of detailed information about client.
982 #[prost(message, repeated, tag = "2")]
983 pub client_info_details: ::prost::alloc::vec::Vec<ClientInfoDetail>,
984}
985/// Key-value pair of detailed information about the client which invoked the
986/// test. Examples: {'Version', '1.0'}, {'Release Track', 'BETA'}.
987#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
988pub struct ClientInfoDetail {
989 /// Required. The key of detailed client information.
990 #[prost(string, tag = "1")]
991 pub key: ::prost::alloc::string::String,
992 /// Required. The value of detailed client information.
993 #[prost(string, tag = "2")]
994 pub value: ::prost::alloc::string::String,
995}
996/// Locations where the results of running the test are stored.
997#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
998pub struct ResultStorage {
999 /// Required.
1000 #[prost(message, optional, tag = "1")]
1001 pub google_cloud_storage: ::core::option::Option<GoogleCloudStorage>,
1002 /// The tool results history that contains the tool results execution that
1003 /// results are written to.
1004 ///
1005 /// If not provided, the service will choose an appropriate value.
1006 #[prost(message, optional, tag = "5")]
1007 pub tool_results_history: ::core::option::Option<ToolResultsHistory>,
1008 /// Output only. The tool results execution that results are written to.
1009 #[prost(message, optional, tag = "6")]
1010 pub tool_results_execution: ::core::option::Option<ToolResultsExecution>,
1011 /// Output only. URL to the results in the Firebase Web Console.
1012 #[prost(string, tag = "7")]
1013 pub results_url: ::prost::alloc::string::String,
1014}
1015/// Represents a tool results history resource.
1016#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1017pub struct ToolResultsHistory {
1018 /// Required. The cloud project that owns the tool results history.
1019 #[prost(string, tag = "1")]
1020 pub project_id: ::prost::alloc::string::String,
1021 /// Required. A tool results history ID.
1022 #[prost(string, tag = "2")]
1023 pub history_id: ::prost::alloc::string::String,
1024}
1025/// Represents a tool results execution resource.
1026///
1027/// This has the results of a TestMatrix.
1028#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1029pub struct ToolResultsExecution {
1030 /// Output only. The cloud project that owns the tool results execution.
1031 #[prost(string, tag = "1")]
1032 pub project_id: ::prost::alloc::string::String,
1033 /// Output only. A tool results history ID.
1034 #[prost(string, tag = "2")]
1035 pub history_id: ::prost::alloc::string::String,
1036 /// Output only. A tool results execution ID.
1037 #[prost(string, tag = "3")]
1038 pub execution_id: ::prost::alloc::string::String,
1039}
1040/// Represents a tool results step resource.
1041///
1042/// This has the results of a TestExecution.
1043#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1044pub struct ToolResultsStep {
1045 /// Output only. The cloud project that owns the tool results step.
1046 #[prost(string, tag = "1")]
1047 pub project_id: ::prost::alloc::string::String,
1048 /// Output only. A tool results history ID.
1049 #[prost(string, tag = "2")]
1050 pub history_id: ::prost::alloc::string::String,
1051 /// Output only. A tool results execution ID.
1052 #[prost(string, tag = "3")]
1053 pub execution_id: ::prost::alloc::string::String,
1054 /// Output only. A tool results step ID.
1055 #[prost(string, tag = "4")]
1056 pub step_id: ::prost::alloc::string::String,
1057}
1058/// A storage location within Google cloud storage (GCS).
1059#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1060pub struct GoogleCloudStorage {
1061 /// Required. The path to a directory in GCS that will
1062 /// eventually contain the results for this test.
1063 /// The requesting user must have write access on the bucket in the supplied
1064 /// path.
1065 #[prost(string, tag = "1")]
1066 pub gcs_path: ::prost::alloc::string::String,
1067}
1068/// A reference to a file, used for user inputs.
1069#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1070pub struct FileReference {
1071 /// Required. The file reference.
1072 #[prost(oneof = "file_reference::File", tags = "1")]
1073 pub file: ::core::option::Option<file_reference::File>,
1074}
1075/// Nested message and enum types in `FileReference`.
1076pub mod file_reference {
1077 /// Required. The file reference.
1078 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1079 pub enum File {
1080 /// A path to a file in Google Cloud Storage.
1081 /// Example: gs://build-app-1414623860166/app%40debug-unaligned.apk
1082 /// These paths are expected to be url encoded (percent encoding)
1083 #[prost(string, tag = "1")]
1084 GcsPath(::prost::alloc::string::String),
1085 }
1086}
1087/// The environment in which the test is run.
1088#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1089pub struct Environment {
1090 /// Required. The environment.
1091 #[prost(oneof = "environment::Environment", tags = "1, 2")]
1092 pub environment: ::core::option::Option<environment::Environment>,
1093}
1094/// Nested message and enum types in `Environment`.
1095pub mod environment {
1096 /// Required. The environment.
1097 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
1098 pub enum Environment {
1099 /// An Android device which must be used with an Android test.
1100 #[prost(message, tag = "1")]
1101 AndroidDevice(super::AndroidDevice),
1102 /// An iOS device which must be used with an iOS test.
1103 #[prost(message, tag = "2")]
1104 IosDevice(super::IosDevice),
1105 }
1106}
1107/// A single Android device.
1108#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1109pub struct AndroidDevice {
1110 /// Required. The id of the Android device to be used.
1111 /// Use the TestEnvironmentDiscoveryService to get supported options.
1112 #[prost(string, tag = "1")]
1113 pub android_model_id: ::prost::alloc::string::String,
1114 /// Required. The id of the Android OS version to be used.
1115 /// Use the TestEnvironmentDiscoveryService to get supported options.
1116 #[prost(string, tag = "2")]
1117 pub android_version_id: ::prost::alloc::string::String,
1118 /// Required. The locale the test device used for testing.
1119 /// Use the TestEnvironmentDiscoveryService to get supported options.
1120 #[prost(string, tag = "3")]
1121 pub locale: ::prost::alloc::string::String,
1122 /// Required. How the device is oriented during the test.
1123 /// Use the TestEnvironmentDiscoveryService to get supported options.
1124 #[prost(string, tag = "4")]
1125 pub orientation: ::prost::alloc::string::String,
1126}
1127/// A single iOS device.
1128#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1129pub struct IosDevice {
1130 /// Required. The id of the iOS device to be used.
1131 /// Use the TestEnvironmentDiscoveryService to get supported options.
1132 #[prost(string, tag = "1")]
1133 pub ios_model_id: ::prost::alloc::string::String,
1134 /// Required. The id of the iOS major software version to be used.
1135 /// Use the TestEnvironmentDiscoveryService to get supported options.
1136 #[prost(string, tag = "2")]
1137 pub ios_version_id: ::prost::alloc::string::String,
1138 /// Required. The locale the test device used for testing.
1139 /// Use the TestEnvironmentDiscoveryService to get supported options.
1140 #[prost(string, tag = "3")]
1141 pub locale: ::prost::alloc::string::String,
1142 /// Required. How the device is oriented during the test.
1143 /// Use the TestEnvironmentDiscoveryService to get supported options.
1144 #[prost(string, tag = "4")]
1145 pub orientation: ::prost::alloc::string::String,
1146}
1147/// Additional details about the progress of the running test.
1148#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1149pub struct TestDetails {
1150 /// Output only. Human-readable, detailed descriptions of the test's progress.
1151 /// For example: "Provisioning a device", "Starting Test".
1152 ///
1153 /// During the course of execution new data may be appended
1154 /// to the end of progress_messages.
1155 #[prost(string, repeated, tag = "3")]
1156 pub progress_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1157 /// Output only. If the TestState is ERROR, then this string will contain
1158 /// human-readable details about the error.
1159 #[prost(string, tag = "4")]
1160 pub error_message: ::prost::alloc::string::String,
1161}
1162/// Details behind an invalid request.
1163#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1164pub struct InvalidRequestDetail {
1165 /// The reason behind the error.
1166 #[prost(enumeration = "invalid_request_detail::Reason", tag = "1")]
1167 pub reason: i32,
1168}
1169/// Nested message and enum types in `InvalidRequestDetail`.
1170pub mod invalid_request_detail {
1171 /// Possible invalid request reasons.
1172 #[derive(
1173 Clone,
1174 Copy,
1175 Debug,
1176 PartialEq,
1177 Eq,
1178 Hash,
1179 PartialOrd,
1180 Ord,
1181 ::prost::Enumeration
1182 )]
1183 #[repr(i32)]
1184 pub enum Reason {
1185 /// No reason has been specified - the default.
1186 Unspecified = 0,
1187 /// The request is not valid.
1188 RequestInvalid = 1,
1189 /// One or more of the resources specified in the request is too large.
1190 ResourceTooBig = 2,
1191 /// One or more resources specified in the request cannot be found.
1192 ResourceNotFound = 3,
1193 /// This request is not (currently) supported.
1194 Unsupported = 4,
1195 /// This request is not currently implemented.
1196 NotImplemented = 5,
1197 /// The caller has no permission for storing the test results
1198 ResultStoragePermissionDenied = 6,
1199 }
1200 impl Reason {
1201 /// String value of the enum field names used in the ProtoBuf definition.
1202 ///
1203 /// The values are not transformed in any way and thus are considered stable
1204 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1205 pub fn as_str_name(&self) -> &'static str {
1206 match self {
1207 Self::Unspecified => "REASON_UNSPECIFIED",
1208 Self::RequestInvalid => "REQUEST_INVALID",
1209 Self::ResourceTooBig => "RESOURCE_TOO_BIG",
1210 Self::ResourceNotFound => "RESOURCE_NOT_FOUND",
1211 Self::Unsupported => "UNSUPPORTED",
1212 Self::NotImplemented => "NOT_IMPLEMENTED",
1213 Self::ResultStoragePermissionDenied => "RESULT_STORAGE_PERMISSION_DENIED",
1214 }
1215 }
1216 /// Creates an enum from field names used in the ProtoBuf definition.
1217 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1218 match value {
1219 "REASON_UNSPECIFIED" => Some(Self::Unspecified),
1220 "REQUEST_INVALID" => Some(Self::RequestInvalid),
1221 "RESOURCE_TOO_BIG" => Some(Self::ResourceTooBig),
1222 "RESOURCE_NOT_FOUND" => Some(Self::ResourceNotFound),
1223 "UNSUPPORTED" => Some(Self::Unsupported),
1224 "NOT_IMPLEMENTED" => Some(Self::NotImplemented),
1225 "RESULT_STORAGE_PERMISSION_DENIED" => {
1226 Some(Self::ResultStoragePermissionDenied)
1227 }
1228 _ => None,
1229 }
1230 }
1231 }
1232}
1233/// Options for enabling sharding.
1234#[derive(Clone, PartialEq, ::prost::Message)]
1235pub struct ShardingOption {
1236 #[prost(oneof = "sharding_option::Option", tags = "1, 2, 3")]
1237 pub option: ::core::option::Option<sharding_option::Option>,
1238}
1239/// Nested message and enum types in `ShardingOption`.
1240pub mod sharding_option {
1241 #[derive(Clone, PartialEq, ::prost::Oneof)]
1242 pub enum Option {
1243 /// Uniformly shards test cases given a total number of shards.
1244 #[prost(message, tag = "1")]
1245 UniformSharding(super::UniformSharding),
1246 /// Shards test cases into the specified groups of packages, classes, and/or
1247 /// methods.
1248 #[prost(message, tag = "2")]
1249 ManualSharding(super::ManualSharding),
1250 /// Shards test based on previous test case timing records.
1251 #[prost(message, tag = "3")]
1252 SmartSharding(super::SmartSharding),
1253 }
1254}
1255/// Uniformly shards test cases given a total number of shards.
1256///
1257/// For instrumentation tests, it will be translated to "-e numShard" and "-e
1258/// shardIndex" AndroidJUnitRunner arguments. With uniform sharding enabled,
1259/// specifying either of these sharding arguments via `environment_variables` is
1260/// invalid.
1261///
1262/// Based on the sharding mechanism AndroidJUnitRunner uses, there is no
1263/// guarantee that test cases will be distributed uniformly across all shards.
1264#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1265pub struct UniformSharding {
1266 /// Required. The total number of shards to create. This must always be a
1267 /// positive number that is no greater than the total number of test cases.
1268 /// When you select one or more physical devices, the number of shards must be
1269 /// \<= 50. When you select one or more ARM virtual devices, it must be \<= 200.
1270 /// When you select only x86 virtual devices, it must be \<= 500.
1271 #[prost(int32, tag = "1")]
1272 pub num_shards: i32,
1273}
1274/// Shards test cases into the specified groups of packages, classes, and/or
1275/// methods.
1276///
1277/// With manual sharding enabled, specifying test targets via
1278/// environment_variables or in InstrumentationTest is invalid.
1279#[derive(Clone, PartialEq, ::prost::Message)]
1280pub struct ManualSharding {
1281 /// Required. Group of packages, classes, and/or test methods to be run for
1282 /// each manually-created shard. You must specify at least one shard if this
1283 /// field is present. When you select one or more physical devices, the number
1284 /// of repeated test_targets_for_shard must be \<= 50. When you select one or
1285 /// more ARM virtual devices, it must be \<= 200. When you select only x86
1286 /// virtual devices, it must be \<= 500.
1287 #[prost(message, repeated, tag = "1")]
1288 pub test_targets_for_shard: ::prost::alloc::vec::Vec<TestTargetsForShard>,
1289}
1290/// Test targets for a shard.
1291#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1292pub struct TestTargetsForShard {
1293 /// Group of packages, classes, and/or test methods to be run for each shard.
1294 /// The targets need to be specified in AndroidJUnitRunner argument format. For
1295 /// example, "package com.my.packages" "class com.my.package.MyClass".
1296 ///
1297 /// The number of test_targets must be greater than 0.
1298 #[prost(string, repeated, tag = "1")]
1299 pub test_targets: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1300}
1301/// Shards test based on previous test case timing records.
1302#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1303pub struct SmartSharding {
1304 /// The amount of time tests within a shard should take.
1305 ///
1306 /// Default: 300 seconds (5 minutes).
1307 /// The minimum allowed: 120 seconds (2 minutes).
1308 ///
1309 /// The shard count is dynamically set based on time, up to the maximum shard
1310 /// limit (described below). To guarantee at least one test case for each
1311 /// shard, the number of shards will not exceed the number of test cases. Shard
1312 /// duration will be exceeded if:
1313 ///
1314 /// * The maximum shard limit is reached and there is more calculated test time
1315 /// remaining to allocate into shards.
1316 /// * Any individual test is estimated to be longer than the targeted shard
1317 /// duration.
1318 ///
1319 /// Shard duration is not guaranteed because smart sharding uses test case
1320 /// history and default durations which may not be accurate. The rules for
1321 /// finding the test case timing records are:
1322 ///
1323 /// * If the service has processed a test case in the last 30 days, the record
1324 /// of the latest successful test case will be used.
1325 /// * For new test cases, the average duration of other known test cases will
1326 /// be used.
1327 /// * If there are no previous test case timing records available, the default
1328 /// test case duration is 15 seconds.
1329 ///
1330 /// Because the actual shard duration can exceed the targeted shard duration,
1331 /// we recommend that you set the targeted value at least 5 minutes less than
1332 /// the maximum allowed test timeout (45 minutes for physical devices and 60
1333 /// minutes for virtual), or that you use the custom test timeout value that
1334 /// you set. This approach avoids cancelling the shard before all tests can
1335 /// finish.
1336 ///
1337 /// Note that there is a limit for maximum number of shards. When you select
1338 /// one or more physical devices, the number of shards must be \<= 50. When you
1339 /// select one or more ARM virtual devices, it must be \<= 200. When you select
1340 /// only x86 virtual devices, it must be \<= 500. To guarantee at least one test
1341 /// case for per shard, the number of shards will not exceed the number of test
1342 /// cases. Each shard created counts toward daily test quota.
1343 #[prost(message, optional, tag = "1")]
1344 pub targeted_shard_duration: ::core::option::Option<::prost_types::Duration>,
1345}
1346/// Output only. Details about the shard.
1347#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1348pub struct Shard {
1349 /// Output only. The index of the shard among all the shards.
1350 #[prost(int32, tag = "1")]
1351 pub shard_index: i32,
1352 /// Output only. The total number of shards.
1353 #[prost(int32, tag = "2")]
1354 pub num_shards: i32,
1355 /// Output only. Test targets for each shard. Only set for manual sharding.
1356 #[prost(message, optional, tag = "3")]
1357 pub test_targets_for_shard: ::core::option::Option<TestTargetsForShard>,
1358 /// Output only. The estimated shard duration based on previous test case
1359 /// timing records, if available.
1360 #[prost(message, optional, tag = "4")]
1361 pub estimated_shard_duration: ::core::option::Option<::prost_types::Duration>,
1362}
1363/// Request to submit a matrix of tests for execution.
1364#[derive(Clone, PartialEq, ::prost::Message)]
1365pub struct CreateTestMatrixRequest {
1366 /// The GCE project under which this job will run.
1367 #[prost(string, tag = "1")]
1368 pub project_id: ::prost::alloc::string::String,
1369 /// The matrix of tests that the user wants to run.
1370 #[prost(message, optional, tag = "2")]
1371 pub test_matrix: ::core::option::Option<TestMatrix>,
1372 /// A string id used to detect duplicated requests.
1373 /// Ids are automatically scoped to a project, so
1374 /// users should ensure the ID is unique per-project.
1375 /// A UUID is recommended.
1376 ///
1377 /// Optional, but strongly recommended.
1378 #[prost(string, tag = "3")]
1379 pub request_id: ::prost::alloc::string::String,
1380}
1381/// Request to get the Test Matrix with the given id.
1382#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1383pub struct GetTestMatrixRequest {
1384 /// Cloud project that owns the test matrix.
1385 #[prost(string, tag = "1")]
1386 pub project_id: ::prost::alloc::string::String,
1387 /// Unique test matrix id which was assigned by the service.
1388 #[prost(string, tag = "2")]
1389 pub test_matrix_id: ::prost::alloc::string::String,
1390}
1391/// Request to stop running all of the tests in the specified matrix.
1392#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1393pub struct CancelTestMatrixRequest {
1394 /// Cloud project that owns the test.
1395 #[prost(string, tag = "1")]
1396 pub project_id: ::prost::alloc::string::String,
1397 /// Test matrix that will be canceled.
1398 #[prost(string, tag = "2")]
1399 pub test_matrix_id: ::prost::alloc::string::String,
1400}
1401/// Response containing the current state of the specified test matrix.
1402#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1403pub struct CancelTestMatrixResponse {
1404 /// The current rolled-up state of the test matrix.
1405 /// If this state is already final, then the cancelation request will
1406 /// have no effect.
1407 #[prost(enumeration = "TestState", tag = "1")]
1408 pub test_state: i32,
1409}
1410/// Specifies how to execute the test.
1411#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1412#[repr(i32)]
1413pub enum OrchestratorOption {
1414 /// Default value: the server will choose the mode. Currently implies that
1415 /// the test will run without the orchestrator. In the future,
1416 /// all instrumentation tests will be run with the orchestrator.
1417 /// Using the orchestrator is highly encouraged because of all the benefits it
1418 /// offers.
1419 Unspecified = 0,
1420 /// Run test using orchestrator.
1421 /// \** Only compatible with AndroidJUnitRunner version 1.1 or higher! **
1422 /// Recommended.
1423 UseOrchestrator = 1,
1424 /// Run test without using orchestrator.
1425 DoNotUseOrchestrator = 2,
1426}
1427impl OrchestratorOption {
1428 /// String value of the enum field names used in the ProtoBuf definition.
1429 ///
1430 /// The values are not transformed in any way and thus are considered stable
1431 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1432 pub fn as_str_name(&self) -> &'static str {
1433 match self {
1434 Self::Unspecified => "ORCHESTRATOR_OPTION_UNSPECIFIED",
1435 Self::UseOrchestrator => "USE_ORCHESTRATOR",
1436 Self::DoNotUseOrchestrator => "DO_NOT_USE_ORCHESTRATOR",
1437 }
1438 }
1439 /// Creates an enum from field names used in the ProtoBuf definition.
1440 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1441 match value {
1442 "ORCHESTRATOR_OPTION_UNSPECIFIED" => Some(Self::Unspecified),
1443 "USE_ORCHESTRATOR" => Some(Self::UseOrchestrator),
1444 "DO_NOT_USE_ORCHESTRATOR" => Some(Self::DoNotUseOrchestrator),
1445 _ => None,
1446 }
1447 }
1448}
1449/// The mode in which Robo should run.
1450#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1451#[repr(i32)]
1452pub enum RoboMode {
1453 /// This means that the server should choose the mode.
1454 /// Recommended.
1455 Unspecified = 0,
1456 /// Runs Robo in UIAutomator-only mode without app resigning
1457 RoboVersion1 = 1,
1458 /// Runs Robo in standard Espresso with UIAutomator fallback
1459 RoboVersion2 = 2,
1460}
1461impl RoboMode {
1462 /// String value of the enum field names used in the ProtoBuf definition.
1463 ///
1464 /// The values are not transformed in any way and thus are considered stable
1465 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1466 pub fn as_str_name(&self) -> &'static str {
1467 match self {
1468 Self::Unspecified => "ROBO_MODE_UNSPECIFIED",
1469 Self::RoboVersion1 => "ROBO_VERSION_1",
1470 Self::RoboVersion2 => "ROBO_VERSION_2",
1471 }
1472 }
1473 /// Creates an enum from field names used in the ProtoBuf definition.
1474 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1475 match value {
1476 "ROBO_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1477 "ROBO_VERSION_1" => Some(Self::RoboVersion1),
1478 "ROBO_VERSION_2" => Some(Self::RoboVersion2),
1479 _ => None,
1480 }
1481 }
1482}
1483/// Actions which Robo can perform on UI elements.
1484#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1485#[repr(i32)]
1486pub enum RoboActionType {
1487 /// DO NOT USE. For proto versioning only.
1488 ActionTypeUnspecified = 0,
1489 /// Direct Robo to click on the specified element. No-op if specified element
1490 /// is not clickable.
1491 SingleClick = 1,
1492 /// Direct Robo to enter text on the specified element. No-op if specified
1493 /// element is not enabled or does not allow text entry.
1494 EnterText = 2,
1495 /// Direct Robo to ignore interactions with a specific element.
1496 Ignore = 3,
1497}
1498impl RoboActionType {
1499 /// String value of the enum field names used in the ProtoBuf definition.
1500 ///
1501 /// The values are not transformed in any way and thus are considered stable
1502 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1503 pub fn as_str_name(&self) -> &'static str {
1504 match self {
1505 Self::ActionTypeUnspecified => "ACTION_TYPE_UNSPECIFIED",
1506 Self::SingleClick => "SINGLE_CLICK",
1507 Self::EnterText => "ENTER_TEXT",
1508 Self::Ignore => "IGNORE",
1509 }
1510 }
1511 /// Creates an enum from field names used in the ProtoBuf definition.
1512 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1513 match value {
1514 "ACTION_TYPE_UNSPECIFIED" => Some(Self::ActionTypeUnspecified),
1515 "SINGLE_CLICK" => Some(Self::SingleClick),
1516 "ENTER_TEXT" => Some(Self::EnterText),
1517 "IGNORE" => Some(Self::Ignore),
1518 _ => None,
1519 }
1520 }
1521}
1522/// The detailed reason that a Matrix was deemed INVALID.
1523#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1524#[repr(i32)]
1525pub enum InvalidMatrixDetails {
1526 /// Do not use. For proto versioning only.
1527 Unspecified = 0,
1528 /// The matrix is INVALID, but there are no further details available.
1529 DetailsUnavailable = 1,
1530 /// The input app APK could not be parsed.
1531 MalformedApk = 2,
1532 /// The input test APK could not be parsed.
1533 MalformedTestApk = 3,
1534 /// The AndroidManifest.xml could not be found.
1535 NoManifest = 4,
1536 /// The APK manifest does not declare a package name.
1537 NoPackageName = 5,
1538 /// The APK application ID (aka package name) is invalid.
1539 /// See also
1540 /// <https://developer.android.com/studio/build/application-id>
1541 InvalidPackageName = 31,
1542 /// The test package and app package are the same.
1543 TestSameAsApp = 6,
1544 /// The test apk does not declare an instrumentation.
1545 NoInstrumentation = 7,
1546 /// The input app apk does not have a signature.
1547 NoSignature = 20,
1548 /// The test runner class specified by user or in the test APK's manifest file
1549 /// is not compatible with Android Test Orchestrator.
1550 /// Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or
1551 /// higher.
1552 /// Orchestrator can be disabled by using DO_NOT_USE_ORCHESTRATOR
1553 /// OrchestratorOption.
1554 InstrumentationOrchestratorIncompatible = 18,
1555 /// The test APK does not contain the test runner class specified by the user
1556 /// or in the manifest file. This can be caused by one of the following
1557 /// reasons:
1558 ///
1559 /// * the user provided a runner class name that's incorrect, or
1560 /// * the test runner isn't built into the test APK (might be in the app APK
1561 /// instead).
1562 NoTestRunnerClass = 19,
1563 /// A main launcher activity could not be found.
1564 NoLauncherActivity = 8,
1565 /// The app declares one or more permissions that are not allowed.
1566 ForbiddenPermissions = 9,
1567 /// There is a conflict in the provided robo_directives.
1568 InvalidRoboDirectives = 10,
1569 /// There is at least one invalid resource name in the provided
1570 /// robo directives
1571 InvalidResourceName = 33,
1572 /// Invalid definition of action in the robo directives
1573 /// (e.g. a click or ignore action includes an input text field)
1574 InvalidDirectiveAction = 34,
1575 /// There is no test loop intent filter, or the one that is given is
1576 /// not formatted correctly.
1577 TestLoopIntentFilterNotFound = 12,
1578 /// The request contains a scenario label that was not declared in the
1579 /// manifest.
1580 ScenarioLabelNotDeclared = 13,
1581 /// There was an error when parsing a label's value.
1582 ScenarioLabelMalformed = 14,
1583 /// The request contains a scenario number that was not declared in the
1584 /// manifest.
1585 ScenarioNotDeclared = 15,
1586 /// Device administrator applications are not allowed.
1587 DeviceAdminReceiver = 17,
1588 /// The zipped XCTest was malformed. The zip did not contain a single
1589 /// .xctestrun file and the contents of the DerivedData/Build/Products
1590 /// directory.
1591 MalformedXcTestZip = 11,
1592 /// The zipped XCTest was built for the iOS simulator rather than for a
1593 /// physical device.
1594 BuiltForIosSimulator = 24,
1595 /// The .xctestrun file did not specify any test targets.
1596 NoTestsInXcTestZip = 25,
1597 /// One or more of the test targets defined in the .xctestrun file specifies
1598 /// "UseDestinationArtifacts", which is disallowed.
1599 UseDestinationArtifacts = 26,
1600 /// XC tests which run on physical devices must have
1601 /// "IsAppHostedTestBundle" == "true" in the xctestrun file.
1602 TestNotAppHosted = 28,
1603 /// An Info.plist file in the XCTest zip could not be parsed.
1604 PlistCannotBeParsed = 30,
1605 /// The APK is marked as "testOnly".
1606 /// Deprecated and not currently used.
1607 #[deprecated]
1608 TestOnlyApk = 21,
1609 /// The input IPA could not be parsed.
1610 MalformedIpa = 22,
1611 /// The application doesn't register the game loop URL scheme.
1612 MissingUrlScheme = 35,
1613 /// The iOS application bundle (.app) couldn't be processed.
1614 MalformedAppBundle = 36,
1615 /// APK contains no code.
1616 /// See also
1617 /// <https://developer.android.com/guide/topics/manifest/application-element.html#code>
1618 NoCodeApk = 23,
1619 /// Either the provided input APK path was malformed,
1620 /// the APK file does not exist, or the user does not have permission to
1621 /// access the APK file.
1622 InvalidInputApk = 27,
1623 /// APK is built for a preview SDK which is unsupported
1624 InvalidApkPreviewSdk = 29,
1625 /// The matrix expanded to contain too many executions.
1626 MatrixTooLarge = 37,
1627 /// Not enough test quota to run the executions in this matrix.
1628 TestQuotaExceeded = 39,
1629 /// A required cloud service api is not activated.
1630 /// See:
1631 /// <https://firebase.google.com/docs/test-lab/android/continuous#requirements>
1632 ServiceNotActivated = 40,
1633 /// There was an unknown permission issue running this test.
1634 UnknownPermissionError = 41,
1635}
1636impl InvalidMatrixDetails {
1637 /// String value of the enum field names used in the ProtoBuf definition.
1638 ///
1639 /// The values are not transformed in any way and thus are considered stable
1640 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1641 pub fn as_str_name(&self) -> &'static str {
1642 match self {
1643 Self::Unspecified => "INVALID_MATRIX_DETAILS_UNSPECIFIED",
1644 Self::DetailsUnavailable => "DETAILS_UNAVAILABLE",
1645 Self::MalformedApk => "MALFORMED_APK",
1646 Self::MalformedTestApk => "MALFORMED_TEST_APK",
1647 Self::NoManifest => "NO_MANIFEST",
1648 Self::NoPackageName => "NO_PACKAGE_NAME",
1649 Self::InvalidPackageName => "INVALID_PACKAGE_NAME",
1650 Self::TestSameAsApp => "TEST_SAME_AS_APP",
1651 Self::NoInstrumentation => "NO_INSTRUMENTATION",
1652 Self::NoSignature => "NO_SIGNATURE",
1653 Self::InstrumentationOrchestratorIncompatible => {
1654 "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE"
1655 }
1656 Self::NoTestRunnerClass => "NO_TEST_RUNNER_CLASS",
1657 Self::NoLauncherActivity => "NO_LAUNCHER_ACTIVITY",
1658 Self::ForbiddenPermissions => "FORBIDDEN_PERMISSIONS",
1659 Self::InvalidRoboDirectives => "INVALID_ROBO_DIRECTIVES",
1660 Self::InvalidResourceName => "INVALID_RESOURCE_NAME",
1661 Self::InvalidDirectiveAction => "INVALID_DIRECTIVE_ACTION",
1662 Self::TestLoopIntentFilterNotFound => "TEST_LOOP_INTENT_FILTER_NOT_FOUND",
1663 Self::ScenarioLabelNotDeclared => "SCENARIO_LABEL_NOT_DECLARED",
1664 Self::ScenarioLabelMalformed => "SCENARIO_LABEL_MALFORMED",
1665 Self::ScenarioNotDeclared => "SCENARIO_NOT_DECLARED",
1666 Self::DeviceAdminReceiver => "DEVICE_ADMIN_RECEIVER",
1667 Self::MalformedXcTestZip => "MALFORMED_XC_TEST_ZIP",
1668 Self::BuiltForIosSimulator => "BUILT_FOR_IOS_SIMULATOR",
1669 Self::NoTestsInXcTestZip => "NO_TESTS_IN_XC_TEST_ZIP",
1670 Self::UseDestinationArtifacts => "USE_DESTINATION_ARTIFACTS",
1671 Self::TestNotAppHosted => "TEST_NOT_APP_HOSTED",
1672 Self::PlistCannotBeParsed => "PLIST_CANNOT_BE_PARSED",
1673 #[allow(deprecated)]
1674 Self::TestOnlyApk => "TEST_ONLY_APK",
1675 Self::MalformedIpa => "MALFORMED_IPA",
1676 Self::MissingUrlScheme => "MISSING_URL_SCHEME",
1677 Self::MalformedAppBundle => "MALFORMED_APP_BUNDLE",
1678 Self::NoCodeApk => "NO_CODE_APK",
1679 Self::InvalidInputApk => "INVALID_INPUT_APK",
1680 Self::InvalidApkPreviewSdk => "INVALID_APK_PREVIEW_SDK",
1681 Self::MatrixTooLarge => "MATRIX_TOO_LARGE",
1682 Self::TestQuotaExceeded => "TEST_QUOTA_EXCEEDED",
1683 Self::ServiceNotActivated => "SERVICE_NOT_ACTIVATED",
1684 Self::UnknownPermissionError => "UNKNOWN_PERMISSION_ERROR",
1685 }
1686 }
1687 /// Creates an enum from field names used in the ProtoBuf definition.
1688 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1689 match value {
1690 "INVALID_MATRIX_DETAILS_UNSPECIFIED" => Some(Self::Unspecified),
1691 "DETAILS_UNAVAILABLE" => Some(Self::DetailsUnavailable),
1692 "MALFORMED_APK" => Some(Self::MalformedApk),
1693 "MALFORMED_TEST_APK" => Some(Self::MalformedTestApk),
1694 "NO_MANIFEST" => Some(Self::NoManifest),
1695 "NO_PACKAGE_NAME" => Some(Self::NoPackageName),
1696 "INVALID_PACKAGE_NAME" => Some(Self::InvalidPackageName),
1697 "TEST_SAME_AS_APP" => Some(Self::TestSameAsApp),
1698 "NO_INSTRUMENTATION" => Some(Self::NoInstrumentation),
1699 "NO_SIGNATURE" => Some(Self::NoSignature),
1700 "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE" => {
1701 Some(Self::InstrumentationOrchestratorIncompatible)
1702 }
1703 "NO_TEST_RUNNER_CLASS" => Some(Self::NoTestRunnerClass),
1704 "NO_LAUNCHER_ACTIVITY" => Some(Self::NoLauncherActivity),
1705 "FORBIDDEN_PERMISSIONS" => Some(Self::ForbiddenPermissions),
1706 "INVALID_ROBO_DIRECTIVES" => Some(Self::InvalidRoboDirectives),
1707 "INVALID_RESOURCE_NAME" => Some(Self::InvalidResourceName),
1708 "INVALID_DIRECTIVE_ACTION" => Some(Self::InvalidDirectiveAction),
1709 "TEST_LOOP_INTENT_FILTER_NOT_FOUND" => {
1710 Some(Self::TestLoopIntentFilterNotFound)
1711 }
1712 "SCENARIO_LABEL_NOT_DECLARED" => Some(Self::ScenarioLabelNotDeclared),
1713 "SCENARIO_LABEL_MALFORMED" => Some(Self::ScenarioLabelMalformed),
1714 "SCENARIO_NOT_DECLARED" => Some(Self::ScenarioNotDeclared),
1715 "DEVICE_ADMIN_RECEIVER" => Some(Self::DeviceAdminReceiver),
1716 "MALFORMED_XC_TEST_ZIP" => Some(Self::MalformedXcTestZip),
1717 "BUILT_FOR_IOS_SIMULATOR" => Some(Self::BuiltForIosSimulator),
1718 "NO_TESTS_IN_XC_TEST_ZIP" => Some(Self::NoTestsInXcTestZip),
1719 "USE_DESTINATION_ARTIFACTS" => Some(Self::UseDestinationArtifacts),
1720 "TEST_NOT_APP_HOSTED" => Some(Self::TestNotAppHosted),
1721 "PLIST_CANNOT_BE_PARSED" => Some(Self::PlistCannotBeParsed),
1722 "TEST_ONLY_APK" => Some(#[allow(deprecated)] Self::TestOnlyApk),
1723 "MALFORMED_IPA" => Some(Self::MalformedIpa),
1724 "MISSING_URL_SCHEME" => Some(Self::MissingUrlScheme),
1725 "MALFORMED_APP_BUNDLE" => Some(Self::MalformedAppBundle),
1726 "NO_CODE_APK" => Some(Self::NoCodeApk),
1727 "INVALID_INPUT_APK" => Some(Self::InvalidInputApk),
1728 "INVALID_APK_PREVIEW_SDK" => Some(Self::InvalidApkPreviewSdk),
1729 "MATRIX_TOO_LARGE" => Some(Self::MatrixTooLarge),
1730 "TEST_QUOTA_EXCEEDED" => Some(Self::TestQuotaExceeded),
1731 "SERVICE_NOT_ACTIVATED" => Some(Self::ServiceNotActivated),
1732 "UNKNOWN_PERMISSION_ERROR" => Some(Self::UnknownPermissionError),
1733 _ => None,
1734 }
1735 }
1736}
1737#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1738#[repr(i32)]
1739pub enum TestState {
1740 /// Do not use. For proto versioning only.
1741 Unspecified = 0,
1742 /// The execution or matrix is being validated.
1743 Validating = 8,
1744 /// The execution or matrix is waiting for resources to become available.
1745 Pending = 1,
1746 /// The execution is currently being processed.
1747 ///
1748 /// Can only be set on an execution.
1749 Running = 2,
1750 /// The execution or matrix has terminated normally.
1751 ///
1752 /// On a matrix this means that the matrix level processing completed normally,
1753 /// but individual executions may be in an ERROR state.
1754 Finished = 3,
1755 /// The execution or matrix has stopped because it encountered an
1756 /// infrastructure failure.
1757 Error = 4,
1758 /// The execution was not run because it corresponds to a unsupported
1759 /// environment.
1760 ///
1761 /// Can only be set on an execution.
1762 UnsupportedEnvironment = 5,
1763 /// The execution was not run because the provided inputs are incompatible with
1764 /// the requested environment.
1765 ///
1766 /// Example: requested AndroidVersion is lower than APK's minSdkVersion
1767 ///
1768 /// Can only be set on an execution.
1769 IncompatibleEnvironment = 9,
1770 /// The execution was not run because the provided inputs are incompatible with
1771 /// the requested architecture.
1772 ///
1773 /// Example: requested device does not support running the native code in
1774 /// the supplied APK
1775 ///
1776 /// Can only be set on an execution.
1777 IncompatibleArchitecture = 10,
1778 /// The user cancelled the execution.
1779 ///
1780 /// Can only be set on an execution.
1781 Cancelled = 6,
1782 /// The execution or matrix was not run because the provided inputs are not
1783 /// valid.
1784 ///
1785 /// Examples: input file is not of the expected type, is malformed/corrupt, or
1786 /// was flagged as malware
1787 Invalid = 7,
1788}
1789impl TestState {
1790 /// String value of the enum field names used in the ProtoBuf definition.
1791 ///
1792 /// The values are not transformed in any way and thus are considered stable
1793 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1794 pub fn as_str_name(&self) -> &'static str {
1795 match self {
1796 Self::Unspecified => "TEST_STATE_UNSPECIFIED",
1797 Self::Validating => "VALIDATING",
1798 Self::Pending => "PENDING",
1799 Self::Running => "RUNNING",
1800 Self::Finished => "FINISHED",
1801 Self::Error => "ERROR",
1802 Self::UnsupportedEnvironment => "UNSUPPORTED_ENVIRONMENT",
1803 Self::IncompatibleEnvironment => "INCOMPATIBLE_ENVIRONMENT",
1804 Self::IncompatibleArchitecture => "INCOMPATIBLE_ARCHITECTURE",
1805 Self::Cancelled => "CANCELLED",
1806 Self::Invalid => "INVALID",
1807 }
1808 }
1809 /// Creates an enum from field names used in the ProtoBuf definition.
1810 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1811 match value {
1812 "TEST_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1813 "VALIDATING" => Some(Self::Validating),
1814 "PENDING" => Some(Self::Pending),
1815 "RUNNING" => Some(Self::Running),
1816 "FINISHED" => Some(Self::Finished),
1817 "ERROR" => Some(Self::Error),
1818 "UNSUPPORTED_ENVIRONMENT" => Some(Self::UnsupportedEnvironment),
1819 "INCOMPATIBLE_ENVIRONMENT" => Some(Self::IncompatibleEnvironment),
1820 "INCOMPATIBLE_ARCHITECTURE" => Some(Self::IncompatibleArchitecture),
1821 "CANCELLED" => Some(Self::Cancelled),
1822 "INVALID" => Some(Self::Invalid),
1823 _ => None,
1824 }
1825 }
1826}
1827/// Outcome summary for a finished test matrix.
1828#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1829#[repr(i32)]
1830pub enum OutcomeSummary {
1831 /// Do not use. For proto versioning only.
1832 Unspecified = 0,
1833 /// The test matrix run was successful, for instance:
1834 ///
1835 /// * All the test cases passed.
1836 /// * Robo did not detect a crash of the application under test.
1837 Success = 1,
1838 /// A run failed, for instance:
1839 ///
1840 /// * One or more test cases failed.
1841 /// * A test timed out.
1842 /// * The application under test crashed.
1843 Failure = 2,
1844 /// Something unexpected happened. The run should still be considered
1845 /// unsuccessful but this is likely a transient problem and re-running the
1846 /// test might be successful.
1847 Inconclusive = 3,
1848 /// All tests were skipped, for instance:
1849 ///
1850 /// * All device configurations were incompatible.
1851 Skipped = 4,
1852}
1853impl OutcomeSummary {
1854 /// String value of the enum field names used in the ProtoBuf definition.
1855 ///
1856 /// The values are not transformed in any way and thus are considered stable
1857 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1858 pub fn as_str_name(&self) -> &'static str {
1859 match self {
1860 Self::Unspecified => "OUTCOME_SUMMARY_UNSPECIFIED",
1861 Self::Success => "SUCCESS",
1862 Self::Failure => "FAILURE",
1863 Self::Inconclusive => "INCONCLUSIVE",
1864 Self::Skipped => "SKIPPED",
1865 }
1866 }
1867 /// Creates an enum from field names used in the ProtoBuf definition.
1868 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1869 match value {
1870 "OUTCOME_SUMMARY_UNSPECIFIED" => Some(Self::Unspecified),
1871 "SUCCESS" => Some(Self::Success),
1872 "FAILURE" => Some(Self::Failure),
1873 "INCONCLUSIVE" => Some(Self::Inconclusive),
1874 "SKIPPED" => Some(Self::Skipped),
1875 _ => None,
1876 }
1877 }
1878}
1879/// Generated client implementations.
1880pub mod test_execution_service_client {
1881 #![allow(
1882 unused_variables,
1883 dead_code,
1884 missing_docs,
1885 clippy::wildcard_imports,
1886 clippy::let_unit_value,
1887 )]
1888 use tonic::codegen::*;
1889 use tonic::codegen::http::Uri;
1890 /// A service for requesting test executions and querying their status.
1891 ///
1892 /// This service is part of Firebase Test Lab. To learn about how to use the
1893 /// product, and how to integrate it with your system,
1894 /// visit https://firebase.google.com/docs/test-lab.
1895 ///
1896 /// Each test execution will wait for available capacity. It will then be
1897 /// invoked as described. The test may be invoked multiple times if an
1898 /// infrastructure failure is detected. Results and other files generated by
1899 /// the test will be stored in an external storage system.
1900 ///
1901 /// The TestExecutionService models this behavior using two resource types:
1902 ///
1903 /// * TestMatrix: a group of one or more TestExecutions, built by taking a
1904 /// product of values over a pre-defined set of axes. In the case of Android
1905 /// Tests, for example, device model and OS version are two axes of the matrix.
1906 ///
1907 /// * TestExecution: a single execution of one or more test targets on a
1908 /// single device. These are created automatically when a TestMatrix is
1909 /// created.
1910 ///
1911 /// This service returns any error codes from the canonical error space (i.e.
1912 /// google.rpc.Code). The errors which may be returned are specified on each
1913 /// method. In addition, any method may return UNAVAILABLE or INTERNAL.
1914 #[derive(Debug, Clone)]
1915 pub struct TestExecutionServiceClient<T> {
1916 inner: tonic::client::Grpc<T>,
1917 }
1918 impl<T> TestExecutionServiceClient<T>
1919 where
1920 T: tonic::client::GrpcService<tonic::body::Body>,
1921 T::Error: Into<StdError>,
1922 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1923 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1924 {
1925 pub fn new(inner: T) -> Self {
1926 let inner = tonic::client::Grpc::new(inner);
1927 Self { inner }
1928 }
1929 pub fn with_origin(inner: T, origin: Uri) -> Self {
1930 let inner = tonic::client::Grpc::with_origin(inner, origin);
1931 Self { inner }
1932 }
1933 pub fn with_interceptor<F>(
1934 inner: T,
1935 interceptor: F,
1936 ) -> TestExecutionServiceClient<InterceptedService<T, F>>
1937 where
1938 F: tonic::service::Interceptor,
1939 T::ResponseBody: Default,
1940 T: tonic::codegen::Service<
1941 http::Request<tonic::body::Body>,
1942 Response = http::Response<
1943 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1944 >,
1945 >,
1946 <T as tonic::codegen::Service<
1947 http::Request<tonic::body::Body>,
1948 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1949 {
1950 TestExecutionServiceClient::new(InterceptedService::new(inner, interceptor))
1951 }
1952 /// Compress requests with the given encoding.
1953 ///
1954 /// This requires the server to support it otherwise it might respond with an
1955 /// error.
1956 #[must_use]
1957 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1958 self.inner = self.inner.send_compressed(encoding);
1959 self
1960 }
1961 /// Enable decompressing responses.
1962 #[must_use]
1963 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1964 self.inner = self.inner.accept_compressed(encoding);
1965 self
1966 }
1967 /// Limits the maximum size of a decoded message.
1968 ///
1969 /// Default: `4MB`
1970 #[must_use]
1971 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1972 self.inner = self.inner.max_decoding_message_size(limit);
1973 self
1974 }
1975 /// Limits the maximum size of an encoded message.
1976 ///
1977 /// Default: `usize::MAX`
1978 #[must_use]
1979 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1980 self.inner = self.inner.max_encoding_message_size(limit);
1981 self
1982 }
1983 /// Creates and runs a matrix of tests according to the given specifications.
1984 /// Unsupported environments will be returned in the state UNSUPPORTED.
1985 /// A test matrix is limited to use at most 2000 devices in parallel.
1986 ///
1987 /// The returned matrix will not yet contain the executions that will be
1988 /// created for this matrix. Execution creation happens later on and will
1989 /// require a call to GetTestMatrix.
1990 ///
1991 /// May return any of the following canonical error codes:
1992 ///
1993 /// * PERMISSION_DENIED - if the user is not authorized to write to project
1994 /// * INVALID_ARGUMENT - if the request is malformed or if the matrix tries
1995 /// to use too many simultaneous devices.
1996 pub async fn create_test_matrix(
1997 &mut self,
1998 request: impl tonic::IntoRequest<super::CreateTestMatrixRequest>,
1999 ) -> std::result::Result<tonic::Response<super::TestMatrix>, tonic::Status> {
2000 self.inner
2001 .ready()
2002 .await
2003 .map_err(|e| {
2004 tonic::Status::unknown(
2005 format!("Service was not ready: {}", e.into()),
2006 )
2007 })?;
2008 let codec = tonic_prost::ProstCodec::default();
2009 let path = http::uri::PathAndQuery::from_static(
2010 "/google.devtools.testing.v1.TestExecutionService/CreateTestMatrix",
2011 );
2012 let mut req = request.into_request();
2013 req.extensions_mut()
2014 .insert(
2015 GrpcMethod::new(
2016 "google.devtools.testing.v1.TestExecutionService",
2017 "CreateTestMatrix",
2018 ),
2019 );
2020 self.inner.unary(req, path, codec).await
2021 }
2022 /// Checks the status of a test matrix and the executions once they
2023 /// are created.
2024 ///
2025 /// The test matrix will contain the list of test executions to run if and only
2026 /// if the resultStorage.toolResultsExecution fields have been populated.
2027 ///
2028 /// Note: Flaky test executions may be added to the matrix at a later stage.
2029 ///
2030 /// May return any of the following canonical error codes:
2031 ///
2032 /// * PERMISSION_DENIED - if the user is not authorized to read project
2033 /// * INVALID_ARGUMENT - if the request is malformed
2034 /// * NOT_FOUND - if the Test Matrix does not exist
2035 pub async fn get_test_matrix(
2036 &mut self,
2037 request: impl tonic::IntoRequest<super::GetTestMatrixRequest>,
2038 ) -> std::result::Result<tonic::Response<super::TestMatrix>, tonic::Status> {
2039 self.inner
2040 .ready()
2041 .await
2042 .map_err(|e| {
2043 tonic::Status::unknown(
2044 format!("Service was not ready: {}", e.into()),
2045 )
2046 })?;
2047 let codec = tonic_prost::ProstCodec::default();
2048 let path = http::uri::PathAndQuery::from_static(
2049 "/google.devtools.testing.v1.TestExecutionService/GetTestMatrix",
2050 );
2051 let mut req = request.into_request();
2052 req.extensions_mut()
2053 .insert(
2054 GrpcMethod::new(
2055 "google.devtools.testing.v1.TestExecutionService",
2056 "GetTestMatrix",
2057 ),
2058 );
2059 self.inner.unary(req, path, codec).await
2060 }
2061 /// Cancels unfinished test executions in a test matrix.
2062 /// This call returns immediately and cancellation proceeds asynchronously.
2063 /// If the matrix is already final, this operation will have no effect.
2064 ///
2065 /// May return any of the following canonical error codes:
2066 ///
2067 /// * PERMISSION_DENIED - if the user is not authorized to read project
2068 /// * INVALID_ARGUMENT - if the request is malformed
2069 /// * NOT_FOUND - if the Test Matrix does not exist
2070 pub async fn cancel_test_matrix(
2071 &mut self,
2072 request: impl tonic::IntoRequest<super::CancelTestMatrixRequest>,
2073 ) -> std::result::Result<
2074 tonic::Response<super::CancelTestMatrixResponse>,
2075 tonic::Status,
2076 > {
2077 self.inner
2078 .ready()
2079 .await
2080 .map_err(|e| {
2081 tonic::Status::unknown(
2082 format!("Service was not ready: {}", e.into()),
2083 )
2084 })?;
2085 let codec = tonic_prost::ProstCodec::default();
2086 let path = http::uri::PathAndQuery::from_static(
2087 "/google.devtools.testing.v1.TestExecutionService/CancelTestMatrix",
2088 );
2089 let mut req = request.into_request();
2090 req.extensions_mut()
2091 .insert(
2092 GrpcMethod::new(
2093 "google.devtools.testing.v1.TestExecutionService",
2094 "CancelTestMatrix",
2095 ),
2096 );
2097 self.inner.unary(req, path, codec).await
2098 }
2099 }
2100}
2101/// Android application details based on application manifest and archive
2102/// contents.
2103#[derive(Clone, PartialEq, ::prost::Message)]
2104pub struct ApkDetail {
2105 #[prost(message, optional, tag = "1")]
2106 pub apk_manifest: ::core::option::Option<ApkManifest>,
2107}
2108/// An Android app manifest. See
2109/// <http://developer.android.com/guide/topics/manifest/manifest-intro.html>
2110#[derive(Clone, PartialEq, ::prost::Message)]
2111pub struct ApkManifest {
2112 /// Full Java-style package name for this application, e.g.
2113 /// "com.example.foo".
2114 #[prost(string, tag = "1")]
2115 pub package_name: ::prost::alloc::string::String,
2116 /// Minimum API level required for the application to run.
2117 #[prost(int32, tag = "2")]
2118 pub min_sdk_version: i32,
2119 /// Maximum API level on which the application is designed to run.
2120 #[prost(int32, tag = "3")]
2121 pub max_sdk_version: i32,
2122 /// Specifies the API Level on which the application is designed to run.
2123 #[prost(int32, tag = "6")]
2124 pub target_sdk_version: i32,
2125 /// User-readable name for the application.
2126 #[prost(string, tag = "4")]
2127 pub application_label: ::prost::alloc::string::String,
2128 #[prost(message, repeated, tag = "5")]
2129 pub intent_filters: ::prost::alloc::vec::Vec<IntentFilter>,
2130 /// Permissions declared to be used by the application
2131 #[prost(message, repeated, tag = "13")]
2132 pub uses_permission_tags: ::prost::alloc::vec::Vec<UsesPermissionTag>,
2133 #[prost(string, repeated, tag = "7")]
2134 pub uses_permission: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2135 /// Version number used internally by the app.
2136 #[prost(int64, tag = "8")]
2137 pub version_code: i64,
2138 /// Version number shown to users.
2139 #[prost(string, tag = "9")]
2140 pub version_name: ::prost::alloc::string::String,
2141 /// Meta-data tags defined in the manifest.
2142 #[prost(message, repeated, tag = "10")]
2143 pub metadata: ::prost::alloc::vec::Vec<Metadata>,
2144 /// Feature usage tags defined in the manifest.
2145 #[prost(message, repeated, tag = "11")]
2146 pub uses_feature: ::prost::alloc::vec::Vec<UsesFeature>,
2147 /// Services contained in the <application> tag.
2148 #[prost(message, repeated, tag = "12")]
2149 pub services: ::prost::alloc::vec::Vec<Service>,
2150}
2151/// The <uses-permission> tag within a manifest.
2152/// <https://developer.android.com/guide/topics/manifest/uses-permission-element.html>
2153#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2154pub struct UsesPermissionTag {
2155 /// The android:name value
2156 #[prost(string, tag = "1")]
2157 pub name: ::prost::alloc::string::String,
2158 /// The android:name value
2159 #[prost(int32, tag = "2")]
2160 pub max_sdk_version: i32,
2161}
2162/// The <service> section of an <application> tag.
2163/// <https://developer.android.com/guide/topics/manifest/service-element>
2164#[derive(Clone, PartialEq, ::prost::Message)]
2165pub struct Service {
2166 /// The android:name value
2167 #[prost(string, tag = "1")]
2168 pub name: ::prost::alloc::string::String,
2169 /// Intent filters in the service
2170 #[prost(message, repeated, tag = "2")]
2171 pub intent_filter: ::prost::alloc::vec::Vec<IntentFilter>,
2172}
2173/// The <intent-filter> section of an <activity> tag.
2174/// <https://developer.android.com/guide/topics/manifest/intent-filter-element.html>
2175#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2176pub struct IntentFilter {
2177 /// The android:name value of the <action> tag.
2178 #[prost(string, repeated, tag = "1")]
2179 pub action_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2180 /// The android:name value of the <category> tag.
2181 #[prost(string, repeated, tag = "2")]
2182 pub category_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2183 /// The android:mimeType value of the <data> tag.
2184 #[prost(string, tag = "3")]
2185 pub mime_type: ::prost::alloc::string::String,
2186}
2187/// A <meta-data> tag within a manifest.
2188/// <https://developer.android.com/guide/topics/manifest/meta-data-element.html>
2189#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2190pub struct Metadata {
2191 /// The android:name value
2192 #[prost(string, tag = "1")]
2193 pub name: ::prost::alloc::string::String,
2194 /// The android:value value
2195 #[prost(string, tag = "2")]
2196 pub value: ::prost::alloc::string::String,
2197}
2198/// A <uses-feature> tag within a manifest.
2199/// <https://developer.android.com/guide/topics/manifest/uses-feature-element.html>
2200#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2201pub struct UsesFeature {
2202 /// The android:name value
2203 #[prost(string, tag = "1")]
2204 pub name: ::prost::alloc::string::String,
2205 /// The android:required value
2206 #[prost(bool, tag = "2")]
2207 pub is_required: bool,
2208}
2209/// A request to get the details of an Android application.
2210#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2211pub struct GetApkDetailsRequest {
2212 /// Optional. The APK to be parsed for details.
2213 #[prost(message, optional, tag = "1")]
2214 pub location: ::core::option::Option<FileReference>,
2215 /// Optional. The App Bundle to be parsed for details.
2216 #[prost(message, optional, tag = "2")]
2217 pub bundle_location: ::core::option::Option<FileReference>,
2218}
2219/// Response containing the details of the specified Android application.
2220#[derive(Clone, PartialEq, ::prost::Message)]
2221pub struct GetApkDetailsResponse {
2222 /// Details of the Android App.
2223 #[prost(message, optional, tag = "1")]
2224 pub apk_detail: ::core::option::Option<ApkDetail>,
2225}
2226/// Generated client implementations.
2227pub mod application_detail_service_client {
2228 #![allow(
2229 unused_variables,
2230 dead_code,
2231 missing_docs,
2232 clippy::wildcard_imports,
2233 clippy::let_unit_value,
2234 )]
2235 use tonic::codegen::*;
2236 use tonic::codegen::http::Uri;
2237 /// A service which parses input applications and returns details that can be
2238 /// useful in the context of testing.
2239 #[derive(Debug, Clone)]
2240 pub struct ApplicationDetailServiceClient<T> {
2241 inner: tonic::client::Grpc<T>,
2242 }
2243 impl<T> ApplicationDetailServiceClient<T>
2244 where
2245 T: tonic::client::GrpcService<tonic::body::Body>,
2246 T::Error: Into<StdError>,
2247 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2248 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2249 {
2250 pub fn new(inner: T) -> Self {
2251 let inner = tonic::client::Grpc::new(inner);
2252 Self { inner }
2253 }
2254 pub fn with_origin(inner: T, origin: Uri) -> Self {
2255 let inner = tonic::client::Grpc::with_origin(inner, origin);
2256 Self { inner }
2257 }
2258 pub fn with_interceptor<F>(
2259 inner: T,
2260 interceptor: F,
2261 ) -> ApplicationDetailServiceClient<InterceptedService<T, F>>
2262 where
2263 F: tonic::service::Interceptor,
2264 T::ResponseBody: Default,
2265 T: tonic::codegen::Service<
2266 http::Request<tonic::body::Body>,
2267 Response = http::Response<
2268 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2269 >,
2270 >,
2271 <T as tonic::codegen::Service<
2272 http::Request<tonic::body::Body>,
2273 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2274 {
2275 ApplicationDetailServiceClient::new(
2276 InterceptedService::new(inner, interceptor),
2277 )
2278 }
2279 /// Compress requests with the given encoding.
2280 ///
2281 /// This requires the server to support it otherwise it might respond with an
2282 /// error.
2283 #[must_use]
2284 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2285 self.inner = self.inner.send_compressed(encoding);
2286 self
2287 }
2288 /// Enable decompressing responses.
2289 #[must_use]
2290 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2291 self.inner = self.inner.accept_compressed(encoding);
2292 self
2293 }
2294 /// Limits the maximum size of a decoded message.
2295 ///
2296 /// Default: `4MB`
2297 #[must_use]
2298 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2299 self.inner = self.inner.max_decoding_message_size(limit);
2300 self
2301 }
2302 /// Limits the maximum size of an encoded message.
2303 ///
2304 /// Default: `usize::MAX`
2305 #[must_use]
2306 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2307 self.inner = self.inner.max_encoding_message_size(limit);
2308 self
2309 }
2310 /// Gets the details of an Android application APK.
2311 pub async fn get_apk_details(
2312 &mut self,
2313 request: impl tonic::IntoRequest<super::GetApkDetailsRequest>,
2314 ) -> std::result::Result<
2315 tonic::Response<super::GetApkDetailsResponse>,
2316 tonic::Status,
2317 > {
2318 self.inner
2319 .ready()
2320 .await
2321 .map_err(|e| {
2322 tonic::Status::unknown(
2323 format!("Service was not ready: {}", e.into()),
2324 )
2325 })?;
2326 let codec = tonic_prost::ProstCodec::default();
2327 let path = http::uri::PathAndQuery::from_static(
2328 "/google.devtools.testing.v1.ApplicationDetailService/GetApkDetails",
2329 );
2330 let mut req = request.into_request();
2331 req.extensions_mut()
2332 .insert(
2333 GrpcMethod::new(
2334 "google.devtools.testing.v1.ApplicationDetailService",
2335 "GetApkDetails",
2336 ),
2337 );
2338 self.inner.unary(req, path, codec).await
2339 }
2340 }
2341}
2342/// A Request for the device session from the session service.
2343#[derive(Clone, PartialEq, ::prost::Message)]
2344pub struct CreateDeviceSessionRequest {
2345 /// Required. The Compute Engine project under which this device will be
2346 /// allocated. "projects/{project_id}"
2347 #[prost(string, tag = "1")]
2348 pub parent: ::prost::alloc::string::String,
2349 /// Required. A device session to create.
2350 #[prost(message, optional, tag = "2")]
2351 pub device_session: ::core::option::Option<DeviceSession>,
2352}
2353/// Request a list of device sessions in the provided parent matching the given
2354/// filter.
2355#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2356pub struct ListDeviceSessionsRequest {
2357 /// Required. The name of the parent to request, e.g. "projects/{project_id}"
2358 #[prost(string, tag = "4")]
2359 pub parent: ::prost::alloc::string::String,
2360 /// Optional. The maximum number of DeviceSessions to return.
2361 #[prost(int32, tag = "1")]
2362 pub page_size: i32,
2363 /// Optional. A continuation token for paging.
2364 #[prost(string, tag = "2")]
2365 pub page_token: ::prost::alloc::string::String,
2366 /// Optional. If specified, responses will be filtered by the given filter.
2367 /// Allowed fields are: session_state.
2368 #[prost(string, tag = "3")]
2369 pub filter: ::prost::alloc::string::String,
2370}
2371/// A list of device sessions.
2372#[derive(Clone, PartialEq, ::prost::Message)]
2373pub struct ListDeviceSessionsResponse {
2374 /// The sessions matching the specified filter in the given cloud project.
2375 #[prost(message, repeated, tag = "1")]
2376 pub device_sessions: ::prost::alloc::vec::Vec<DeviceSession>,
2377 /// A token, which can be sent as `page_token` to retrieve the next page.
2378 /// If this field is omitted, there are no subsequent pages.
2379 #[prost(string, tag = "2")]
2380 pub next_page_token: ::prost::alloc::string::String,
2381}
2382/// The request object for a Device Session.
2383#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2384pub struct GetDeviceSessionRequest {
2385 /// Required. Name of the DeviceSession, e.g.
2386 /// "projects/{project_id}/deviceSessions/{session_id}"
2387 #[prost(string, tag = "1")]
2388 pub name: ::prost::alloc::string::String,
2389}
2390/// The request object for cancelling a Device Session.
2391#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2392pub struct CancelDeviceSessionRequest {
2393 /// Required. Name of the DeviceSession, e.g.
2394 /// "projects/{project_id}/deviceSessions/{session_id}"
2395 #[prost(string, tag = "1")]
2396 pub name: ::prost::alloc::string::String,
2397}
2398/// The request object for the UpdateDeviceSession RPC.
2399#[derive(Clone, PartialEq, ::prost::Message)]
2400pub struct UpdateDeviceSessionRequest {
2401 /// Required. DeviceSession to update.
2402 /// The device session's `name` field is used to identify the session to update
2403 /// "projects/{project_id}/deviceSessions/{session_id}"
2404 #[prost(message, optional, tag = "1")]
2405 pub device_session: ::core::option::Option<DeviceSession>,
2406 /// Required. The list of fields to update.
2407 #[prost(message, optional, tag = "2")]
2408 pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
2409}
2410/// Protobuf message describing the device message, used from several RPCs.
2411#[derive(Clone, PartialEq, ::prost::Message)]
2412pub struct DeviceSession {
2413 /// Optional. Name of the DeviceSession, e.g.
2414 /// "projects/{project_id}/deviceSessions/{session_id}"
2415 #[prost(string, tag = "1")]
2416 pub name: ::prost::alloc::string::String,
2417 /// Output only. The title of the DeviceSession to be presented in the UI.
2418 #[prost(string, tag = "2")]
2419 pub display_name: ::prost::alloc::string::String,
2420 /// Output only. Current state of the DeviceSession.
2421 #[prost(enumeration = "device_session::SessionState", tag = "3")]
2422 pub state: i32,
2423 /// Output only. The historical state transitions of the session_state message
2424 /// including the current session state.
2425 #[prost(message, repeated, tag = "14")]
2426 pub state_histories: ::prost::alloc::vec::Vec<device_session::SessionStateEvent>,
2427 /// Output only. The interval of time that this device must be interacted with
2428 /// before it transitions from ACTIVE to TIMEOUT_INACTIVITY.
2429 #[prost(message, optional, tag = "7")]
2430 pub inactivity_timeout: ::core::option::Option<::prost_types::Duration>,
2431 /// Output only. The time that the Session was created.
2432 #[prost(message, optional, tag = "8")]
2433 pub create_time: ::core::option::Option<::prost_types::Timestamp>,
2434 /// Output only. The timestamp that the session first became ACTIVE.
2435 #[prost(message, optional, tag = "9")]
2436 pub active_start_time: ::core::option::Option<::prost_types::Timestamp>,
2437 /// Required. The requested device
2438 #[prost(message, optional, tag = "15")]
2439 pub android_device: ::core::option::Option<AndroidDevice>,
2440 #[prost(oneof = "device_session::Expiration", tags = "13, 5")]
2441 pub expiration: ::core::option::Option<device_session::Expiration>,
2442}
2443/// Nested message and enum types in `DeviceSession`.
2444pub mod device_session {
2445 /// A message encapsulating a series of Session states and the time that the
2446 /// DeviceSession first entered those states.
2447 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2448 pub struct SessionStateEvent {
2449 /// Output only. The session_state tracked by this event
2450 #[prost(enumeration = "SessionState", tag = "1")]
2451 pub session_state: i32,
2452 /// Output only. The time that the session_state first encountered that
2453 /// state.
2454 #[prost(message, optional, tag = "2")]
2455 pub event_time: ::core::option::Option<::prost_types::Timestamp>,
2456 /// Output only. A human-readable message to explain the state.
2457 #[prost(string, tag = "3")]
2458 pub state_message: ::prost::alloc::string::String,
2459 }
2460 /// The state that the device session resides.
2461 #[derive(
2462 Clone,
2463 Copy,
2464 Debug,
2465 PartialEq,
2466 Eq,
2467 Hash,
2468 PartialOrd,
2469 Ord,
2470 ::prost::Enumeration
2471 )]
2472 #[repr(i32)]
2473 pub enum SessionState {
2474 /// Default value. This value is unused.
2475 Unspecified = 0,
2476 /// Initial state of a session request. The session is being validated for
2477 /// correctness and a device is not yet requested.
2478 Requested = 1,
2479 /// The session has been validated and is in the queue for a device.
2480 Pending = 2,
2481 /// The session has been granted and the device is accepting
2482 /// connections.
2483 Active = 3,
2484 /// The session duration exceeded the device’s reservation time period and
2485 /// timed out automatically.
2486 Expired = 4,
2487 /// The user is finished with the session and it was canceled by the user
2488 /// while the request was still getting allocated or after allocation and
2489 /// during device usage period.
2490 Finished = 5,
2491 /// Unable to complete the session because the device was unavailable and
2492 /// it failed to allocate through the scheduler. For example, a device not
2493 /// in the catalog was requested or the request expired in the allocation
2494 /// queue.
2495 Unavailable = 6,
2496 /// Unable to complete the session for an internal reason, such as an
2497 /// infrastructure failure.
2498 Error = 7,
2499 }
2500 impl SessionState {
2501 /// String value of the enum field names used in the ProtoBuf definition.
2502 ///
2503 /// The values are not transformed in any way and thus are considered stable
2504 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2505 pub fn as_str_name(&self) -> &'static str {
2506 match self {
2507 Self::Unspecified => "SESSION_STATE_UNSPECIFIED",
2508 Self::Requested => "REQUESTED",
2509 Self::Pending => "PENDING",
2510 Self::Active => "ACTIVE",
2511 Self::Expired => "EXPIRED",
2512 Self::Finished => "FINISHED",
2513 Self::Unavailable => "UNAVAILABLE",
2514 Self::Error => "ERROR",
2515 }
2516 }
2517 /// Creates an enum from field names used in the ProtoBuf definition.
2518 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2519 match value {
2520 "SESSION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
2521 "REQUESTED" => Some(Self::Requested),
2522 "PENDING" => Some(Self::Pending),
2523 "ACTIVE" => Some(Self::Active),
2524 "EXPIRED" => Some(Self::Expired),
2525 "FINISHED" => Some(Self::Finished),
2526 "UNAVAILABLE" => Some(Self::Unavailable),
2527 "ERROR" => Some(Self::Error),
2528 _ => None,
2529 }
2530 }
2531 }
2532 #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Oneof)]
2533 pub enum Expiration {
2534 /// Optional. The amount of time that a device will be initially allocated
2535 /// for. This can eventually be extended with the UpdateDeviceSession RPC.
2536 /// Default: 15 minutes.
2537 #[prost(message, tag = "13")]
2538 Ttl(::prost_types::Duration),
2539 /// Optional. If the device is still in use at this time, any connections
2540 /// will be ended and the SessionState will transition from ACTIVE to
2541 /// FINISHED.
2542 #[prost(message, tag = "5")]
2543 ExpireTime(::prost_types::Timestamp),
2544 }
2545}
2546/// Generated client implementations.
2547pub mod direct_access_service_client {
2548 #![allow(
2549 unused_variables,
2550 dead_code,
2551 missing_docs,
2552 clippy::wildcard_imports,
2553 clippy::let_unit_value,
2554 )]
2555 use tonic::codegen::*;
2556 use tonic::codegen::http::Uri;
2557 /// A service for allocating devices and interacting with the live-allocated
2558 /// devices.
2559 ///
2560 /// This service is part of Firebase Test Lab. To learn about how to use the
2561 /// product, and how to integrate it with your system,
2562 /// visit https://firebase.google.com/docs/test-lab.
2563 ///
2564 /// Each Session will wait for available capacity, at a higher
2565 /// priority over Test Execution. When allocated, the session will be exposed
2566 /// through a stream for integration.
2567 ///
2568 /// DirectAccessService is currently available as a preview to select developers.
2569 /// You can register today on behalf of you and your team at
2570 /// https://developer.android.com/studio/preview/android-device-streaming
2571 #[derive(Debug, Clone)]
2572 pub struct DirectAccessServiceClient<T> {
2573 inner: tonic::client::Grpc<T>,
2574 }
2575 impl<T> DirectAccessServiceClient<T>
2576 where
2577 T: tonic::client::GrpcService<tonic::body::Body>,
2578 T::Error: Into<StdError>,
2579 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2580 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2581 {
2582 pub fn new(inner: T) -> Self {
2583 let inner = tonic::client::Grpc::new(inner);
2584 Self { inner }
2585 }
2586 pub fn with_origin(inner: T, origin: Uri) -> Self {
2587 let inner = tonic::client::Grpc::with_origin(inner, origin);
2588 Self { inner }
2589 }
2590 pub fn with_interceptor<F>(
2591 inner: T,
2592 interceptor: F,
2593 ) -> DirectAccessServiceClient<InterceptedService<T, F>>
2594 where
2595 F: tonic::service::Interceptor,
2596 T::ResponseBody: Default,
2597 T: tonic::codegen::Service<
2598 http::Request<tonic::body::Body>,
2599 Response = http::Response<
2600 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2601 >,
2602 >,
2603 <T as tonic::codegen::Service<
2604 http::Request<tonic::body::Body>,
2605 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2606 {
2607 DirectAccessServiceClient::new(InterceptedService::new(inner, interceptor))
2608 }
2609 /// Compress requests with the given encoding.
2610 ///
2611 /// This requires the server to support it otherwise it might respond with an
2612 /// error.
2613 #[must_use]
2614 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2615 self.inner = self.inner.send_compressed(encoding);
2616 self
2617 }
2618 /// Enable decompressing responses.
2619 #[must_use]
2620 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2621 self.inner = self.inner.accept_compressed(encoding);
2622 self
2623 }
2624 /// Limits the maximum size of a decoded message.
2625 ///
2626 /// Default: `4MB`
2627 #[must_use]
2628 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2629 self.inner = self.inner.max_decoding_message_size(limit);
2630 self
2631 }
2632 /// Limits the maximum size of an encoded message.
2633 ///
2634 /// Default: `usize::MAX`
2635 #[must_use]
2636 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2637 self.inner = self.inner.max_encoding_message_size(limit);
2638 self
2639 }
2640 /// POST /v1/projects/{project_id}/deviceSessions
2641 pub async fn create_device_session(
2642 &mut self,
2643 request: impl tonic::IntoRequest<super::CreateDeviceSessionRequest>,
2644 ) -> std::result::Result<tonic::Response<super::DeviceSession>, tonic::Status> {
2645 self.inner
2646 .ready()
2647 .await
2648 .map_err(|e| {
2649 tonic::Status::unknown(
2650 format!("Service was not ready: {}", e.into()),
2651 )
2652 })?;
2653 let codec = tonic_prost::ProstCodec::default();
2654 let path = http::uri::PathAndQuery::from_static(
2655 "/google.devtools.testing.v1.DirectAccessService/CreateDeviceSession",
2656 );
2657 let mut req = request.into_request();
2658 req.extensions_mut()
2659 .insert(
2660 GrpcMethod::new(
2661 "google.devtools.testing.v1.DirectAccessService",
2662 "CreateDeviceSession",
2663 ),
2664 );
2665 self.inner.unary(req, path, codec).await
2666 }
2667 /// GET /v1/projects/{project_id}/deviceSessions
2668 /// Lists device Sessions owned by the project user.
2669 pub async fn list_device_sessions(
2670 &mut self,
2671 request: impl tonic::IntoRequest<super::ListDeviceSessionsRequest>,
2672 ) -> std::result::Result<
2673 tonic::Response<super::ListDeviceSessionsResponse>,
2674 tonic::Status,
2675 > {
2676 self.inner
2677 .ready()
2678 .await
2679 .map_err(|e| {
2680 tonic::Status::unknown(
2681 format!("Service was not ready: {}", e.into()),
2682 )
2683 })?;
2684 let codec = tonic_prost::ProstCodec::default();
2685 let path = http::uri::PathAndQuery::from_static(
2686 "/google.devtools.testing.v1.DirectAccessService/ListDeviceSessions",
2687 );
2688 let mut req = request.into_request();
2689 req.extensions_mut()
2690 .insert(
2691 GrpcMethod::new(
2692 "google.devtools.testing.v1.DirectAccessService",
2693 "ListDeviceSessions",
2694 ),
2695 );
2696 self.inner.unary(req, path, codec).await
2697 }
2698 /// GET /v1/projects/{project_id}/deviceSessions/{device_session_id}
2699 /// Return a DeviceSession, which documents the allocation status and
2700 /// whether the device is allocated. Clients making requests from this API
2701 /// must poll GetDeviceSession.
2702 pub async fn get_device_session(
2703 &mut self,
2704 request: impl tonic::IntoRequest<super::GetDeviceSessionRequest>,
2705 ) -> std::result::Result<tonic::Response<super::DeviceSession>, tonic::Status> {
2706 self.inner
2707 .ready()
2708 .await
2709 .map_err(|e| {
2710 tonic::Status::unknown(
2711 format!("Service was not ready: {}", e.into()),
2712 )
2713 })?;
2714 let codec = tonic_prost::ProstCodec::default();
2715 let path = http::uri::PathAndQuery::from_static(
2716 "/google.devtools.testing.v1.DirectAccessService/GetDeviceSession",
2717 );
2718 let mut req = request.into_request();
2719 req.extensions_mut()
2720 .insert(
2721 GrpcMethod::new(
2722 "google.devtools.testing.v1.DirectAccessService",
2723 "GetDeviceSession",
2724 ),
2725 );
2726 self.inner.unary(req, path, codec).await
2727 }
2728 /// POST
2729 /// /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel
2730 /// Changes the DeviceSession to state FINISHED and terminates all connections.
2731 /// Canceled sessions are not deleted and can be retrieved or
2732 /// listed by the user until they expire based on the 28 day deletion policy.
2733 pub async fn cancel_device_session(
2734 &mut self,
2735 request: impl tonic::IntoRequest<super::CancelDeviceSessionRequest>,
2736 ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
2737 self.inner
2738 .ready()
2739 .await
2740 .map_err(|e| {
2741 tonic::Status::unknown(
2742 format!("Service was not ready: {}", e.into()),
2743 )
2744 })?;
2745 let codec = tonic_prost::ProstCodec::default();
2746 let path = http::uri::PathAndQuery::from_static(
2747 "/google.devtools.testing.v1.DirectAccessService/CancelDeviceSession",
2748 );
2749 let mut req = request.into_request();
2750 req.extensions_mut()
2751 .insert(
2752 GrpcMethod::new(
2753 "google.devtools.testing.v1.DirectAccessService",
2754 "CancelDeviceSession",
2755 ),
2756 );
2757 self.inner.unary(req, path, codec).await
2758 }
2759 /// PATCH
2760 /// /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession
2761 /// Updates the current device session to the fields described by the
2762 /// update_mask.
2763 pub async fn update_device_session(
2764 &mut self,
2765 request: impl tonic::IntoRequest<super::UpdateDeviceSessionRequest>,
2766 ) -> std::result::Result<tonic::Response<super::DeviceSession>, tonic::Status> {
2767 self.inner
2768 .ready()
2769 .await
2770 .map_err(|e| {
2771 tonic::Status::unknown(
2772 format!("Service was not ready: {}", e.into()),
2773 )
2774 })?;
2775 let codec = tonic_prost::ProstCodec::default();
2776 let path = http::uri::PathAndQuery::from_static(
2777 "/google.devtools.testing.v1.DirectAccessService/UpdateDeviceSession",
2778 );
2779 let mut req = request.into_request();
2780 req.extensions_mut()
2781 .insert(
2782 GrpcMethod::new(
2783 "google.devtools.testing.v1.DirectAccessService",
2784 "UpdateDeviceSession",
2785 ),
2786 );
2787 self.inner.unary(req, path, codec).await
2788 }
2789 /// Exposes ADB connection for use with the Adb Device Forwarder project
2790 /// if the reserved device supports ADB.
2791 /// gRPC headers are used to authenticate the Connect RPC, as well as
2792 /// associate to a particular device session.
2793 /// In particular, the user must specify the "X-FTL-Session-Name" header.
2794 pub async fn adb_connect(
2795 &mut self,
2796 request: impl tonic::IntoStreamingRequest<Message = super::AdbMessage>,
2797 ) -> std::result::Result<
2798 tonic::Response<tonic::codec::Streaming<super::DeviceMessage>>,
2799 tonic::Status,
2800 > {
2801 self.inner
2802 .ready()
2803 .await
2804 .map_err(|e| {
2805 tonic::Status::unknown(
2806 format!("Service was not ready: {}", e.into()),
2807 )
2808 })?;
2809 let codec = tonic_prost::ProstCodec::default();
2810 let path = http::uri::PathAndQuery::from_static(
2811 "/google.devtools.testing.v1.DirectAccessService/AdbConnect",
2812 );
2813 let mut req = request.into_streaming_request();
2814 req.extensions_mut()
2815 .insert(
2816 GrpcMethod::new(
2817 "google.devtools.testing.v1.DirectAccessService",
2818 "AdbConnect",
2819 ),
2820 );
2821 self.inner.streaming(req, path, codec).await
2822 }
2823 }
2824}
2825/// A single device IP block
2826#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2827pub struct DeviceIpBlock {
2828 /// An IP address block in CIDR notation eg: 34.68.194.64/29
2829 #[prost(string, tag = "1")]
2830 pub block: ::prost::alloc::string::String,
2831 /// Whether this block is used by physical or virtual devices
2832 #[prost(enumeration = "DeviceForm", tag = "2")]
2833 pub form: i32,
2834 /// The date this block was added to Firebase Test Lab
2835 #[prost(message, optional, tag = "3")]
2836 pub added_date: ::core::option::Option<super::super::super::r#type::Date>,
2837}
2838/// Request to list the currently supported values for an environment type.
2839#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
2840pub struct GetTestEnvironmentCatalogRequest {
2841 /// Required. The type of environment that should be listed.
2842 #[prost(
2843 enumeration = "get_test_environment_catalog_request::EnvironmentType",
2844 tag = "1"
2845 )]
2846 pub environment_type: i32,
2847 /// For authorization, the cloud project requesting the TestEnvironmentCatalog.
2848 #[prost(string, tag = "2")]
2849 pub project_id: ::prost::alloc::string::String,
2850 /// Optional. Whether to include viewable only models in the response. This is
2851 /// only applicable for Android models.
2852 #[prost(bool, tag = "4")]
2853 pub include_viewable_models: bool,
2854}
2855/// Nested message and enum types in `GetTestEnvironmentCatalogRequest`.
2856pub mod get_test_environment_catalog_request {
2857 /// Types of environments the Test API supports.
2858 #[derive(
2859 Clone,
2860 Copy,
2861 Debug,
2862 PartialEq,
2863 Eq,
2864 Hash,
2865 PartialOrd,
2866 Ord,
2867 ::prost::Enumeration
2868 )]
2869 #[repr(i32)]
2870 pub enum EnvironmentType {
2871 /// Do not use. For proto versioning only.
2872 Unspecified = 0,
2873 /// A device running a version of the Android OS.
2874 Android = 1,
2875 /// A device running a version of iOS.
2876 Ios = 3,
2877 /// A network configuration to use when running a test.
2878 NetworkConfiguration = 4,
2879 /// The software environment provided by TestExecutionService.
2880 ProvidedSoftware = 5,
2881 /// The IP blocks used by devices in the test environment.
2882 DeviceIpBlocks = 6,
2883 }
2884 impl EnvironmentType {
2885 /// String value of the enum field names used in the ProtoBuf definition.
2886 ///
2887 /// The values are not transformed in any way and thus are considered stable
2888 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2889 pub fn as_str_name(&self) -> &'static str {
2890 match self {
2891 Self::Unspecified => "ENVIRONMENT_TYPE_UNSPECIFIED",
2892 Self::Android => "ANDROID",
2893 Self::Ios => "IOS",
2894 Self::NetworkConfiguration => "NETWORK_CONFIGURATION",
2895 Self::ProvidedSoftware => "PROVIDED_SOFTWARE",
2896 Self::DeviceIpBlocks => "DEVICE_IP_BLOCKS",
2897 }
2898 }
2899 /// Creates an enum from field names used in the ProtoBuf definition.
2900 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2901 match value {
2902 "ENVIRONMENT_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
2903 "ANDROID" => Some(Self::Android),
2904 "IOS" => Some(Self::Ios),
2905 "NETWORK_CONFIGURATION" => Some(Self::NetworkConfiguration),
2906 "PROVIDED_SOFTWARE" => Some(Self::ProvidedSoftware),
2907 "DEVICE_IP_BLOCKS" => Some(Self::DeviceIpBlocks),
2908 _ => None,
2909 }
2910 }
2911 }
2912}
2913/// A description of a test environment.
2914#[derive(Clone, PartialEq, ::prost::Message)]
2915pub struct TestEnvironmentCatalog {
2916 /// Output only.
2917 #[prost(
2918 oneof = "test_environment_catalog::EnvironmentCatalog",
2919 tags = "1, 3, 4, 5, 6"
2920 )]
2921 pub environment_catalog: ::core::option::Option<
2922 test_environment_catalog::EnvironmentCatalog,
2923 >,
2924}
2925/// Nested message and enum types in `TestEnvironmentCatalog`.
2926pub mod test_environment_catalog {
2927 /// Output only.
2928 #[derive(Clone, PartialEq, ::prost::Oneof)]
2929 pub enum EnvironmentCatalog {
2930 /// Supported Android devices.
2931 #[prost(message, tag = "1")]
2932 AndroidDeviceCatalog(super::AndroidDeviceCatalog),
2933 /// Supported iOS devices.
2934 #[prost(message, tag = "3")]
2935 IosDeviceCatalog(super::IosDeviceCatalog),
2936 /// Supported network configurations.
2937 #[prost(message, tag = "4")]
2938 NetworkConfigurationCatalog(super::NetworkConfigurationCatalog),
2939 /// The software test environment provided by TestExecutionService.
2940 #[prost(message, tag = "5")]
2941 SoftwareCatalog(super::ProvidedSoftwareCatalog),
2942 /// The IP blocks used by devices in the test environment.
2943 #[prost(message, tag = "6")]
2944 DeviceIpBlockCatalog(super::DeviceIpBlockCatalog),
2945 }
2946}
2947/// List of IP blocks used by the Firebase Test Lab
2948#[derive(Clone, PartialEq, ::prost::Message)]
2949pub struct DeviceIpBlockCatalog {
2950 /// The device IP blocks used by Firebase Test Lab
2951 #[prost(message, repeated, tag = "1")]
2952 pub ip_blocks: ::prost::alloc::vec::Vec<DeviceIpBlock>,
2953}
2954/// The currently supported Android devices.
2955#[derive(Clone, PartialEq, ::prost::Message)]
2956pub struct AndroidDeviceCatalog {
2957 /// The set of supported Android device models.
2958 #[prost(message, repeated, tag = "1")]
2959 pub models: ::prost::alloc::vec::Vec<AndroidModel>,
2960 /// The set of supported Android OS versions.
2961 #[prost(message, repeated, tag = "2")]
2962 pub versions: ::prost::alloc::vec::Vec<AndroidVersion>,
2963 /// The set of supported runtime configurations.
2964 #[prost(message, optional, tag = "3")]
2965 pub runtime_configuration: ::core::option::Option<AndroidRuntimeConfiguration>,
2966}
2967/// Android configuration that can be selected at the time a test is run.
2968#[derive(Clone, PartialEq, ::prost::Message)]
2969pub struct AndroidRuntimeConfiguration {
2970 /// The set of available locales.
2971 #[prost(message, repeated, tag = "1")]
2972 pub locales: ::prost::alloc::vec::Vec<Locale>,
2973 /// The set of available orientations.
2974 #[prost(message, repeated, tag = "2")]
2975 pub orientations: ::prost::alloc::vec::Vec<Orientation>,
2976}
2977/// A description of an Android device tests may be run on.
2978#[derive(Clone, PartialEq, ::prost::Message)]
2979pub struct AndroidModel {
2980 /// The unique opaque id for this model.
2981 /// Use this for invoking the TestExecutionService.
2982 #[prost(string, tag = "1")]
2983 pub id: ::prost::alloc::string::String,
2984 /// The human-readable marketing name for this device model.
2985 /// Examples: "Nexus 5", "Galaxy S5".
2986 #[prost(string, tag = "2")]
2987 pub name: ::prost::alloc::string::String,
2988 /// The manufacturer of this device.
2989 #[prost(string, tag = "3")]
2990 pub manufacturer: ::prost::alloc::string::String,
2991 /// The company that this device is branded with.
2992 /// Example: "Google", "Samsung".
2993 #[prost(string, tag = "9")]
2994 pub brand: ::prost::alloc::string::String,
2995 /// The name of the industrial design.
2996 /// This corresponds to android.os.Build.DEVICE.
2997 #[prost(string, tag = "10")]
2998 pub codename: ::prost::alloc::string::String,
2999 /// Whether this device is virtual or physical.
3000 #[prost(enumeration = "DeviceForm", tag = "4")]
3001 pub form: i32,
3002 /// Whether this device is a phone, tablet, wearable, etc.
3003 #[prost(enumeration = "DeviceFormFactor", tag = "16")]
3004 pub form_factor: i32,
3005 /// Version-specific information of an Android model.
3006 #[prost(message, repeated, tag = "21")]
3007 pub per_version_info: ::prost::alloc::vec::Vec<PerAndroidVersionInfo>,
3008 /// Screen size in the horizontal (X) dimension measured in pixels.
3009 #[prost(int32, tag = "5")]
3010 pub screen_x: i32,
3011 /// Screen size in the vertical (Y) dimension measured in pixels.
3012 #[prost(int32, tag = "6")]
3013 pub screen_y: i32,
3014 /// Screen density in DPI.
3015 /// This corresponds to ro.sf.lcd_density
3016 #[prost(int32, tag = "12")]
3017 pub screen_density: i32,
3018 /// True if and only if tests with this model are recorded by stitching
3019 /// together screenshots. See use_low_spec_video_recording in device config.
3020 #[prost(bool, tag = "17")]
3021 pub low_fps_video_recording: bool,
3022 /// The set of Android versions this device supports.
3023 #[prost(string, repeated, tag = "7")]
3024 pub supported_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3025 /// The list of supported ABIs for this device.
3026 /// This corresponds to either android.os.Build.SUPPORTED_ABIS (for API level
3027 /// 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2.
3028 /// The most preferred ABI is the first element in the list.
3029 ///
3030 /// Elements are optionally prefixed by "version_id:" (where version_id is
3031 /// the id of an AndroidVersion), denoting an ABI that is supported only on
3032 /// a particular version.
3033 #[prost(string, repeated, tag = "11")]
3034 pub supported_abis: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3035 /// Tags for this dimension.
3036 /// Examples: "default", "preview", "deprecated".
3037 #[prost(string, repeated, tag = "8")]
3038 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3039 /// URL of a thumbnail image (photo) of the device.
3040 #[prost(string, tag = "19")]
3041 pub thumbnail_url: ::prost::alloc::string::String,
3042 /// Output only. Lab info of this device.
3043 #[prost(message, optional, tag = "26")]
3044 pub lab_info: ::core::option::Option<LabInfo>,
3045 /// Reasons for access denial. This model is accessible if this list is empty,
3046 /// otherwise the model is viewable only.
3047 #[prost(enumeration = "android_model::AccessDeniedReason", repeated, tag = "33")]
3048 pub access_denied_reasons: ::prost::alloc::vec::Vec<i32>,
3049}
3050/// Nested message and enum types in `AndroidModel`.
3051pub mod android_model {
3052 /// Reason for access denial.
3053 #[derive(
3054 Clone,
3055 Copy,
3056 Debug,
3057 PartialEq,
3058 Eq,
3059 Hash,
3060 PartialOrd,
3061 Ord,
3062 ::prost::Enumeration
3063 )]
3064 #[repr(i32)]
3065 pub enum AccessDeniedReason {
3066 /// Do not use. For proto versioning only.
3067 Unspecified = 0,
3068 /// The model is for viewing purposes only. Access and utilization require
3069 /// acceptance of an End User License Agreement (EULA).
3070 EulaNotAccepted = 1,
3071 }
3072 impl AccessDeniedReason {
3073 /// String value of the enum field names used in the ProtoBuf definition.
3074 ///
3075 /// The values are not transformed in any way and thus are considered stable
3076 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3077 pub fn as_str_name(&self) -> &'static str {
3078 match self {
3079 Self::Unspecified => "ACCESS_DENIED_REASON_UNSPECIFIED",
3080 Self::EulaNotAccepted => "EULA_NOT_ACCEPTED",
3081 }
3082 }
3083 /// Creates an enum from field names used in the ProtoBuf definition.
3084 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3085 match value {
3086 "ACCESS_DENIED_REASON_UNSPECIFIED" => Some(Self::Unspecified),
3087 "EULA_NOT_ACCEPTED" => Some(Self::EulaNotAccepted),
3088 _ => None,
3089 }
3090 }
3091 }
3092}
3093/// A version of the Android OS.
3094#[derive(Clone, PartialEq, ::prost::Message)]
3095pub struct AndroidVersion {
3096 /// An opaque id for this Android version.
3097 /// Use this id to invoke the TestExecutionService.
3098 #[prost(string, tag = "1")]
3099 pub id: ::prost::alloc::string::String,
3100 /// A string representing this version of the Android OS.
3101 /// Examples: "4.3", "4.4".
3102 #[prost(string, tag = "2")]
3103 pub version_string: ::prost::alloc::string::String,
3104 /// The API level for this Android version.
3105 /// Examples: 18, 19.
3106 #[prost(int32, tag = "3")]
3107 pub api_level: i32,
3108 /// The code name for this Android version.
3109 /// Examples: "JellyBean", "KitKat".
3110 #[prost(string, tag = "4")]
3111 pub code_name: ::prost::alloc::string::String,
3112 /// The date this Android version became available in the market.
3113 #[prost(message, optional, tag = "5")]
3114 pub release_date: ::core::option::Option<super::super::super::r#type::Date>,
3115 /// Market share for this version.
3116 #[prost(message, optional, tag = "6")]
3117 pub distribution: ::core::option::Option<Distribution>,
3118 /// Tags for this dimension.
3119 /// Examples: "default", "preview", "deprecated".
3120 #[prost(string, repeated, tag = "7")]
3121 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3122}
3123/// A version-specific information of an Android model.
3124#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3125pub struct PerAndroidVersionInfo {
3126 /// An Android version.
3127 #[prost(string, tag = "1")]
3128 pub version_id: ::prost::alloc::string::String,
3129 /// The number of online devices for an Android version.
3130 #[prost(enumeration = "DeviceCapacity", tag = "2")]
3131 pub device_capacity: i32,
3132 /// Output only. The estimated wait time for a single interactive device
3133 /// session using Direct Access.
3134 #[prost(message, optional, tag = "3")]
3135 pub interactive_device_availability_estimate: ::core::option::Option<
3136 ::prost_types::Duration,
3137 >,
3138 /// Output only. Identifies supported clients for DirectAccess for this Android
3139 /// version.
3140 #[prost(message, optional, tag = "4")]
3141 pub direct_access_version_info: ::core::option::Option<DirectAccessVersionInfo>,
3142}
3143/// Denotes whether Direct Access is supported, and by which client versions.
3144///
3145/// DirectAccessService is currently available as a preview to select developers.
3146/// You can register today on behalf of you and your team at
3147/// <https://developer.android.com/studio/preview/android-device-streaming>
3148#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3149pub struct DirectAccessVersionInfo {
3150 /// Whether direct access is supported at all. Clients are expected to
3151 /// filter down the device list to only android models and versions which
3152 /// support Direct Access when that is the user intent.
3153 #[prost(bool, tag = "1")]
3154 pub direct_access_supported: bool,
3155 /// Output only. Indicates client-device compatibility, where a device is known
3156 /// to work only with certain workarounds implemented in the Android Studio
3157 /// client. Expected format "major.minor.micro.patch", e.g.
3158 /// "5921.22.2211.8881706".
3159 #[prost(string, tag = "2")]
3160 pub minimum_android_studio_version: ::prost::alloc::string::String,
3161}
3162/// Data about the relative number of devices running a
3163/// given configuration of the Android platform.
3164#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3165pub struct Distribution {
3166 /// Output only. The time this distribution was measured.
3167 #[prost(message, optional, tag = "1")]
3168 pub measurement_time: ::core::option::Option<::prost_types::Timestamp>,
3169 /// Output only. The estimated fraction (0-1) of the total market with this
3170 /// configuration.
3171 #[prost(double, tag = "2")]
3172 pub market_share: f64,
3173}
3174/// Lab specific information for a device.
3175#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3176pub struct LabInfo {
3177 /// Lab name where the device is hosted.
3178 /// If empty, the device is hosted in a Google owned lab.
3179 #[prost(string, tag = "1")]
3180 pub name: ::prost::alloc::string::String,
3181 /// The Unicode country/region code (CLDR) of the lab where the device is
3182 /// hosted. E.g. "US" for United States, "CH" for Switzerland.
3183 #[prost(string, tag = "2")]
3184 pub region_code: ::prost::alloc::string::String,
3185}
3186/// The currently supported iOS devices.
3187#[derive(Clone, PartialEq, ::prost::Message)]
3188pub struct IosDeviceCatalog {
3189 /// The set of supported iOS device models.
3190 #[prost(message, repeated, tag = "1")]
3191 pub models: ::prost::alloc::vec::Vec<IosModel>,
3192 /// The set of supported iOS software versions.
3193 #[prost(message, repeated, tag = "2")]
3194 pub versions: ::prost::alloc::vec::Vec<IosVersion>,
3195 /// The set of supported Xcode versions.
3196 #[prost(message, repeated, tag = "4")]
3197 pub xcode_versions: ::prost::alloc::vec::Vec<XcodeVersion>,
3198 /// The set of supported runtime configurations.
3199 #[prost(message, optional, tag = "3")]
3200 pub runtime_configuration: ::core::option::Option<IosRuntimeConfiguration>,
3201}
3202/// iOS configuration that can be selected at the time a test is run.
3203#[derive(Clone, PartialEq, ::prost::Message)]
3204pub struct IosRuntimeConfiguration {
3205 /// The set of available locales.
3206 #[prost(message, repeated, tag = "1")]
3207 pub locales: ::prost::alloc::vec::Vec<Locale>,
3208 /// The set of available orientations.
3209 #[prost(message, repeated, tag = "2")]
3210 pub orientations: ::prost::alloc::vec::Vec<Orientation>,
3211}
3212/// A description of an iOS device tests may be run on.
3213#[derive(Clone, PartialEq, ::prost::Message)]
3214pub struct IosModel {
3215 /// The unique opaque id for this model.
3216 /// Use this for invoking the TestExecutionService.
3217 #[prost(string, tag = "1")]
3218 pub id: ::prost::alloc::string::String,
3219 /// The human-readable name for this device model.
3220 /// Examples: "iPhone 4s", "iPad Mini 2".
3221 #[prost(string, tag = "2")]
3222 pub name: ::prost::alloc::string::String,
3223 /// The set of iOS major software versions this device supports.
3224 #[prost(string, repeated, tag = "3")]
3225 pub supported_version_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3226 /// Tags for this dimension.
3227 /// Examples: "default", "preview", "deprecated".
3228 #[prost(string, repeated, tag = "4")]
3229 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3230 /// Device capabilities.
3231 /// Copied from
3232 /// <https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html>
3233 #[prost(string, repeated, tag = "5")]
3234 pub device_capabilities: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3235 /// Screen size in the horizontal (X) dimension measured in pixels.
3236 #[prost(int32, tag = "7")]
3237 pub screen_x: i32,
3238 /// Screen size in the vertical (Y) dimension measured in pixels.
3239 #[prost(int32, tag = "8")]
3240 pub screen_y: i32,
3241 /// Screen density in DPI.
3242 #[prost(int32, tag = "9")]
3243 pub screen_density: i32,
3244 /// Whether this device is a phone, tablet, wearable, etc.
3245 #[prost(enumeration = "DeviceFormFactor", tag = "6")]
3246 pub form_factor: i32,
3247 /// Version-specific information of an iOS model.
3248 #[prost(message, repeated, tag = "14")]
3249 pub per_version_info: ::prost::alloc::vec::Vec<PerIosVersionInfo>,
3250}
3251/// An iOS version.
3252#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3253pub struct IosVersion {
3254 /// An opaque id for this iOS version.
3255 /// Use this id to invoke the TestExecutionService.
3256 #[prost(string, tag = "1")]
3257 pub id: ::prost::alloc::string::String,
3258 /// An integer representing the major iOS version.
3259 /// Examples: "8", "9".
3260 #[prost(int32, tag = "2")]
3261 pub major_version: i32,
3262 /// An integer representing the minor iOS version.
3263 /// Examples: "1", "2".
3264 #[prost(int32, tag = "4")]
3265 pub minor_version: i32,
3266 /// Tags for this dimension.
3267 /// Examples: "default", "preview", "deprecated".
3268 #[prost(string, repeated, tag = "3")]
3269 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3270 /// The available Xcode versions for this version.
3271 #[prost(string, repeated, tag = "5")]
3272 pub supported_xcode_version_ids: ::prost::alloc::vec::Vec<
3273 ::prost::alloc::string::String,
3274 >,
3275}
3276/// A version-specific information of an iOS model.
3277#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3278pub struct PerIosVersionInfo {
3279 /// An iOS version.
3280 #[prost(string, tag = "1")]
3281 pub version_id: ::prost::alloc::string::String,
3282 /// The number of online devices for an iOS version.
3283 #[prost(enumeration = "DeviceCapacity", tag = "2")]
3284 pub device_capacity: i32,
3285}
3286/// A location/region designation for language.
3287#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3288pub struct Locale {
3289 /// The id for this locale.
3290 /// Example: "en_US".
3291 #[prost(string, tag = "1")]
3292 pub id: ::prost::alloc::string::String,
3293 /// A human-friendly name for this language/locale.
3294 /// Example: "English".
3295 #[prost(string, tag = "2")]
3296 pub name: ::prost::alloc::string::String,
3297 /// A human-friendly string representing the region for this
3298 /// locale. Example: "United States". Not present for every locale.
3299 #[prost(string, tag = "3")]
3300 pub region: ::prost::alloc::string::String,
3301 /// Tags for this dimension.
3302 /// Example: "default".
3303 #[prost(string, repeated, tag = "4")]
3304 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3305}
3306/// Screen orientation of the device.
3307#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3308pub struct Orientation {
3309 /// The id for this orientation.
3310 /// Example: "portrait".
3311 #[prost(string, tag = "1")]
3312 pub id: ::prost::alloc::string::String,
3313 /// A human-friendly name for this orientation.
3314 /// Example: "portrait".
3315 #[prost(string, tag = "2")]
3316 pub name: ::prost::alloc::string::String,
3317 /// Tags for this dimension.
3318 /// Example: "default".
3319 #[prost(string, repeated, tag = "3")]
3320 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3321}
3322/// An Xcode version that an iOS version is compatible with.
3323#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3324pub struct XcodeVersion {
3325 /// The id for this version.
3326 /// Example: "9.2".
3327 #[prost(string, tag = "1")]
3328 pub version: ::prost::alloc::string::String,
3329 /// Tags for this Xcode version.
3330 /// Example: "default".
3331 #[prost(string, repeated, tag = "2")]
3332 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3333}
3334#[derive(Clone, PartialEq, ::prost::Message)]
3335pub struct NetworkConfigurationCatalog {
3336 #[prost(message, repeated, tag = "1")]
3337 pub configurations: ::prost::alloc::vec::Vec<NetworkConfiguration>,
3338}
3339#[derive(Clone, PartialEq, ::prost::Message)]
3340pub struct NetworkConfiguration {
3341 /// The unique opaque id for this network traffic configuration.
3342 #[prost(string, tag = "1")]
3343 pub id: ::prost::alloc::string::String,
3344 /// The emulation rule applying to the upload traffic.
3345 #[prost(message, optional, tag = "2")]
3346 pub up_rule: ::core::option::Option<TrafficRule>,
3347 /// The emulation rule applying to the download traffic.
3348 #[prost(message, optional, tag = "3")]
3349 pub down_rule: ::core::option::Option<TrafficRule>,
3350}
3351/// Network emulation parameters.
3352#[derive(Clone, Copy, PartialEq, ::prost::Message)]
3353pub struct TrafficRule {
3354 /// Packet delay, must be >= 0.
3355 #[prost(message, optional, tag = "1")]
3356 pub delay: ::core::option::Option<::prost_types::Duration>,
3357 /// Packet loss ratio (0.0 - 1.0).
3358 #[prost(float, tag = "2")]
3359 pub packet_loss_ratio: f32,
3360 /// Packet duplication ratio (0.0 - 1.0).
3361 #[prost(float, tag = "3")]
3362 pub packet_duplication_ratio: f32,
3363 /// Bandwidth in kbits/second.
3364 #[prost(float, tag = "4")]
3365 pub bandwidth: f32,
3366 /// Burst size in kbits.
3367 #[prost(float, tag = "5")]
3368 pub burst: f32,
3369}
3370/// The currently provided software environment on the devices under test.
3371#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3372pub struct ProvidedSoftwareCatalog {
3373 /// Deprecated: Use AndroidX Test Orchestrator going forward.
3374 ///
3375 /// A string representing the current version of Android Test Orchestrator
3376 /// that is used in the environment. The package is available at
3377 /// <https://maven.google.com/web/index.html#com.android.support.test:orchestrator.>
3378 #[deprecated]
3379 #[prost(string, tag = "1")]
3380 pub orchestrator_version: ::prost::alloc::string::String,
3381 /// A string representing the current version of AndroidX Test Orchestrator
3382 /// that is used in the environment. The package is available at
3383 /// <https://maven.google.com/web/index.html#androidx.test:orchestrator.>
3384 #[prost(string, tag = "2")]
3385 pub androidx_orchestrator_version: ::prost::alloc::string::String,
3386}
3387/// Whether the device is physical or virtual.
3388#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3389#[repr(i32)]
3390pub enum DeviceForm {
3391 /// Do not use. For proto versioning only.
3392 Unspecified = 0,
3393 /// Android virtual device using Compute Engine native virtualization. Firebase
3394 /// Test Lab only.
3395 Virtual = 1,
3396 /// Actual hardware.
3397 Physical = 2,
3398 /// Android virtual device using emulator in nested virtualization. Equivalent
3399 /// to Android Studio.
3400 Emulator = 3,
3401}
3402impl DeviceForm {
3403 /// String value of the enum field names used in the ProtoBuf definition.
3404 ///
3405 /// The values are not transformed in any way and thus are considered stable
3406 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3407 pub fn as_str_name(&self) -> &'static str {
3408 match self {
3409 Self::Unspecified => "DEVICE_FORM_UNSPECIFIED",
3410 Self::Virtual => "VIRTUAL",
3411 Self::Physical => "PHYSICAL",
3412 Self::Emulator => "EMULATOR",
3413 }
3414 }
3415 /// Creates an enum from field names used in the ProtoBuf definition.
3416 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3417 match value {
3418 "DEVICE_FORM_UNSPECIFIED" => Some(Self::Unspecified),
3419 "VIRTUAL" => Some(Self::Virtual),
3420 "PHYSICAL" => Some(Self::Physical),
3421 "EMULATOR" => Some(Self::Emulator),
3422 _ => None,
3423 }
3424 }
3425}
3426/// The form factor of a device.
3427#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3428#[repr(i32)]
3429pub enum DeviceFormFactor {
3430 /// Do not use. For proto versioning only.
3431 Unspecified = 0,
3432 /// This device has the shape of a phone.
3433 Phone = 1,
3434 /// This device has the shape of a tablet.
3435 Tablet = 2,
3436 /// This device has the shape of a watch or other wearable.
3437 Wearable = 3,
3438}
3439impl DeviceFormFactor {
3440 /// String value of the enum field names used in the ProtoBuf definition.
3441 ///
3442 /// The values are not transformed in any way and thus are considered stable
3443 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3444 pub fn as_str_name(&self) -> &'static str {
3445 match self {
3446 Self::Unspecified => "DEVICE_FORM_FACTOR_UNSPECIFIED",
3447 Self::Phone => "PHONE",
3448 Self::Tablet => "TABLET",
3449 Self::Wearable => "WEARABLE",
3450 }
3451 }
3452 /// Creates an enum from field names used in the ProtoBuf definition.
3453 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3454 match value {
3455 "DEVICE_FORM_FACTOR_UNSPECIFIED" => Some(Self::Unspecified),
3456 "PHONE" => Some(Self::Phone),
3457 "TABLET" => Some(Self::Tablet),
3458 "WEARABLE" => Some(Self::Wearable),
3459 _ => None,
3460 }
3461 }
3462}
3463/// Capacity based on the number of online devices in the lab.
3464///
3465/// Important: device capacity does not directly reflect the length of the
3466/// queue at a moment in time. It does not take into account current traffic or
3467/// the state of the devices.
3468///
3469/// For physical devices, the number is the average of online devices in the last
3470/// 30 days.
3471#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
3472#[repr(i32)]
3473pub enum DeviceCapacity {
3474 /// The value of device capacity is unknown or unset.
3475 Unspecified = 0,
3476 /// Devices that are high in capacity (The lab has a large number of these
3477 /// devices).
3478 ///
3479 /// These devices are generally suggested for running a large number of
3480 /// simultaneous tests (e.g. more than 100 tests).
3481 ///
3482 /// Please note that high capacity devices do not guarantee short wait times
3483 /// due to several factors:
3484 ///
3485 /// 1. Traffic (how heavily they are used at any given moment)
3486 /// 1. High capacity devices are prioritized for certain usages, which may
3487 /// cause user tests to be slower than selecting other similar device types.
3488 High = 1,
3489 /// Devices that are medium in capacity (The lab has a decent number of these
3490 /// devices, though not as many as high capacity devices).
3491 ///
3492 /// These devices are suitable for fewer test runs (e.g. fewer than 100 tests)
3493 /// and only for low shard counts (e.g. less than 10 shards).
3494 Medium = 2,
3495 /// Devices that are low in capacity (The lab has a small number of these
3496 /// devices).
3497 ///
3498 /// These devices may be used if users need to test on this specific device
3499 /// model and version. Please note that due to low capacity, the tests may take
3500 /// much longer to finish, especially if a large number of tests are invoked at
3501 /// once. These devices are not suitable for test sharding.
3502 Low = 3,
3503 /// Devices that are completely missing from the lab.
3504 ///
3505 /// These devices are unavailable either temporarily or permanently and should
3506 /// not be requested. If the device is also marked as deprecated, this state
3507 /// is very likely permanent.
3508 None = 4,
3509}
3510impl DeviceCapacity {
3511 /// String value of the enum field names used in the ProtoBuf definition.
3512 ///
3513 /// The values are not transformed in any way and thus are considered stable
3514 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
3515 pub fn as_str_name(&self) -> &'static str {
3516 match self {
3517 Self::Unspecified => "DEVICE_CAPACITY_UNSPECIFIED",
3518 Self::High => "DEVICE_CAPACITY_HIGH",
3519 Self::Medium => "DEVICE_CAPACITY_MEDIUM",
3520 Self::Low => "DEVICE_CAPACITY_LOW",
3521 Self::None => "DEVICE_CAPACITY_NONE",
3522 }
3523 }
3524 /// Creates an enum from field names used in the ProtoBuf definition.
3525 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
3526 match value {
3527 "DEVICE_CAPACITY_UNSPECIFIED" => Some(Self::Unspecified),
3528 "DEVICE_CAPACITY_HIGH" => Some(Self::High),
3529 "DEVICE_CAPACITY_MEDIUM" => Some(Self::Medium),
3530 "DEVICE_CAPACITY_LOW" => Some(Self::Low),
3531 "DEVICE_CAPACITY_NONE" => Some(Self::None),
3532 _ => None,
3533 }
3534 }
3535}
3536/// Generated client implementations.
3537pub mod test_environment_discovery_service_client {
3538 #![allow(
3539 unused_variables,
3540 dead_code,
3541 missing_docs,
3542 clippy::wildcard_imports,
3543 clippy::let_unit_value,
3544 )]
3545 use tonic::codegen::*;
3546 use tonic::codegen::http::Uri;
3547 /// Service for discovering environments supported by the TestExecutionService.
3548 ///
3549 /// Over time the TestService may add or remove devices or configuration options
3550 /// (e.g., when new devices and APIs are released). Clients should check here
3551 /// periodically to discover what options are supported.
3552 ///
3553 /// It defines the following resource model:
3554 ///
3555 /// * The API a collection of \[TestEnvironmentCatalog\]
3556 /// \[google.devtools.test.v1.TestEnvironmentCatalog\] resources, named
3557 /// `testEnvironmentCatalog/*`
3558 ///
3559 /// * Each TestEnvironmentCatalog resource describes a set of supported
3560 /// environments.
3561 ///
3562 /// * An \[AndroidDeviceCatalog\]\[google.devtools.test.v1.AndroidDeviceCatalog\]
3563 /// describes supported Android devices. It contains lists of supported
3564 /// \[AndroidModels\]\[google.devtools.test.v1.AndroidModel\] and
3565 /// \[AndroidVersions\]\[google.devtools.test.v1.AndroidVersion\] along with a
3566 /// \[AndroidRuntimeConfiguration\]\[google.devtools.test.v1.AndroidRuntimeConfiguration\].
3567 /// Each AndroidModel contains a list of Versions it supports. All
3568 /// models support all locales and orientations described by the
3569 /// AndroidRuntimeConfiguration
3570 ///
3571 /// * An \[IosDeviceCatalog\]\[google.devtools.test.v1.IosDeviceCatalog\]
3572 /// describes supported iOS devices. It contains lists of supported
3573 /// \[IosModels\]\[google.devtools.test.v1.IosModel\] and
3574 /// \[IosVersions\]\[google.devtools.test.v1.IosVersion\] along with a
3575 /// \[IosRuntimeConfiguration\]\[google.devtools.test.v1.IosRuntimeConfiguration\].
3576 /// Each IosModel contains a list of Versions it supports. All
3577 /// models support all locales and orientations described by the
3578 /// IosRuntimeConfiguration.
3579 #[derive(Debug, Clone)]
3580 pub struct TestEnvironmentDiscoveryServiceClient<T> {
3581 inner: tonic::client::Grpc<T>,
3582 }
3583 impl<T> TestEnvironmentDiscoveryServiceClient<T>
3584 where
3585 T: tonic::client::GrpcService<tonic::body::Body>,
3586 T::Error: Into<StdError>,
3587 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
3588 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
3589 {
3590 pub fn new(inner: T) -> Self {
3591 let inner = tonic::client::Grpc::new(inner);
3592 Self { inner }
3593 }
3594 pub fn with_origin(inner: T, origin: Uri) -> Self {
3595 let inner = tonic::client::Grpc::with_origin(inner, origin);
3596 Self { inner }
3597 }
3598 pub fn with_interceptor<F>(
3599 inner: T,
3600 interceptor: F,
3601 ) -> TestEnvironmentDiscoveryServiceClient<InterceptedService<T, F>>
3602 where
3603 F: tonic::service::Interceptor,
3604 T::ResponseBody: Default,
3605 T: tonic::codegen::Service<
3606 http::Request<tonic::body::Body>,
3607 Response = http::Response<
3608 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
3609 >,
3610 >,
3611 <T as tonic::codegen::Service<
3612 http::Request<tonic::body::Body>,
3613 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
3614 {
3615 TestEnvironmentDiscoveryServiceClient::new(
3616 InterceptedService::new(inner, interceptor),
3617 )
3618 }
3619 /// Compress requests with the given encoding.
3620 ///
3621 /// This requires the server to support it otherwise it might respond with an
3622 /// error.
3623 #[must_use]
3624 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3625 self.inner = self.inner.send_compressed(encoding);
3626 self
3627 }
3628 /// Enable decompressing responses.
3629 #[must_use]
3630 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3631 self.inner = self.inner.accept_compressed(encoding);
3632 self
3633 }
3634 /// Limits the maximum size of a decoded message.
3635 ///
3636 /// Default: `4MB`
3637 #[must_use]
3638 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3639 self.inner = self.inner.max_decoding_message_size(limit);
3640 self
3641 }
3642 /// Limits the maximum size of an encoded message.
3643 ///
3644 /// Default: `usize::MAX`
3645 #[must_use]
3646 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3647 self.inner = self.inner.max_encoding_message_size(limit);
3648 self
3649 }
3650 /// Gets the catalog of supported test environments.
3651 ///
3652 /// May return any of the following canonical error codes:
3653 ///
3654 /// * INVALID_ARGUMENT - if the request is malformed
3655 /// * NOT_FOUND - if the environment type does not exist
3656 /// * INTERNAL - if an internal error occurred
3657 pub async fn get_test_environment_catalog(
3658 &mut self,
3659 request: impl tonic::IntoRequest<super::GetTestEnvironmentCatalogRequest>,
3660 ) -> std::result::Result<
3661 tonic::Response<super::TestEnvironmentCatalog>,
3662 tonic::Status,
3663 > {
3664 self.inner
3665 .ready()
3666 .await
3667 .map_err(|e| {
3668 tonic::Status::unknown(
3669 format!("Service was not ready: {}", e.into()),
3670 )
3671 })?;
3672 let codec = tonic_prost::ProstCodec::default();
3673 let path = http::uri::PathAndQuery::from_static(
3674 "/google.devtools.testing.v1.TestEnvironmentDiscoveryService/GetTestEnvironmentCatalog",
3675 );
3676 let mut req = request.into_request();
3677 req.extensions_mut()
3678 .insert(
3679 GrpcMethod::new(
3680 "google.devtools.testing.v1.TestEnvironmentDiscoveryService",
3681 "GetTestEnvironmentCatalog",
3682 ),
3683 );
3684 self.inner.unary(req, path, codec).await
3685 }
3686 }
3687}