Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

3328 строки
124 KiB

  1. // Package testing provides access to the Cloud Testing API.
  2. //
  3. // See https://developers.google.com/cloud-test-lab/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/testing/v1"
  8. // ...
  9. // testingService, err := testing.New(oauthHttpClient)
  10. package testing // import "google.golang.org/api/testing/v1"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "testing:v1"
  41. const apiName = "testing"
  42. const apiVersion = "v1"
  43. const basePath = "https://testing.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data across Google Cloud Platform services
  47. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  48. // View your data across Google Cloud Platform services
  49. CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only"
  50. )
  51. func New(client *http.Client) (*Service, error) {
  52. if client == nil {
  53. return nil, errors.New("client is nil")
  54. }
  55. s := &Service{client: client, BasePath: basePath}
  56. s.ApplicationDetailService = NewApplicationDetailServiceService(s)
  57. s.Projects = NewProjectsService(s)
  58. s.TestEnvironmentCatalog = NewTestEnvironmentCatalogService(s)
  59. return s, nil
  60. }
  61. type Service struct {
  62. client *http.Client
  63. BasePath string // API endpoint base URL
  64. UserAgent string // optional additional User-Agent fragment
  65. ApplicationDetailService *ApplicationDetailServiceService
  66. Projects *ProjectsService
  67. TestEnvironmentCatalog *TestEnvironmentCatalogService
  68. }
  69. func (s *Service) userAgent() string {
  70. if s.UserAgent == "" {
  71. return googleapi.UserAgent
  72. }
  73. return googleapi.UserAgent + " " + s.UserAgent
  74. }
  75. func NewApplicationDetailServiceService(s *Service) *ApplicationDetailServiceService {
  76. rs := &ApplicationDetailServiceService{s: s}
  77. return rs
  78. }
  79. type ApplicationDetailServiceService struct {
  80. s *Service
  81. }
  82. func NewProjectsService(s *Service) *ProjectsService {
  83. rs := &ProjectsService{s: s}
  84. rs.TestMatrices = NewProjectsTestMatricesService(s)
  85. return rs
  86. }
  87. type ProjectsService struct {
  88. s *Service
  89. TestMatrices *ProjectsTestMatricesService
  90. }
  91. func NewProjectsTestMatricesService(s *Service) *ProjectsTestMatricesService {
  92. rs := &ProjectsTestMatricesService{s: s}
  93. return rs
  94. }
  95. type ProjectsTestMatricesService struct {
  96. s *Service
  97. }
  98. func NewTestEnvironmentCatalogService(s *Service) *TestEnvironmentCatalogService {
  99. rs := &TestEnvironmentCatalogService{s: s}
  100. return rs
  101. }
  102. type TestEnvironmentCatalogService struct {
  103. s *Service
  104. }
  105. // Account: Identifies an account and how to log into it
  106. type Account struct {
  107. // GoogleAuto: An automatic google login account
  108. GoogleAuto *GoogleAuto `json:"googleAuto,omitempty"`
  109. // ForceSendFields is a list of field names (e.g. "GoogleAuto") to
  110. // unconditionally include in API requests. By default, fields with
  111. // empty values are omitted from API requests. However, any non-pointer,
  112. // non-interface field appearing in ForceSendFields will be sent to the
  113. // server regardless of whether the field is empty or not. This may be
  114. // used to include empty fields in Patch requests.
  115. ForceSendFields []string `json:"-"`
  116. // NullFields is a list of field names (e.g. "GoogleAuto") to include in
  117. // API requests with the JSON null value. By default, fields with empty
  118. // values are omitted from API requests. However, any field with an
  119. // empty value appearing in NullFields will be sent to the server as
  120. // null. It is an error if a field in this list has a non-empty value.
  121. // This may be used to include null fields in Patch requests.
  122. NullFields []string `json:"-"`
  123. }
  124. func (s *Account) MarshalJSON() ([]byte, error) {
  125. type NoMethod Account
  126. raw := NoMethod(*s)
  127. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  128. }
  129. // AndroidDevice: A single Android device.
  130. type AndroidDevice struct {
  131. // AndroidModelId: The id of the Android device to be used.
  132. // Use the EnvironmentDiscoveryService to get supported
  133. // options.
  134. // Required
  135. AndroidModelId string `json:"androidModelId,omitempty"`
  136. // AndroidVersionId: The id of the Android OS version to be used.
  137. // Use the EnvironmentDiscoveryService to get supported
  138. // options.
  139. // Required
  140. AndroidVersionId string `json:"androidVersionId,omitempty"`
  141. // Locale: The locale the test device used for testing.
  142. // Use the EnvironmentDiscoveryService to get supported
  143. // options.
  144. // Required
  145. Locale string `json:"locale,omitempty"`
  146. // Orientation: How the device is oriented during the test.
  147. // Use the EnvironmentDiscoveryService to get supported
  148. // options.
  149. // Required
  150. Orientation string `json:"orientation,omitempty"`
  151. // ForceSendFields is a list of field names (e.g. "AndroidModelId") to
  152. // unconditionally include in API requests. By default, fields with
  153. // empty values are omitted from API requests. However, any non-pointer,
  154. // non-interface field appearing in ForceSendFields will be sent to the
  155. // server regardless of whether the field is empty or not. This may be
  156. // used to include empty fields in Patch requests.
  157. ForceSendFields []string `json:"-"`
  158. // NullFields is a list of field names (e.g. "AndroidModelId") to
  159. // include in API requests with the JSON null value. By default, fields
  160. // with empty values are omitted from API requests. However, any field
  161. // with an empty value appearing in NullFields will be sent to the
  162. // server as null. It is an error if a field in this list has a
  163. // non-empty value. This may be used to include null fields in Patch
  164. // requests.
  165. NullFields []string `json:"-"`
  166. }
  167. func (s *AndroidDevice) MarshalJSON() ([]byte, error) {
  168. type NoMethod AndroidDevice
  169. raw := NoMethod(*s)
  170. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  171. }
  172. // AndroidDeviceCatalog: The currently supported Android devices.
  173. type AndroidDeviceCatalog struct {
  174. // Models: The set of supported Android device models.
  175. // @OutputOnly
  176. Models []*AndroidModel `json:"models,omitempty"`
  177. // RuntimeConfiguration: The set of supported runtime
  178. // configurations.
  179. // @OutputOnly
  180. RuntimeConfiguration *AndroidRuntimeConfiguration `json:"runtimeConfiguration,omitempty"`
  181. // Versions: The set of supported Android OS versions.
  182. // @OutputOnly
  183. Versions []*AndroidVersion `json:"versions,omitempty"`
  184. // ForceSendFields is a list of field names (e.g. "Models") to
  185. // unconditionally include in API requests. By default, fields with
  186. // empty values are omitted from API requests. However, any non-pointer,
  187. // non-interface field appearing in ForceSendFields will be sent to the
  188. // server regardless of whether the field is empty or not. This may be
  189. // used to include empty fields in Patch requests.
  190. ForceSendFields []string `json:"-"`
  191. // NullFields is a list of field names (e.g. "Models") to include in API
  192. // requests with the JSON null value. By default, fields with empty
  193. // values are omitted from API requests. However, any field with an
  194. // empty value appearing in NullFields will be sent to the server as
  195. // null. It is an error if a field in this list has a non-empty value.
  196. // This may be used to include null fields in Patch requests.
  197. NullFields []string `json:"-"`
  198. }
  199. func (s *AndroidDeviceCatalog) MarshalJSON() ([]byte, error) {
  200. type NoMethod AndroidDeviceCatalog
  201. raw := NoMethod(*s)
  202. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  203. }
  204. // AndroidDeviceList: A list of Android device configurations in which
  205. // the test is to be executed.
  206. type AndroidDeviceList struct {
  207. // AndroidDevices: A list of Android devices
  208. // Required
  209. AndroidDevices []*AndroidDevice `json:"androidDevices,omitempty"`
  210. // ForceSendFields is a list of field names (e.g. "AndroidDevices") to
  211. // unconditionally include in API requests. By default, fields with
  212. // empty values are omitted from API requests. However, any non-pointer,
  213. // non-interface field appearing in ForceSendFields will be sent to the
  214. // server regardless of whether the field is empty or not. This may be
  215. // used to include empty fields in Patch requests.
  216. ForceSendFields []string `json:"-"`
  217. // NullFields is a list of field names (e.g. "AndroidDevices") to
  218. // include in API requests with the JSON null value. By default, fields
  219. // with empty values are omitted from API requests. However, any field
  220. // with an empty value appearing in NullFields will be sent to the
  221. // server as null. It is an error if a field in this list has a
  222. // non-empty value. This may be used to include null fields in Patch
  223. // requests.
  224. NullFields []string `json:"-"`
  225. }
  226. func (s *AndroidDeviceList) MarshalJSON() ([]byte, error) {
  227. type NoMethod AndroidDeviceList
  228. raw := NoMethod(*s)
  229. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  230. }
  231. // AndroidInstrumentationTest: A test of an Android application that can
  232. // control an Android component
  233. // independently of its normal lifecycle.
  234. // Android instrumentation tests run an application APK and test APK
  235. // inside the
  236. // same process on a virtual or physical AndroidDevice. They also
  237. // specify
  238. // a test runner class, such as com.google.GoogleTestRunner, which can
  239. // vary
  240. // on the specific instrumentation framework chosen.
  241. //
  242. // See <http://developer.android.com/tools/testing/testing_android.html>
  243. // for
  244. // more information on types of Android tests.
  245. type AndroidInstrumentationTest struct {
  246. // AppApk: The APK for the application under test.
  247. // Required
  248. AppApk *FileReference `json:"appApk,omitempty"`
  249. // AppPackageId: The java package for the application under
  250. // test.
  251. // Optional, default is determined by examining the application's
  252. // manifest.
  253. AppPackageId string `json:"appPackageId,omitempty"`
  254. // OrchestratorOption: The option of whether running each test within
  255. // its own invocation of
  256. // instrumentation with Android Test Orchestrator or not.
  257. // ** Orchestrator is only compatible with AndroidJUnitRunner version
  258. // 1.0 or
  259. // higher! **
  260. // Orchestrator offers the following benefits:
  261. // - No shared state
  262. // - Crashes are isolated
  263. // - Logs are scoped per
  264. // test
  265. //
  266. // See
  267. // <https://developer.android.com/training/testing/junit-runner
  268. // .html#using-android-test-orchestrator>
  269. // for more information about Android Test Orchestrator.
  270. //
  271. // Optional, if empty, test will be run without orchestrator.
  272. //
  273. // Possible values:
  274. // "ORCHESTRATOR_OPTION_UNSPECIFIED" - This means that the server
  275. // should choose the mode. And test will be run
  276. // without orchestrator.
  277. // Using orchestrator is highly encouraged because of all the benefits
  278. // it
  279. // offers. And in the future, all instrumentation tests will be run
  280. // with
  281. // orchestrator by default if preference unspecified.
  282. // "USE_ORCHESTRATOR" - Run test using orchestrator.
  283. // ** Only compatible with AndroidJUnitRunner version 1.0 or higher!
  284. // **
  285. // Recommended.
  286. // "DO_NOT_USE_ORCHESTRATOR" - Run test without using orchestrator.
  287. OrchestratorOption string `json:"orchestratorOption,omitempty"`
  288. // TestApk: The APK containing the test code to be executed.
  289. // Required
  290. TestApk *FileReference `json:"testApk,omitempty"`
  291. // TestPackageId: The java package for the test to be
  292. // executed.
  293. // Optional, default is determined by examining the application's
  294. // manifest.
  295. TestPackageId string `json:"testPackageId,omitempty"`
  296. // TestRunnerClass: The InstrumentationTestRunner class.
  297. // Optional, default is determined by examining the application's
  298. // manifest.
  299. TestRunnerClass string `json:"testRunnerClass,omitempty"`
  300. // TestTargets: Each target must be fully qualified with the package
  301. // name or class name,
  302. // in one of these formats:
  303. // - "package package_name"
  304. // - "class package_name.class_name"
  305. // - "class package_name.class_name#method_name"
  306. //
  307. // Optional, if empty, all targets in the module will be run.
  308. TestTargets []string `json:"testTargets,omitempty"`
  309. // ForceSendFields is a list of field names (e.g. "AppApk") to
  310. // unconditionally include in API requests. By default, fields with
  311. // empty values are omitted from API requests. However, any non-pointer,
  312. // non-interface field appearing in ForceSendFields will be sent to the
  313. // server regardless of whether the field is empty or not. This may be
  314. // used to include empty fields in Patch requests.
  315. ForceSendFields []string `json:"-"`
  316. // NullFields is a list of field names (e.g. "AppApk") to include in API
  317. // requests with the JSON null value. By default, fields with empty
  318. // values are omitted from API requests. However, any field with an
  319. // empty value appearing in NullFields will be sent to the server as
  320. // null. It is an error if a field in this list has a non-empty value.
  321. // This may be used to include null fields in Patch requests.
  322. NullFields []string `json:"-"`
  323. }
  324. func (s *AndroidInstrumentationTest) MarshalJSON() ([]byte, error) {
  325. type NoMethod AndroidInstrumentationTest
  326. raw := NoMethod(*s)
  327. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  328. }
  329. // AndroidMatrix: A set of Android device configuration permutations is
  330. // defined by the
  331. // the cross-product of the given axes. Internally, the given
  332. // AndroidMatrix
  333. // will be expanded into a set of AndroidDevices.
  334. //
  335. // Only supported permutations will be instantiated. Invalid
  336. // permutations
  337. // (e.g., incompatible models/versions) are ignored.
  338. type AndroidMatrix struct {
  339. // AndroidModelIds: The ids of the set of Android device to be used.
  340. // Use the EnvironmentDiscoveryService to get supported
  341. // options.
  342. // Required
  343. AndroidModelIds []string `json:"androidModelIds,omitempty"`
  344. // AndroidVersionIds: The ids of the set of Android OS version to be
  345. // used.
  346. // Use the EnvironmentDiscoveryService to get supported
  347. // options.
  348. // Required
  349. AndroidVersionIds []string `json:"androidVersionIds,omitempty"`
  350. // Locales: The set of locales the test device will enable for
  351. // testing.
  352. // Use the EnvironmentDiscoveryService to get supported
  353. // options.
  354. // Required
  355. Locales []string `json:"locales,omitempty"`
  356. // Orientations: The set of orientations to test with.
  357. // Use the EnvironmentDiscoveryService to get supported
  358. // options.
  359. // Required
  360. Orientations []string `json:"orientations,omitempty"`
  361. // ForceSendFields is a list of field names (e.g. "AndroidModelIds") to
  362. // unconditionally include in API requests. By default, fields with
  363. // empty values are omitted from API requests. However, any non-pointer,
  364. // non-interface field appearing in ForceSendFields will be sent to the
  365. // server regardless of whether the field is empty or not. This may be
  366. // used to include empty fields in Patch requests.
  367. ForceSendFields []string `json:"-"`
  368. // NullFields is a list of field names (e.g. "AndroidModelIds") to
  369. // include in API requests with the JSON null value. By default, fields
  370. // with empty values are omitted from API requests. However, any field
  371. // with an empty value appearing in NullFields will be sent to the
  372. // server as null. It is an error if a field in this list has a
  373. // non-empty value. This may be used to include null fields in Patch
  374. // requests.
  375. NullFields []string `json:"-"`
  376. }
  377. func (s *AndroidMatrix) MarshalJSON() ([]byte, error) {
  378. type NoMethod AndroidMatrix
  379. raw := NoMethod(*s)
  380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  381. }
  382. // AndroidModel: A description of an Android device tests may be run on.
  383. type AndroidModel struct {
  384. // Brand: The company that this device is branded with.
  385. // Example: "Google", "Samsung"
  386. // @OutputOnly
  387. Brand string `json:"brand,omitempty"`
  388. // Codename: The name of the industrial design.
  389. // This corresponds to android.os.Build.DEVICE
  390. // @OutputOnly
  391. Codename string `json:"codename,omitempty"`
  392. // Form: Whether this device is virtual or physical.
  393. // @OutputOnly
  394. //
  395. // Possible values:
  396. // "DEVICE_FORM_UNSPECIFIED" - Do not use. For proto versioning only.
  397. // "VIRTUAL" - A software stack that simulates the device
  398. // "PHYSICAL" - Actual hardware
  399. Form string `json:"form,omitempty"`
  400. // Id: The unique opaque id for this model.
  401. // Use this for invoking the TestExecutionService.
  402. // @OutputOnly
  403. Id string `json:"id,omitempty"`
  404. // Manufacturer: The manufacturer of this device.
  405. // @OutputOnly
  406. Manufacturer string `json:"manufacturer,omitempty"`
  407. // Name: The human-readable marketing name for this device
  408. // model.
  409. // Examples: "Nexus 5", "Galaxy S5"
  410. // @OutputOnly
  411. Name string `json:"name,omitempty"`
  412. // ScreenDensity: Screen density in DPI.
  413. // This corresponds to ro.sf.lcd_density
  414. // @OutputOnly
  415. ScreenDensity int64 `json:"screenDensity,omitempty"`
  416. // ScreenX: Screen size in the horizontal (X) dimension measured in
  417. // pixels.
  418. // @OutputOnly
  419. ScreenX int64 `json:"screenX,omitempty"`
  420. // ScreenY: Screen size in the vertical (Y) dimension measured in
  421. // pixels.
  422. // @OutputOnly
  423. ScreenY int64 `json:"screenY,omitempty"`
  424. // SupportedAbis: The list of supported ABIs for this device.
  425. // This corresponds to either android.os.Build.SUPPORTED_ABIS (for API
  426. // level
  427. // 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2.
  428. // The most preferred ABI is the first element in the list.
  429. //
  430. // Elements are optionally prefixed by "version_id:" (where version_id
  431. // is
  432. // the id of an AndroidVersion), denoting an ABI that is supported only
  433. // on
  434. // a particular version.
  435. // @OutputOnly
  436. SupportedAbis []string `json:"supportedAbis,omitempty"`
  437. // SupportedVersionIds: The set of Android versions this device
  438. // supports.
  439. // @OutputOnly
  440. SupportedVersionIds []string `json:"supportedVersionIds,omitempty"`
  441. // Tags: Tags for this dimension.
  442. // Examples: "default", "preview", "deprecated"
  443. Tags []string `json:"tags,omitempty"`
  444. // VideoRecordingNotSupported: True if and only if tests with this model
  445. // DO NOT have video output.
  446. // See also TestSpecification.disable_video_recording
  447. // @OutputOnly
  448. VideoRecordingNotSupported bool `json:"videoRecordingNotSupported,omitempty"`
  449. // ForceSendFields is a list of field names (e.g. "Brand") to
  450. // unconditionally include in API requests. By default, fields with
  451. // empty values are omitted from API requests. However, any non-pointer,
  452. // non-interface field appearing in ForceSendFields will be sent to the
  453. // server regardless of whether the field is empty or not. This may be
  454. // used to include empty fields in Patch requests.
  455. ForceSendFields []string `json:"-"`
  456. // NullFields is a list of field names (e.g. "Brand") to include in API
  457. // requests with the JSON null value. By default, fields with empty
  458. // values are omitted from API requests. However, any field with an
  459. // empty value appearing in NullFields will be sent to the server as
  460. // null. It is an error if a field in this list has a non-empty value.
  461. // This may be used to include null fields in Patch requests.
  462. NullFields []string `json:"-"`
  463. }
  464. func (s *AndroidModel) MarshalJSON() ([]byte, error) {
  465. type NoMethod AndroidModel
  466. raw := NoMethod(*s)
  467. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  468. }
  469. // AndroidRoboTest: A test of an android application that explores the
  470. // application on a virtual
  471. // or physical Android Device, finding culprits and crashes as it goes.
  472. type AndroidRoboTest struct {
  473. // AppApk: The APK for the application under test.
  474. // Required
  475. AppApk *FileReference `json:"appApk,omitempty"`
  476. // AppInitialActivity: The initial activity that should be used to start
  477. // the app.
  478. // Optional
  479. AppInitialActivity string `json:"appInitialActivity,omitempty"`
  480. // AppPackageId: The java package for the application under
  481. // test.
  482. // Optional, default is determined by examining the application's
  483. // manifest.
  484. AppPackageId string `json:"appPackageId,omitempty"`
  485. // MaxDepth: The max depth of the traversal stack Robo can explore.
  486. // Needs to be at least
  487. // 2 to make Robo explore the app beyond the first activity.
  488. // Default is 50.
  489. // Optional
  490. MaxDepth int64 `json:"maxDepth,omitempty"`
  491. // MaxSteps: The max number of steps Robo can execute.
  492. // Default is no limit.
  493. // Optional
  494. MaxSteps int64 `json:"maxSteps,omitempty"`
  495. // RoboDirectives: A set of directives Robo should apply during the
  496. // crawl.
  497. // This allows users to customize the crawl. For example, the username
  498. // and
  499. // password for a test account can be provided.
  500. // Optional
  501. RoboDirectives []*RoboDirective `json:"roboDirectives,omitempty"`
  502. // RoboScript: A JSON file with a sequence of actions Robo should
  503. // perform as a prologue
  504. // for the crawl.
  505. // Optional
  506. RoboScript *FileReference `json:"roboScript,omitempty"`
  507. // StartingIntents: The intents used to launch the app for the crawl.
  508. // If none are provided, then the main launcher activity is launched.
  509. // If some are provided, then only those provided are launched (the
  510. // main
  511. // launcher activity must be provided explicitly).
  512. StartingIntents []*RoboStartingIntent `json:"startingIntents,omitempty"`
  513. // ForceSendFields is a list of field names (e.g. "AppApk") to
  514. // unconditionally include in API requests. By default, fields with
  515. // empty values are omitted from API requests. However, any non-pointer,
  516. // non-interface field appearing in ForceSendFields will be sent to the
  517. // server regardless of whether the field is empty or not. This may be
  518. // used to include empty fields in Patch requests.
  519. ForceSendFields []string `json:"-"`
  520. // NullFields is a list of field names (e.g. "AppApk") to include in API
  521. // requests with the JSON null value. By default, fields with empty
  522. // values are omitted from API requests. However, any field with an
  523. // empty value appearing in NullFields will be sent to the server as
  524. // null. It is an error if a field in this list has a non-empty value.
  525. // This may be used to include null fields in Patch requests.
  526. NullFields []string `json:"-"`
  527. }
  528. func (s *AndroidRoboTest) MarshalJSON() ([]byte, error) {
  529. type NoMethod AndroidRoboTest
  530. raw := NoMethod(*s)
  531. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  532. }
  533. // AndroidRuntimeConfiguration: Configuration that can be selected at
  534. // the time a test is run.
  535. type AndroidRuntimeConfiguration struct {
  536. // Locales: The set of available locales.
  537. // @OutputOnly
  538. Locales []*Locale `json:"locales,omitempty"`
  539. // Orientations: The set of available orientations.
  540. // @OutputOnly
  541. Orientations []*Orientation `json:"orientations,omitempty"`
  542. // ForceSendFields is a list of field names (e.g. "Locales") to
  543. // unconditionally include in API requests. By default, fields with
  544. // empty values are omitted from API requests. However, any non-pointer,
  545. // non-interface field appearing in ForceSendFields will be sent to the
  546. // server regardless of whether the field is empty or not. This may be
  547. // used to include empty fields in Patch requests.
  548. ForceSendFields []string `json:"-"`
  549. // NullFields is a list of field names (e.g. "Locales") to include in
  550. // API requests with the JSON null value. By default, fields with empty
  551. // values are omitted from API requests. However, any field with an
  552. // empty value appearing in NullFields will be sent to the server as
  553. // null. It is an error if a field in this list has a non-empty value.
  554. // This may be used to include null fields in Patch requests.
  555. NullFields []string `json:"-"`
  556. }
  557. func (s *AndroidRuntimeConfiguration) MarshalJSON() ([]byte, error) {
  558. type NoMethod AndroidRuntimeConfiguration
  559. raw := NoMethod(*s)
  560. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  561. }
  562. // AndroidTestLoop: A test of an Android Application with a Test
  563. // Loop.
  564. // The intent <intent-name> will be implicitly added, since Games is the
  565. // only
  566. // user of this api, for the time being.
  567. type AndroidTestLoop struct {
  568. // AppApk: The APK for the application under test.
  569. // Required
  570. AppApk *FileReference `json:"appApk,omitempty"`
  571. // AppPackageId: The java package for the application under
  572. // test.
  573. // Optional, default is determined by examining the application's
  574. // manifest.
  575. AppPackageId string `json:"appPackageId,omitempty"`
  576. // ScenarioLabels: The list of scenario labels that should be run during
  577. // the test.
  578. // The scenario labels should map to labels defined in the
  579. // application's
  580. // manifest. For example, player_experience
  581. // and
  582. // com.google.test.loops.player_experience add all of the loops labeled
  583. // in the
  584. // manifest with the com.google.test.loops.player_experience name to
  585. // the
  586. // execution.
  587. // Optional. Scenarios can also be specified in the scenarios field.
  588. ScenarioLabels []string `json:"scenarioLabels,omitempty"`
  589. // Scenarios: The list of scenarios that should be run during the
  590. // test.
  591. // Optional, default is all test loops, derived from the
  592. // application's
  593. // manifest.
  594. Scenarios []int64 `json:"scenarios,omitempty"`
  595. // ForceSendFields is a list of field names (e.g. "AppApk") to
  596. // unconditionally include in API requests. By default, fields with
  597. // empty values are omitted from API requests. However, any non-pointer,
  598. // non-interface field appearing in ForceSendFields will be sent to the
  599. // server regardless of whether the field is empty or not. This may be
  600. // used to include empty fields in Patch requests.
  601. ForceSendFields []string `json:"-"`
  602. // NullFields is a list of field names (e.g. "AppApk") to include in API
  603. // requests with the JSON null value. By default, fields with empty
  604. // values are omitted from API requests. However, any field with an
  605. // empty value appearing in NullFields will be sent to the server as
  606. // null. It is an error if a field in this list has a non-empty value.
  607. // This may be used to include null fields in Patch requests.
  608. NullFields []string `json:"-"`
  609. }
  610. func (s *AndroidTestLoop) MarshalJSON() ([]byte, error) {
  611. type NoMethod AndroidTestLoop
  612. raw := NoMethod(*s)
  613. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  614. }
  615. // AndroidVersion: A version of the Android OS
  616. type AndroidVersion struct {
  617. // ApiLevel: The API level for this Android version.
  618. // Examples: 18, 19
  619. // @OutputOnly
  620. ApiLevel int64 `json:"apiLevel,omitempty"`
  621. // CodeName: The code name for this Android version.
  622. // Examples: "JellyBean", "KitKat"
  623. // @OutputOnly
  624. CodeName string `json:"codeName,omitempty"`
  625. // Distribution: Market share for this version.
  626. // @OutputOnly
  627. Distribution *Distribution `json:"distribution,omitempty"`
  628. // Id: An opaque id for this Android version.
  629. // Use this id to invoke the TestExecutionService.
  630. // @OutputOnly
  631. Id string `json:"id,omitempty"`
  632. // ReleaseDate: The date this Android version became available in the
  633. // market.
  634. // @OutputOnly
  635. ReleaseDate *Date `json:"releaseDate,omitempty"`
  636. // Tags: Tags for this dimension.
  637. // Examples: "default", "preview", "deprecated"
  638. Tags []string `json:"tags,omitempty"`
  639. // VersionString: A string representing this version of the Android
  640. // OS.
  641. // Examples: "4.3", "4.4"
  642. // @OutputOnly
  643. VersionString string `json:"versionString,omitempty"`
  644. // ForceSendFields is a list of field names (e.g. "ApiLevel") to
  645. // unconditionally include in API requests. By default, fields with
  646. // empty values are omitted from API requests. However, any non-pointer,
  647. // non-interface field appearing in ForceSendFields will be sent to the
  648. // server regardless of whether the field is empty or not. This may be
  649. // used to include empty fields in Patch requests.
  650. ForceSendFields []string `json:"-"`
  651. // NullFields is a list of field names (e.g. "ApiLevel") to include in
  652. // API requests with the JSON null value. By default, fields with empty
  653. // values are omitted from API requests. However, any field with an
  654. // empty value appearing in NullFields will be sent to the server as
  655. // null. It is an error if a field in this list has a non-empty value.
  656. // This may be used to include null fields in Patch requests.
  657. NullFields []string `json:"-"`
  658. }
  659. func (s *AndroidVersion) MarshalJSON() ([]byte, error) {
  660. type NoMethod AndroidVersion
  661. raw := NoMethod(*s)
  662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  663. }
  664. // Apk: An Android package file to install.
  665. type Apk struct {
  666. // Location: The path to an APK to be installed on the device before the
  667. // test begins.
  668. // Optional
  669. Location *FileReference `json:"location,omitempty"`
  670. // PackageName: The java package for the APK to be installed.
  671. // Optional, value is determined by examining the application's
  672. // manifest.
  673. PackageName string `json:"packageName,omitempty"`
  674. // ForceSendFields is a list of field names (e.g. "Location") to
  675. // unconditionally include in API requests. By default, fields with
  676. // empty values are omitted from API requests. However, any non-pointer,
  677. // non-interface field appearing in ForceSendFields will be sent to the
  678. // server regardless of whether the field is empty or not. This may be
  679. // used to include empty fields in Patch requests.
  680. ForceSendFields []string `json:"-"`
  681. // NullFields is a list of field names (e.g. "Location") to include in
  682. // API requests with the JSON null value. By default, fields with empty
  683. // values are omitted from API requests. However, any field with an
  684. // empty value appearing in NullFields will be sent to the server as
  685. // null. It is an error if a field in this list has a non-empty value.
  686. // This may be used to include null fields in Patch requests.
  687. NullFields []string `json:"-"`
  688. }
  689. func (s *Apk) MarshalJSON() ([]byte, error) {
  690. type NoMethod Apk
  691. raw := NoMethod(*s)
  692. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  693. }
  694. // ApkDetail: Android application details based on application manifest
  695. // and apk archive
  696. // contents
  697. type ApkDetail struct {
  698. ApkManifest *ApkManifest `json:"apkManifest,omitempty"`
  699. // ForceSendFields is a list of field names (e.g. "ApkManifest") to
  700. // unconditionally include in API requests. By default, fields with
  701. // empty values are omitted from API requests. However, any non-pointer,
  702. // non-interface field appearing in ForceSendFields will be sent to the
  703. // server regardless of whether the field is empty or not. This may be
  704. // used to include empty fields in Patch requests.
  705. ForceSendFields []string `json:"-"`
  706. // NullFields is a list of field names (e.g. "ApkManifest") to include
  707. // in API requests with the JSON null value. By default, fields with
  708. // empty values are omitted from API requests. However, any field with
  709. // an empty value appearing in NullFields will be sent to the server as
  710. // null. It is an error if a field in this list has a non-empty value.
  711. // This may be used to include null fields in Patch requests.
  712. NullFields []string `json:"-"`
  713. }
  714. func (s *ApkDetail) MarshalJSON() ([]byte, error) {
  715. type NoMethod ApkDetail
  716. raw := NoMethod(*s)
  717. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  718. }
  719. // ApkManifest: An Android app manifest.
  720. // See
  721. // http://developer.android.com/guide/topics/manifest/manifest-intro.
  722. // html
  723. type ApkManifest struct {
  724. // ApplicationLabel: User-readable name for the application.
  725. ApplicationLabel string `json:"applicationLabel,omitempty"`
  726. IntentFilters []*IntentFilter `json:"intentFilters,omitempty"`
  727. // MaxSdkVersion: Maximum API level on which the application is designed
  728. // to run.
  729. MaxSdkVersion int64 `json:"maxSdkVersion,omitempty"`
  730. // MinSdkVersion: Minimum API level required for the application to run.
  731. MinSdkVersion int64 `json:"minSdkVersion,omitempty"`
  732. // PackageName: Full Java-style package name for this application,
  733. // e.g.
  734. // "com.example.foo".
  735. PackageName string `json:"packageName,omitempty"`
  736. // ForceSendFields is a list of field names (e.g. "ApplicationLabel") to
  737. // unconditionally include in API requests. By default, fields with
  738. // empty values are omitted from API requests. However, any non-pointer,
  739. // non-interface field appearing in ForceSendFields will be sent to the
  740. // server regardless of whether the field is empty or not. This may be
  741. // used to include empty fields in Patch requests.
  742. ForceSendFields []string `json:"-"`
  743. // NullFields is a list of field names (e.g. "ApplicationLabel") to
  744. // include in API requests with the JSON null value. By default, fields
  745. // with empty values are omitted from API requests. However, any field
  746. // with an empty value appearing in NullFields will be sent to the
  747. // server as null. It is an error if a field in this list has a
  748. // non-empty value. This may be used to include null fields in Patch
  749. // requests.
  750. NullFields []string `json:"-"`
  751. }
  752. func (s *ApkManifest) MarshalJSON() ([]byte, error) {
  753. type NoMethod ApkManifest
  754. raw := NoMethod(*s)
  755. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  756. }
  757. // CancelTestMatrixResponse: Response containing the current state of
  758. // the specified test matrix.
  759. type CancelTestMatrixResponse struct {
  760. // TestState: The current rolled-up state of the test matrix.
  761. // If this state is already final, then the cancelation request
  762. // will
  763. // have no effect.
  764. //
  765. // Possible values:
  766. // "TEST_STATE_UNSPECIFIED" - Do not use. For proto versioning only.
  767. // "VALIDATING" - The execution or matrix is being validated.
  768. // "PENDING" - The execution or matrix is waiting for resources to
  769. // become available.
  770. // "RUNNING" - The execution is currently being processed.
  771. //
  772. // Can only be set on an execution.
  773. // "FINISHED" - The execution or matrix has terminated normally.
  774. //
  775. // On a matrix this means that the matrix level processing completed
  776. // normally,
  777. // but individual executions may be in an ERROR state.
  778. // "ERROR" - The execution or matrix has stopped because it
  779. // encountered an
  780. // infrastructure failure.
  781. // "UNSUPPORTED_ENVIRONMENT" - The execution was not run because it
  782. // corresponds to a unsupported
  783. // environment.
  784. //
  785. // Can only be set on an execution.
  786. // "INCOMPATIBLE_ENVIRONMENT" - The execution was not run because the
  787. // provided inputs are incompatible with
  788. // the requested environment.
  789. //
  790. // Example: requested AndroidVersion is lower than APK's
  791. // minSdkVersion
  792. //
  793. // Can only be set on an execution.
  794. // "INCOMPATIBLE_ARCHITECTURE" - The execution was not run because the
  795. // provided inputs are incompatible with
  796. // the requested architecture.
  797. //
  798. // Example: requested device does not support running the native code
  799. // in
  800. // the supplied APK
  801. //
  802. // Can only be set on an execution.
  803. // "CANCELLED" - The user cancelled the execution.
  804. //
  805. // Can only be set on an execution.
  806. // "INVALID" - The execution or matrix was not run because the
  807. // provided inputs are not
  808. // valid.
  809. //
  810. // Examples: input file is not of the expected type, is
  811. // malformed/corrupt, or
  812. // was flagged as malware
  813. TestState string `json:"testState,omitempty"`
  814. // ServerResponse contains the HTTP response code and headers from the
  815. // server.
  816. googleapi.ServerResponse `json:"-"`
  817. // ForceSendFields is a list of field names (e.g. "TestState") to
  818. // unconditionally include in API requests. By default, fields with
  819. // empty values are omitted from API requests. However, any non-pointer,
  820. // non-interface field appearing in ForceSendFields will be sent to the
  821. // server regardless of whether the field is empty or not. This may be
  822. // used to include empty fields in Patch requests.
  823. ForceSendFields []string `json:"-"`
  824. // NullFields is a list of field names (e.g. "TestState") to include in
  825. // API requests with the JSON null value. By default, fields with empty
  826. // values are omitted from API requests. However, any field with an
  827. // empty value appearing in NullFields will be sent to the server as
  828. // null. It is an error if a field in this list has a non-empty value.
  829. // This may be used to include null fields in Patch requests.
  830. NullFields []string `json:"-"`
  831. }
  832. func (s *CancelTestMatrixResponse) MarshalJSON() ([]byte, error) {
  833. type NoMethod CancelTestMatrixResponse
  834. raw := NoMethod(*s)
  835. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  836. }
  837. // ClientInfo: Information about the client which invoked the test.
  838. type ClientInfo struct {
  839. // ClientInfoDetails: The list of detailed information about client.
  840. ClientInfoDetails []*ClientInfoDetail `json:"clientInfoDetails,omitempty"`
  841. // Name: Client name, such as gcloud.
  842. // Required
  843. Name string `json:"name,omitempty"`
  844. // ForceSendFields is a list of field names (e.g. "ClientInfoDetails")
  845. // to unconditionally include in API requests. By default, fields with
  846. // empty values are omitted from API requests. However, any non-pointer,
  847. // non-interface field appearing in ForceSendFields will be sent to the
  848. // server regardless of whether the field is empty or not. This may be
  849. // used to include empty fields in Patch requests.
  850. ForceSendFields []string `json:"-"`
  851. // NullFields is a list of field names (e.g. "ClientInfoDetails") to
  852. // include in API requests with the JSON null value. By default, fields
  853. // with empty values are omitted from API requests. However, any field
  854. // with an empty value appearing in NullFields will be sent to the
  855. // server as null. It is an error if a field in this list has a
  856. // non-empty value. This may be used to include null fields in Patch
  857. // requests.
  858. NullFields []string `json:"-"`
  859. }
  860. func (s *ClientInfo) MarshalJSON() ([]byte, error) {
  861. type NoMethod ClientInfo
  862. raw := NoMethod(*s)
  863. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  864. }
  865. // ClientInfoDetail: Key-value pair of detailed information about the
  866. // client which invoked the
  867. // test. For example {'Version', '1.0'}, {'Release Track', 'BETA'}
  868. type ClientInfoDetail struct {
  869. // Key: The key of detailed client information.
  870. // Required
  871. Key string `json:"key,omitempty"`
  872. // Value: The value of detailed client information.
  873. // Required
  874. Value string `json:"value,omitempty"`
  875. // ForceSendFields is a list of field names (e.g. "Key") to
  876. // unconditionally include in API requests. By default, fields with
  877. // empty values are omitted from API requests. However, any non-pointer,
  878. // non-interface field appearing in ForceSendFields will be sent to the
  879. // server regardless of whether the field is empty or not. This may be
  880. // used to include empty fields in Patch requests.
  881. ForceSendFields []string `json:"-"`
  882. // NullFields is a list of field names (e.g. "Key") to include in API
  883. // requests with the JSON null value. By default, fields with empty
  884. // values are omitted from API requests. However, any field with an
  885. // empty value appearing in NullFields will be sent to the server as
  886. // null. It is an error if a field in this list has a non-empty value.
  887. // This may be used to include null fields in Patch requests.
  888. NullFields []string `json:"-"`
  889. }
  890. func (s *ClientInfoDetail) MarshalJSON() ([]byte, error) {
  891. type NoMethod ClientInfoDetail
  892. raw := NoMethod(*s)
  893. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  894. }
  895. // Date: Represents a whole calendar date, e.g. date of birth. The time
  896. // of day and
  897. // time zone are either specified elsewhere or are not significant. The
  898. // date
  899. // is relative to the Proleptic Gregorian Calendar. The day may be 0
  900. // to
  901. // represent a year and month where the day is not significant, e.g.
  902. // credit card
  903. // expiration date. The year may be 0 to represent a month and day
  904. // independent
  905. // of year, e.g. anniversary date. Related types are
  906. // google.type.TimeOfDay
  907. // and `google.protobuf.Timestamp`.
  908. type Date struct {
  909. // Day: Day of month. Must be from 1 to 31 and valid for the year and
  910. // month, or 0
  911. // if specifying a year/month where the day is not significant.
  912. Day int64 `json:"day,omitempty"`
  913. // Month: Month of year. Must be from 1 to 12, or 0 if specifying a date
  914. // without a
  915. // month.
  916. Month int64 `json:"month,omitempty"`
  917. // Year: Year of date. Must be from 1 to 9999, or 0 if specifying a date
  918. // without
  919. // a year.
  920. Year int64 `json:"year,omitempty"`
  921. // ForceSendFields is a list of field names (e.g. "Day") to
  922. // unconditionally include in API requests. By default, fields with
  923. // empty values are omitted from API requests. However, any non-pointer,
  924. // non-interface field appearing in ForceSendFields will be sent to the
  925. // server regardless of whether the field is empty or not. This may be
  926. // used to include empty fields in Patch requests.
  927. ForceSendFields []string `json:"-"`
  928. // NullFields is a list of field names (e.g. "Day") to include in API
  929. // requests with the JSON null value. By default, fields with empty
  930. // values are omitted from API requests. However, any field with an
  931. // empty value appearing in NullFields will be sent to the server as
  932. // null. It is an error if a field in this list has a non-empty value.
  933. // This may be used to include null fields in Patch requests.
  934. NullFields []string `json:"-"`
  935. }
  936. func (s *Date) MarshalJSON() ([]byte, error) {
  937. type NoMethod Date
  938. raw := NoMethod(*s)
  939. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  940. }
  941. // DeviceFile: A single device file description.
  942. type DeviceFile struct {
  943. // ObbFile: A reference to an opaque binary blob file
  944. ObbFile *ObbFile `json:"obbFile,omitempty"`
  945. // RegularFile: A reference to a regular file
  946. RegularFile *RegularFile `json:"regularFile,omitempty"`
  947. // ForceSendFields is a list of field names (e.g. "ObbFile") to
  948. // unconditionally include in API requests. By default, fields with
  949. // empty values are omitted from API requests. However, any non-pointer,
  950. // non-interface field appearing in ForceSendFields will be sent to the
  951. // server regardless of whether the field is empty or not. This may be
  952. // used to include empty fields in Patch requests.
  953. ForceSendFields []string `json:"-"`
  954. // NullFields is a list of field names (e.g. "ObbFile") to include in
  955. // API requests with the JSON null value. By default, fields with empty
  956. // values are omitted from API requests. However, any field with an
  957. // empty value appearing in NullFields will be sent to the server as
  958. // null. It is an error if a field in this list has a non-empty value.
  959. // This may be used to include null fields in Patch requests.
  960. NullFields []string `json:"-"`
  961. }
  962. func (s *DeviceFile) MarshalJSON() ([]byte, error) {
  963. type NoMethod DeviceFile
  964. raw := NoMethod(*s)
  965. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  966. }
  967. // Distribution: Data about the relative number of devices running
  968. // a
  969. // given configuration of the Android platform.
  970. type Distribution struct {
  971. // MarketShare: The estimated fraction (0-1) of the total market with
  972. // this configuration.
  973. // @OutputOnly
  974. MarketShare float64 `json:"marketShare,omitempty"`
  975. // MeasurementTime: The time this distribution was measured.
  976. // @OutputOnly
  977. MeasurementTime string `json:"measurementTime,omitempty"`
  978. // ForceSendFields is a list of field names (e.g. "MarketShare") to
  979. // unconditionally include in API requests. By default, fields with
  980. // empty values are omitted from API requests. However, any non-pointer,
  981. // non-interface field appearing in ForceSendFields will be sent to the
  982. // server regardless of whether the field is empty or not. This may be
  983. // used to include empty fields in Patch requests.
  984. ForceSendFields []string `json:"-"`
  985. // NullFields is a list of field names (e.g. "MarketShare") to include
  986. // in API requests with the JSON null value. By default, fields with
  987. // empty values are omitted from API requests. However, any field with
  988. // an empty value appearing in NullFields will be sent to the server as
  989. // null. It is an error if a field in this list has a non-empty value.
  990. // This may be used to include null fields in Patch requests.
  991. NullFields []string `json:"-"`
  992. }
  993. func (s *Distribution) MarshalJSON() ([]byte, error) {
  994. type NoMethod Distribution
  995. raw := NoMethod(*s)
  996. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  997. }
  998. func (s *Distribution) UnmarshalJSON(data []byte) error {
  999. type NoMethod Distribution
  1000. var s1 struct {
  1001. MarketShare gensupport.JSONFloat64 `json:"marketShare"`
  1002. *NoMethod
  1003. }
  1004. s1.NoMethod = (*NoMethod)(s)
  1005. if err := json.Unmarshal(data, &s1); err != nil {
  1006. return err
  1007. }
  1008. s.MarketShare = float64(s1.MarketShare)
  1009. return nil
  1010. }
  1011. // Environment: The environment in which the test is run.
  1012. type Environment struct {
  1013. // AndroidDevice: An Android device which must be used with an Android
  1014. // test.
  1015. AndroidDevice *AndroidDevice `json:"androidDevice,omitempty"`
  1016. // ForceSendFields is a list of field names (e.g. "AndroidDevice") to
  1017. // unconditionally include in API requests. By default, fields with
  1018. // empty values are omitted from API requests. However, any non-pointer,
  1019. // non-interface field appearing in ForceSendFields will be sent to the
  1020. // server regardless of whether the field is empty or not. This may be
  1021. // used to include empty fields in Patch requests.
  1022. ForceSendFields []string `json:"-"`
  1023. // NullFields is a list of field names (e.g. "AndroidDevice") to include
  1024. // in API requests with the JSON null value. By default, fields with
  1025. // empty values are omitted from API requests. However, any field with
  1026. // an empty value appearing in NullFields will be sent to the server as
  1027. // null. It is an error if a field in this list has a non-empty value.
  1028. // This may be used to include null fields in Patch requests.
  1029. NullFields []string `json:"-"`
  1030. }
  1031. func (s *Environment) MarshalJSON() ([]byte, error) {
  1032. type NoMethod Environment
  1033. raw := NoMethod(*s)
  1034. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1035. }
  1036. // EnvironmentMatrix: The matrix of environments in which the test is to
  1037. // be executed.
  1038. type EnvironmentMatrix struct {
  1039. // AndroidDeviceList: A list of Android devices; the test will be run
  1040. // only on the specified
  1041. // devices.
  1042. AndroidDeviceList *AndroidDeviceList `json:"androidDeviceList,omitempty"`
  1043. // AndroidMatrix: A matrix of Android devices.
  1044. AndroidMatrix *AndroidMatrix `json:"androidMatrix,omitempty"`
  1045. // ForceSendFields is a list of field names (e.g. "AndroidDeviceList")
  1046. // to unconditionally include in API requests. By default, fields with
  1047. // empty values are omitted from API requests. However, any non-pointer,
  1048. // non-interface field appearing in ForceSendFields will be sent to the
  1049. // server regardless of whether the field is empty or not. This may be
  1050. // used to include empty fields in Patch requests.
  1051. ForceSendFields []string `json:"-"`
  1052. // NullFields is a list of field names (e.g. "AndroidDeviceList") to
  1053. // include in API requests with the JSON null value. By default, fields
  1054. // with empty values are omitted from API requests. However, any field
  1055. // with an empty value appearing in NullFields will be sent to the
  1056. // server as null. It is an error if a field in this list has a
  1057. // non-empty value. This may be used to include null fields in Patch
  1058. // requests.
  1059. NullFields []string `json:"-"`
  1060. }
  1061. func (s *EnvironmentMatrix) MarshalJSON() ([]byte, error) {
  1062. type NoMethod EnvironmentMatrix
  1063. raw := NoMethod(*s)
  1064. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1065. }
  1066. // EnvironmentVariable: A key-value pair passed as an environment
  1067. // variable to the test
  1068. type EnvironmentVariable struct {
  1069. // Key: Key for the environment variable
  1070. Key string `json:"key,omitempty"`
  1071. // Value: Value for the environment variable
  1072. Value string `json:"value,omitempty"`
  1073. // ForceSendFields is a list of field names (e.g. "Key") to
  1074. // unconditionally include in API requests. By default, fields with
  1075. // empty values are omitted from API requests. However, any non-pointer,
  1076. // non-interface field appearing in ForceSendFields will be sent to the
  1077. // server regardless of whether the field is empty or not. This may be
  1078. // used to include empty fields in Patch requests.
  1079. ForceSendFields []string `json:"-"`
  1080. // NullFields is a list of field names (e.g. "Key") to include in API
  1081. // requests with the JSON null value. By default, fields with empty
  1082. // values are omitted from API requests. However, any field with an
  1083. // empty value appearing in NullFields will be sent to the server as
  1084. // null. It is an error if a field in this list has a non-empty value.
  1085. // This may be used to include null fields in Patch requests.
  1086. NullFields []string `json:"-"`
  1087. }
  1088. func (s *EnvironmentVariable) MarshalJSON() ([]byte, error) {
  1089. type NoMethod EnvironmentVariable
  1090. raw := NoMethod(*s)
  1091. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1092. }
  1093. // FileReference: A reference to a file, used for user inputs.
  1094. type FileReference struct {
  1095. // GcsPath: A path to a file in Google Cloud Storage.
  1096. // Example: gs://build-app-1414623860166/app-debug-unaligned.apk
  1097. GcsPath string `json:"gcsPath,omitempty"`
  1098. // ForceSendFields is a list of field names (e.g. "GcsPath") to
  1099. // unconditionally include in API requests. By default, fields with
  1100. // empty values are omitted from API requests. However, any non-pointer,
  1101. // non-interface field appearing in ForceSendFields will be sent to the
  1102. // server regardless of whether the field is empty or not. This may be
  1103. // used to include empty fields in Patch requests.
  1104. ForceSendFields []string `json:"-"`
  1105. // NullFields is a list of field names (e.g. "GcsPath") to include in
  1106. // API requests with the JSON null value. By default, fields with empty
  1107. // values are omitted from API requests. However, any field with an
  1108. // empty value appearing in NullFields will be sent to the server as
  1109. // null. It is an error if a field in this list has a non-empty value.
  1110. // This may be used to include null fields in Patch requests.
  1111. NullFields []string `json:"-"`
  1112. }
  1113. func (s *FileReference) MarshalJSON() ([]byte, error) {
  1114. type NoMethod FileReference
  1115. raw := NoMethod(*s)
  1116. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1117. }
  1118. // GetApkDetailsResponse: Response containing the details of the
  1119. // specified Android application APK.
  1120. type GetApkDetailsResponse struct {
  1121. // ApkDetail: Details of the Android APK.
  1122. ApkDetail *ApkDetail `json:"apkDetail,omitempty"`
  1123. // ServerResponse contains the HTTP response code and headers from the
  1124. // server.
  1125. googleapi.ServerResponse `json:"-"`
  1126. // ForceSendFields is a list of field names (e.g. "ApkDetail") to
  1127. // unconditionally include in API requests. By default, fields with
  1128. // empty values are omitted from API requests. However, any non-pointer,
  1129. // non-interface field appearing in ForceSendFields will be sent to the
  1130. // server regardless of whether the field is empty or not. This may be
  1131. // used to include empty fields in Patch requests.
  1132. ForceSendFields []string `json:"-"`
  1133. // NullFields is a list of field names (e.g. "ApkDetail") to include in
  1134. // API requests with the JSON null value. By default, fields with empty
  1135. // values are omitted from API requests. However, any field with an
  1136. // empty value appearing in NullFields will be sent to the server as
  1137. // null. It is an error if a field in this list has a non-empty value.
  1138. // This may be used to include null fields in Patch requests.
  1139. NullFields []string `json:"-"`
  1140. }
  1141. func (s *GetApkDetailsResponse) MarshalJSON() ([]byte, error) {
  1142. type NoMethod GetApkDetailsResponse
  1143. raw := NoMethod(*s)
  1144. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1145. }
  1146. // GoogleAuto: Enables automatic Google account login.
  1147. // If set, the service will automatically generate a Google test account
  1148. // and add
  1149. // it to the device, before executing the test. Note that test accounts
  1150. // might be
  1151. // reused.
  1152. // Many applications show their full set of functionalities when an
  1153. // account is
  1154. // present on the device. Logging into the device with these generated
  1155. // accounts
  1156. // allows testing more functionalities.
  1157. type GoogleAuto struct {
  1158. }
  1159. // GoogleCloudStorage: A storage location within Google cloud storage
  1160. // (GCS).
  1161. type GoogleCloudStorage struct {
  1162. // GcsPath: The path to a directory in GCS that will
  1163. // eventually contain the results for this test.
  1164. // The requesting user must have write access on the bucket in the
  1165. // supplied
  1166. // path.
  1167. // Required
  1168. GcsPath string `json:"gcsPath,omitempty"`
  1169. // ForceSendFields is a list of field names (e.g. "GcsPath") to
  1170. // unconditionally include in API requests. By default, fields with
  1171. // empty values are omitted from API requests. However, any non-pointer,
  1172. // non-interface field appearing in ForceSendFields will be sent to the
  1173. // server regardless of whether the field is empty or not. This may be
  1174. // used to include empty fields in Patch requests.
  1175. ForceSendFields []string `json:"-"`
  1176. // NullFields is a list of field names (e.g. "GcsPath") to include in
  1177. // API requests with the JSON null value. By default, fields with empty
  1178. // values are omitted from API requests. However, any field with an
  1179. // empty value appearing in NullFields will be sent to the server as
  1180. // null. It is an error if a field in this list has a non-empty value.
  1181. // This may be used to include null fields in Patch requests.
  1182. NullFields []string `json:"-"`
  1183. }
  1184. func (s *GoogleCloudStorage) MarshalJSON() ([]byte, error) {
  1185. type NoMethod GoogleCloudStorage
  1186. raw := NoMethod(*s)
  1187. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1188. }
  1189. // IntentFilter: The <intent-filter> section of an <activity>
  1190. // tag.
  1191. // https://developer.android.com/guide/topics/manifest/intent-filter
  1192. // -element.html
  1193. type IntentFilter struct {
  1194. // ActionNames: The android:name value of the <action> tag
  1195. ActionNames []string `json:"actionNames,omitempty"`
  1196. // CategoryNames: The android:name value of the <category> tag
  1197. CategoryNames []string `json:"categoryNames,omitempty"`
  1198. // MimeType: The android:mimeType value of the <data> tag
  1199. MimeType string `json:"mimeType,omitempty"`
  1200. // ForceSendFields is a list of field names (e.g. "ActionNames") to
  1201. // unconditionally include in API requests. By default, fields with
  1202. // empty values are omitted from API requests. However, any non-pointer,
  1203. // non-interface field appearing in ForceSendFields will be sent to the
  1204. // server regardless of whether the field is empty or not. This may be
  1205. // used to include empty fields in Patch requests.
  1206. ForceSendFields []string `json:"-"`
  1207. // NullFields is a list of field names (e.g. "ActionNames") to include
  1208. // in API requests with the JSON null value. By default, fields with
  1209. // empty values are omitted from API requests. However, any field with
  1210. // an empty value appearing in NullFields will be sent to the server as
  1211. // null. It is an error if a field in this list has a non-empty value.
  1212. // This may be used to include null fields in Patch requests.
  1213. NullFields []string `json:"-"`
  1214. }
  1215. func (s *IntentFilter) MarshalJSON() ([]byte, error) {
  1216. type NoMethod IntentFilter
  1217. raw := NoMethod(*s)
  1218. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1219. }
  1220. // LauncherActivityIntent: Specifies an intent that starts the main
  1221. // launcher activity.
  1222. type LauncherActivityIntent struct {
  1223. }
  1224. // Locale: A location/region designation for language.
  1225. type Locale struct {
  1226. // Id: The id for this locale.
  1227. // Example: "en_US"
  1228. // @OutputOnly
  1229. Id string `json:"id,omitempty"`
  1230. // Name: A human-friendly name for this language/locale.
  1231. // Example: "English"
  1232. // @OutputOnly
  1233. Name string `json:"name,omitempty"`
  1234. // Region: A human-friendly string representing the region for this
  1235. // locale.
  1236. // Example: "United States"
  1237. // Not present for every locale.
  1238. // @OutputOnly
  1239. Region string `json:"region,omitempty"`
  1240. // Tags: Tags for this dimension.
  1241. // Examples: "default"
  1242. Tags []string `json:"tags,omitempty"`
  1243. // ForceSendFields is a list of field names (e.g. "Id") to
  1244. // unconditionally include in API requests. By default, fields with
  1245. // empty values are omitted from API requests. However, any non-pointer,
  1246. // non-interface field appearing in ForceSendFields will be sent to the
  1247. // server regardless of whether the field is empty or not. This may be
  1248. // used to include empty fields in Patch requests.
  1249. ForceSendFields []string `json:"-"`
  1250. // NullFields is a list of field names (e.g. "Id") to include in API
  1251. // requests with the JSON null value. By default, fields with empty
  1252. // values are omitted from API requests. However, any field with an
  1253. // empty value appearing in NullFields will be sent to the server as
  1254. // null. It is an error if a field in this list has a non-empty value.
  1255. // This may be used to include null fields in Patch requests.
  1256. NullFields []string `json:"-"`
  1257. }
  1258. func (s *Locale) MarshalJSON() ([]byte, error) {
  1259. type NoMethod Locale
  1260. raw := NoMethod(*s)
  1261. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1262. }
  1263. type NetworkConfiguration struct {
  1264. // DownRule: The emulation rule applying to the download traffic
  1265. DownRule *TrafficRule `json:"downRule,omitempty"`
  1266. // Id: The unique opaque id for this network traffic
  1267. // configuration
  1268. // @OutputOnly
  1269. Id string `json:"id,omitempty"`
  1270. // UpRule: The emulation rule applying to the upload traffic
  1271. UpRule *TrafficRule `json:"upRule,omitempty"`
  1272. // ForceSendFields is a list of field names (e.g. "DownRule") to
  1273. // unconditionally include in API requests. By default, fields with
  1274. // empty values are omitted from API requests. However, any non-pointer,
  1275. // non-interface field appearing in ForceSendFields will be sent to the
  1276. // server regardless of whether the field is empty or not. This may be
  1277. // used to include empty fields in Patch requests.
  1278. ForceSendFields []string `json:"-"`
  1279. // NullFields is a list of field names (e.g. "DownRule") to include in
  1280. // API requests with the JSON null value. By default, fields with empty
  1281. // values are omitted from API requests. However, any field with an
  1282. // empty value appearing in NullFields will be sent to the server as
  1283. // null. It is an error if a field in this list has a non-empty value.
  1284. // This may be used to include null fields in Patch requests.
  1285. NullFields []string `json:"-"`
  1286. }
  1287. func (s *NetworkConfiguration) MarshalJSON() ([]byte, error) {
  1288. type NoMethod NetworkConfiguration
  1289. raw := NoMethod(*s)
  1290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1291. }
  1292. type NetworkConfigurationCatalog struct {
  1293. Configurations []*NetworkConfiguration `json:"configurations,omitempty"`
  1294. // ForceSendFields is a list of field names (e.g. "Configurations") to
  1295. // unconditionally include in API requests. By default, fields with
  1296. // empty values are omitted from API requests. However, any non-pointer,
  1297. // non-interface field appearing in ForceSendFields will be sent to the
  1298. // server regardless of whether the field is empty or not. This may be
  1299. // used to include empty fields in Patch requests.
  1300. ForceSendFields []string `json:"-"`
  1301. // NullFields is a list of field names (e.g. "Configurations") to
  1302. // include in API requests with the JSON null value. By default, fields
  1303. // with empty values are omitted from API requests. However, any field
  1304. // with an empty value appearing in NullFields will be sent to the
  1305. // server as null. It is an error if a field in this list has a
  1306. // non-empty value. This may be used to include null fields in Patch
  1307. // requests.
  1308. NullFields []string `json:"-"`
  1309. }
  1310. func (s *NetworkConfigurationCatalog) MarshalJSON() ([]byte, error) {
  1311. type NoMethod NetworkConfigurationCatalog
  1312. raw := NoMethod(*s)
  1313. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1314. }
  1315. // ObbFile: An opaque binary blob file to install on the device before
  1316. // the test starts
  1317. type ObbFile struct {
  1318. // Obb: Opaque Binary Blob (OBB) file(s) to install on the
  1319. // device
  1320. // Required
  1321. Obb *FileReference `json:"obb,omitempty"`
  1322. // ObbFileName: OBB file name which must conform to the format as
  1323. // specified by
  1324. // Android
  1325. // e.g. [main|patch].0300110.com.example.android.obb
  1326. // which will be installed into
  1327. // <shared-storage>/Android/obb/<package-name>/
  1328. // on the device
  1329. // Required
  1330. ObbFileName string `json:"obbFileName,omitempty"`
  1331. // ForceSendFields is a list of field names (e.g. "Obb") to
  1332. // unconditionally include in API requests. By default, fields with
  1333. // empty values are omitted from API requests. However, any non-pointer,
  1334. // non-interface field appearing in ForceSendFields will be sent to the
  1335. // server regardless of whether the field is empty or not. This may be
  1336. // used to include empty fields in Patch requests.
  1337. ForceSendFields []string `json:"-"`
  1338. // NullFields is a list of field names (e.g. "Obb") to include in API
  1339. // requests with the JSON null value. By default, fields with empty
  1340. // values are omitted from API requests. However, any field with an
  1341. // empty value appearing in NullFields will be sent to the server as
  1342. // null. It is an error if a field in this list has a non-empty value.
  1343. // This may be used to include null fields in Patch requests.
  1344. NullFields []string `json:"-"`
  1345. }
  1346. func (s *ObbFile) MarshalJSON() ([]byte, error) {
  1347. type NoMethod ObbFile
  1348. raw := NoMethod(*s)
  1349. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1350. }
  1351. // Orientation: Screen orientation of the device.
  1352. type Orientation struct {
  1353. // Id: The id for this orientation.
  1354. // Example: "portrait"
  1355. // @OutputOnly
  1356. Id string `json:"id,omitempty"`
  1357. // Name: A human-friendly name for this orientation.
  1358. // Example: "portrait"
  1359. // @OutputOnly
  1360. Name string `json:"name,omitempty"`
  1361. // Tags: Tags for this dimension.
  1362. // Examples: "default"
  1363. Tags []string `json:"tags,omitempty"`
  1364. // ForceSendFields is a list of field names (e.g. "Id") to
  1365. // unconditionally include in API requests. By default, fields with
  1366. // empty values are omitted from API requests. However, any non-pointer,
  1367. // non-interface field appearing in ForceSendFields will be sent to the
  1368. // server regardless of whether the field is empty or not. This may be
  1369. // used to include empty fields in Patch requests.
  1370. ForceSendFields []string `json:"-"`
  1371. // NullFields is a list of field names (e.g. "Id") to include in API
  1372. // requests with the JSON null value. By default, fields with empty
  1373. // values are omitted from API requests. However, any field with an
  1374. // empty value appearing in NullFields will be sent to the server as
  1375. // null. It is an error if a field in this list has a non-empty value.
  1376. // This may be used to include null fields in Patch requests.
  1377. NullFields []string `json:"-"`
  1378. }
  1379. func (s *Orientation) MarshalJSON() ([]byte, error) {
  1380. type NoMethod Orientation
  1381. raw := NoMethod(*s)
  1382. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1383. }
  1384. // ProvidedSoftwareCatalog: The currently provided software environment
  1385. // on the devices under test.
  1386. type ProvidedSoftwareCatalog struct {
  1387. // OrchestratorVersion: A string representing the current version of
  1388. // Android Test Orchestrator that
  1389. // is provided by TestExecutionService. Example: "1.0.2 beta"
  1390. OrchestratorVersion string `json:"orchestratorVersion,omitempty"`
  1391. // ForceSendFields is a list of field names (e.g. "OrchestratorVersion")
  1392. // to unconditionally include in API requests. By default, fields with
  1393. // empty values are omitted from API requests. However, any non-pointer,
  1394. // non-interface field appearing in ForceSendFields will be sent to the
  1395. // server regardless of whether the field is empty or not. This may be
  1396. // used to include empty fields in Patch requests.
  1397. ForceSendFields []string `json:"-"`
  1398. // NullFields is a list of field names (e.g. "OrchestratorVersion") to
  1399. // include in API requests with the JSON null value. By default, fields
  1400. // with empty values are omitted from API requests. However, any field
  1401. // with an empty value appearing in NullFields will be sent to the
  1402. // server as null. It is an error if a field in this list has a
  1403. // non-empty value. This may be used to include null fields in Patch
  1404. // requests.
  1405. NullFields []string `json:"-"`
  1406. }
  1407. func (s *ProvidedSoftwareCatalog) MarshalJSON() ([]byte, error) {
  1408. type NoMethod ProvidedSoftwareCatalog
  1409. raw := NoMethod(*s)
  1410. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1411. }
  1412. // RegularFile: A file or directory to install on the device before the
  1413. // test starts
  1414. type RegularFile struct {
  1415. // Content: Required
  1416. Content *FileReference `json:"content,omitempty"`
  1417. // DevicePath: Where to put the content on the device. Must be an
  1418. // absolute, whitelisted
  1419. // path. If the file exists, it will be replaced.
  1420. // The following device-side directories and any of their subdirectories
  1421. // are
  1422. // whitelisted:
  1423. // <p>${EXTERNAL_STORAGE}, or /sdcard</p>
  1424. // <p>${ANDROID_DATA}/local/tmp, or /data/local/tmp</p>
  1425. // <p>Specifying a path outside of these directory trees is
  1426. // invalid.
  1427. //
  1428. // <p> The paths /sdcard and /data will be made available and treated
  1429. // as
  1430. // implicit path substitutions. E.g. if /sdcard on a particular device
  1431. // does
  1432. // not map to external storage, the system will replace it with the
  1433. // external
  1434. // storage path prefix for that device and copy the file there.
  1435. //
  1436. // <p> It is strongly advised to use the <a
  1437. // href=
  1438. // "http://developer.android.com/reference/android/os/Environment.h
  1439. // tml">
  1440. // Environment API</a> in app and test code to access files on the
  1441. // device in a
  1442. // portable way.
  1443. // Required
  1444. DevicePath string `json:"devicePath,omitempty"`
  1445. // ForceSendFields is a list of field names (e.g. "Content") to
  1446. // unconditionally include in API requests. By default, fields with
  1447. // empty values are omitted from API requests. However, any non-pointer,
  1448. // non-interface field appearing in ForceSendFields will be sent to the
  1449. // server regardless of whether the field is empty or not. This may be
  1450. // used to include empty fields in Patch requests.
  1451. ForceSendFields []string `json:"-"`
  1452. // NullFields is a list of field names (e.g. "Content") to include in
  1453. // API requests with the JSON null value. By default, fields with empty
  1454. // values are omitted from API requests. However, any field with an
  1455. // empty value appearing in NullFields will be sent to the server as
  1456. // null. It is an error if a field in this list has a non-empty value.
  1457. // This may be used to include null fields in Patch requests.
  1458. NullFields []string `json:"-"`
  1459. }
  1460. func (s *RegularFile) MarshalJSON() ([]byte, error) {
  1461. type NoMethod RegularFile
  1462. raw := NoMethod(*s)
  1463. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1464. }
  1465. // ResultStorage: Locations where the results of running the test are
  1466. // stored.
  1467. type ResultStorage struct {
  1468. // GoogleCloudStorage: Required.
  1469. GoogleCloudStorage *GoogleCloudStorage `json:"googleCloudStorage,omitempty"`
  1470. // ToolResultsExecution: The tool results execution that results are
  1471. // written to.
  1472. // @OutputOnly
  1473. ToolResultsExecution *ToolResultsExecution `json:"toolResultsExecution,omitempty"`
  1474. // ToolResultsHistory: The tool results history that contains the tool
  1475. // results execution that
  1476. // results are written to.
  1477. //
  1478. // Optional, if not provided the service will choose an appropriate
  1479. // value.
  1480. ToolResultsHistory *ToolResultsHistory `json:"toolResultsHistory,omitempty"`
  1481. // ForceSendFields is a list of field names (e.g. "GoogleCloudStorage")
  1482. // to unconditionally include in API requests. By default, fields with
  1483. // empty values are omitted from API requests. However, any non-pointer,
  1484. // non-interface field appearing in ForceSendFields will be sent to the
  1485. // server regardless of whether the field is empty or not. This may be
  1486. // used to include empty fields in Patch requests.
  1487. ForceSendFields []string `json:"-"`
  1488. // NullFields is a list of field names (e.g. "GoogleCloudStorage") to
  1489. // include in API requests with the JSON null value. By default, fields
  1490. // with empty values are omitted from API requests. However, any field
  1491. // with an empty value appearing in NullFields will be sent to the
  1492. // server as null. It is an error if a field in this list has a
  1493. // non-empty value. This may be used to include null fields in Patch
  1494. // requests.
  1495. NullFields []string `json:"-"`
  1496. }
  1497. func (s *ResultStorage) MarshalJSON() ([]byte, error) {
  1498. type NoMethod ResultStorage
  1499. raw := NoMethod(*s)
  1500. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1501. }
  1502. // RoboDirective: Directs Robo to interact with a specific UI element if
  1503. // it is encountered
  1504. // during the crawl. Currently, Robo can perform text entry or element
  1505. // click.
  1506. type RoboDirective struct {
  1507. // ActionType: The type of action that Robo should perform on the
  1508. // specified element.
  1509. // Required.
  1510. //
  1511. // Possible values:
  1512. // "ACTION_TYPE_UNSPECIFIED" - DO NOT USE. For proto versioning only.
  1513. // "SINGLE_CLICK" - Direct Robo to click on the specified element.
  1514. // No-op if specified element
  1515. // is not clickable.
  1516. // "ENTER_TEXT" - Direct Robo to enter text on the specified element.
  1517. // No-op if specified
  1518. // element is not enabled or does not allow text entry.
  1519. ActionType string `json:"actionType,omitempty"`
  1520. // InputText: The text that Robo is directed to set. If left empty, the
  1521. // directive will be
  1522. // treated as a CLICK on the element matching the
  1523. // resource_name.
  1524. // Optional
  1525. InputText string `json:"inputText,omitempty"`
  1526. // ResourceName: The android resource name of the target UI element
  1527. // For example,
  1528. // in Java: R.string.foo
  1529. // in xml: @string/foo
  1530. // Only the “foo” part is needed.
  1531. // Reference
  1532. // doc:
  1533. // https://developer.android.com/guide/topics/resources/accessing-re
  1534. // sources.html
  1535. // Required
  1536. ResourceName string `json:"resourceName,omitempty"`
  1537. // ForceSendFields is a list of field names (e.g. "ActionType") to
  1538. // unconditionally include in API requests. By default, fields with
  1539. // empty values are omitted from API requests. However, any non-pointer,
  1540. // non-interface field appearing in ForceSendFields will be sent to the
  1541. // server regardless of whether the field is empty or not. This may be
  1542. // used to include empty fields in Patch requests.
  1543. ForceSendFields []string `json:"-"`
  1544. // NullFields is a list of field names (e.g. "ActionType") to include in
  1545. // API requests with the JSON null value. By default, fields with empty
  1546. // values are omitted from API requests. However, any field with an
  1547. // empty value appearing in NullFields will be sent to the server as
  1548. // null. It is an error if a field in this list has a non-empty value.
  1549. // This may be used to include null fields in Patch requests.
  1550. NullFields []string `json:"-"`
  1551. }
  1552. func (s *RoboDirective) MarshalJSON() ([]byte, error) {
  1553. type NoMethod RoboDirective
  1554. raw := NoMethod(*s)
  1555. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1556. }
  1557. // RoboStartingIntent: Message for specifying the start activities to
  1558. // crawl
  1559. type RoboStartingIntent struct {
  1560. LauncherActivity *LauncherActivityIntent `json:"launcherActivity,omitempty"`
  1561. StartActivity *StartActivityIntent `json:"startActivity,omitempty"`
  1562. // ForceSendFields is a list of field names (e.g. "LauncherActivity") to
  1563. // unconditionally include in API requests. By default, fields with
  1564. // empty values are omitted from API requests. However, any non-pointer,
  1565. // non-interface field appearing in ForceSendFields will be sent to the
  1566. // server regardless of whether the field is empty or not. This may be
  1567. // used to include empty fields in Patch requests.
  1568. ForceSendFields []string `json:"-"`
  1569. // NullFields is a list of field names (e.g. "LauncherActivity") to
  1570. // include in API requests with the JSON null value. By default, fields
  1571. // with empty values are omitted from API requests. However, any field
  1572. // with an empty value appearing in NullFields will be sent to the
  1573. // server as null. It is an error if a field in this list has a
  1574. // non-empty value. This may be used to include null fields in Patch
  1575. // requests.
  1576. NullFields []string `json:"-"`
  1577. }
  1578. func (s *RoboStartingIntent) MarshalJSON() ([]byte, error) {
  1579. type NoMethod RoboStartingIntent
  1580. raw := NoMethod(*s)
  1581. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1582. }
  1583. // StartActivityIntent: A starting intent specified by an action, uri,
  1584. // and categories.
  1585. type StartActivityIntent struct {
  1586. // Action: Action name.
  1587. // Required for START_ACTIVITY.
  1588. Action string `json:"action,omitempty"`
  1589. // Categories: Intent categories to set on the intent.
  1590. // Optional.
  1591. Categories []string `json:"categories,omitempty"`
  1592. // Uri: URI for the action.
  1593. // Optional.
  1594. Uri string `json:"uri,omitempty"`
  1595. // ForceSendFields is a list of field names (e.g. "Action") to
  1596. // unconditionally include in API requests. By default, fields with
  1597. // empty values are omitted from API requests. However, any non-pointer,
  1598. // non-interface field appearing in ForceSendFields will be sent to the
  1599. // server regardless of whether the field is empty or not. This may be
  1600. // used to include empty fields in Patch requests.
  1601. ForceSendFields []string `json:"-"`
  1602. // NullFields is a list of field names (e.g. "Action") to include in API
  1603. // requests with the JSON null value. By default, fields with empty
  1604. // values are omitted from API requests. However, any field with an
  1605. // empty value appearing in NullFields will be sent to the server as
  1606. // null. It is an error if a field in this list has a non-empty value.
  1607. // This may be used to include null fields in Patch requests.
  1608. NullFields []string `json:"-"`
  1609. }
  1610. func (s *StartActivityIntent) MarshalJSON() ([]byte, error) {
  1611. type NoMethod StartActivityIntent
  1612. raw := NoMethod(*s)
  1613. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1614. }
  1615. // TestDetails: Additional details about the progress of the running
  1616. // test.
  1617. type TestDetails struct {
  1618. // ErrorMessage: If the TestState is ERROR, then this string will
  1619. // contain human-readable
  1620. // details about the error.
  1621. // @OutputOnly
  1622. ErrorMessage string `json:"errorMessage,omitempty"`
  1623. // ProgressMessages: Human-readable, detailed descriptions of the test's
  1624. // progress.
  1625. // For example: "Provisioning a device", "Starting Test".
  1626. //
  1627. // During the course of execution new data may be appended
  1628. // to the end of progress_messages.
  1629. // @OutputOnly
  1630. ProgressMessages []string `json:"progressMessages,omitempty"`
  1631. // VideoRecordingDisabled: Indicates that video will not be recorded for
  1632. // this execution either because
  1633. // the user chose to disable it or the device does not support it.
  1634. // See AndroidModel.video_recording_not_supported
  1635. // @OutputOnly
  1636. VideoRecordingDisabled bool `json:"videoRecordingDisabled,omitempty"`
  1637. // ForceSendFields is a list of field names (e.g. "ErrorMessage") to
  1638. // unconditionally include in API requests. By default, fields with
  1639. // empty values are omitted from API requests. However, any non-pointer,
  1640. // non-interface field appearing in ForceSendFields will be sent to the
  1641. // server regardless of whether the field is empty or not. This may be
  1642. // used to include empty fields in Patch requests.
  1643. ForceSendFields []string `json:"-"`
  1644. // NullFields is a list of field names (e.g. "ErrorMessage") to include
  1645. // in API requests with the JSON null value. By default, fields with
  1646. // empty values are omitted from API requests. However, any field with
  1647. // an empty value appearing in NullFields will be sent to the server as
  1648. // null. It is an error if a field in this list has a non-empty value.
  1649. // This may be used to include null fields in Patch requests.
  1650. NullFields []string `json:"-"`
  1651. }
  1652. func (s *TestDetails) MarshalJSON() ([]byte, error) {
  1653. type NoMethod TestDetails
  1654. raw := NoMethod(*s)
  1655. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1656. }
  1657. // TestEnvironmentCatalog: A description of a test environment.
  1658. type TestEnvironmentCatalog struct {
  1659. // AndroidDeviceCatalog: Android devices suitable for running Android
  1660. // Instrumentation Tests.
  1661. AndroidDeviceCatalog *AndroidDeviceCatalog `json:"androidDeviceCatalog,omitempty"`
  1662. // NetworkConfigurationCatalog: Supported network configurations
  1663. NetworkConfigurationCatalog *NetworkConfigurationCatalog `json:"networkConfigurationCatalog,omitempty"`
  1664. // SoftwareCatalog: The software test environment provided by
  1665. // TestExecutionService.
  1666. SoftwareCatalog *ProvidedSoftwareCatalog `json:"softwareCatalog,omitempty"`
  1667. // ServerResponse contains the HTTP response code and headers from the
  1668. // server.
  1669. googleapi.ServerResponse `json:"-"`
  1670. // ForceSendFields is a list of field names (e.g.
  1671. // "AndroidDeviceCatalog") to unconditionally include in API requests.
  1672. // By default, fields with empty values are omitted from API requests.
  1673. // However, any non-pointer, non-interface field appearing in
  1674. // ForceSendFields will be sent to the server regardless of whether the
  1675. // field is empty or not. This may be used to include empty fields in
  1676. // Patch requests.
  1677. ForceSendFields []string `json:"-"`
  1678. // NullFields is a list of field names (e.g. "AndroidDeviceCatalog") to
  1679. // include in API requests with the JSON null value. By default, fields
  1680. // with empty values are omitted from API requests. However, any field
  1681. // with an empty value appearing in NullFields will be sent to the
  1682. // server as null. It is an error if a field in this list has a
  1683. // non-empty value. This may be used to include null fields in Patch
  1684. // requests.
  1685. NullFields []string `json:"-"`
  1686. }
  1687. func (s *TestEnvironmentCatalog) MarshalJSON() ([]byte, error) {
  1688. type NoMethod TestEnvironmentCatalog
  1689. raw := NoMethod(*s)
  1690. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1691. }
  1692. // TestExecution: Specifies a single test to be executed in a single
  1693. // environment.
  1694. type TestExecution struct {
  1695. // Environment: How the host machine(s) are configured.
  1696. // @OutputOnly
  1697. Environment *Environment `json:"environment,omitempty"`
  1698. // Id: Unique id set by the backend.
  1699. // @OutputOnly
  1700. Id string `json:"id,omitempty"`
  1701. // MatrixId: Id of the containing TestMatrix.
  1702. // @OutputOnly
  1703. MatrixId string `json:"matrixId,omitempty"`
  1704. // ProjectId: The cloud project that owns the test
  1705. // execution.
  1706. // @OutputOnly
  1707. ProjectId string `json:"projectId,omitempty"`
  1708. // State: Indicates the current progress of the test execution (e.g.,
  1709. // FINISHED).
  1710. // @OutputOnly
  1711. //
  1712. // Possible values:
  1713. // "TEST_STATE_UNSPECIFIED" - Do not use. For proto versioning only.
  1714. // "VALIDATING" - The execution or matrix is being validated.
  1715. // "PENDING" - The execution or matrix is waiting for resources to
  1716. // become available.
  1717. // "RUNNING" - The execution is currently being processed.
  1718. //
  1719. // Can only be set on an execution.
  1720. // "FINISHED" - The execution or matrix has terminated normally.
  1721. //
  1722. // On a matrix this means that the matrix level processing completed
  1723. // normally,
  1724. // but individual executions may be in an ERROR state.
  1725. // "ERROR" - The execution or matrix has stopped because it
  1726. // encountered an
  1727. // infrastructure failure.
  1728. // "UNSUPPORTED_ENVIRONMENT" - The execution was not run because it
  1729. // corresponds to a unsupported
  1730. // environment.
  1731. //
  1732. // Can only be set on an execution.
  1733. // "INCOMPATIBLE_ENVIRONMENT" - The execution was not run because the
  1734. // provided inputs are incompatible with
  1735. // the requested environment.
  1736. //
  1737. // Example: requested AndroidVersion is lower than APK's
  1738. // minSdkVersion
  1739. //
  1740. // Can only be set on an execution.
  1741. // "INCOMPATIBLE_ARCHITECTURE" - The execution was not run because the
  1742. // provided inputs are incompatible with
  1743. // the requested architecture.
  1744. //
  1745. // Example: requested device does not support running the native code
  1746. // in
  1747. // the supplied APK
  1748. //
  1749. // Can only be set on an execution.
  1750. // "CANCELLED" - The user cancelled the execution.
  1751. //
  1752. // Can only be set on an execution.
  1753. // "INVALID" - The execution or matrix was not run because the
  1754. // provided inputs are not
  1755. // valid.
  1756. //
  1757. // Examples: input file is not of the expected type, is
  1758. // malformed/corrupt, or
  1759. // was flagged as malware
  1760. State string `json:"state,omitempty"`
  1761. // TestDetails: Additional details about the running test.
  1762. // @OutputOnly
  1763. TestDetails *TestDetails `json:"testDetails,omitempty"`
  1764. // TestSpecification: How to run the test.
  1765. // @OutputOnly
  1766. TestSpecification *TestSpecification `json:"testSpecification,omitempty"`
  1767. // Timestamp: The time this test execution was initially
  1768. // created.
  1769. // @OutputOnly
  1770. Timestamp string `json:"timestamp,omitempty"`
  1771. // ToolResultsStep: Where the results for this execution are
  1772. // written.
  1773. // @OutputOnly
  1774. ToolResultsStep *ToolResultsStep `json:"toolResultsStep,omitempty"`
  1775. // ForceSendFields is a list of field names (e.g. "Environment") to
  1776. // unconditionally include in API requests. By default, fields with
  1777. // empty values are omitted from API requests. However, any non-pointer,
  1778. // non-interface field appearing in ForceSendFields will be sent to the
  1779. // server regardless of whether the field is empty or not. This may be
  1780. // used to include empty fields in Patch requests.
  1781. ForceSendFields []string `json:"-"`
  1782. // NullFields is a list of field names (e.g. "Environment") to include
  1783. // in API requests with the JSON null value. By default, fields with
  1784. // empty values are omitted from API requests. However, any field with
  1785. // an empty value appearing in NullFields will be sent to the server as
  1786. // null. It is an error if a field in this list has a non-empty value.
  1787. // This may be used to include null fields in Patch requests.
  1788. NullFields []string `json:"-"`
  1789. }
  1790. func (s *TestExecution) MarshalJSON() ([]byte, error) {
  1791. type NoMethod TestExecution
  1792. raw := NoMethod(*s)
  1793. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1794. }
  1795. // TestMatrix: A group of one or more TestExecutions, built by taking
  1796. // a
  1797. // product of values over a pre-defined set of axes.
  1798. type TestMatrix struct {
  1799. // ClientInfo: Information about the client which invoked the
  1800. // test.
  1801. // Optional
  1802. ClientInfo *ClientInfo `json:"clientInfo,omitempty"`
  1803. // EnvironmentMatrix: How the host machine(s) are configured.
  1804. // Required
  1805. EnvironmentMatrix *EnvironmentMatrix `json:"environmentMatrix,omitempty"`
  1806. // InvalidMatrixDetails: Describes why the matrix is considered
  1807. // invalid.
  1808. // Only useful for matrices in the INVALID state.
  1809. // @OutputOnly
  1810. //
  1811. // Possible values:
  1812. // "INVALID_MATRIX_DETAILS_UNSPECIFIED" - Do not use. For proto
  1813. // versioning only.
  1814. // "DETAILS_UNAVAILABLE" - The matrix is INVALID, but there are no
  1815. // further details available.
  1816. // "MALFORMED_APK" - The input app APK could not be parsed.
  1817. // "MALFORMED_TEST_APK" - The input test APK could not be parsed.
  1818. // "NO_MANIFEST" - The AndroidManifest.xml could not be found.
  1819. // "NO_PACKAGE_NAME" - The APK manifest does not declare a package
  1820. // name.
  1821. // "TEST_SAME_AS_APP" - The test package and app package are the same.
  1822. // "NO_INSTRUMENTATION" - The test apk does not declare an
  1823. // instrumentation.
  1824. // "NO_SIGNATURE" - The input app apk does not have a signature.
  1825. // "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE" - The test runner class
  1826. // specified by user or in the test APK's manifest file
  1827. // is not compatible with Android Test Orchestrator.
  1828. // Orchestrator is only compatible with AndroidJUnitRunner version 1.0
  1829. // or
  1830. // higher.
  1831. // Orchestrator can be disabled by using
  1832. // DO_NOT_USE_ORCHESTRATOR
  1833. // OrchestratorOption.
  1834. // "NO_TEST_RUNNER_CLASS" - The test APK does not contain the test
  1835. // runner class specified by user or in
  1836. // the manifest file.
  1837. // This can be caused by either of the following reasons:
  1838. // - the user provided a runner class name that's incorrect, or
  1839. // - the test runner isn't built into the test APK (might be in the app
  1840. // APK
  1841. // instead).
  1842. // "NO_LAUNCHER_ACTIVITY" - A main launcher activity could not be
  1843. // found.
  1844. // "FORBIDDEN_PERMISSIONS" - The app declares one or more permissions
  1845. // that are not allowed.
  1846. // "INVALID_ROBO_DIRECTIVES" - There is a conflict in the provided
  1847. // robo_directives.
  1848. // "TEST_LOOP_INTENT_FILTER_NOT_FOUND" - There there is no test loop
  1849. // intent filter, or the one that is given is
  1850. // not formatted correctly.
  1851. // "SCENARIO_LABEL_NOT_DECLARED" - The request contains a scenario
  1852. // label that was not declared in the
  1853. // manifest.
  1854. // "SCENARIO_LABEL_MALFORMED" - There was an error when parsing a
  1855. // label's value.
  1856. // "SCENARIO_NOT_DECLARED" - The request contains a scenario number
  1857. // that was not declared in the
  1858. // manifest.
  1859. // "DEVICE_ADMIN_RECEIVER" - Device administrator applications are not
  1860. // allowed.
  1861. // "TEST_ONLY_APK" - The APK is marked as "testOnly".
  1862. // NOT USED
  1863. // "MALFORMED_IPA" - The input IPA could not be parsed.
  1864. // NOT USED
  1865. // "NO_CODE_APK" - APK contains no code.
  1866. // See
  1867. // also
  1868. // https://developer.android.com/guide/topics/manifest/application-e
  1869. // lement.html#code
  1870. // "INVALID_INPUT_APK" - Either the provided input APK path was
  1871. // malformed,
  1872. // the APK file does not exist, or the user does not have permission
  1873. // to
  1874. // access the APK file.
  1875. InvalidMatrixDetails string `json:"invalidMatrixDetails,omitempty"`
  1876. // ProjectId: The cloud project that owns the test matrix.
  1877. // @OutputOnly
  1878. ProjectId string `json:"projectId,omitempty"`
  1879. // ResultStorage: Where the results for the matrix are written.
  1880. // Required
  1881. ResultStorage *ResultStorage `json:"resultStorage,omitempty"`
  1882. // State: Indicates the current progress of the test matrix (e.g.,
  1883. // FINISHED)
  1884. // @OutputOnly
  1885. //
  1886. // Possible values:
  1887. // "TEST_STATE_UNSPECIFIED" - Do not use. For proto versioning only.
  1888. // "VALIDATING" - The execution or matrix is being validated.
  1889. // "PENDING" - The execution or matrix is waiting for resources to
  1890. // become available.
  1891. // "RUNNING" - The execution is currently being processed.
  1892. //
  1893. // Can only be set on an execution.
  1894. // "FINISHED" - The execution or matrix has terminated normally.
  1895. //
  1896. // On a matrix this means that the matrix level processing completed
  1897. // normally,
  1898. // but individual executions may be in an ERROR state.
  1899. // "ERROR" - The execution or matrix has stopped because it
  1900. // encountered an
  1901. // infrastructure failure.
  1902. // "UNSUPPORTED_ENVIRONMENT" - The execution was not run because it
  1903. // corresponds to a unsupported
  1904. // environment.
  1905. //
  1906. // Can only be set on an execution.
  1907. // "INCOMPATIBLE_ENVIRONMENT" - The execution was not run because the
  1908. // provided inputs are incompatible with
  1909. // the requested environment.
  1910. //
  1911. // Example: requested AndroidVersion is lower than APK's
  1912. // minSdkVersion
  1913. //
  1914. // Can only be set on an execution.
  1915. // "INCOMPATIBLE_ARCHITECTURE" - The execution was not run because the
  1916. // provided inputs are incompatible with
  1917. // the requested architecture.
  1918. //
  1919. // Example: requested device does not support running the native code
  1920. // in
  1921. // the supplied APK
  1922. //
  1923. // Can only be set on an execution.
  1924. // "CANCELLED" - The user cancelled the execution.
  1925. //
  1926. // Can only be set on an execution.
  1927. // "INVALID" - The execution or matrix was not run because the
  1928. // provided inputs are not
  1929. // valid.
  1930. //
  1931. // Examples: input file is not of the expected type, is
  1932. // malformed/corrupt, or
  1933. // was flagged as malware
  1934. State string `json:"state,omitempty"`
  1935. // TestExecutions: The list of test executions that the service creates
  1936. // for this matrix.
  1937. // @OutputOnly
  1938. TestExecutions []*TestExecution `json:"testExecutions,omitempty"`
  1939. // TestMatrixId: Unique id set by the service.
  1940. // @OutputOnly
  1941. TestMatrixId string `json:"testMatrixId,omitempty"`
  1942. // TestSpecification: How to run the test.
  1943. // Required
  1944. TestSpecification *TestSpecification `json:"testSpecification,omitempty"`
  1945. // Timestamp: The time this test matrix was initially
  1946. // created.
  1947. // @OutputOnly
  1948. Timestamp string `json:"timestamp,omitempty"`
  1949. // ServerResponse contains the HTTP response code and headers from the
  1950. // server.
  1951. googleapi.ServerResponse `json:"-"`
  1952. // ForceSendFields is a list of field names (e.g. "ClientInfo") to
  1953. // unconditionally include in API requests. By default, fields with
  1954. // empty values are omitted from API requests. However, any non-pointer,
  1955. // non-interface field appearing in ForceSendFields will be sent to the
  1956. // server regardless of whether the field is empty or not. This may be
  1957. // used to include empty fields in Patch requests.
  1958. ForceSendFields []string `json:"-"`
  1959. // NullFields is a list of field names (e.g. "ClientInfo") to include in
  1960. // API requests with the JSON null value. By default, fields with empty
  1961. // values are omitted from API requests. However, any field with an
  1962. // empty value appearing in NullFields will be sent to the server as
  1963. // null. It is an error if a field in this list has a non-empty value.
  1964. // This may be used to include null fields in Patch requests.
  1965. NullFields []string `json:"-"`
  1966. }
  1967. func (s *TestMatrix) MarshalJSON() ([]byte, error) {
  1968. type NoMethod TestMatrix
  1969. raw := NoMethod(*s)
  1970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1971. }
  1972. // TestSetup: A description of how to set up the Android device prior to
  1973. // running the test.
  1974. type TestSetup struct {
  1975. // Account: The device will be logged in on this account for the
  1976. // duration of the test.
  1977. // Optional
  1978. Account *Account `json:"account,omitempty"`
  1979. // AdditionalApks: APKs to install in addition to those being directly
  1980. // tested.
  1981. // Currently capped at 100.
  1982. // Optional
  1983. AdditionalApks []*Apk `json:"additionalApks,omitempty"`
  1984. // DirectoriesToPull: List of directories on the device to upload to GCS
  1985. // at the end of the test;
  1986. // they must be absolute paths under /sdcard or /data/local/tmp.
  1987. // Path names are restricted to characters a-z A-Z 0-9 _ - . + and
  1988. // /
  1989. //
  1990. // Note: The paths /sdcard and /data will be made available and treated
  1991. // as
  1992. // implicit path substitutions. E.g. if /sdcard on a particular device
  1993. // does
  1994. // not map to external storage, the system will replace it with the
  1995. // external
  1996. // storage path prefix for that device.
  1997. //
  1998. // Optional
  1999. DirectoriesToPull []string `json:"directoriesToPull,omitempty"`
  2000. // EnvironmentVariables: Environment variables to set for the test (only
  2001. // applicable for
  2002. // instrumentation tests).
  2003. EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables,omitempty"`
  2004. // FilesToPush: List of files to push to the device before starting the
  2005. // test.
  2006. //
  2007. // Optional
  2008. FilesToPush []*DeviceFile `json:"filesToPush,omitempty"`
  2009. // NetworkProfile: The network traffic profile used for running the
  2010. // test.
  2011. // Optional
  2012. NetworkProfile string `json:"networkProfile,omitempty"`
  2013. // ForceSendFields is a list of field names (e.g. "Account") to
  2014. // unconditionally include in API requests. By default, fields with
  2015. // empty values are omitted from API requests. However, any non-pointer,
  2016. // non-interface field appearing in ForceSendFields will be sent to the
  2017. // server regardless of whether the field is empty or not. This may be
  2018. // used to include empty fields in Patch requests.
  2019. ForceSendFields []string `json:"-"`
  2020. // NullFields is a list of field names (e.g. "Account") to include in
  2021. // API requests with the JSON null value. By default, fields with empty
  2022. // values are omitted from API requests. However, any field with an
  2023. // empty value appearing in NullFields will be sent to the server as
  2024. // null. It is an error if a field in this list has a non-empty value.
  2025. // This may be used to include null fields in Patch requests.
  2026. NullFields []string `json:"-"`
  2027. }
  2028. func (s *TestSetup) MarshalJSON() ([]byte, error) {
  2029. type NoMethod TestSetup
  2030. raw := NoMethod(*s)
  2031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2032. }
  2033. // TestSpecification: A description of how to run the test.
  2034. type TestSpecification struct {
  2035. // AndroidInstrumentationTest: An Android instrumentation test.
  2036. AndroidInstrumentationTest *AndroidInstrumentationTest `json:"androidInstrumentationTest,omitempty"`
  2037. // AndroidRoboTest: An Android robo test.
  2038. AndroidRoboTest *AndroidRoboTest `json:"androidRoboTest,omitempty"`
  2039. // AndroidTestLoop: An Android Application with a Test Loop
  2040. AndroidTestLoop *AndroidTestLoop `json:"androidTestLoop,omitempty"`
  2041. // AutoGoogleLogin: Enables automatic Google account login.
  2042. // If set, the service will automatically generate a Google test account
  2043. // and
  2044. // add it to the device, before executing the test. Note that test
  2045. // accounts
  2046. // might be reused.
  2047. // Many applications show their full set of functionalities when an
  2048. // account is
  2049. // present on the device. Logging into the device with these
  2050. // generated
  2051. // accounts allows testing more functionalities.
  2052. // Default is false.
  2053. // Optional
  2054. AutoGoogleLogin bool `json:"autoGoogleLogin,omitempty"`
  2055. // DisablePerformanceMetrics: Disables performance metrics recording;
  2056. // may reduce test latency.
  2057. DisablePerformanceMetrics bool `json:"disablePerformanceMetrics,omitempty"`
  2058. // DisableVideoRecording: Disables video recording; may reduce test
  2059. // latency.
  2060. DisableVideoRecording bool `json:"disableVideoRecording,omitempty"`
  2061. // TestSetup: Test setup requirements for Android e.g. files to install,
  2062. // bootstrap
  2063. // scripts.
  2064. // Optional
  2065. TestSetup *TestSetup `json:"testSetup,omitempty"`
  2066. // TestTimeout: Max time a test execution is allowed to run before it
  2067. // is
  2068. // automatically cancelled.
  2069. // Optional, default is 5 min.
  2070. TestTimeout string `json:"testTimeout,omitempty"`
  2071. // ForceSendFields is a list of field names (e.g.
  2072. // "AndroidInstrumentationTest") to unconditionally include in API
  2073. // requests. By default, fields with empty values are omitted from API
  2074. // requests. However, any non-pointer, non-interface field appearing in
  2075. // ForceSendFields will be sent to the server regardless of whether the
  2076. // field is empty or not. This may be used to include empty fields in
  2077. // Patch requests.
  2078. ForceSendFields []string `json:"-"`
  2079. // NullFields is a list of field names (e.g.
  2080. // "AndroidInstrumentationTest") to include in API requests with the
  2081. // JSON null value. By default, fields with empty values are omitted
  2082. // from API requests. However, any field with an empty value appearing
  2083. // in NullFields will be sent to the server as null. It is an error if a
  2084. // field in this list has a non-empty value. This may be used to include
  2085. // null fields in Patch requests.
  2086. NullFields []string `json:"-"`
  2087. }
  2088. func (s *TestSpecification) MarshalJSON() ([]byte, error) {
  2089. type NoMethod TestSpecification
  2090. raw := NoMethod(*s)
  2091. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2092. }
  2093. // ToolResultsExecution: Represents a tool results execution
  2094. // resource.
  2095. //
  2096. // This has the results of a TestMatrix.
  2097. type ToolResultsExecution struct {
  2098. // ExecutionId: A tool results execution ID.
  2099. // @OutputOnly
  2100. ExecutionId string `json:"executionId,omitempty"`
  2101. // HistoryId: A tool results history ID.
  2102. // @OutputOnly
  2103. HistoryId string `json:"historyId,omitempty"`
  2104. // ProjectId: The cloud project that owns the tool results
  2105. // execution.
  2106. // @OutputOnly
  2107. ProjectId string `json:"projectId,omitempty"`
  2108. // ForceSendFields is a list of field names (e.g. "ExecutionId") to
  2109. // unconditionally include in API requests. By default, fields with
  2110. // empty values are omitted from API requests. However, any non-pointer,
  2111. // non-interface field appearing in ForceSendFields will be sent to the
  2112. // server regardless of whether the field is empty or not. This may be
  2113. // used to include empty fields in Patch requests.
  2114. ForceSendFields []string `json:"-"`
  2115. // NullFields is a list of field names (e.g. "ExecutionId") to include
  2116. // in API requests with the JSON null value. By default, fields with
  2117. // empty values are omitted from API requests. However, any field with
  2118. // an empty value appearing in NullFields will be sent to the server as
  2119. // null. It is an error if a field in this list has a non-empty value.
  2120. // This may be used to include null fields in Patch requests.
  2121. NullFields []string `json:"-"`
  2122. }
  2123. func (s *ToolResultsExecution) MarshalJSON() ([]byte, error) {
  2124. type NoMethod ToolResultsExecution
  2125. raw := NoMethod(*s)
  2126. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2127. }
  2128. // ToolResultsHistory: Represents a tool results history resource.
  2129. type ToolResultsHistory struct {
  2130. // HistoryId: A tool results history ID.
  2131. // Required
  2132. HistoryId string `json:"historyId,omitempty"`
  2133. // ProjectId: The cloud project that owns the tool results
  2134. // history.
  2135. // Required
  2136. ProjectId string `json:"projectId,omitempty"`
  2137. // ForceSendFields is a list of field names (e.g. "HistoryId") to
  2138. // unconditionally include in API requests. By default, fields with
  2139. // empty values are omitted from API requests. However, any non-pointer,
  2140. // non-interface field appearing in ForceSendFields will be sent to the
  2141. // server regardless of whether the field is empty or not. This may be
  2142. // used to include empty fields in Patch requests.
  2143. ForceSendFields []string `json:"-"`
  2144. // NullFields is a list of field names (e.g. "HistoryId") to include in
  2145. // API requests with the JSON null value. By default, fields with empty
  2146. // values are omitted from API requests. However, any field with an
  2147. // empty value appearing in NullFields will be sent to the server as
  2148. // null. It is an error if a field in this list has a non-empty value.
  2149. // This may be used to include null fields in Patch requests.
  2150. NullFields []string `json:"-"`
  2151. }
  2152. func (s *ToolResultsHistory) MarshalJSON() ([]byte, error) {
  2153. type NoMethod ToolResultsHistory
  2154. raw := NoMethod(*s)
  2155. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2156. }
  2157. // ToolResultsStep: Represents a tool results step resource.
  2158. //
  2159. // This has the results of a TestExecution.
  2160. type ToolResultsStep struct {
  2161. // ExecutionId: A tool results execution ID.
  2162. // @OutputOnly
  2163. ExecutionId string `json:"executionId,omitempty"`
  2164. // HistoryId: A tool results history ID.
  2165. // @OutputOnly
  2166. HistoryId string `json:"historyId,omitempty"`
  2167. // ProjectId: The cloud project that owns the tool results
  2168. // step.
  2169. // @OutputOnly
  2170. ProjectId string `json:"projectId,omitempty"`
  2171. // StepId: A tool results step ID.
  2172. // @OutputOnly
  2173. StepId string `json:"stepId,omitempty"`
  2174. // ForceSendFields is a list of field names (e.g. "ExecutionId") to
  2175. // unconditionally include in API requests. By default, fields with
  2176. // empty values are omitted from API requests. However, any non-pointer,
  2177. // non-interface field appearing in ForceSendFields will be sent to the
  2178. // server regardless of whether the field is empty or not. This may be
  2179. // used to include empty fields in Patch requests.
  2180. ForceSendFields []string `json:"-"`
  2181. // NullFields is a list of field names (e.g. "ExecutionId") to include
  2182. // in API requests with the JSON null value. By default, fields with
  2183. // empty values are omitted from API requests. However, any field with
  2184. // an empty value appearing in NullFields will be sent to the server as
  2185. // null. It is an error if a field in this list has a non-empty value.
  2186. // This may be used to include null fields in Patch requests.
  2187. NullFields []string `json:"-"`
  2188. }
  2189. func (s *ToolResultsStep) MarshalJSON() ([]byte, error) {
  2190. type NoMethod ToolResultsStep
  2191. raw := NoMethod(*s)
  2192. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2193. }
  2194. // TrafficRule: Network emulation parameters
  2195. type TrafficRule struct {
  2196. // Bandwidth: Bandwidth in kbits/second
  2197. Bandwidth float64 `json:"bandwidth,omitempty"`
  2198. // Burst: Burst size in kbits
  2199. Burst float64 `json:"burst,omitempty"`
  2200. // Delay: Packet delay, must be >= 0
  2201. Delay string `json:"delay,omitempty"`
  2202. // PacketDuplicationRatio: Packet duplication ratio (0.0 - 1.0)
  2203. PacketDuplicationRatio float64 `json:"packetDuplicationRatio,omitempty"`
  2204. // PacketLossRatio: Packet loss ratio (0.0 - 1.0)
  2205. PacketLossRatio float64 `json:"packetLossRatio,omitempty"`
  2206. // ForceSendFields is a list of field names (e.g. "Bandwidth") to
  2207. // unconditionally include in API requests. By default, fields with
  2208. // empty values are omitted from API requests. However, any non-pointer,
  2209. // non-interface field appearing in ForceSendFields will be sent to the
  2210. // server regardless of whether the field is empty or not. This may be
  2211. // used to include empty fields in Patch requests.
  2212. ForceSendFields []string `json:"-"`
  2213. // NullFields is a list of field names (e.g. "Bandwidth") to include in
  2214. // API requests with the JSON null value. By default, fields with empty
  2215. // values are omitted from API requests. However, any field with an
  2216. // empty value appearing in NullFields will be sent to the server as
  2217. // null. It is an error if a field in this list has a non-empty value.
  2218. // This may be used to include null fields in Patch requests.
  2219. NullFields []string `json:"-"`
  2220. }
  2221. func (s *TrafficRule) MarshalJSON() ([]byte, error) {
  2222. type NoMethod TrafficRule
  2223. raw := NoMethod(*s)
  2224. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2225. }
  2226. func (s *TrafficRule) UnmarshalJSON(data []byte) error {
  2227. type NoMethod TrafficRule
  2228. var s1 struct {
  2229. Bandwidth gensupport.JSONFloat64 `json:"bandwidth"`
  2230. Burst gensupport.JSONFloat64 `json:"burst"`
  2231. PacketDuplicationRatio gensupport.JSONFloat64 `json:"packetDuplicationRatio"`
  2232. PacketLossRatio gensupport.JSONFloat64 `json:"packetLossRatio"`
  2233. *NoMethod
  2234. }
  2235. s1.NoMethod = (*NoMethod)(s)
  2236. if err := json.Unmarshal(data, &s1); err != nil {
  2237. return err
  2238. }
  2239. s.Bandwidth = float64(s1.Bandwidth)
  2240. s.Burst = float64(s1.Burst)
  2241. s.PacketDuplicationRatio = float64(s1.PacketDuplicationRatio)
  2242. s.PacketLossRatio = float64(s1.PacketLossRatio)
  2243. return nil
  2244. }
  2245. // method id "testing.applicationDetailService.getApkDetails":
  2246. type ApplicationDetailServiceGetApkDetailsCall struct {
  2247. s *Service
  2248. filereference *FileReference
  2249. urlParams_ gensupport.URLParams
  2250. ctx_ context.Context
  2251. header_ http.Header
  2252. }
  2253. // GetApkDetails: Request the details of an Android application APK.
  2254. func (r *ApplicationDetailServiceService) GetApkDetails(filereference *FileReference) *ApplicationDetailServiceGetApkDetailsCall {
  2255. c := &ApplicationDetailServiceGetApkDetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2256. c.filereference = filereference
  2257. return c
  2258. }
  2259. // Fields allows partial responses to be retrieved. See
  2260. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2261. // for more information.
  2262. func (c *ApplicationDetailServiceGetApkDetailsCall) Fields(s ...googleapi.Field) *ApplicationDetailServiceGetApkDetailsCall {
  2263. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2264. return c
  2265. }
  2266. // Context sets the context to be used in this call's Do method. Any
  2267. // pending HTTP request will be aborted if the provided context is
  2268. // canceled.
  2269. func (c *ApplicationDetailServiceGetApkDetailsCall) Context(ctx context.Context) *ApplicationDetailServiceGetApkDetailsCall {
  2270. c.ctx_ = ctx
  2271. return c
  2272. }
  2273. // Header returns an http.Header that can be modified by the caller to
  2274. // add HTTP headers to the request.
  2275. func (c *ApplicationDetailServiceGetApkDetailsCall) Header() http.Header {
  2276. if c.header_ == nil {
  2277. c.header_ = make(http.Header)
  2278. }
  2279. return c.header_
  2280. }
  2281. func (c *ApplicationDetailServiceGetApkDetailsCall) doRequest(alt string) (*http.Response, error) {
  2282. reqHeaders := make(http.Header)
  2283. for k, v := range c.header_ {
  2284. reqHeaders[k] = v
  2285. }
  2286. reqHeaders.Set("User-Agent", c.s.userAgent())
  2287. var body io.Reader = nil
  2288. body, err := googleapi.WithoutDataWrapper.JSONReader(c.filereference)
  2289. if err != nil {
  2290. return nil, err
  2291. }
  2292. reqHeaders.Set("Content-Type", "application/json")
  2293. c.urlParams_.Set("alt", alt)
  2294. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/applicationDetailService/getApkDetails")
  2295. urls += "?" + c.urlParams_.Encode()
  2296. req, _ := http.NewRequest("POST", urls, body)
  2297. req.Header = reqHeaders
  2298. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2299. }
  2300. // Do executes the "testing.applicationDetailService.getApkDetails" call.
  2301. // Exactly one of *GetApkDetailsResponse or error will be non-nil. Any
  2302. // non-2xx status code is an error. Response headers are in either
  2303. // *GetApkDetailsResponse.ServerResponse.Header or (if a response was
  2304. // returned at all) in error.(*googleapi.Error).Header. Use
  2305. // googleapi.IsNotModified to check whether the returned error was
  2306. // because http.StatusNotModified was returned.
  2307. func (c *ApplicationDetailServiceGetApkDetailsCall) Do(opts ...googleapi.CallOption) (*GetApkDetailsResponse, error) {
  2308. gensupport.SetOptions(c.urlParams_, opts...)
  2309. res, err := c.doRequest("json")
  2310. if res != nil && res.StatusCode == http.StatusNotModified {
  2311. if res.Body != nil {
  2312. res.Body.Close()
  2313. }
  2314. return nil, &googleapi.Error{
  2315. Code: res.StatusCode,
  2316. Header: res.Header,
  2317. }
  2318. }
  2319. if err != nil {
  2320. return nil, err
  2321. }
  2322. defer googleapi.CloseBody(res)
  2323. if err := googleapi.CheckResponse(res); err != nil {
  2324. return nil, err
  2325. }
  2326. ret := &GetApkDetailsResponse{
  2327. ServerResponse: googleapi.ServerResponse{
  2328. Header: res.Header,
  2329. HTTPStatusCode: res.StatusCode,
  2330. },
  2331. }
  2332. target := &ret
  2333. if err := gensupport.DecodeResponse(target, res); err != nil {
  2334. return nil, err
  2335. }
  2336. return ret, nil
  2337. // {
  2338. // "description": "Request the details of an Android application APK.",
  2339. // "flatPath": "v1/applicationDetailService/getApkDetails",
  2340. // "httpMethod": "POST",
  2341. // "id": "testing.applicationDetailService.getApkDetails",
  2342. // "parameterOrder": [],
  2343. // "parameters": {},
  2344. // "path": "v1/applicationDetailService/getApkDetails",
  2345. // "request": {
  2346. // "$ref": "FileReference"
  2347. // },
  2348. // "response": {
  2349. // "$ref": "GetApkDetailsResponse"
  2350. // },
  2351. // "scopes": [
  2352. // "https://www.googleapis.com/auth/cloud-platform"
  2353. // ]
  2354. // }
  2355. }
  2356. // method id "testing.projects.testMatrices.cancel":
  2357. type ProjectsTestMatricesCancelCall struct {
  2358. s *Service
  2359. projectId string
  2360. testMatrixId string
  2361. urlParams_ gensupport.URLParams
  2362. ctx_ context.Context
  2363. header_ http.Header
  2364. }
  2365. // Cancel: Cancels unfinished test executions in a test matrix.
  2366. // This call returns immediately and cancellation proceeds
  2367. // asychronously.
  2368. // If the matrix is already final, this operation will have no
  2369. // effect.
  2370. //
  2371. // May return any of the following canonical error codes:
  2372. //
  2373. // - PERMISSION_DENIED - if the user is not authorized to read project
  2374. // - INVALID_ARGUMENT - if the request is malformed
  2375. // - NOT_FOUND - if the Test Matrix does not exist
  2376. func (r *ProjectsTestMatricesService) Cancel(projectId string, testMatrixId string) *ProjectsTestMatricesCancelCall {
  2377. c := &ProjectsTestMatricesCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2378. c.projectId = projectId
  2379. c.testMatrixId = testMatrixId
  2380. return c
  2381. }
  2382. // Fields allows partial responses to be retrieved. See
  2383. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2384. // for more information.
  2385. func (c *ProjectsTestMatricesCancelCall) Fields(s ...googleapi.Field) *ProjectsTestMatricesCancelCall {
  2386. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2387. return c
  2388. }
  2389. // Context sets the context to be used in this call's Do method. Any
  2390. // pending HTTP request will be aborted if the provided context is
  2391. // canceled.
  2392. func (c *ProjectsTestMatricesCancelCall) Context(ctx context.Context) *ProjectsTestMatricesCancelCall {
  2393. c.ctx_ = ctx
  2394. return c
  2395. }
  2396. // Header returns an http.Header that can be modified by the caller to
  2397. // add HTTP headers to the request.
  2398. func (c *ProjectsTestMatricesCancelCall) Header() http.Header {
  2399. if c.header_ == nil {
  2400. c.header_ = make(http.Header)
  2401. }
  2402. return c.header_
  2403. }
  2404. func (c *ProjectsTestMatricesCancelCall) doRequest(alt string) (*http.Response, error) {
  2405. reqHeaders := make(http.Header)
  2406. for k, v := range c.header_ {
  2407. reqHeaders[k] = v
  2408. }
  2409. reqHeaders.Set("User-Agent", c.s.userAgent())
  2410. var body io.Reader = nil
  2411. c.urlParams_.Set("alt", alt)
  2412. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel")
  2413. urls += "?" + c.urlParams_.Encode()
  2414. req, _ := http.NewRequest("POST", urls, body)
  2415. req.Header = reqHeaders
  2416. googleapi.Expand(req.URL, map[string]string{
  2417. "projectId": c.projectId,
  2418. "testMatrixId": c.testMatrixId,
  2419. })
  2420. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2421. }
  2422. // Do executes the "testing.projects.testMatrices.cancel" call.
  2423. // Exactly one of *CancelTestMatrixResponse or error will be non-nil.
  2424. // Any non-2xx status code is an error. Response headers are in either
  2425. // *CancelTestMatrixResponse.ServerResponse.Header or (if a response was
  2426. // returned at all) in error.(*googleapi.Error).Header. Use
  2427. // googleapi.IsNotModified to check whether the returned error was
  2428. // because http.StatusNotModified was returned.
  2429. func (c *ProjectsTestMatricesCancelCall) Do(opts ...googleapi.CallOption) (*CancelTestMatrixResponse, error) {
  2430. gensupport.SetOptions(c.urlParams_, opts...)
  2431. res, err := c.doRequest("json")
  2432. if res != nil && res.StatusCode == http.StatusNotModified {
  2433. if res.Body != nil {
  2434. res.Body.Close()
  2435. }
  2436. return nil, &googleapi.Error{
  2437. Code: res.StatusCode,
  2438. Header: res.Header,
  2439. }
  2440. }
  2441. if err != nil {
  2442. return nil, err
  2443. }
  2444. defer googleapi.CloseBody(res)
  2445. if err := googleapi.CheckResponse(res); err != nil {
  2446. return nil, err
  2447. }
  2448. ret := &CancelTestMatrixResponse{
  2449. ServerResponse: googleapi.ServerResponse{
  2450. Header: res.Header,
  2451. HTTPStatusCode: res.StatusCode,
  2452. },
  2453. }
  2454. target := &ret
  2455. if err := gensupport.DecodeResponse(target, res); err != nil {
  2456. return nil, err
  2457. }
  2458. return ret, nil
  2459. // {
  2460. // "description": "Cancels unfinished test executions in a test matrix.\nThis call returns immediately and cancellation proceeds asychronously.\nIf the matrix is already final, this operation will have no effect.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist",
  2461. // "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel",
  2462. // "httpMethod": "POST",
  2463. // "id": "testing.projects.testMatrices.cancel",
  2464. // "parameterOrder": [
  2465. // "projectId",
  2466. // "testMatrixId"
  2467. // ],
  2468. // "parameters": {
  2469. // "projectId": {
  2470. // "description": "Cloud project that owns the test.",
  2471. // "location": "path",
  2472. // "required": true,
  2473. // "type": "string"
  2474. // },
  2475. // "testMatrixId": {
  2476. // "description": "Test matrix that will be canceled.",
  2477. // "location": "path",
  2478. // "required": true,
  2479. // "type": "string"
  2480. // }
  2481. // },
  2482. // "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel",
  2483. // "response": {
  2484. // "$ref": "CancelTestMatrixResponse"
  2485. // },
  2486. // "scopes": [
  2487. // "https://www.googleapis.com/auth/cloud-platform"
  2488. // ]
  2489. // }
  2490. }
  2491. // method id "testing.projects.testMatrices.create":
  2492. type ProjectsTestMatricesCreateCall struct {
  2493. s *Service
  2494. projectId string
  2495. testmatrix *TestMatrix
  2496. urlParams_ gensupport.URLParams
  2497. ctx_ context.Context
  2498. header_ http.Header
  2499. }
  2500. // Create: Request to run a matrix of tests according to the given
  2501. // specifications.
  2502. // Unsupported environments will be returned in the state
  2503. // UNSUPPORTED.
  2504. // Matrices are limited to at most 200 supported executions.
  2505. //
  2506. // May return any of the following canonical error codes:
  2507. //
  2508. // - PERMISSION_DENIED - if the user is not authorized to write to
  2509. // project
  2510. // - INVALID_ARGUMENT - if the request is malformed or if the matrix
  2511. // expands
  2512. // to more than 200 supported executions
  2513. func (r *ProjectsTestMatricesService) Create(projectId string, testmatrix *TestMatrix) *ProjectsTestMatricesCreateCall {
  2514. c := &ProjectsTestMatricesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2515. c.projectId = projectId
  2516. c.testmatrix = testmatrix
  2517. return c
  2518. }
  2519. // RequestId sets the optional parameter "requestId": A string id used
  2520. // to detect duplicated requests.
  2521. // Ids are automatically scoped to a project, so
  2522. // users should ensure the ID is unique per-project.
  2523. // A UUID is recommended.
  2524. //
  2525. // Optional, but strongly recommended.
  2526. func (c *ProjectsTestMatricesCreateCall) RequestId(requestId string) *ProjectsTestMatricesCreateCall {
  2527. c.urlParams_.Set("requestId", requestId)
  2528. return c
  2529. }
  2530. // Fields allows partial responses to be retrieved. See
  2531. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2532. // for more information.
  2533. func (c *ProjectsTestMatricesCreateCall) Fields(s ...googleapi.Field) *ProjectsTestMatricesCreateCall {
  2534. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2535. return c
  2536. }
  2537. // Context sets the context to be used in this call's Do method. Any
  2538. // pending HTTP request will be aborted if the provided context is
  2539. // canceled.
  2540. func (c *ProjectsTestMatricesCreateCall) Context(ctx context.Context) *ProjectsTestMatricesCreateCall {
  2541. c.ctx_ = ctx
  2542. return c
  2543. }
  2544. // Header returns an http.Header that can be modified by the caller to
  2545. // add HTTP headers to the request.
  2546. func (c *ProjectsTestMatricesCreateCall) Header() http.Header {
  2547. if c.header_ == nil {
  2548. c.header_ = make(http.Header)
  2549. }
  2550. return c.header_
  2551. }
  2552. func (c *ProjectsTestMatricesCreateCall) doRequest(alt string) (*http.Response, error) {
  2553. reqHeaders := make(http.Header)
  2554. for k, v := range c.header_ {
  2555. reqHeaders[k] = v
  2556. }
  2557. reqHeaders.Set("User-Agent", c.s.userAgent())
  2558. var body io.Reader = nil
  2559. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testmatrix)
  2560. if err != nil {
  2561. return nil, err
  2562. }
  2563. reqHeaders.Set("Content-Type", "application/json")
  2564. c.urlParams_.Set("alt", alt)
  2565. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/testMatrices")
  2566. urls += "?" + c.urlParams_.Encode()
  2567. req, _ := http.NewRequest("POST", urls, body)
  2568. req.Header = reqHeaders
  2569. googleapi.Expand(req.URL, map[string]string{
  2570. "projectId": c.projectId,
  2571. })
  2572. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2573. }
  2574. // Do executes the "testing.projects.testMatrices.create" call.
  2575. // Exactly one of *TestMatrix or error will be non-nil. Any non-2xx
  2576. // status code is an error. Response headers are in either
  2577. // *TestMatrix.ServerResponse.Header or (if a response was returned at
  2578. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2579. // to check whether the returned error was because
  2580. // http.StatusNotModified was returned.
  2581. func (c *ProjectsTestMatricesCreateCall) Do(opts ...googleapi.CallOption) (*TestMatrix, error) {
  2582. gensupport.SetOptions(c.urlParams_, opts...)
  2583. res, err := c.doRequest("json")
  2584. if res != nil && res.StatusCode == http.StatusNotModified {
  2585. if res.Body != nil {
  2586. res.Body.Close()
  2587. }
  2588. return nil, &googleapi.Error{
  2589. Code: res.StatusCode,
  2590. Header: res.Header,
  2591. }
  2592. }
  2593. if err != nil {
  2594. return nil, err
  2595. }
  2596. defer googleapi.CloseBody(res)
  2597. if err := googleapi.CheckResponse(res); err != nil {
  2598. return nil, err
  2599. }
  2600. ret := &TestMatrix{
  2601. ServerResponse: googleapi.ServerResponse{
  2602. Header: res.Header,
  2603. HTTPStatusCode: res.StatusCode,
  2604. },
  2605. }
  2606. target := &ret
  2607. if err := gensupport.DecodeResponse(target, res); err != nil {
  2608. return nil, err
  2609. }
  2610. return ret, nil
  2611. // {
  2612. // "description": "Request to run a matrix of tests according to the given specifications.\nUnsupported environments will be returned in the state UNSUPPORTED.\nMatrices are limited to at most 200 supported executions.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project\n- INVALID_ARGUMENT - if the request is malformed or if the matrix expands\n to more than 200 supported executions",
  2613. // "flatPath": "v1/projects/{projectId}/testMatrices",
  2614. // "httpMethod": "POST",
  2615. // "id": "testing.projects.testMatrices.create",
  2616. // "parameterOrder": [
  2617. // "projectId"
  2618. // ],
  2619. // "parameters": {
  2620. // "projectId": {
  2621. // "description": "The GCE project under which this job will run.",
  2622. // "location": "path",
  2623. // "required": true,
  2624. // "type": "string"
  2625. // },
  2626. // "requestId": {
  2627. // "description": "A string id used to detect duplicated requests.\nIds are automatically scoped to a project, so\nusers should ensure the ID is unique per-project.\nA UUID is recommended.\n\nOptional, but strongly recommended.",
  2628. // "location": "query",
  2629. // "type": "string"
  2630. // }
  2631. // },
  2632. // "path": "v1/projects/{projectId}/testMatrices",
  2633. // "request": {
  2634. // "$ref": "TestMatrix"
  2635. // },
  2636. // "response": {
  2637. // "$ref": "TestMatrix"
  2638. // },
  2639. // "scopes": [
  2640. // "https://www.googleapis.com/auth/cloud-platform"
  2641. // ]
  2642. // }
  2643. }
  2644. // method id "testing.projects.testMatrices.get":
  2645. type ProjectsTestMatricesGetCall struct {
  2646. s *Service
  2647. projectId string
  2648. testMatrixId string
  2649. urlParams_ gensupport.URLParams
  2650. ifNoneMatch_ string
  2651. ctx_ context.Context
  2652. header_ http.Header
  2653. }
  2654. // Get: Check the status of a test matrix.
  2655. //
  2656. // May return any of the following canonical error codes:
  2657. //
  2658. // - PERMISSION_DENIED - if the user is not authorized to read project
  2659. // - INVALID_ARGUMENT - if the request is malformed
  2660. // - NOT_FOUND - if the Test Matrix does not exist
  2661. func (r *ProjectsTestMatricesService) Get(projectId string, testMatrixId string) *ProjectsTestMatricesGetCall {
  2662. c := &ProjectsTestMatricesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2663. c.projectId = projectId
  2664. c.testMatrixId = testMatrixId
  2665. return c
  2666. }
  2667. // Fields allows partial responses to be retrieved. See
  2668. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2669. // for more information.
  2670. func (c *ProjectsTestMatricesGetCall) Fields(s ...googleapi.Field) *ProjectsTestMatricesGetCall {
  2671. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2672. return c
  2673. }
  2674. // IfNoneMatch sets the optional parameter which makes the operation
  2675. // fail if the object's ETag matches the given value. This is useful for
  2676. // getting updates only after the object has changed since the last
  2677. // request. Use googleapi.IsNotModified to check whether the response
  2678. // error from Do is the result of In-None-Match.
  2679. func (c *ProjectsTestMatricesGetCall) IfNoneMatch(entityTag string) *ProjectsTestMatricesGetCall {
  2680. c.ifNoneMatch_ = entityTag
  2681. return c
  2682. }
  2683. // Context sets the context to be used in this call's Do method. Any
  2684. // pending HTTP request will be aborted if the provided context is
  2685. // canceled.
  2686. func (c *ProjectsTestMatricesGetCall) Context(ctx context.Context) *ProjectsTestMatricesGetCall {
  2687. c.ctx_ = ctx
  2688. return c
  2689. }
  2690. // Header returns an http.Header that can be modified by the caller to
  2691. // add HTTP headers to the request.
  2692. func (c *ProjectsTestMatricesGetCall) Header() http.Header {
  2693. if c.header_ == nil {
  2694. c.header_ = make(http.Header)
  2695. }
  2696. return c.header_
  2697. }
  2698. func (c *ProjectsTestMatricesGetCall) doRequest(alt string) (*http.Response, error) {
  2699. reqHeaders := make(http.Header)
  2700. for k, v := range c.header_ {
  2701. reqHeaders[k] = v
  2702. }
  2703. reqHeaders.Set("User-Agent", c.s.userAgent())
  2704. if c.ifNoneMatch_ != "" {
  2705. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2706. }
  2707. var body io.Reader = nil
  2708. c.urlParams_.Set("alt", alt)
  2709. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/testMatrices/{testMatrixId}")
  2710. urls += "?" + c.urlParams_.Encode()
  2711. req, _ := http.NewRequest("GET", urls, body)
  2712. req.Header = reqHeaders
  2713. googleapi.Expand(req.URL, map[string]string{
  2714. "projectId": c.projectId,
  2715. "testMatrixId": c.testMatrixId,
  2716. })
  2717. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2718. }
  2719. // Do executes the "testing.projects.testMatrices.get" call.
  2720. // Exactly one of *TestMatrix or error will be non-nil. Any non-2xx
  2721. // status code is an error. Response headers are in either
  2722. // *TestMatrix.ServerResponse.Header or (if a response was returned at
  2723. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2724. // to check whether the returned error was because
  2725. // http.StatusNotModified was returned.
  2726. func (c *ProjectsTestMatricesGetCall) Do(opts ...googleapi.CallOption) (*TestMatrix, error) {
  2727. gensupport.SetOptions(c.urlParams_, opts...)
  2728. res, err := c.doRequest("json")
  2729. if res != nil && res.StatusCode == http.StatusNotModified {
  2730. if res.Body != nil {
  2731. res.Body.Close()
  2732. }
  2733. return nil, &googleapi.Error{
  2734. Code: res.StatusCode,
  2735. Header: res.Header,
  2736. }
  2737. }
  2738. if err != nil {
  2739. return nil, err
  2740. }
  2741. defer googleapi.CloseBody(res)
  2742. if err := googleapi.CheckResponse(res); err != nil {
  2743. return nil, err
  2744. }
  2745. ret := &TestMatrix{
  2746. ServerResponse: googleapi.ServerResponse{
  2747. Header: res.Header,
  2748. HTTPStatusCode: res.StatusCode,
  2749. },
  2750. }
  2751. target := &ret
  2752. if err := gensupport.DecodeResponse(target, res); err != nil {
  2753. return nil, err
  2754. }
  2755. return ret, nil
  2756. // {
  2757. // "description": "Check the status of a test matrix.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist",
  2758. // "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}",
  2759. // "httpMethod": "GET",
  2760. // "id": "testing.projects.testMatrices.get",
  2761. // "parameterOrder": [
  2762. // "projectId",
  2763. // "testMatrixId"
  2764. // ],
  2765. // "parameters": {
  2766. // "projectId": {
  2767. // "description": "Cloud project that owns the test matrix.",
  2768. // "location": "path",
  2769. // "required": true,
  2770. // "type": "string"
  2771. // },
  2772. // "testMatrixId": {
  2773. // "description": "Unique test matrix id which was assigned by the service.",
  2774. // "location": "path",
  2775. // "required": true,
  2776. // "type": "string"
  2777. // }
  2778. // },
  2779. // "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}",
  2780. // "response": {
  2781. // "$ref": "TestMatrix"
  2782. // },
  2783. // "scopes": [
  2784. // "https://www.googleapis.com/auth/cloud-platform",
  2785. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2786. // ]
  2787. // }
  2788. }
  2789. // method id "testing.testEnvironmentCatalog.get":
  2790. type TestEnvironmentCatalogGetCall struct {
  2791. s *Service
  2792. environmentType string
  2793. urlParams_ gensupport.URLParams
  2794. ifNoneMatch_ string
  2795. ctx_ context.Context
  2796. header_ http.Header
  2797. }
  2798. // Get: Get the catalog of supported test environments.
  2799. //
  2800. // May return any of the following canonical error codes:
  2801. //
  2802. // - INVALID_ARGUMENT - if the request is malformed
  2803. // - NOT_FOUND - if the environment type does not exist
  2804. // - INTERNAL - if an internal error occurred
  2805. func (r *TestEnvironmentCatalogService) Get(environmentType string) *TestEnvironmentCatalogGetCall {
  2806. c := &TestEnvironmentCatalogGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2807. c.environmentType = environmentType
  2808. return c
  2809. }
  2810. // ProjectId sets the optional parameter "projectId": For authorization,
  2811. // the cloud project requesting the TestEnvironmentCatalog.
  2812. // Optional
  2813. func (c *TestEnvironmentCatalogGetCall) ProjectId(projectId string) *TestEnvironmentCatalogGetCall {
  2814. c.urlParams_.Set("projectId", projectId)
  2815. return c
  2816. }
  2817. // Fields allows partial responses to be retrieved. See
  2818. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2819. // for more information.
  2820. func (c *TestEnvironmentCatalogGetCall) Fields(s ...googleapi.Field) *TestEnvironmentCatalogGetCall {
  2821. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2822. return c
  2823. }
  2824. // IfNoneMatch sets the optional parameter which makes the operation
  2825. // fail if the object's ETag matches the given value. This is useful for
  2826. // getting updates only after the object has changed since the last
  2827. // request. Use googleapi.IsNotModified to check whether the response
  2828. // error from Do is the result of In-None-Match.
  2829. func (c *TestEnvironmentCatalogGetCall) IfNoneMatch(entityTag string) *TestEnvironmentCatalogGetCall {
  2830. c.ifNoneMatch_ = entityTag
  2831. return c
  2832. }
  2833. // Context sets the context to be used in this call's Do method. Any
  2834. // pending HTTP request will be aborted if the provided context is
  2835. // canceled.
  2836. func (c *TestEnvironmentCatalogGetCall) Context(ctx context.Context) *TestEnvironmentCatalogGetCall {
  2837. c.ctx_ = ctx
  2838. return c
  2839. }
  2840. // Header returns an http.Header that can be modified by the caller to
  2841. // add HTTP headers to the request.
  2842. func (c *TestEnvironmentCatalogGetCall) Header() http.Header {
  2843. if c.header_ == nil {
  2844. c.header_ = make(http.Header)
  2845. }
  2846. return c.header_
  2847. }
  2848. func (c *TestEnvironmentCatalogGetCall) doRequest(alt string) (*http.Response, error) {
  2849. reqHeaders := make(http.Header)
  2850. for k, v := range c.header_ {
  2851. reqHeaders[k] = v
  2852. }
  2853. reqHeaders.Set("User-Agent", c.s.userAgent())
  2854. if c.ifNoneMatch_ != "" {
  2855. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2856. }
  2857. var body io.Reader = nil
  2858. c.urlParams_.Set("alt", alt)
  2859. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/testEnvironmentCatalog/{environmentType}")
  2860. urls += "?" + c.urlParams_.Encode()
  2861. req, _ := http.NewRequest("GET", urls, body)
  2862. req.Header = reqHeaders
  2863. googleapi.Expand(req.URL, map[string]string{
  2864. "environmentType": c.environmentType,
  2865. })
  2866. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2867. }
  2868. // Do executes the "testing.testEnvironmentCatalog.get" call.
  2869. // Exactly one of *TestEnvironmentCatalog or error will be non-nil. Any
  2870. // non-2xx status code is an error. Response headers are in either
  2871. // *TestEnvironmentCatalog.ServerResponse.Header or (if a response was
  2872. // returned at all) in error.(*googleapi.Error).Header. Use
  2873. // googleapi.IsNotModified to check whether the returned error was
  2874. // because http.StatusNotModified was returned.
  2875. func (c *TestEnvironmentCatalogGetCall) Do(opts ...googleapi.CallOption) (*TestEnvironmentCatalog, error) {
  2876. gensupport.SetOptions(c.urlParams_, opts...)
  2877. res, err := c.doRequest("json")
  2878. if res != nil && res.StatusCode == http.StatusNotModified {
  2879. if res.Body != nil {
  2880. res.Body.Close()
  2881. }
  2882. return nil, &googleapi.Error{
  2883. Code: res.StatusCode,
  2884. Header: res.Header,
  2885. }
  2886. }
  2887. if err != nil {
  2888. return nil, err
  2889. }
  2890. defer googleapi.CloseBody(res)
  2891. if err := googleapi.CheckResponse(res); err != nil {
  2892. return nil, err
  2893. }
  2894. ret := &TestEnvironmentCatalog{
  2895. ServerResponse: googleapi.ServerResponse{
  2896. Header: res.Header,
  2897. HTTPStatusCode: res.StatusCode,
  2898. },
  2899. }
  2900. target := &ret
  2901. if err := gensupport.DecodeResponse(target, res); err != nil {
  2902. return nil, err
  2903. }
  2904. return ret, nil
  2905. // {
  2906. // "description": "Get the catalog of supported test environments.\n\nMay return any of the following canonical error codes:\n\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the environment type does not exist\n- INTERNAL - if an internal error occurred",
  2907. // "flatPath": "v1/testEnvironmentCatalog/{environmentType}",
  2908. // "httpMethod": "GET",
  2909. // "id": "testing.testEnvironmentCatalog.get",
  2910. // "parameterOrder": [
  2911. // "environmentType"
  2912. // ],
  2913. // "parameters": {
  2914. // "environmentType": {
  2915. // "description": "The type of environment that should be listed.\nRequired",
  2916. // "enum": [
  2917. // "ENVIRONMENT_TYPE_UNSPECIFIED",
  2918. // "ANDROID",
  2919. // "NETWORK_CONFIGURATION",
  2920. // "PROVIDED_SOFTWARE"
  2921. // ],
  2922. // "location": "path",
  2923. // "required": true,
  2924. // "type": "string"
  2925. // },
  2926. // "projectId": {
  2927. // "description": "For authorization, the cloud project requesting the TestEnvironmentCatalog.\nOptional",
  2928. // "location": "query",
  2929. // "type": "string"
  2930. // }
  2931. // },
  2932. // "path": "v1/testEnvironmentCatalog/{environmentType}",
  2933. // "response": {
  2934. // "$ref": "TestEnvironmentCatalog"
  2935. // },
  2936. // "scopes": [
  2937. // "https://www.googleapis.com/auth/cloud-platform",
  2938. // "https://www.googleapis.com/auth/cloud-platform.read-only"
  2939. // ]
  2940. // }
  2941. }