您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

7612 行
280 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package toolresults provides access to the Cloud Tool Results API.
  6. //
  7. // For product documentation, see: https://firebase.google.com/docs/test-lab/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/toolresults/v1beta3"
  14. // ...
  15. // ctx := context.Background()
  16. // toolresultsService, err := toolresults.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  25. //
  26. // toolresultsService, err := toolresults.NewService(ctx, option.WithAPIKey("AIza..."))
  27. //
  28. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  29. //
  30. // config := &oauth2.Config{...}
  31. // // ...
  32. // token, err := config.Exchange(ctx, ...)
  33. // toolresultsService, err := toolresults.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  34. //
  35. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  36. package toolresults // import "google.golang.org/api/toolresults/v1beta3"
  37. import (
  38. "bytes"
  39. "context"
  40. "encoding/json"
  41. "errors"
  42. "fmt"
  43. "io"
  44. "net/http"
  45. "net/url"
  46. "strconv"
  47. "strings"
  48. gensupport "google.golang.org/api/gensupport"
  49. googleapi "google.golang.org/api/googleapi"
  50. option "google.golang.org/api/option"
  51. htransport "google.golang.org/api/transport/http"
  52. )
  53. // Always reference these packages, just in case the auto-generated code
  54. // below doesn't.
  55. var _ = bytes.NewBuffer
  56. var _ = strconv.Itoa
  57. var _ = fmt.Sprintf
  58. var _ = json.NewDecoder
  59. var _ = io.Copy
  60. var _ = url.Parse
  61. var _ = gensupport.MarshalJSON
  62. var _ = googleapi.Version
  63. var _ = errors.New
  64. var _ = strings.Replace
  65. var _ = context.Canceled
  66. const apiId = "toolresults:v1beta3"
  67. const apiName = "toolresults"
  68. const apiVersion = "v1beta3"
  69. const basePath = "https://www.googleapis.com/toolresults/v1beta3/projects/"
  70. // OAuth2 scopes used by this API.
  71. const (
  72. // View and manage your data across Google Cloud Platform services
  73. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  74. )
  75. // NewService creates a new Service.
  76. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  77. scopesOption := option.WithScopes(
  78. "https://www.googleapis.com/auth/cloud-platform",
  79. )
  80. // NOTE: prepend, so we don't override user-specified scopes.
  81. opts = append([]option.ClientOption{scopesOption}, opts...)
  82. client, endpoint, err := htransport.NewClient(ctx, opts...)
  83. if err != nil {
  84. return nil, err
  85. }
  86. s, err := New(client)
  87. if err != nil {
  88. return nil, err
  89. }
  90. if endpoint != "" {
  91. s.BasePath = endpoint
  92. }
  93. return s, nil
  94. }
  95. // New creates a new Service. It uses the provided http.Client for requests.
  96. //
  97. // Deprecated: please use NewService instead.
  98. // To provide a custom HTTP client, use option.WithHTTPClient.
  99. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  100. func New(client *http.Client) (*Service, error) {
  101. if client == nil {
  102. return nil, errors.New("client is nil")
  103. }
  104. s := &Service{client: client, BasePath: basePath}
  105. s.Projects = NewProjectsService(s)
  106. return s, nil
  107. }
  108. type Service struct {
  109. client *http.Client
  110. BasePath string // API endpoint base URL
  111. UserAgent string // optional additional User-Agent fragment
  112. Projects *ProjectsService
  113. }
  114. func (s *Service) userAgent() string {
  115. if s.UserAgent == "" {
  116. return googleapi.UserAgent
  117. }
  118. return googleapi.UserAgent + " " + s.UserAgent
  119. }
  120. func NewProjectsService(s *Service) *ProjectsService {
  121. rs := &ProjectsService{s: s}
  122. rs.Histories = NewProjectsHistoriesService(s)
  123. return rs
  124. }
  125. type ProjectsService struct {
  126. s *Service
  127. Histories *ProjectsHistoriesService
  128. }
  129. func NewProjectsHistoriesService(s *Service) *ProjectsHistoriesService {
  130. rs := &ProjectsHistoriesService{s: s}
  131. rs.Executions = NewProjectsHistoriesExecutionsService(s)
  132. return rs
  133. }
  134. type ProjectsHistoriesService struct {
  135. s *Service
  136. Executions *ProjectsHistoriesExecutionsService
  137. }
  138. func NewProjectsHistoriesExecutionsService(s *Service) *ProjectsHistoriesExecutionsService {
  139. rs := &ProjectsHistoriesExecutionsService{s: s}
  140. rs.Clusters = NewProjectsHistoriesExecutionsClustersService(s)
  141. rs.Steps = NewProjectsHistoriesExecutionsStepsService(s)
  142. return rs
  143. }
  144. type ProjectsHistoriesExecutionsService struct {
  145. s *Service
  146. Clusters *ProjectsHistoriesExecutionsClustersService
  147. Steps *ProjectsHistoriesExecutionsStepsService
  148. }
  149. func NewProjectsHistoriesExecutionsClustersService(s *Service) *ProjectsHistoriesExecutionsClustersService {
  150. rs := &ProjectsHistoriesExecutionsClustersService{s: s}
  151. return rs
  152. }
  153. type ProjectsHistoriesExecutionsClustersService struct {
  154. s *Service
  155. }
  156. func NewProjectsHistoriesExecutionsStepsService(s *Service) *ProjectsHistoriesExecutionsStepsService {
  157. rs := &ProjectsHistoriesExecutionsStepsService{s: s}
  158. rs.PerfMetricsSummary = NewProjectsHistoriesExecutionsStepsPerfMetricsSummaryService(s)
  159. rs.PerfSampleSeries = NewProjectsHistoriesExecutionsStepsPerfSampleSeriesService(s)
  160. rs.Thumbnails = NewProjectsHistoriesExecutionsStepsThumbnailsService(s)
  161. return rs
  162. }
  163. type ProjectsHistoriesExecutionsStepsService struct {
  164. s *Service
  165. PerfMetricsSummary *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService
  166. PerfSampleSeries *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService
  167. Thumbnails *ProjectsHistoriesExecutionsStepsThumbnailsService
  168. }
  169. func NewProjectsHistoriesExecutionsStepsPerfMetricsSummaryService(s *Service) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService {
  170. rs := &ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService{s: s}
  171. return rs
  172. }
  173. type ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService struct {
  174. s *Service
  175. }
  176. func NewProjectsHistoriesExecutionsStepsPerfSampleSeriesService(s *Service) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService {
  177. rs := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesService{s: s}
  178. rs.Samples = NewProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService(s)
  179. return rs
  180. }
  181. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesService struct {
  182. s *Service
  183. Samples *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService
  184. }
  185. func NewProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService(s *Service) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService {
  186. rs := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService{s: s}
  187. return rs
  188. }
  189. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService struct {
  190. s *Service
  191. }
  192. func NewProjectsHistoriesExecutionsStepsThumbnailsService(s *Service) *ProjectsHistoriesExecutionsStepsThumbnailsService {
  193. rs := &ProjectsHistoriesExecutionsStepsThumbnailsService{s: s}
  194. return rs
  195. }
  196. type ProjectsHistoriesExecutionsStepsThumbnailsService struct {
  197. s *Service
  198. }
  199. // AndroidAppInfo: Android app information.
  200. type AndroidAppInfo struct {
  201. // Name: The name of the app. Optional
  202. Name string `json:"name,omitempty"`
  203. // PackageName: The package name of the app. Required.
  204. PackageName string `json:"packageName,omitempty"`
  205. // VersionCode: The internal version code of the app. Optional.
  206. VersionCode string `json:"versionCode,omitempty"`
  207. // VersionName: The version name of the app. Optional.
  208. VersionName string `json:"versionName,omitempty"`
  209. // ForceSendFields is a list of field names (e.g. "Name") to
  210. // unconditionally include in API requests. By default, fields with
  211. // empty values are omitted from API requests. However, any non-pointer,
  212. // non-interface field appearing in ForceSendFields will be sent to the
  213. // server regardless of whether the field is empty or not. This may be
  214. // used to include empty fields in Patch requests.
  215. ForceSendFields []string `json:"-"`
  216. // NullFields is a list of field names (e.g. "Name") to include in API
  217. // requests with the JSON null value. By default, fields with empty
  218. // values are omitted from API requests. However, any field with an
  219. // empty value appearing in NullFields will be sent to the server as
  220. // null. It is an error if a field in this list has a non-empty value.
  221. // This may be used to include null fields in Patch requests.
  222. NullFields []string `json:"-"`
  223. }
  224. func (s *AndroidAppInfo) MarshalJSON() ([]byte, error) {
  225. type NoMethod AndroidAppInfo
  226. raw := NoMethod(*s)
  227. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  228. }
  229. // AndroidInstrumentationTest: A test of an Android application that can
  230. // control an Android component independently of its normal
  231. // lifecycle.
  232. //
  233. // See for more information on types of Android tests.
  234. type AndroidInstrumentationTest struct {
  235. // TestPackageId: The java package for the test to be executed. Required
  236. TestPackageId string `json:"testPackageId,omitempty"`
  237. // TestRunnerClass: The InstrumentationTestRunner class. Required
  238. TestRunnerClass string `json:"testRunnerClass,omitempty"`
  239. // TestTargets: Each target must be fully qualified with the package
  240. // name or class name, in one of these formats: - "package package_name"
  241. // - "class package_name.class_name" - "class
  242. // package_name.class_name#method_name"
  243. //
  244. // If empty, all targets in the module will be run.
  245. TestTargets []string `json:"testTargets,omitempty"`
  246. // UseOrchestrator: The flag indicates whether Android Test Orchestrator
  247. // will be used to run test or not.
  248. UseOrchestrator bool `json:"useOrchestrator,omitempty"`
  249. // ForceSendFields is a list of field names (e.g. "TestPackageId") to
  250. // unconditionally include in API requests. By default, fields with
  251. // empty values are omitted from API requests. However, any non-pointer,
  252. // non-interface field appearing in ForceSendFields will be sent to the
  253. // server regardless of whether the field is empty or not. This may be
  254. // used to include empty fields in Patch requests.
  255. ForceSendFields []string `json:"-"`
  256. // NullFields is a list of field names (e.g. "TestPackageId") to include
  257. // in API requests with the JSON null value. By default, fields with
  258. // empty values are omitted from API requests. However, any field with
  259. // an empty value appearing in NullFields will be sent to the server as
  260. // null. It is an error if a field in this list has a non-empty value.
  261. // This may be used to include null fields in Patch requests.
  262. NullFields []string `json:"-"`
  263. }
  264. func (s *AndroidInstrumentationTest) MarshalJSON() ([]byte, error) {
  265. type NoMethod AndroidInstrumentationTest
  266. raw := NoMethod(*s)
  267. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  268. }
  269. // AndroidRoboTest: A test of an android application that explores the
  270. // application on a virtual or physical Android device, finding culprits
  271. // and crashes as it goes.
  272. type AndroidRoboTest struct {
  273. // AppInitialActivity: The initial activity that should be used to start
  274. // the app. Optional
  275. AppInitialActivity string `json:"appInitialActivity,omitempty"`
  276. // BootstrapPackageId: The java package for the bootstrap. Optional
  277. BootstrapPackageId string `json:"bootstrapPackageId,omitempty"`
  278. // BootstrapRunnerClass: The runner class for the bootstrap. Optional
  279. BootstrapRunnerClass string `json:"bootstrapRunnerClass,omitempty"`
  280. // MaxDepth: The max depth of the traversal stack Robo can explore.
  281. // Optional
  282. MaxDepth int64 `json:"maxDepth,omitempty"`
  283. // MaxSteps: The max number of steps/actions Robo can execute. Default
  284. // is no limit (0). Optional
  285. MaxSteps int64 `json:"maxSteps,omitempty"`
  286. // ForceSendFields is a list of field names (e.g. "AppInitialActivity")
  287. // to unconditionally include in API requests. By default, fields with
  288. // empty values are omitted from API requests. However, any non-pointer,
  289. // non-interface field appearing in ForceSendFields will be sent to the
  290. // server regardless of whether the field is empty or not. This may be
  291. // used to include empty fields in Patch requests.
  292. ForceSendFields []string `json:"-"`
  293. // NullFields is a list of field names (e.g. "AppInitialActivity") to
  294. // include in API requests with the JSON null value. By default, fields
  295. // with empty values are omitted from API requests. However, any field
  296. // with an empty value appearing in NullFields will be sent to the
  297. // server as null. It is an error if a field in this list has a
  298. // non-empty value. This may be used to include null fields in Patch
  299. // requests.
  300. NullFields []string `json:"-"`
  301. }
  302. func (s *AndroidRoboTest) MarshalJSON() ([]byte, error) {
  303. type NoMethod AndroidRoboTest
  304. raw := NoMethod(*s)
  305. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  306. }
  307. // AndroidTest: An Android mobile test specification.
  308. type AndroidTest struct {
  309. // AndroidAppInfo: Information about the application under test.
  310. AndroidAppInfo *AndroidAppInfo `json:"androidAppInfo,omitempty"`
  311. // AndroidInstrumentationTest: An Android instrumentation test.
  312. AndroidInstrumentationTest *AndroidInstrumentationTest `json:"androidInstrumentationTest,omitempty"`
  313. // AndroidRoboTest: An Android robo test.
  314. AndroidRoboTest *AndroidRoboTest `json:"androidRoboTest,omitempty"`
  315. // TestTimeout: Max time a test is allowed to run before it is
  316. // automatically cancelled.
  317. TestTimeout *Duration `json:"testTimeout,omitempty"`
  318. // ForceSendFields is a list of field names (e.g. "AndroidAppInfo") to
  319. // unconditionally include in API requests. By default, fields with
  320. // empty values are omitted from API requests. However, any non-pointer,
  321. // non-interface field appearing in ForceSendFields will be sent to the
  322. // server regardless of whether the field is empty or not. This may be
  323. // used to include empty fields in Patch requests.
  324. ForceSendFields []string `json:"-"`
  325. // NullFields is a list of field names (e.g. "AndroidAppInfo") to
  326. // include in API requests with the JSON null value. By default, fields
  327. // with empty values are omitted from API requests. However, any field
  328. // with an empty value appearing in NullFields will be sent to the
  329. // server as null. It is an error if a field in this list has a
  330. // non-empty value. This may be used to include null fields in Patch
  331. // requests.
  332. NullFields []string `json:"-"`
  333. }
  334. func (s *AndroidTest) MarshalJSON() ([]byte, error) {
  335. type NoMethod AndroidTest
  336. raw := NoMethod(*s)
  337. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  338. }
  339. // Any: `Any` contains an arbitrary serialized protocol buffer message
  340. // along with a URL that describes the type of the serialized
  341. // message.
  342. //
  343. // Protobuf library provides support to pack/unpack Any values in the
  344. // form of utility functions or additional generated methods of the Any
  345. // type.
  346. //
  347. // Example 1: Pack and unpack a message in C++.
  348. //
  349. // Foo foo = ...; Any any; any.PackFrom(foo); ... if
  350. // (any.UnpackTo(&foo)) { ... }
  351. //
  352. // Example 2: Pack and unpack a message in Java.
  353. //
  354. // Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) {
  355. // foo = any.unpack(Foo.class); }
  356. //
  357. // Example 3: Pack and unpack a message in Python.
  358. //
  359. // foo = Foo(...) any = Any() any.Pack(foo) ... if
  360. // any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ...
  361. //
  362. // Example 4: Pack and unpack a message in Go
  363. //
  364. // foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo :=
  365. // &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ...
  366. // }
  367. //
  368. // The pack methods provided by protobuf library will by default use
  369. // 'type.googleapis.com/full.type.name' as the type URL and the unpack
  370. // methods only use the fully qualified type name after the last '/' in
  371. // the type URL, for example "foo.bar.com/x/y.z" will yield type name
  372. // "y.z".
  373. //
  374. //
  375. //
  376. // JSON ==== The JSON representation of an `Any` value uses the regular
  377. // representation of the deserialized, embedded message, with an
  378. // additional field `@type` which contains the type URL.
  379. // Example:
  380. //
  381. // package google.profile; message Person { string first_name = 1;
  382. // string last_name = 2; }
  383. //
  384. // { "@type": "type.googleapis.com/google.profile.Person", "firstName":
  385. // , "lastName": }
  386. //
  387. // If the embedded message type is well-known and has a custom JSON
  388. // representation, that representation will be embedded adding a field
  389. // `value` which holds the custom JSON in addition to the `@type` field.
  390. // Example (for message [google.protobuf.Duration][]):
  391. //
  392. // { "@type": "type.googleapis.com/google.protobuf.Duration", "value":
  393. // "1.212s" }
  394. type Any struct {
  395. // TypeUrl: A URL/resource name that uniquely identifies the type of the
  396. // serialized protocol buffer message. This string must contain at least
  397. // one "/" character. The last segment of the URL's path must represent
  398. // the fully qualified name of the type (as in
  399. // `path/google.protobuf.Duration`). The name should be in a canonical
  400. // form (e.g., leading "." is not accepted).
  401. //
  402. // In practice, teams usually precompile into the binary all types that
  403. // they expect it to use in the context of Any. However, for URLs which
  404. // use the scheme `http`, `https`, or no scheme, one can optionally set
  405. // up a type server that maps type URLs to message definitions as
  406. // follows:
  407. //
  408. // * If no scheme is provided, `https` is assumed. * An HTTP GET on the
  409. // URL must yield a [google.protobuf.Type][] value in binary format, or
  410. // produce an error. * Applications are allowed to cache lookup results
  411. // based on the URL, or have them precompiled into a binary to avoid any
  412. // lookup. Therefore, binary compatibility needs to be preserved on
  413. // changes to types. (Use versioned type names to manage breaking
  414. // changes.)
  415. //
  416. // Note: this functionality is not currently available in the official
  417. // protobuf release, and it is not used for type URLs beginning with
  418. // type.googleapis.com.
  419. //
  420. // Schemes other than `http`, `https` (or the empty scheme) might be
  421. // used with implementation specific semantics.
  422. TypeUrl string `json:"typeUrl,omitempty"`
  423. // Value: Must be a valid serialized protocol buffer of the above
  424. // specified type.
  425. Value string `json:"value,omitempty"`
  426. // ForceSendFields is a list of field names (e.g. "TypeUrl") to
  427. // unconditionally include in API requests. By default, fields with
  428. // empty values are omitted from API requests. However, any non-pointer,
  429. // non-interface field appearing in ForceSendFields will be sent to the
  430. // server regardless of whether the field is empty or not. This may be
  431. // used to include empty fields in Patch requests.
  432. ForceSendFields []string `json:"-"`
  433. // NullFields is a list of field names (e.g. "TypeUrl") to include in
  434. // API requests with the JSON null value. By default, fields with empty
  435. // values are omitted from API requests. However, any field with an
  436. // empty value appearing in NullFields will be sent to the server as
  437. // null. It is an error if a field in this list has a non-empty value.
  438. // This may be used to include null fields in Patch requests.
  439. NullFields []string `json:"-"`
  440. }
  441. func (s *Any) MarshalJSON() ([]byte, error) {
  442. type NoMethod Any
  443. raw := NoMethod(*s)
  444. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  445. }
  446. type AppStartTime struct {
  447. // FullyDrawnTime: Optional. The time from app start to reaching the
  448. // developer-reported "fully drawn" time. This is only stored if the app
  449. // includes a call to Activity.reportFullyDrawn(). See
  450. // https://developer.android.com/topic/performance/launch-time.html#time-full
  451. FullyDrawnTime *Duration `json:"fullyDrawnTime,omitempty"`
  452. // InitialDisplayTime: The time from app start to the first displayed
  453. // activity being drawn, as reported in Logcat. See
  454. // https://developer.android.com/topic/performance/launch-time.html#time-initial
  455. InitialDisplayTime *Duration `json:"initialDisplayTime,omitempty"`
  456. // ForceSendFields is a list of field names (e.g. "FullyDrawnTime") to
  457. // unconditionally include in API requests. By default, fields with
  458. // empty values are omitted from API requests. However, any non-pointer,
  459. // non-interface field appearing in ForceSendFields will be sent to the
  460. // server regardless of whether the field is empty or not. This may be
  461. // used to include empty fields in Patch requests.
  462. ForceSendFields []string `json:"-"`
  463. // NullFields is a list of field names (e.g. "FullyDrawnTime") to
  464. // include in API requests with the JSON null value. By default, fields
  465. // with empty values are omitted from API requests. However, any field
  466. // with an empty value appearing in NullFields will be sent to the
  467. // server as null. It is an error if a field in this list has a
  468. // non-empty value. This may be used to include null fields in Patch
  469. // requests.
  470. NullFields []string `json:"-"`
  471. }
  472. func (s *AppStartTime) MarshalJSON() ([]byte, error) {
  473. type NoMethod AppStartTime
  474. raw := NoMethod(*s)
  475. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  476. }
  477. // BasicPerfSampleSeries: Encapsulates the metadata for basic sample
  478. // series represented by a line chart
  479. type BasicPerfSampleSeries struct {
  480. // Possible values:
  481. // "cpu"
  482. // "graphics"
  483. // "memory"
  484. // "network"
  485. // "perfMetricTypeUnspecified"
  486. PerfMetricType string `json:"perfMetricType,omitempty"`
  487. // Possible values:
  488. // "byte"
  489. // "bytesPerSecond"
  490. // "framesPerSecond"
  491. // "kibibyte"
  492. // "percent"
  493. // "perfUnitUnspecified"
  494. PerfUnit string `json:"perfUnit,omitempty"`
  495. // Possible values:
  496. // "cpuKernel"
  497. // "cpuTotal"
  498. // "cpuUser"
  499. // "graphicsFrameRate"
  500. // "memoryRssPrivate"
  501. // "memoryRssShared"
  502. // "memoryRssTotal"
  503. // "memoryTotal"
  504. // "networkReceived"
  505. // "networkSent"
  506. // "ntBytesReceived"
  507. // "ntBytesTransferred"
  508. // "sampleSeriesTypeUnspecified"
  509. SampleSeriesLabel string `json:"sampleSeriesLabel,omitempty"`
  510. // ForceSendFields is a list of field names (e.g. "PerfMetricType") to
  511. // unconditionally include in API requests. By default, fields with
  512. // empty values are omitted from API requests. However, any non-pointer,
  513. // non-interface field appearing in ForceSendFields will be sent to the
  514. // server regardless of whether the field is empty or not. This may be
  515. // used to include empty fields in Patch requests.
  516. ForceSendFields []string `json:"-"`
  517. // NullFields is a list of field names (e.g. "PerfMetricType") to
  518. // include in API requests with the JSON null value. By default, fields
  519. // with empty values are omitted from API requests. However, any field
  520. // with an empty value appearing in NullFields will be sent to the
  521. // server as null. It is an error if a field in this list has a
  522. // non-empty value. This may be used to include null fields in Patch
  523. // requests.
  524. NullFields []string `json:"-"`
  525. }
  526. func (s *BasicPerfSampleSeries) MarshalJSON() ([]byte, error) {
  527. type NoMethod BasicPerfSampleSeries
  528. raw := NoMethod(*s)
  529. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  530. }
  531. // BatchCreatePerfSamplesRequest: The request must provide up to a
  532. // maximum of 5000 samples to be created; a larger sample size will
  533. // cause an INVALID_ARGUMENT error
  534. type BatchCreatePerfSamplesRequest struct {
  535. // PerfSamples: The set of PerfSamples to create should not include
  536. // existing timestamps
  537. PerfSamples []*PerfSample `json:"perfSamples,omitempty"`
  538. // ForceSendFields is a list of field names (e.g. "PerfSamples") to
  539. // unconditionally include in API requests. By default, fields with
  540. // empty values are omitted from API requests. However, any non-pointer,
  541. // non-interface field appearing in ForceSendFields will be sent to the
  542. // server regardless of whether the field is empty or not. This may be
  543. // used to include empty fields in Patch requests.
  544. ForceSendFields []string `json:"-"`
  545. // NullFields is a list of field names (e.g. "PerfSamples") to include
  546. // in API requests with the JSON null value. By default, fields with
  547. // empty values are omitted from API requests. However, any field with
  548. // an empty value appearing in NullFields will be sent to the server as
  549. // null. It is an error if a field in this list has a non-empty value.
  550. // This may be used to include null fields in Patch requests.
  551. NullFields []string `json:"-"`
  552. }
  553. func (s *BatchCreatePerfSamplesRequest) MarshalJSON() ([]byte, error) {
  554. type NoMethod BatchCreatePerfSamplesRequest
  555. raw := NoMethod(*s)
  556. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  557. }
  558. type BatchCreatePerfSamplesResponse struct {
  559. PerfSamples []*PerfSample `json:"perfSamples,omitempty"`
  560. // ServerResponse contains the HTTP response code and headers from the
  561. // server.
  562. googleapi.ServerResponse `json:"-"`
  563. // ForceSendFields is a list of field names (e.g. "PerfSamples") to
  564. // unconditionally include in API requests. By default, fields with
  565. // empty values are omitted from API requests. However, any non-pointer,
  566. // non-interface field appearing in ForceSendFields will be sent to the
  567. // server regardless of whether the field is empty or not. This may be
  568. // used to include empty fields in Patch requests.
  569. ForceSendFields []string `json:"-"`
  570. // NullFields is a list of field names (e.g. "PerfSamples") to include
  571. // in API requests with the JSON null value. By default, fields with
  572. // empty values are omitted from API requests. However, any field with
  573. // an empty value appearing in NullFields will be sent to the server as
  574. // null. It is an error if a field in this list has a non-empty value.
  575. // This may be used to include null fields in Patch requests.
  576. NullFields []string `json:"-"`
  577. }
  578. func (s *BatchCreatePerfSamplesResponse) MarshalJSON() ([]byte, error) {
  579. type NoMethod BatchCreatePerfSamplesResponse
  580. raw := NoMethod(*s)
  581. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  582. }
  583. type CPUInfo struct {
  584. // CpuProcessor: description of the device processor ie '1.8 GHz hexa
  585. // core 64-bit ARMv8-A'
  586. CpuProcessor string `json:"cpuProcessor,omitempty"`
  587. // CpuSpeedInGhz: the CPU clock speed in GHz
  588. CpuSpeedInGhz float64 `json:"cpuSpeedInGhz,omitempty"`
  589. // NumberOfCores: the number of CPU cores
  590. NumberOfCores int64 `json:"numberOfCores,omitempty"`
  591. // ForceSendFields is a list of field names (e.g. "CpuProcessor") to
  592. // unconditionally include in API requests. By default, fields with
  593. // empty values are omitted from API requests. However, any non-pointer,
  594. // non-interface field appearing in ForceSendFields will be sent to the
  595. // server regardless of whether the field is empty or not. This may be
  596. // used to include empty fields in Patch requests.
  597. ForceSendFields []string `json:"-"`
  598. // NullFields is a list of field names (e.g. "CpuProcessor") to include
  599. // in API requests with the JSON null value. By default, fields with
  600. // empty values are omitted from API requests. However, any field with
  601. // an empty value appearing in NullFields will be sent to the server as
  602. // null. It is an error if a field in this list has a non-empty value.
  603. // This may be used to include null fields in Patch requests.
  604. NullFields []string `json:"-"`
  605. }
  606. func (s *CPUInfo) MarshalJSON() ([]byte, error) {
  607. type NoMethod CPUInfo
  608. raw := NoMethod(*s)
  609. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  610. }
  611. func (s *CPUInfo) UnmarshalJSON(data []byte) error {
  612. type NoMethod CPUInfo
  613. var s1 struct {
  614. CpuSpeedInGhz gensupport.JSONFloat64 `json:"cpuSpeedInGhz"`
  615. *NoMethod
  616. }
  617. s1.NoMethod = (*NoMethod)(s)
  618. if err := json.Unmarshal(data, &s1); err != nil {
  619. return err
  620. }
  621. s.CpuSpeedInGhz = float64(s1.CpuSpeedInGhz)
  622. return nil
  623. }
  624. // Duration: A Duration represents a signed, fixed-length span of time
  625. // represented as a count of seconds and fractions of seconds at
  626. // nanosecond resolution. It is independent of any calendar and concepts
  627. // like "day" or "month". It is related to Timestamp in that the
  628. // difference between two Timestamp values is a Duration and it can be
  629. // added or subtracted from a Timestamp. Range is approximately +-10,000
  630. // years.
  631. //
  632. // # Examples
  633. //
  634. // Example 1: Compute Duration from two Timestamps in pseudo
  635. // code.
  636. //
  637. // Timestamp start = ...; Timestamp end = ...; Duration duration =
  638. // ...;
  639. //
  640. // duration.seconds = end.seconds - start.seconds; duration.nanos =
  641. // end.nanos - start.nanos;
  642. //
  643. // if (duration.seconds 0) { duration.seconds += 1; duration.nanos -=
  644. // 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) {
  645. // duration.seconds -= 1; duration.nanos += 1000000000; }
  646. //
  647. // Example 2: Compute Timestamp from Timestamp + Duration in pseudo
  648. // code.
  649. //
  650. // Timestamp start = ...; Duration duration = ...; Timestamp end =
  651. // ...;
  652. //
  653. // end.seconds = start.seconds + duration.seconds; end.nanos =
  654. // start.nanos + duration.nanos;
  655. //
  656. // if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -=
  657. // 1000000000; }
  658. //
  659. // Example 3: Compute Duration from datetime.timedelta in Python.
  660. //
  661. // td = datetime.timedelta(days=3, minutes=10) duration = Duration()
  662. // duration.FromTimedelta(td)
  663. //
  664. // # JSON Mapping
  665. //
  666. // In JSON format, the Duration type is encoded as a string rather than
  667. // an object, where the string ends in the suffix "s" (indicating
  668. // seconds) and is preceded by the number of seconds, with nanoseconds
  669. // expressed as fractional seconds. For example, 3 seconds with 0
  670. // nanoseconds should be encoded in JSON format as "3s", while 3 seconds
  671. // and 1 nanosecond should be expressed in JSON format as
  672. // "3.000000001s", and 3 seconds and 1 microsecond should be expressed
  673. // in JSON format as "3.000001s".
  674. type Duration struct {
  675. // Nanos: Signed fractions of a second at nanosecond resolution of the
  676. // span of time. Durations less than one second are represented with a 0
  677. // `seconds` field and a positive or negative `nanos` field. For
  678. // durations of one second or more, a non-zero value for the `nanos`
  679. // field must be of the same sign as the `seconds` field. Must be from
  680. // -999,999,999 to +999,999,999 inclusive.
  681. Nanos int64 `json:"nanos,omitempty"`
  682. // Seconds: Signed seconds of the span of time. Must be from
  683. // -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds
  684. // are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25
  685. // days/year * 10000 years
  686. Seconds int64 `json:"seconds,omitempty,string"`
  687. // ForceSendFields is a list of field names (e.g. "Nanos") to
  688. // unconditionally include in API requests. By default, fields with
  689. // empty values are omitted from API requests. However, any non-pointer,
  690. // non-interface field appearing in ForceSendFields will be sent to the
  691. // server regardless of whether the field is empty or not. This may be
  692. // used to include empty fields in Patch requests.
  693. ForceSendFields []string `json:"-"`
  694. // NullFields is a list of field names (e.g. "Nanos") to include in API
  695. // requests with the JSON null value. By default, fields with empty
  696. // values are omitted from API requests. However, any field with an
  697. // empty value appearing in NullFields will be sent to the server as
  698. // null. It is an error if a field in this list has a non-empty value.
  699. // This may be used to include null fields in Patch requests.
  700. NullFields []string `json:"-"`
  701. }
  702. func (s *Duration) MarshalJSON() ([]byte, error) {
  703. type NoMethod Duration
  704. raw := NoMethod(*s)
  705. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  706. }
  707. // Execution: An Execution represents a collection of Steps. For
  708. // instance, it could represent: - a mobile test executed across a range
  709. // of device configurations - a jenkins job with a build step followed
  710. // by a test step
  711. //
  712. // The maximum size of an execution message is 1 MiB.
  713. //
  714. // An Execution can be updated until its state is set to COMPLETE at
  715. // which point it becomes immutable.
  716. type Execution struct {
  717. // CompletionTime: The time when the Execution status transitioned to
  718. // COMPLETE.
  719. //
  720. // This value will be set automatically when state transitions to
  721. // COMPLETE.
  722. //
  723. // - In response: set if the execution state is COMPLETE. - In
  724. // create/update request: never set
  725. CompletionTime *Timestamp `json:"completionTime,omitempty"`
  726. // CreationTime: The time when the Execution was created.
  727. //
  728. // This value will be set automatically when CreateExecution is
  729. // called.
  730. //
  731. // - In response: always set - In create/update request: never set
  732. CreationTime *Timestamp `json:"creationTime,omitempty"`
  733. // ExecutionId: A unique identifier within a History for this
  734. // Execution.
  735. //
  736. // Returns INVALID_ARGUMENT if this field is set or overwritten by the
  737. // caller.
  738. //
  739. // - In response always set - In create/update request: never set
  740. ExecutionId string `json:"executionId,omitempty"`
  741. // Outcome: Classify the result, for example into SUCCESS or FAILURE
  742. //
  743. // - In response: present if set by create/update request - In
  744. // create/update request: optional
  745. Outcome *Outcome `json:"outcome,omitempty"`
  746. // Specification: Lightweight information about execution request.
  747. //
  748. // - In response: present if set by create - In create: optional - In
  749. // update: optional
  750. Specification *Specification `json:"specification,omitempty"`
  751. // State: The initial state is IN_PROGRESS.
  752. //
  753. // The only legal state transitions is from IN_PROGRESS to COMPLETE.
  754. //
  755. // A PRECONDITION_FAILED will be returned if an invalid transition is
  756. // requested.
  757. //
  758. // The state can only be set to COMPLETE once. A FAILED_PRECONDITION
  759. // will be returned if the state is set to COMPLETE multiple times.
  760. //
  761. // If the state is set to COMPLETE, all the in-progress steps within the
  762. // execution will be set as COMPLETE. If the outcome of the step is not
  763. // set, the outcome will be set to INCONCLUSIVE.
  764. //
  765. // - In response always set - In create/update request: optional
  766. //
  767. // Possible values:
  768. // "complete"
  769. // "inProgress"
  770. // "pending"
  771. // "unknownState"
  772. State string `json:"state,omitempty"`
  773. // TestExecutionMatrixId: TestExecution Matrix ID that the
  774. // TestExecutionService uses.
  775. //
  776. // - In response: present if set by create - In create: optional - In
  777. // update: never set
  778. TestExecutionMatrixId string `json:"testExecutionMatrixId,omitempty"`
  779. // ServerResponse contains the HTTP response code and headers from the
  780. // server.
  781. googleapi.ServerResponse `json:"-"`
  782. // ForceSendFields is a list of field names (e.g. "CompletionTime") to
  783. // unconditionally include in API requests. By default, fields with
  784. // empty values are omitted from API requests. However, any non-pointer,
  785. // non-interface field appearing in ForceSendFields will be sent to the
  786. // server regardless of whether the field is empty or not. This may be
  787. // used to include empty fields in Patch requests.
  788. ForceSendFields []string `json:"-"`
  789. // NullFields is a list of field names (e.g. "CompletionTime") to
  790. // include in API requests with the JSON null value. By default, fields
  791. // with empty values are omitted from API requests. However, any field
  792. // with an empty value appearing in NullFields will be sent to the
  793. // server as null. It is an error if a field in this list has a
  794. // non-empty value. This may be used to include null fields in Patch
  795. // requests.
  796. NullFields []string `json:"-"`
  797. }
  798. func (s *Execution) MarshalJSON() ([]byte, error) {
  799. type NoMethod Execution
  800. raw := NoMethod(*s)
  801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  802. }
  803. type FailureDetail struct {
  804. // Crashed: If the failure was severe because the system (app) under
  805. // test crashed.
  806. Crashed bool `json:"crashed,omitempty"`
  807. // NotInstalled: If an app is not installed and thus no test can be run
  808. // with the app. This might be caused by trying to run a test on an
  809. // unsupported platform.
  810. NotInstalled bool `json:"notInstalled,omitempty"`
  811. // OtherNativeCrash: If a native process (including any other than the
  812. // app) crashed.
  813. OtherNativeCrash bool `json:"otherNativeCrash,omitempty"`
  814. // TimedOut: If the test overran some time limit, and that is why it
  815. // failed.
  816. TimedOut bool `json:"timedOut,omitempty"`
  817. // UnableToCrawl: If the robo was unable to crawl the app; perhaps
  818. // because the app did not start.
  819. UnableToCrawl bool `json:"unableToCrawl,omitempty"`
  820. // ForceSendFields is a list of field names (e.g. "Crashed") to
  821. // unconditionally include in API requests. By default, fields with
  822. // empty values are omitted from API requests. However, any non-pointer,
  823. // non-interface field appearing in ForceSendFields will be sent to the
  824. // server regardless of whether the field is empty or not. This may be
  825. // used to include empty fields in Patch requests.
  826. ForceSendFields []string `json:"-"`
  827. // NullFields is a list of field names (e.g. "Crashed") to include in
  828. // API requests with the JSON null value. By default, fields with empty
  829. // values are omitted from API requests. However, any field with an
  830. // empty value appearing in NullFields will be sent to the server as
  831. // null. It is an error if a field in this list has a non-empty value.
  832. // This may be used to include null fields in Patch requests.
  833. NullFields []string `json:"-"`
  834. }
  835. func (s *FailureDetail) MarshalJSON() ([]byte, error) {
  836. type NoMethod FailureDetail
  837. raw := NoMethod(*s)
  838. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  839. }
  840. // FileReference: A reference to a file.
  841. type FileReference struct {
  842. // FileUri: The URI of a file stored in Google Cloud Storage.
  843. //
  844. // For example: http://storage.googleapis.com/mybucket/path/to/test.xml
  845. // or in gsutil format: gs://mybucket/path/to/test.xml with
  846. // version-specific info,
  847. // gs://mybucket/path/to/test.xml#1360383693690000
  848. //
  849. // An INVALID_ARGUMENT error will be returned if the URI format is not
  850. // supported.
  851. //
  852. // - In response: always set - In create/update request: always set
  853. FileUri string `json:"fileUri,omitempty"`
  854. // ForceSendFields is a list of field names (e.g. "FileUri") to
  855. // unconditionally include in API requests. By default, fields with
  856. // empty values are omitted from API requests. However, any non-pointer,
  857. // non-interface field appearing in ForceSendFields will be sent to the
  858. // server regardless of whether the field is empty or not. This may be
  859. // used to include empty fields in Patch requests.
  860. ForceSendFields []string `json:"-"`
  861. // NullFields is a list of field names (e.g. "FileUri") to include in
  862. // API requests with the JSON null value. By default, fields with empty
  863. // values are omitted from API requests. However, any field with an
  864. // empty value appearing in NullFields will be sent to the server as
  865. // null. It is an error if a field in this list has a non-empty value.
  866. // This may be used to include null fields in Patch requests.
  867. NullFields []string `json:"-"`
  868. }
  869. func (s *FileReference) MarshalJSON() ([]byte, error) {
  870. type NoMethod FileReference
  871. raw := NoMethod(*s)
  872. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  873. }
  874. // GraphicsStats: Graphics statistics for the App. The information is
  875. // collected from 'adb shell dumpsys graphicsstats'. For more info see:
  876. // https://developer.android.com/training/testing/performance.html
  877. // Statistics will only be present for API 23+.
  878. type GraphicsStats struct {
  879. // Buckets: Histogram of frame render times. There should be 154 buckets
  880. // ranging from [5ms, 6ms) to [4950ms, infinity)
  881. Buckets []*GraphicsStatsBucket `json:"buckets,omitempty"`
  882. // HighInputLatencyCount: Total "high input latency" events.
  883. HighInputLatencyCount int64 `json:"highInputLatencyCount,omitempty,string"`
  884. // JankyFrames: Total frames with slow render time. Should be <=
  885. // total_frames.
  886. JankyFrames int64 `json:"jankyFrames,omitempty,string"`
  887. // MissedVsyncCount: Total "missed vsync" events.
  888. MissedVsyncCount int64 `json:"missedVsyncCount,omitempty,string"`
  889. // P50Millis: 50th percentile frame render time in milliseconds.
  890. P50Millis int64 `json:"p50Millis,omitempty,string"`
  891. // P90Millis: 90th percentile frame render time in milliseconds.
  892. P90Millis int64 `json:"p90Millis,omitempty,string"`
  893. // P95Millis: 95th percentile frame render time in milliseconds.
  894. P95Millis int64 `json:"p95Millis,omitempty,string"`
  895. // P99Millis: 99th percentile frame render time in milliseconds.
  896. P99Millis int64 `json:"p99Millis,omitempty,string"`
  897. // SlowBitmapUploadCount: Total "slow bitmap upload" events.
  898. SlowBitmapUploadCount int64 `json:"slowBitmapUploadCount,omitempty,string"`
  899. // SlowDrawCount: Total "slow draw" events.
  900. SlowDrawCount int64 `json:"slowDrawCount,omitempty,string"`
  901. // SlowUiThreadCount: Total "slow UI thread" events.
  902. SlowUiThreadCount int64 `json:"slowUiThreadCount,omitempty,string"`
  903. // TotalFrames: Total frames rendered by package.
  904. TotalFrames int64 `json:"totalFrames,omitempty,string"`
  905. // ForceSendFields is a list of field names (e.g. "Buckets") to
  906. // unconditionally include in API requests. By default, fields with
  907. // empty values are omitted from API requests. However, any non-pointer,
  908. // non-interface field appearing in ForceSendFields will be sent to the
  909. // server regardless of whether the field is empty or not. This may be
  910. // used to include empty fields in Patch requests.
  911. ForceSendFields []string `json:"-"`
  912. // NullFields is a list of field names (e.g. "Buckets") to include in
  913. // API requests with the JSON null value. By default, fields with empty
  914. // values are omitted from API requests. However, any field with an
  915. // empty value appearing in NullFields will be sent to the server as
  916. // null. It is an error if a field in this list has a non-empty value.
  917. // This may be used to include null fields in Patch requests.
  918. NullFields []string `json:"-"`
  919. }
  920. func (s *GraphicsStats) MarshalJSON() ([]byte, error) {
  921. type NoMethod GraphicsStats
  922. raw := NoMethod(*s)
  923. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  924. }
  925. type GraphicsStatsBucket struct {
  926. // FrameCount: Number of frames in the bucket.
  927. FrameCount int64 `json:"frameCount,omitempty,string"`
  928. // RenderMillis: Lower bound of render time in milliseconds.
  929. RenderMillis int64 `json:"renderMillis,omitempty,string"`
  930. // ForceSendFields is a list of field names (e.g. "FrameCount") to
  931. // unconditionally include in API requests. By default, fields with
  932. // empty values are omitted from API requests. However, any non-pointer,
  933. // non-interface field appearing in ForceSendFields will be sent to the
  934. // server regardless of whether the field is empty or not. This may be
  935. // used to include empty fields in Patch requests.
  936. ForceSendFields []string `json:"-"`
  937. // NullFields is a list of field names (e.g. "FrameCount") to include in
  938. // API requests with the JSON null value. By default, fields with empty
  939. // values are omitted from API requests. However, any field with an
  940. // empty value appearing in NullFields will be sent to the server as
  941. // null. It is an error if a field in this list has a non-empty value.
  942. // This may be used to include null fields in Patch requests.
  943. NullFields []string `json:"-"`
  944. }
  945. func (s *GraphicsStatsBucket) MarshalJSON() ([]byte, error) {
  946. type NoMethod GraphicsStatsBucket
  947. raw := NoMethod(*s)
  948. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  949. }
  950. // History: A History represents a sorted list of Executions ordered by
  951. // the start_timestamp_millis field (descending). It can be used to
  952. // group all the Executions of a continuous build.
  953. //
  954. // Note that the ordering only operates on one-dimension. If a
  955. // repository has multiple branches, it means that multiple histories
  956. // will need to be used in order to order Executions per branch.
  957. type History struct {
  958. // DisplayName: A short human-readable (plain text) name to display in
  959. // the UI. Maximum of 100 characters.
  960. //
  961. // - In response: present if set during create. - In create request:
  962. // optional
  963. DisplayName string `json:"displayName,omitempty"`
  964. // HistoryId: A unique identifier within a project for this
  965. // History.
  966. //
  967. // Returns INVALID_ARGUMENT if this field is set or overwritten by the
  968. // caller.
  969. //
  970. // - In response always set - In create request: never set
  971. HistoryId string `json:"historyId,omitempty"`
  972. // Name: A name to uniquely identify a history within a project. Maximum
  973. // of 200 characters.
  974. //
  975. // - In response always set - In create request: always set
  976. Name string `json:"name,omitempty"`
  977. // ServerResponse contains the HTTP response code and headers from the
  978. // server.
  979. googleapi.ServerResponse `json:"-"`
  980. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  981. // unconditionally include in API requests. By default, fields with
  982. // empty values are omitted from API requests. However, any non-pointer,
  983. // non-interface field appearing in ForceSendFields will be sent to the
  984. // server regardless of whether the field is empty or not. This may be
  985. // used to include empty fields in Patch requests.
  986. ForceSendFields []string `json:"-"`
  987. // NullFields is a list of field names (e.g. "DisplayName") to include
  988. // in API requests with the JSON null value. By default, fields with
  989. // empty values are omitted from API requests. However, any field with
  990. // an empty value appearing in NullFields will be sent to the server as
  991. // null. It is an error if a field in this list has a non-empty value.
  992. // This may be used to include null fields in Patch requests.
  993. NullFields []string `json:"-"`
  994. }
  995. func (s *History) MarshalJSON() ([]byte, error) {
  996. type NoMethod History
  997. raw := NoMethod(*s)
  998. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  999. }
  1000. // Image: An image, with a link to the main image and a thumbnail.
  1001. type Image struct {
  1002. // Error: An error explaining why the thumbnail could not be rendered.
  1003. Error *Status `json:"error,omitempty"`
  1004. // SourceImage: A reference to the full-size, original image.
  1005. //
  1006. // This is the same as the tool_outputs entry for the image under its
  1007. // Step.
  1008. //
  1009. // Always set.
  1010. SourceImage *ToolOutputReference `json:"sourceImage,omitempty"`
  1011. // StepId: The step to which the image is attached.
  1012. //
  1013. // Always set.
  1014. StepId string `json:"stepId,omitempty"`
  1015. // Thumbnail: The thumbnail.
  1016. Thumbnail *Thumbnail `json:"thumbnail,omitempty"`
  1017. // ForceSendFields is a list of field names (e.g. "Error") to
  1018. // unconditionally include in API requests. By default, fields with
  1019. // empty values are omitted from API requests. However, any non-pointer,
  1020. // non-interface field appearing in ForceSendFields will be sent to the
  1021. // server regardless of whether the field is empty or not. This may be
  1022. // used to include empty fields in Patch requests.
  1023. ForceSendFields []string `json:"-"`
  1024. // NullFields is a list of field names (e.g. "Error") to include in API
  1025. // requests with the JSON null value. By default, fields with empty
  1026. // values are omitted from API requests. However, any field with an
  1027. // empty value appearing in NullFields will be sent to the server as
  1028. // null. It is an error if a field in this list has a non-empty value.
  1029. // This may be used to include null fields in Patch requests.
  1030. NullFields []string `json:"-"`
  1031. }
  1032. func (s *Image) MarshalJSON() ([]byte, error) {
  1033. type NoMethod Image
  1034. raw := NoMethod(*s)
  1035. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1036. }
  1037. type InconclusiveDetail struct {
  1038. // AbortedByUser: If the end user aborted the test execution before a
  1039. // pass or fail could be determined. For example, the user pressed
  1040. // ctrl-c which sent a kill signal to the test runner while the test was
  1041. // running.
  1042. AbortedByUser bool `json:"abortedByUser,omitempty"`
  1043. // InfrastructureFailure: If the test runner could not determine success
  1044. // or failure because the test depends on a component other than the
  1045. // system under test which failed.
  1046. //
  1047. // For example, a mobile test requires provisioning a device where the
  1048. // test executes, and that provisioning can fail.
  1049. InfrastructureFailure bool `json:"infrastructureFailure,omitempty"`
  1050. // ForceSendFields is a list of field names (e.g. "AbortedByUser") to
  1051. // unconditionally include in API requests. By default, fields with
  1052. // empty values are omitted from API requests. However, any non-pointer,
  1053. // non-interface field appearing in ForceSendFields will be sent to the
  1054. // server regardless of whether the field is empty or not. This may be
  1055. // used to include empty fields in Patch requests.
  1056. ForceSendFields []string `json:"-"`
  1057. // NullFields is a list of field names (e.g. "AbortedByUser") to include
  1058. // in API requests with the JSON null value. By default, fields with
  1059. // empty values are omitted from API requests. However, any field with
  1060. // an empty value appearing in NullFields will be sent to the server as
  1061. // null. It is an error if a field in this list has a non-empty value.
  1062. // This may be used to include null fields in Patch requests.
  1063. NullFields []string `json:"-"`
  1064. }
  1065. func (s *InconclusiveDetail) MarshalJSON() ([]byte, error) {
  1066. type NoMethod InconclusiveDetail
  1067. raw := NoMethod(*s)
  1068. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1069. }
  1070. // IndividualOutcome: Step Id and outcome of each individual step that
  1071. // was run as a group with other steps with the same configuration.
  1072. type IndividualOutcome struct {
  1073. // Possible values:
  1074. // "failure"
  1075. // "flaky"
  1076. // "inconclusive"
  1077. // "skipped"
  1078. // "success"
  1079. // "unset"
  1080. OutcomeSummary string `json:"outcomeSummary,omitempty"`
  1081. StepId string `json:"stepId,omitempty"`
  1082. // ForceSendFields is a list of field names (e.g. "OutcomeSummary") to
  1083. // unconditionally include in API requests. By default, fields with
  1084. // empty values are omitted from API requests. However, any non-pointer,
  1085. // non-interface field appearing in ForceSendFields will be sent to the
  1086. // server regardless of whether the field is empty or not. This may be
  1087. // used to include empty fields in Patch requests.
  1088. ForceSendFields []string `json:"-"`
  1089. // NullFields is a list of field names (e.g. "OutcomeSummary") to
  1090. // include in API requests with the JSON null value. By default, fields
  1091. // with empty values are omitted from API requests. However, any field
  1092. // with an empty value appearing in NullFields will be sent to the
  1093. // server as null. It is an error if a field in this list has a
  1094. // non-empty value. This may be used to include null fields in Patch
  1095. // requests.
  1096. NullFields []string `json:"-"`
  1097. }
  1098. func (s *IndividualOutcome) MarshalJSON() ([]byte, error) {
  1099. type NoMethod IndividualOutcome
  1100. raw := NoMethod(*s)
  1101. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1102. }
  1103. type ListExecutionsResponse struct {
  1104. // Executions: Executions.
  1105. //
  1106. // Always set.
  1107. Executions []*Execution `json:"executions,omitempty"`
  1108. // NextPageToken: A continuation token to resume the query at the next
  1109. // item.
  1110. //
  1111. // Will only be set if there are more Executions to fetch.
  1112. NextPageToken string `json:"nextPageToken,omitempty"`
  1113. // ServerResponse contains the HTTP response code and headers from the
  1114. // server.
  1115. googleapi.ServerResponse `json:"-"`
  1116. // ForceSendFields is a list of field names (e.g. "Executions") to
  1117. // unconditionally include in API requests. By default, fields with
  1118. // empty values are omitted from API requests. However, any non-pointer,
  1119. // non-interface field appearing in ForceSendFields will be sent to the
  1120. // server regardless of whether the field is empty or not. This may be
  1121. // used to include empty fields in Patch requests.
  1122. ForceSendFields []string `json:"-"`
  1123. // NullFields is a list of field names (e.g. "Executions") to include in
  1124. // API requests with the JSON null value. By default, fields with empty
  1125. // values are omitted from API requests. However, any field with an
  1126. // empty value appearing in NullFields will be sent to the server as
  1127. // null. It is an error if a field in this list has a non-empty value.
  1128. // This may be used to include null fields in Patch requests.
  1129. NullFields []string `json:"-"`
  1130. }
  1131. func (s *ListExecutionsResponse) MarshalJSON() ([]byte, error) {
  1132. type NoMethod ListExecutionsResponse
  1133. raw := NoMethod(*s)
  1134. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1135. }
  1136. // ListHistoriesResponse: Response message for HistoryService.List
  1137. type ListHistoriesResponse struct {
  1138. // Histories: Histories.
  1139. Histories []*History `json:"histories,omitempty"`
  1140. // NextPageToken: A continuation token to resume the query at the next
  1141. // item.
  1142. //
  1143. // Will only be set if there are more histories to fetch.
  1144. //
  1145. // Tokens are valid for up to one hour from the time of the first list
  1146. // request. For instance, if you make a list request at 1PM and use the
  1147. // token from this first request 10 minutes later, the token from this
  1148. // second response will only be valid for 50 minutes.
  1149. NextPageToken string `json:"nextPageToken,omitempty"`
  1150. // ServerResponse contains the HTTP response code and headers from the
  1151. // server.
  1152. googleapi.ServerResponse `json:"-"`
  1153. // ForceSendFields is a list of field names (e.g. "Histories") to
  1154. // unconditionally include in API requests. By default, fields with
  1155. // empty values are omitted from API requests. However, any non-pointer,
  1156. // non-interface field appearing in ForceSendFields will be sent to the
  1157. // server regardless of whether the field is empty or not. This may be
  1158. // used to include empty fields in Patch requests.
  1159. ForceSendFields []string `json:"-"`
  1160. // NullFields is a list of field names (e.g. "Histories") to include in
  1161. // API requests with the JSON null value. By default, fields with empty
  1162. // values are omitted from API requests. However, any field with an
  1163. // empty value appearing in NullFields will be sent to the server as
  1164. // null. It is an error if a field in this list has a non-empty value.
  1165. // This may be used to include null fields in Patch requests.
  1166. NullFields []string `json:"-"`
  1167. }
  1168. func (s *ListHistoriesResponse) MarshalJSON() ([]byte, error) {
  1169. type NoMethod ListHistoriesResponse
  1170. raw := NoMethod(*s)
  1171. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1172. }
  1173. type ListPerfSampleSeriesResponse struct {
  1174. // PerfSampleSeries: The resulting PerfSampleSeries sorted by id
  1175. PerfSampleSeries []*PerfSampleSeries `json:"perfSampleSeries,omitempty"`
  1176. // ServerResponse contains the HTTP response code and headers from the
  1177. // server.
  1178. googleapi.ServerResponse `json:"-"`
  1179. // ForceSendFields is a list of field names (e.g. "PerfSampleSeries") to
  1180. // unconditionally include in API requests. By default, fields with
  1181. // empty values are omitted from API requests. However, any non-pointer,
  1182. // non-interface field appearing in ForceSendFields will be sent to the
  1183. // server regardless of whether the field is empty or not. This may be
  1184. // used to include empty fields in Patch requests.
  1185. ForceSendFields []string `json:"-"`
  1186. // NullFields is a list of field names (e.g. "PerfSampleSeries") to
  1187. // include in API requests with the JSON null value. By default, fields
  1188. // with empty values are omitted from API requests. However, any field
  1189. // with an empty value appearing in NullFields will be sent to the
  1190. // server as null. It is an error if a field in this list has a
  1191. // non-empty value. This may be used to include null fields in Patch
  1192. // requests.
  1193. NullFields []string `json:"-"`
  1194. }
  1195. func (s *ListPerfSampleSeriesResponse) MarshalJSON() ([]byte, error) {
  1196. type NoMethod ListPerfSampleSeriesResponse
  1197. raw := NoMethod(*s)
  1198. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1199. }
  1200. type ListPerfSamplesResponse struct {
  1201. // NextPageToken: Optional, returned if result size exceeds the page
  1202. // size specified in the request (or the default page size, 500, if
  1203. // unspecified). It indicates the last sample timestamp to be used as
  1204. // page_token in subsequent request
  1205. NextPageToken string `json:"nextPageToken,omitempty"`
  1206. PerfSamples []*PerfSample `json:"perfSamples,omitempty"`
  1207. // ServerResponse contains the HTTP response code and headers from the
  1208. // server.
  1209. googleapi.ServerResponse `json:"-"`
  1210. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1211. // unconditionally include in API requests. By default, fields with
  1212. // empty values are omitted from API requests. However, any non-pointer,
  1213. // non-interface field appearing in ForceSendFields will be sent to the
  1214. // server regardless of whether the field is empty or not. This may be
  1215. // used to include empty fields in Patch requests.
  1216. ForceSendFields []string `json:"-"`
  1217. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1218. // in API requests with the JSON null value. By default, fields with
  1219. // empty values are omitted from API requests. However, any field with
  1220. // an empty value appearing in NullFields will be sent to the server as
  1221. // null. It is an error if a field in this list has a non-empty value.
  1222. // This may be used to include null fields in Patch requests.
  1223. NullFields []string `json:"-"`
  1224. }
  1225. func (s *ListPerfSamplesResponse) MarshalJSON() ([]byte, error) {
  1226. type NoMethod ListPerfSamplesResponse
  1227. raw := NoMethod(*s)
  1228. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1229. }
  1230. type ListScreenshotClustersResponse struct {
  1231. // Clusters: The set of clusters associated with an execution Always set
  1232. Clusters []*ScreenshotCluster `json:"clusters,omitempty"`
  1233. // ServerResponse contains the HTTP response code and headers from the
  1234. // server.
  1235. googleapi.ServerResponse `json:"-"`
  1236. // ForceSendFields is a list of field names (e.g. "Clusters") to
  1237. // unconditionally include in API requests. By default, fields with
  1238. // empty values are omitted from API requests. However, any non-pointer,
  1239. // non-interface field appearing in ForceSendFields will be sent to the
  1240. // server regardless of whether the field is empty or not. This may be
  1241. // used to include empty fields in Patch requests.
  1242. ForceSendFields []string `json:"-"`
  1243. // NullFields is a list of field names (e.g. "Clusters") to include in
  1244. // API requests with the JSON null value. By default, fields with empty
  1245. // values are omitted from API requests. However, any field with an
  1246. // empty value appearing in NullFields will be sent to the server as
  1247. // null. It is an error if a field in this list has a non-empty value.
  1248. // This may be used to include null fields in Patch requests.
  1249. NullFields []string `json:"-"`
  1250. }
  1251. func (s *ListScreenshotClustersResponse) MarshalJSON() ([]byte, error) {
  1252. type NoMethod ListScreenshotClustersResponse
  1253. raw := NoMethod(*s)
  1254. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1255. }
  1256. // ListStepThumbnailsResponse: A response containing the thumbnails in a
  1257. // step.
  1258. type ListStepThumbnailsResponse struct {
  1259. // NextPageToken: A continuation token to resume the query at the next
  1260. // item.
  1261. //
  1262. // If set, indicates that there are more thumbnails to read, by calling
  1263. // list again with this value in the page_token field.
  1264. NextPageToken string `json:"nextPageToken,omitempty"`
  1265. // Thumbnails: A list of image data.
  1266. //
  1267. // Images are returned in a deterministic order; they are ordered by
  1268. // these factors, in order of importance: * First, by their associated
  1269. // test case. Images without a test case are considered greater than
  1270. // images with one. * Second, by their creation time. Images without a
  1271. // creation time are greater than images with one. * Third, by the order
  1272. // in which they were added to the step (by calls to CreateStep or
  1273. // UpdateStep).
  1274. Thumbnails []*Image `json:"thumbnails,omitempty"`
  1275. // ServerResponse contains the HTTP response code and headers from the
  1276. // server.
  1277. googleapi.ServerResponse `json:"-"`
  1278. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1279. // unconditionally include in API requests. By default, fields with
  1280. // empty values are omitted from API requests. However, any non-pointer,
  1281. // non-interface field appearing in ForceSendFields will be sent to the
  1282. // server regardless of whether the field is empty or not. This may be
  1283. // used to include empty fields in Patch requests.
  1284. ForceSendFields []string `json:"-"`
  1285. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1286. // in API requests with the JSON null value. By default, fields with
  1287. // empty values are omitted from API requests. However, any field with
  1288. // an empty value appearing in NullFields will be sent to the server as
  1289. // null. It is an error if a field in this list has a non-empty value.
  1290. // This may be used to include null fields in Patch requests.
  1291. NullFields []string `json:"-"`
  1292. }
  1293. func (s *ListStepThumbnailsResponse) MarshalJSON() ([]byte, error) {
  1294. type NoMethod ListStepThumbnailsResponse
  1295. raw := NoMethod(*s)
  1296. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1297. }
  1298. // ListStepsResponse: Response message for StepService.List.
  1299. type ListStepsResponse struct {
  1300. // NextPageToken: A continuation token to resume the query at the next
  1301. // item.
  1302. //
  1303. // If set, indicates that there are more steps to read, by calling list
  1304. // again with this value in the page_token field.
  1305. NextPageToken string `json:"nextPageToken,omitempty"`
  1306. // Steps: Steps.
  1307. Steps []*Step `json:"steps,omitempty"`
  1308. // ServerResponse contains the HTTP response code and headers from the
  1309. // server.
  1310. googleapi.ServerResponse `json:"-"`
  1311. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1312. // unconditionally include in API requests. By default, fields with
  1313. // empty values are omitted from API requests. However, any non-pointer,
  1314. // non-interface field appearing in ForceSendFields will be sent to the
  1315. // server regardless of whether the field is empty or not. This may be
  1316. // used to include empty fields in Patch requests.
  1317. ForceSendFields []string `json:"-"`
  1318. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1319. // in API requests with the JSON null value. By default, fields with
  1320. // empty values are omitted from API requests. However, any field with
  1321. // an empty value appearing in NullFields will be sent to the server as
  1322. // null. It is an error if a field in this list has a non-empty value.
  1323. // This may be used to include null fields in Patch requests.
  1324. NullFields []string `json:"-"`
  1325. }
  1326. func (s *ListStepsResponse) MarshalJSON() ([]byte, error) {
  1327. type NoMethod ListStepsResponse
  1328. raw := NoMethod(*s)
  1329. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1330. }
  1331. type MemoryInfo struct {
  1332. // MemoryCapInKibibyte: Maximum memory that can be allocated to the
  1333. // process in KiB
  1334. MemoryCapInKibibyte int64 `json:"memoryCapInKibibyte,omitempty,string"`
  1335. // MemoryTotalInKibibyte: Total memory available on the device in KiB
  1336. MemoryTotalInKibibyte int64 `json:"memoryTotalInKibibyte,omitempty,string"`
  1337. // ForceSendFields is a list of field names (e.g. "MemoryCapInKibibyte")
  1338. // to unconditionally include in API requests. By default, fields with
  1339. // empty values are omitted from API requests. However, any non-pointer,
  1340. // non-interface field appearing in ForceSendFields will be sent to the
  1341. // server regardless of whether the field is empty or not. This may be
  1342. // used to include empty fields in Patch requests.
  1343. ForceSendFields []string `json:"-"`
  1344. // NullFields is a list of field names (e.g. "MemoryCapInKibibyte") to
  1345. // include in API requests with the JSON null value. By default, fields
  1346. // with empty values are omitted from API requests. However, any field
  1347. // with an empty value appearing in NullFields will be sent to the
  1348. // server as null. It is an error if a field in this list has a
  1349. // non-empty value. This may be used to include null fields in Patch
  1350. // requests.
  1351. NullFields []string `json:"-"`
  1352. }
  1353. func (s *MemoryInfo) MarshalJSON() ([]byte, error) {
  1354. type NoMethod MemoryInfo
  1355. raw := NoMethod(*s)
  1356. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1357. }
  1358. // MultiStep: Details when multiple steps are run with the same
  1359. // configuration as a group.
  1360. type MultiStep struct {
  1361. // MultistepNumber: Unique int given to each step. Ranges from
  1362. // 0(inclusive) to total number of steps(exclusive). The primary step is
  1363. // 0.
  1364. MultistepNumber int64 `json:"multistepNumber,omitempty"`
  1365. // PrimaryStep: Present if it is a primary (original) step.
  1366. PrimaryStep *PrimaryStep `json:"primaryStep,omitempty"`
  1367. // PrimaryStepId: Step Id of the primary (original) step, which might be
  1368. // this step.
  1369. PrimaryStepId string `json:"primaryStepId,omitempty"`
  1370. // ForceSendFields is a list of field names (e.g. "MultistepNumber") to
  1371. // unconditionally include in API requests. By default, fields with
  1372. // empty values are omitted from API requests. However, any non-pointer,
  1373. // non-interface field appearing in ForceSendFields will be sent to the
  1374. // server regardless of whether the field is empty or not. This may be
  1375. // used to include empty fields in Patch requests.
  1376. ForceSendFields []string `json:"-"`
  1377. // NullFields is a list of field names (e.g. "MultistepNumber") to
  1378. // include in API requests with the JSON null value. By default, fields
  1379. // with empty values are omitted from API requests. However, any field
  1380. // with an empty value appearing in NullFields will be sent to the
  1381. // server as null. It is an error if a field in this list has a
  1382. // non-empty value. This may be used to include null fields in Patch
  1383. // requests.
  1384. NullFields []string `json:"-"`
  1385. }
  1386. func (s *MultiStep) MarshalJSON() ([]byte, error) {
  1387. type NoMethod MultiStep
  1388. raw := NoMethod(*s)
  1389. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1390. }
  1391. // Outcome: Interprets a result so that humans and machines can act on
  1392. // it.
  1393. type Outcome struct {
  1394. // FailureDetail: More information about a FAILURE outcome.
  1395. //
  1396. // Returns INVALID_ARGUMENT if this field is set but the summary is not
  1397. // FAILURE.
  1398. //
  1399. // Optional
  1400. FailureDetail *FailureDetail `json:"failureDetail,omitempty"`
  1401. // InconclusiveDetail: More information about an INCONCLUSIVE
  1402. // outcome.
  1403. //
  1404. // Returns INVALID_ARGUMENT if this field is set but the summary is not
  1405. // INCONCLUSIVE.
  1406. //
  1407. // Optional
  1408. InconclusiveDetail *InconclusiveDetail `json:"inconclusiveDetail,omitempty"`
  1409. // SkippedDetail: More information about a SKIPPED outcome.
  1410. //
  1411. // Returns INVALID_ARGUMENT if this field is set but the summary is not
  1412. // SKIPPED.
  1413. //
  1414. // Optional
  1415. SkippedDetail *SkippedDetail `json:"skippedDetail,omitempty"`
  1416. // SuccessDetail: More information about a SUCCESS outcome.
  1417. //
  1418. // Returns INVALID_ARGUMENT if this field is set but the summary is not
  1419. // SUCCESS.
  1420. //
  1421. // Optional
  1422. SuccessDetail *SuccessDetail `json:"successDetail,omitempty"`
  1423. // Summary: The simplest way to interpret a result.
  1424. //
  1425. // Required
  1426. //
  1427. // Possible values:
  1428. // "failure"
  1429. // "flaky"
  1430. // "inconclusive"
  1431. // "skipped"
  1432. // "success"
  1433. // "unset"
  1434. Summary string `json:"summary,omitempty"`
  1435. // ForceSendFields is a list of field names (e.g. "FailureDetail") to
  1436. // unconditionally include in API requests. By default, fields with
  1437. // empty values are omitted from API requests. However, any non-pointer,
  1438. // non-interface field appearing in ForceSendFields will be sent to the
  1439. // server regardless of whether the field is empty or not. This may be
  1440. // used to include empty fields in Patch requests.
  1441. ForceSendFields []string `json:"-"`
  1442. // NullFields is a list of field names (e.g. "FailureDetail") to include
  1443. // in API requests with the JSON null value. By default, fields with
  1444. // empty values are omitted from API requests. However, any field with
  1445. // an empty value appearing in NullFields will be sent to the server as
  1446. // null. It is an error if a field in this list has a non-empty value.
  1447. // This may be used to include null fields in Patch requests.
  1448. NullFields []string `json:"-"`
  1449. }
  1450. func (s *Outcome) MarshalJSON() ([]byte, error) {
  1451. type NoMethod Outcome
  1452. raw := NoMethod(*s)
  1453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1454. }
  1455. // PerfEnvironment: Encapsulates performance environment info
  1456. type PerfEnvironment struct {
  1457. // CpuInfo: CPU related environment info
  1458. CpuInfo *CPUInfo `json:"cpuInfo,omitempty"`
  1459. // MemoryInfo: Memory related environment info
  1460. MemoryInfo *MemoryInfo `json:"memoryInfo,omitempty"`
  1461. // ForceSendFields is a list of field names (e.g. "CpuInfo") to
  1462. // unconditionally include in API requests. By default, fields with
  1463. // empty values are omitted from API requests. However, any non-pointer,
  1464. // non-interface field appearing in ForceSendFields will be sent to the
  1465. // server regardless of whether the field is empty or not. This may be
  1466. // used to include empty fields in Patch requests.
  1467. ForceSendFields []string `json:"-"`
  1468. // NullFields is a list of field names (e.g. "CpuInfo") to include in
  1469. // API requests with the JSON null value. By default, fields with empty
  1470. // values are omitted from API requests. However, any field with an
  1471. // empty value appearing in NullFields will be sent to the server as
  1472. // null. It is an error if a field in this list has a non-empty value.
  1473. // This may be used to include null fields in Patch requests.
  1474. NullFields []string `json:"-"`
  1475. }
  1476. func (s *PerfEnvironment) MarshalJSON() ([]byte, error) {
  1477. type NoMethod PerfEnvironment
  1478. raw := NoMethod(*s)
  1479. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1480. }
  1481. // PerfMetricsSummary: A summary of perf metrics collected and
  1482. // performance environment info
  1483. type PerfMetricsSummary struct {
  1484. AppStartTime *AppStartTime `json:"appStartTime,omitempty"`
  1485. // ExecutionId: A tool results execution ID.
  1486. ExecutionId string `json:"executionId,omitempty"`
  1487. // GraphicsStats: Graphics statistics for the entire run. Statistics are
  1488. // reset at the beginning of the run and collected at the end of the
  1489. // run.
  1490. GraphicsStats *GraphicsStats `json:"graphicsStats,omitempty"`
  1491. // HistoryId: A tool results history ID.
  1492. HistoryId string `json:"historyId,omitempty"`
  1493. // PerfEnvironment: Describes the environment in which the performance
  1494. // metrics were collected
  1495. PerfEnvironment *PerfEnvironment `json:"perfEnvironment,omitempty"`
  1496. // PerfMetrics: Set of resource collected
  1497. //
  1498. // Possible values:
  1499. // "cpu"
  1500. // "graphics"
  1501. // "memory"
  1502. // "network"
  1503. // "perfMetricTypeUnspecified"
  1504. PerfMetrics []string `json:"perfMetrics,omitempty"`
  1505. // ProjectId: The cloud project
  1506. ProjectId string `json:"projectId,omitempty"`
  1507. // StepId: A tool results step ID.
  1508. StepId string `json:"stepId,omitempty"`
  1509. // ServerResponse contains the HTTP response code and headers from the
  1510. // server.
  1511. googleapi.ServerResponse `json:"-"`
  1512. // ForceSendFields is a list of field names (e.g. "AppStartTime") to
  1513. // unconditionally include in API requests. By default, fields with
  1514. // empty values are omitted from API requests. However, any non-pointer,
  1515. // non-interface field appearing in ForceSendFields will be sent to the
  1516. // server regardless of whether the field is empty or not. This may be
  1517. // used to include empty fields in Patch requests.
  1518. ForceSendFields []string `json:"-"`
  1519. // NullFields is a list of field names (e.g. "AppStartTime") to include
  1520. // in API requests with the JSON null value. By default, fields with
  1521. // empty values are omitted from API requests. However, any field with
  1522. // an empty value appearing in NullFields will be sent to the server as
  1523. // null. It is an error if a field in this list has a non-empty value.
  1524. // This may be used to include null fields in Patch requests.
  1525. NullFields []string `json:"-"`
  1526. }
  1527. func (s *PerfMetricsSummary) MarshalJSON() ([]byte, error) {
  1528. type NoMethod PerfMetricsSummary
  1529. raw := NoMethod(*s)
  1530. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1531. }
  1532. // PerfSample: Resource representing a single performance measure or
  1533. // data point
  1534. type PerfSample struct {
  1535. // SampleTime: Timestamp of collection
  1536. SampleTime *Timestamp `json:"sampleTime,omitempty"`
  1537. // Value: Value observed
  1538. Value float64 `json:"value,omitempty"`
  1539. // ForceSendFields is a list of field names (e.g. "SampleTime") to
  1540. // unconditionally include in API requests. By default, fields with
  1541. // empty values are omitted from API requests. However, any non-pointer,
  1542. // non-interface field appearing in ForceSendFields will be sent to the
  1543. // server regardless of whether the field is empty or not. This may be
  1544. // used to include empty fields in Patch requests.
  1545. ForceSendFields []string `json:"-"`
  1546. // NullFields is a list of field names (e.g. "SampleTime") to include in
  1547. // API requests with the JSON null value. By default, fields with empty
  1548. // values are omitted from API requests. However, any field with an
  1549. // empty value appearing in NullFields will be sent to the server as
  1550. // null. It is an error if a field in this list has a non-empty value.
  1551. // This may be used to include null fields in Patch requests.
  1552. NullFields []string `json:"-"`
  1553. }
  1554. func (s *PerfSample) MarshalJSON() ([]byte, error) {
  1555. type NoMethod PerfSample
  1556. raw := NoMethod(*s)
  1557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1558. }
  1559. func (s *PerfSample) UnmarshalJSON(data []byte) error {
  1560. type NoMethod PerfSample
  1561. var s1 struct {
  1562. Value gensupport.JSONFloat64 `json:"value"`
  1563. *NoMethod
  1564. }
  1565. s1.NoMethod = (*NoMethod)(s)
  1566. if err := json.Unmarshal(data, &s1); err != nil {
  1567. return err
  1568. }
  1569. s.Value = float64(s1.Value)
  1570. return nil
  1571. }
  1572. // PerfSampleSeries: Resource representing a collection of performance
  1573. // samples (or data points)
  1574. type PerfSampleSeries struct {
  1575. // BasicPerfSampleSeries: Basic series represented by a line chart
  1576. BasicPerfSampleSeries *BasicPerfSampleSeries `json:"basicPerfSampleSeries,omitempty"`
  1577. // ExecutionId: A tool results execution ID.
  1578. ExecutionId string `json:"executionId,omitempty"`
  1579. // HistoryId: A tool results history ID.
  1580. HistoryId string `json:"historyId,omitempty"`
  1581. // ProjectId: The cloud project
  1582. ProjectId string `json:"projectId,omitempty"`
  1583. // SampleSeriesId: A sample series id
  1584. SampleSeriesId string `json:"sampleSeriesId,omitempty"`
  1585. // StepId: A tool results step ID.
  1586. StepId string `json:"stepId,omitempty"`
  1587. // ServerResponse contains the HTTP response code and headers from the
  1588. // server.
  1589. googleapi.ServerResponse `json:"-"`
  1590. // ForceSendFields is a list of field names (e.g.
  1591. // "BasicPerfSampleSeries") to unconditionally include in API requests.
  1592. // By default, fields with empty values are omitted from API requests.
  1593. // However, any non-pointer, non-interface field appearing in
  1594. // ForceSendFields will be sent to the server regardless of whether the
  1595. // field is empty or not. This may be used to include empty fields in
  1596. // Patch requests.
  1597. ForceSendFields []string `json:"-"`
  1598. // NullFields is a list of field names (e.g. "BasicPerfSampleSeries") to
  1599. // include in API requests with the JSON null value. By default, fields
  1600. // with empty values are omitted from API requests. However, any field
  1601. // with an empty value appearing in NullFields will be sent to the
  1602. // server as null. It is an error if a field in this list has a
  1603. // non-empty value. This may be used to include null fields in Patch
  1604. // requests.
  1605. NullFields []string `json:"-"`
  1606. }
  1607. func (s *PerfSampleSeries) MarshalJSON() ([]byte, error) {
  1608. type NoMethod PerfSampleSeries
  1609. raw := NoMethod(*s)
  1610. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1611. }
  1612. // PrimaryStep: Stores rollup test status of multiple steps that were
  1613. // run as a group and outcome of each individual step.
  1614. type PrimaryStep struct {
  1615. // IndividualOutcome: Step Id and outcome of each individual step.
  1616. IndividualOutcome []*IndividualOutcome `json:"individualOutcome,omitempty"`
  1617. // RollUp: Rollup test status of multiple steps that were run with the
  1618. // same configuration as a group.
  1619. //
  1620. // Possible values:
  1621. // "failure"
  1622. // "flaky"
  1623. // "inconclusive"
  1624. // "skipped"
  1625. // "success"
  1626. // "unset"
  1627. RollUp string `json:"rollUp,omitempty"`
  1628. // ForceSendFields is a list of field names (e.g. "IndividualOutcome")
  1629. // to unconditionally include in API requests. By default, fields with
  1630. // empty values are omitted from API requests. However, any non-pointer,
  1631. // non-interface field appearing in ForceSendFields will be sent to the
  1632. // server regardless of whether the field is empty or not. This may be
  1633. // used to include empty fields in Patch requests.
  1634. ForceSendFields []string `json:"-"`
  1635. // NullFields is a list of field names (e.g. "IndividualOutcome") to
  1636. // include in API requests with the JSON null value. By default, fields
  1637. // with empty values are omitted from API requests. However, any field
  1638. // with an empty value appearing in NullFields will be sent to the
  1639. // server as null. It is an error if a field in this list has a
  1640. // non-empty value. This may be used to include null fields in Patch
  1641. // requests.
  1642. NullFields []string `json:"-"`
  1643. }
  1644. func (s *PrimaryStep) MarshalJSON() ([]byte, error) {
  1645. type NoMethod PrimaryStep
  1646. raw := NoMethod(*s)
  1647. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1648. }
  1649. // ProjectSettings: Per-project settings for the Tool Results service.
  1650. type ProjectSettings struct {
  1651. // DefaultBucket: The name of the Google Cloud Storage bucket to which
  1652. // results are written.
  1653. //
  1654. // By default, this is unset.
  1655. //
  1656. // In update request: optional In response: optional
  1657. DefaultBucket string `json:"defaultBucket,omitempty"`
  1658. // Name: The name of the project's settings.
  1659. //
  1660. // Always of the form: projects/{project-id}/settings
  1661. //
  1662. // In update request: never set In response: always set
  1663. Name string `json:"name,omitempty"`
  1664. // ServerResponse contains the HTTP response code and headers from the
  1665. // server.
  1666. googleapi.ServerResponse `json:"-"`
  1667. // ForceSendFields is a list of field names (e.g. "DefaultBucket") to
  1668. // unconditionally include in API requests. By default, fields with
  1669. // empty values are omitted from API requests. However, any non-pointer,
  1670. // non-interface field appearing in ForceSendFields will be sent to the
  1671. // server regardless of whether the field is empty or not. This may be
  1672. // used to include empty fields in Patch requests.
  1673. ForceSendFields []string `json:"-"`
  1674. // NullFields is a list of field names (e.g. "DefaultBucket") to include
  1675. // in API requests with the JSON null value. By default, fields with
  1676. // empty values are omitted from API requests. However, any field with
  1677. // an empty value appearing in NullFields will be sent to the server as
  1678. // null. It is an error if a field in this list has a non-empty value.
  1679. // This may be used to include null fields in Patch requests.
  1680. NullFields []string `json:"-"`
  1681. }
  1682. func (s *ProjectSettings) MarshalJSON() ([]byte, error) {
  1683. type NoMethod ProjectSettings
  1684. raw := NoMethod(*s)
  1685. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1686. }
  1687. // PublishXunitXmlFilesRequest: Request message for
  1688. // StepService.PublishXunitXmlFiles.
  1689. type PublishXunitXmlFilesRequest struct {
  1690. // XunitXmlFiles: URI of the Xunit XML files to publish.
  1691. //
  1692. // The maximum size of the file this reference is pointing to is
  1693. // 50MB.
  1694. //
  1695. // Required.
  1696. XunitXmlFiles []*FileReference `json:"xunitXmlFiles,omitempty"`
  1697. // ForceSendFields is a list of field names (e.g. "XunitXmlFiles") to
  1698. // unconditionally include in API requests. By default, fields with
  1699. // empty values are omitted from API requests. However, any non-pointer,
  1700. // non-interface field appearing in ForceSendFields will be sent to the
  1701. // server regardless of whether the field is empty or not. This may be
  1702. // used to include empty fields in Patch requests.
  1703. ForceSendFields []string `json:"-"`
  1704. // NullFields is a list of field names (e.g. "XunitXmlFiles") to include
  1705. // in API requests with the JSON null value. By default, fields with
  1706. // empty values are omitted from API requests. However, any field with
  1707. // an empty value appearing in NullFields will be sent to the server as
  1708. // null. It is an error if a field in this list has a non-empty value.
  1709. // This may be used to include null fields in Patch requests.
  1710. NullFields []string `json:"-"`
  1711. }
  1712. func (s *PublishXunitXmlFilesRequest) MarshalJSON() ([]byte, error) {
  1713. type NoMethod PublishXunitXmlFilesRequest
  1714. raw := NoMethod(*s)
  1715. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1716. }
  1717. type Screen struct {
  1718. // FileReference: File reference of the png file. Required.
  1719. FileReference string `json:"fileReference,omitempty"`
  1720. // Locale: Locale of the device that the screenshot was taken on.
  1721. // Required.
  1722. Locale string `json:"locale,omitempty"`
  1723. // Model: Model of the device that the screenshot was taken on.
  1724. // Required.
  1725. Model string `json:"model,omitempty"`
  1726. // Version: OS version of the device that the screenshot was taken on.
  1727. // Required.
  1728. Version string `json:"version,omitempty"`
  1729. // ForceSendFields is a list of field names (e.g. "FileReference") to
  1730. // unconditionally include in API requests. By default, fields with
  1731. // empty values are omitted from API requests. However, any non-pointer,
  1732. // non-interface field appearing in ForceSendFields will be sent to the
  1733. // server regardless of whether the field is empty or not. This may be
  1734. // used to include empty fields in Patch requests.
  1735. ForceSendFields []string `json:"-"`
  1736. // NullFields is a list of field names (e.g. "FileReference") to include
  1737. // in API requests with the JSON null value. By default, fields with
  1738. // empty values are omitted from API requests. However, any field with
  1739. // an empty value appearing in NullFields will be sent to the server as
  1740. // null. It is an error if a field in this list has a non-empty value.
  1741. // This may be used to include null fields in Patch requests.
  1742. NullFields []string `json:"-"`
  1743. }
  1744. func (s *Screen) MarshalJSON() ([]byte, error) {
  1745. type NoMethod Screen
  1746. raw := NoMethod(*s)
  1747. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1748. }
  1749. type ScreenshotCluster struct {
  1750. // Activity: A string that describes the activity of every screen in the
  1751. // cluster.
  1752. Activity string `json:"activity,omitempty"`
  1753. // ClusterId: A unique identifier for the cluster.
  1754. ClusterId string `json:"clusterId,omitempty"`
  1755. // KeyScreen: A singular screen that represents the cluster as a whole.
  1756. // This screen will act as the "cover" of the entire cluster. When users
  1757. // look at the clusters, only the key screen from each cluster will be
  1758. // shown. Which screen is the key screen is determined by the
  1759. // ClusteringAlgorithm
  1760. KeyScreen *Screen `json:"keyScreen,omitempty"`
  1761. // Screens: Full list of screens.
  1762. Screens []*Screen `json:"screens,omitempty"`
  1763. // ServerResponse contains the HTTP response code and headers from the
  1764. // server.
  1765. googleapi.ServerResponse `json:"-"`
  1766. // ForceSendFields is a list of field names (e.g. "Activity") to
  1767. // unconditionally include in API requests. By default, fields with
  1768. // empty values are omitted from API requests. However, any non-pointer,
  1769. // non-interface field appearing in ForceSendFields will be sent to the
  1770. // server regardless of whether the field is empty or not. This may be
  1771. // used to include empty fields in Patch requests.
  1772. ForceSendFields []string `json:"-"`
  1773. // NullFields is a list of field names (e.g. "Activity") to include in
  1774. // API requests with the JSON null value. By default, fields with empty
  1775. // values are omitted from API requests. However, any field with an
  1776. // empty value appearing in NullFields will be sent to the server as
  1777. // null. It is an error if a field in this list has a non-empty value.
  1778. // This may be used to include null fields in Patch requests.
  1779. NullFields []string `json:"-"`
  1780. }
  1781. func (s *ScreenshotCluster) MarshalJSON() ([]byte, error) {
  1782. type NoMethod ScreenshotCluster
  1783. raw := NoMethod(*s)
  1784. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1785. }
  1786. type SkippedDetail struct {
  1787. // IncompatibleAppVersion: If the App doesn't support the specific API
  1788. // level.
  1789. IncompatibleAppVersion bool `json:"incompatibleAppVersion,omitempty"`
  1790. // IncompatibleArchitecture: If the App doesn't run on the specific
  1791. // architecture, for example, x86.
  1792. IncompatibleArchitecture bool `json:"incompatibleArchitecture,omitempty"`
  1793. // IncompatibleDevice: If the requested OS version doesn't run on the
  1794. // specific device model.
  1795. IncompatibleDevice bool `json:"incompatibleDevice,omitempty"`
  1796. // ForceSendFields is a list of field names (e.g.
  1797. // "IncompatibleAppVersion") to unconditionally include in API requests.
  1798. // By default, fields with empty values are omitted from API requests.
  1799. // However, any non-pointer, non-interface field appearing in
  1800. // ForceSendFields will be sent to the server regardless of whether the
  1801. // field is empty or not. This may be used to include empty fields in
  1802. // Patch requests.
  1803. ForceSendFields []string `json:"-"`
  1804. // NullFields is a list of field names (e.g. "IncompatibleAppVersion")
  1805. // to include in API requests with the JSON null value. By default,
  1806. // fields with empty values are omitted from API requests. However, any
  1807. // field with an empty value appearing in NullFields will be sent to the
  1808. // server as null. It is an error if a field in this list has a
  1809. // non-empty value. This may be used to include null fields in Patch
  1810. // requests.
  1811. NullFields []string `json:"-"`
  1812. }
  1813. func (s *SkippedDetail) MarshalJSON() ([]byte, error) {
  1814. type NoMethod SkippedDetail
  1815. raw := NoMethod(*s)
  1816. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1817. }
  1818. // Specification: The details about how to run the execution.
  1819. type Specification struct {
  1820. // AndroidTest: An Android mobile test execution specification.
  1821. AndroidTest *AndroidTest `json:"androidTest,omitempty"`
  1822. // ForceSendFields is a list of field names (e.g. "AndroidTest") to
  1823. // unconditionally include in API requests. By default, fields with
  1824. // empty values are omitted from API requests. However, any non-pointer,
  1825. // non-interface field appearing in ForceSendFields will be sent to the
  1826. // server regardless of whether the field is empty or not. This may be
  1827. // used to include empty fields in Patch requests.
  1828. ForceSendFields []string `json:"-"`
  1829. // NullFields is a list of field names (e.g. "AndroidTest") to include
  1830. // in API requests with the JSON null value. By default, fields with
  1831. // empty values are omitted from API requests. However, any field with
  1832. // an empty value appearing in NullFields will be sent to the server as
  1833. // null. It is an error if a field in this list has a non-empty value.
  1834. // This may be used to include null fields in Patch requests.
  1835. NullFields []string `json:"-"`
  1836. }
  1837. func (s *Specification) MarshalJSON() ([]byte, error) {
  1838. type NoMethod Specification
  1839. raw := NoMethod(*s)
  1840. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1841. }
  1842. // StackTrace: A stacktrace.
  1843. type StackTrace struct {
  1844. // Exception: The stack trace message.
  1845. //
  1846. // Required
  1847. Exception string `json:"exception,omitempty"`
  1848. // ForceSendFields is a list of field names (e.g. "Exception") to
  1849. // unconditionally include in API requests. By default, fields with
  1850. // empty values are omitted from API requests. However, any non-pointer,
  1851. // non-interface field appearing in ForceSendFields will be sent to the
  1852. // server regardless of whether the field is empty or not. This may be
  1853. // used to include empty fields in Patch requests.
  1854. ForceSendFields []string `json:"-"`
  1855. // NullFields is a list of field names (e.g. "Exception") to include in
  1856. // API requests with the JSON null value. By default, fields with empty
  1857. // values are omitted from API requests. However, any field with an
  1858. // empty value appearing in NullFields will be sent to the server as
  1859. // null. It is an error if a field in this list has a non-empty value.
  1860. // This may be used to include null fields in Patch requests.
  1861. NullFields []string `json:"-"`
  1862. }
  1863. func (s *StackTrace) MarshalJSON() ([]byte, error) {
  1864. type NoMethod StackTrace
  1865. raw := NoMethod(*s)
  1866. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1867. }
  1868. // Status: The `Status` type defines a logical error model that is
  1869. // suitable for different programming environments, including REST APIs
  1870. // and RPC APIs. It is used by [gRPC](https://github.com/grpc). The
  1871. // error model is designed to be:
  1872. //
  1873. // - Simple to use and understand for most users - Flexible enough to
  1874. // meet unexpected needs
  1875. //
  1876. // # Overview
  1877. //
  1878. // The `Status` message contains three pieces of data: error code, error
  1879. // message, and error details. The error code should be an enum value of
  1880. // [google.rpc.Code][], but it may accept additional error codes if
  1881. // needed. The error message should be a developer-facing English
  1882. // message that helps developers *understand* and *resolve* the error.
  1883. // If a localized user-facing error message is needed, put the localized
  1884. // message in the error details or localize it in the client. The
  1885. // optional error details may contain arbitrary information about the
  1886. // error. There is a predefined set of error detail types in the package
  1887. // `google.rpc` that can be used for common error conditions.
  1888. //
  1889. // # Language mapping
  1890. //
  1891. // The `Status` message is the logical representation of the error
  1892. // model, but it is not necessarily the actual wire format. When the
  1893. // `Status` message is exposed in different client libraries and
  1894. // different wire protocols, it can be mapped differently. For example,
  1895. // it will likely be mapped to some exceptions in Java, but more likely
  1896. // mapped to some error codes in C.
  1897. //
  1898. // # Other uses
  1899. //
  1900. // The error model and the `Status` message can be used in a variety of
  1901. // environments, either with or without APIs, to provide a consistent
  1902. // developer experience across different environments.
  1903. //
  1904. // Example uses of this error model include:
  1905. //
  1906. // - Partial errors. If a service needs to return partial errors to the
  1907. // client, it may embed the `Status` in the normal response to indicate
  1908. // the partial errors.
  1909. //
  1910. // - Workflow errors. A typical workflow has multiple steps. Each step
  1911. // may have a `Status` message for error reporting.
  1912. //
  1913. // - Batch operations. If a client uses batch request and batch
  1914. // response, the `Status` message should be used directly inside batch
  1915. // response, one for each error sub-response.
  1916. //
  1917. // - Asynchronous operations. If an API call embeds asynchronous
  1918. // operation results in its response, the status of those operations
  1919. // should be represented directly using the `Status` message.
  1920. //
  1921. // - Logging. If some API errors are stored in logs, the message
  1922. // `Status` could be used directly after any stripping needed for
  1923. // security/privacy reasons.
  1924. type Status struct {
  1925. // Code: The status code, which should be an enum value of
  1926. // [google.rpc.Code][].
  1927. Code int64 `json:"code,omitempty"`
  1928. // Details: A list of messages that carry the error details. There is a
  1929. // common set of message types for APIs to use.
  1930. Details []*Any `json:"details,omitempty"`
  1931. // Message: A developer-facing error message, which should be in
  1932. // English. Any user-facing error message should be localized and sent
  1933. // in the [google.rpc.Status.details][] field, or localized by the
  1934. // client.
  1935. Message string `json:"message,omitempty"`
  1936. // ForceSendFields is a list of field names (e.g. "Code") to
  1937. // unconditionally include in API requests. By default, fields with
  1938. // empty values are omitted from API requests. However, any non-pointer,
  1939. // non-interface field appearing in ForceSendFields will be sent to the
  1940. // server regardless of whether the field is empty or not. This may be
  1941. // used to include empty fields in Patch requests.
  1942. ForceSendFields []string `json:"-"`
  1943. // NullFields is a list of field names (e.g. "Code") to include in API
  1944. // requests with the JSON null value. By default, fields with empty
  1945. // values are omitted from API requests. However, any field with an
  1946. // empty value appearing in NullFields will be sent to the server as
  1947. // null. It is an error if a field in this list has a non-empty value.
  1948. // This may be used to include null fields in Patch requests.
  1949. NullFields []string `json:"-"`
  1950. }
  1951. func (s *Status) MarshalJSON() ([]byte, error) {
  1952. type NoMethod Status
  1953. raw := NoMethod(*s)
  1954. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1955. }
  1956. // Step: A Step represents a single operation performed as part of
  1957. // Execution. A step can be used to represent the execution of a tool (
  1958. // for example a test runner execution or an execution of a
  1959. // compiler).
  1960. //
  1961. // Steps can overlap (for instance two steps might have the same start
  1962. // time if some operations are done in parallel).
  1963. //
  1964. // Here is an example, let's consider that we have a continuous build is
  1965. // executing a test runner for each iteration. The workflow would look
  1966. // like: - user creates a Execution with id 1 - user creates an
  1967. // TestExecutionStep with id 100 for Execution 1 - user update
  1968. // TestExecutionStep with id 100 to add a raw xml log + the service
  1969. // parses the xml logs and returns a TestExecutionStep with updated
  1970. // TestResult(s). - user update the status of TestExecutionStep with id
  1971. // 100 to COMPLETE
  1972. //
  1973. // A Step can be updated until its state is set to COMPLETE at which
  1974. // points it becomes immutable.
  1975. type Step struct {
  1976. // CompletionTime: The time when the step status was set to
  1977. // complete.
  1978. //
  1979. // This value will be set automatically when state transitions to
  1980. // COMPLETE.
  1981. //
  1982. // - In response: set if the execution state is COMPLETE. - In
  1983. // create/update request: never set
  1984. CompletionTime *Timestamp `json:"completionTime,omitempty"`
  1985. // CreationTime: The time when the step was created.
  1986. //
  1987. // - In response: always set - In create/update request: never set
  1988. CreationTime *Timestamp `json:"creationTime,omitempty"`
  1989. // Description: A description of this tool For example: mvn clean
  1990. // package -D skipTests=true
  1991. //
  1992. // - In response: present if set by create/update request - In
  1993. // create/update request: optional
  1994. Description string `json:"description,omitempty"`
  1995. // DeviceUsageDuration: How much the device resource is used to perform
  1996. // the test.
  1997. //
  1998. // This is the device usage used for billing purpose, which is different
  1999. // from the run_duration, for example, infrastructure failure won't be
  2000. // charged for device usage.
  2001. //
  2002. // PRECONDITION_FAILED will be returned if one attempts to set a
  2003. // device_usage on a step which already has this field set.
  2004. //
  2005. // - In response: present if previously set. - In create request:
  2006. // optional - In update request: optional
  2007. DeviceUsageDuration *Duration `json:"deviceUsageDuration,omitempty"`
  2008. // DimensionValue: If the execution containing this step has any
  2009. // dimension_definition set, then this field allows the child to specify
  2010. // the values of the dimensions.
  2011. //
  2012. // The keys must exactly match the dimension_definition of the
  2013. // execution.
  2014. //
  2015. // For example, if the execution has `dimension_definition = ['attempt',
  2016. // 'device']` then a step must define values for those dimensions, eg.
  2017. // `dimension_value = ['attempt': '1', 'device': 'Nexus 6']`
  2018. //
  2019. // If a step does not participate in one dimension of the matrix, the
  2020. // value for that dimension should be empty string. For example, if one
  2021. // of the tests is executed by a runner which does not support retries,
  2022. // the step could have `dimension_value = ['attempt': '', 'device':
  2023. // 'Nexus 6']`
  2024. //
  2025. // If the step does not participate in any dimensions of the matrix, it
  2026. // may leave dimension_value unset.
  2027. //
  2028. // A PRECONDITION_FAILED will be returned if any of the keys do not
  2029. // exist in the dimension_definition of the execution.
  2030. //
  2031. // A PRECONDITION_FAILED will be returned if another step in this
  2032. // execution already has the same name and dimension_value, but differs
  2033. // on other data fields, for example, step field is different.
  2034. //
  2035. // A PRECONDITION_FAILED will be returned if dimension_value is set, and
  2036. // there is a dimension_definition in the execution which is not
  2037. // specified as one of the keys.
  2038. //
  2039. // - In response: present if set by create - In create request: optional
  2040. // - In update request: never set
  2041. DimensionValue []*StepDimensionValueEntry `json:"dimensionValue,omitempty"`
  2042. // HasImages: Whether any of the outputs of this step are images whose
  2043. // thumbnails can be fetched with ListThumbnails.
  2044. //
  2045. // - In response: always set - In create/update request: never set
  2046. HasImages bool `json:"hasImages,omitempty"`
  2047. // Labels: Arbitrary user-supplied key/value pairs that are associated
  2048. // with the step.
  2049. //
  2050. // Users are responsible for managing the key namespace such that keys
  2051. // don't accidentally collide.
  2052. //
  2053. // An INVALID_ARGUMENT will be returned if the number of labels exceeds
  2054. // 100 or if the length of any of the keys or values exceeds 100
  2055. // characters.
  2056. //
  2057. // - In response: always set - In create request: optional - In update
  2058. // request: optional; any new key/value pair will be added to the map,
  2059. // and any new value for an existing key will update that key's value
  2060. Labels []*StepLabelsEntry `json:"labels,omitempty"`
  2061. // MultiStep: Details when multiple steps are run with the same
  2062. // configuration as a group. These details can be used identify which
  2063. // group this step is part of. It also identifies the groups 'primary
  2064. // step' which indexes all the group members.
  2065. //
  2066. // - In response: present if previously set. - In create request:
  2067. // optional, set iff this step was performed more than once. - In update
  2068. // request: optional
  2069. MultiStep *MultiStep `json:"multiStep,omitempty"`
  2070. // Name: A short human-readable name to display in the UI. Maximum of
  2071. // 100 characters. For example: Clean build
  2072. //
  2073. // A PRECONDITION_FAILED will be returned upon creating a new step if it
  2074. // shares its name and dimension_value with an existing step. If two
  2075. // steps represent a similar action, but have different dimension
  2076. // values, they should share the same name. For instance, if the same
  2077. // set of tests is run on two different platforms, the two steps should
  2078. // have the same name.
  2079. //
  2080. // - In response: always set - In create request: always set - In update
  2081. // request: never set
  2082. Name string `json:"name,omitempty"`
  2083. // Outcome: Classification of the result, for example into SUCCESS or
  2084. // FAILURE
  2085. //
  2086. // - In response: present if set by create/update request - In
  2087. // create/update request: optional
  2088. Outcome *Outcome `json:"outcome,omitempty"`
  2089. // RunDuration: How long it took for this step to run.
  2090. //
  2091. // If unset, this is set to the difference between creation_time and
  2092. // completion_time when the step is set to the COMPLETE state. In some
  2093. // cases, it is appropriate to set this value separately: For instance,
  2094. // if a step is created, but the operation it represents is queued for a
  2095. // few minutes before it executes, it would be appropriate not to
  2096. // include the time spent queued in its
  2097. // run_duration.
  2098. //
  2099. // PRECONDITION_FAILED will be returned if one attempts to set a
  2100. // run_duration on a step which already has this field set.
  2101. //
  2102. // - In response: present if previously set; always present on COMPLETE
  2103. // step - In create request: optional - In update request: optional
  2104. RunDuration *Duration `json:"runDuration,omitempty"`
  2105. // State: The initial state is IN_PROGRESS. The only legal state
  2106. // transitions are * IN_PROGRESS -> COMPLETE
  2107. //
  2108. // A PRECONDITION_FAILED will be returned if an invalid transition is
  2109. // requested.
  2110. //
  2111. // It is valid to create Step with a state set to COMPLETE. The state
  2112. // can only be set to COMPLETE once. A PRECONDITION_FAILED will be
  2113. // returned if the state is set to COMPLETE multiple times.
  2114. //
  2115. // - In response: always set - In create/update request: optional
  2116. //
  2117. // Possible values:
  2118. // "complete"
  2119. // "inProgress"
  2120. // "pending"
  2121. // "unknownState"
  2122. State string `json:"state,omitempty"`
  2123. // StepId: A unique identifier within a Execution for this
  2124. // Step.
  2125. //
  2126. // Returns INVALID_ARGUMENT if this field is set or overwritten by the
  2127. // caller.
  2128. //
  2129. // - In response: always set - In create/update request: never set
  2130. StepId string `json:"stepId,omitempty"`
  2131. // TestExecutionStep: An execution of a test runner.
  2132. TestExecutionStep *TestExecutionStep `json:"testExecutionStep,omitempty"`
  2133. // ToolExecutionStep: An execution of a tool (used for steps we don't
  2134. // explicitly support).
  2135. ToolExecutionStep *ToolExecutionStep `json:"toolExecutionStep,omitempty"`
  2136. // ServerResponse contains the HTTP response code and headers from the
  2137. // server.
  2138. googleapi.ServerResponse `json:"-"`
  2139. // ForceSendFields is a list of field names (e.g. "CompletionTime") to
  2140. // unconditionally include in API requests. By default, fields with
  2141. // empty values are omitted from API requests. However, any non-pointer,
  2142. // non-interface field appearing in ForceSendFields will be sent to the
  2143. // server regardless of whether the field is empty or not. This may be
  2144. // used to include empty fields in Patch requests.
  2145. ForceSendFields []string `json:"-"`
  2146. // NullFields is a list of field names (e.g. "CompletionTime") to
  2147. // include in API requests with the JSON null value. By default, fields
  2148. // with empty values are omitted from API requests. However, any field
  2149. // with an empty value appearing in NullFields will be sent to the
  2150. // server as null. It is an error if a field in this list has a
  2151. // non-empty value. This may be used to include null fields in Patch
  2152. // requests.
  2153. NullFields []string `json:"-"`
  2154. }
  2155. func (s *Step) MarshalJSON() ([]byte, error) {
  2156. type NoMethod Step
  2157. raw := NoMethod(*s)
  2158. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2159. }
  2160. type StepDimensionValueEntry struct {
  2161. Key string `json:"key,omitempty"`
  2162. Value string `json:"value,omitempty"`
  2163. // ForceSendFields is a list of field names (e.g. "Key") to
  2164. // unconditionally include in API requests. By default, fields with
  2165. // empty values are omitted from API requests. However, any non-pointer,
  2166. // non-interface field appearing in ForceSendFields will be sent to the
  2167. // server regardless of whether the field is empty or not. This may be
  2168. // used to include empty fields in Patch requests.
  2169. ForceSendFields []string `json:"-"`
  2170. // NullFields is a list of field names (e.g. "Key") to include in API
  2171. // requests with the JSON null value. By default, fields with empty
  2172. // values are omitted from API requests. However, any field with an
  2173. // empty value appearing in NullFields will be sent to the server as
  2174. // null. It is an error if a field in this list has a non-empty value.
  2175. // This may be used to include null fields in Patch requests.
  2176. NullFields []string `json:"-"`
  2177. }
  2178. func (s *StepDimensionValueEntry) MarshalJSON() ([]byte, error) {
  2179. type NoMethod StepDimensionValueEntry
  2180. raw := NoMethod(*s)
  2181. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2182. }
  2183. type StepLabelsEntry struct {
  2184. Key string `json:"key,omitempty"`
  2185. Value string `json:"value,omitempty"`
  2186. // ForceSendFields is a list of field names (e.g. "Key") to
  2187. // unconditionally include in API requests. By default, fields with
  2188. // empty values are omitted from API requests. However, any non-pointer,
  2189. // non-interface field appearing in ForceSendFields will be sent to the
  2190. // server regardless of whether the field is empty or not. This may be
  2191. // used to include empty fields in Patch requests.
  2192. ForceSendFields []string `json:"-"`
  2193. // NullFields is a list of field names (e.g. "Key") to include in API
  2194. // requests with the JSON null value. By default, fields with empty
  2195. // values are omitted from API requests. However, any field with an
  2196. // empty value appearing in NullFields will be sent to the server as
  2197. // null. It is an error if a field in this list has a non-empty value.
  2198. // This may be used to include null fields in Patch requests.
  2199. NullFields []string `json:"-"`
  2200. }
  2201. func (s *StepLabelsEntry) MarshalJSON() ([]byte, error) {
  2202. type NoMethod StepLabelsEntry
  2203. raw := NoMethod(*s)
  2204. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2205. }
  2206. type SuccessDetail struct {
  2207. // OtherNativeCrash: If a native process other than the app crashed.
  2208. OtherNativeCrash bool `json:"otherNativeCrash,omitempty"`
  2209. // ForceSendFields is a list of field names (e.g. "OtherNativeCrash") to
  2210. // unconditionally include in API requests. By default, fields with
  2211. // empty values are omitted from API requests. However, any non-pointer,
  2212. // non-interface field appearing in ForceSendFields will be sent to the
  2213. // server regardless of whether the field is empty or not. This may be
  2214. // used to include empty fields in Patch requests.
  2215. ForceSendFields []string `json:"-"`
  2216. // NullFields is a list of field names (e.g. "OtherNativeCrash") to
  2217. // include in API requests with the JSON null value. By default, fields
  2218. // with empty values are omitted from API requests. However, any field
  2219. // with an empty value appearing in NullFields will be sent to the
  2220. // server as null. It is an error if a field in this list has a
  2221. // non-empty value. This may be used to include null fields in Patch
  2222. // requests.
  2223. NullFields []string `json:"-"`
  2224. }
  2225. func (s *SuccessDetail) MarshalJSON() ([]byte, error) {
  2226. type NoMethod SuccessDetail
  2227. raw := NoMethod(*s)
  2228. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2229. }
  2230. // TestCaseReference: A reference to a test case.
  2231. //
  2232. // Test case references are canonically ordered lexicographically by
  2233. // these three factors: * First, by test_suite_name. * Second, by
  2234. // class_name. * Third, by name.
  2235. type TestCaseReference struct {
  2236. // ClassName: The name of the class.
  2237. ClassName string `json:"className,omitempty"`
  2238. // Name: The name of the test case.
  2239. //
  2240. // Required.
  2241. Name string `json:"name,omitempty"`
  2242. // TestSuiteName: The name of the test suite to which this test case
  2243. // belongs.
  2244. TestSuiteName string `json:"testSuiteName,omitempty"`
  2245. // ForceSendFields is a list of field names (e.g. "ClassName") to
  2246. // unconditionally include in API requests. By default, fields with
  2247. // empty values are omitted from API requests. However, any non-pointer,
  2248. // non-interface field appearing in ForceSendFields will be sent to the
  2249. // server regardless of whether the field is empty or not. This may be
  2250. // used to include empty fields in Patch requests.
  2251. ForceSendFields []string `json:"-"`
  2252. // NullFields is a list of field names (e.g. "ClassName") to include in
  2253. // API requests with the JSON null value. By default, fields with empty
  2254. // values are omitted from API requests. However, any field with an
  2255. // empty value appearing in NullFields will be sent to the server as
  2256. // null. It is an error if a field in this list has a non-empty value.
  2257. // This may be used to include null fields in Patch requests.
  2258. NullFields []string `json:"-"`
  2259. }
  2260. func (s *TestCaseReference) MarshalJSON() ([]byte, error) {
  2261. type NoMethod TestCaseReference
  2262. raw := NoMethod(*s)
  2263. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2264. }
  2265. // TestExecutionStep: A step that represents running tests.
  2266. //
  2267. // It accepts ant-junit xml files which will be parsed into structured
  2268. // test results by the service. Xml file paths are updated in order to
  2269. // append more files, however they can't be deleted.
  2270. //
  2271. // Users can also add test results manually by using the test_result
  2272. // field.
  2273. type TestExecutionStep struct {
  2274. // TestIssues: Issues observed during the test execution.
  2275. //
  2276. // For example, if the mobile app under test crashed during the test,
  2277. // the error message and the stack trace content can be recorded here to
  2278. // assist debugging.
  2279. //
  2280. // - In response: present if set by create or update - In create/update
  2281. // request: optional
  2282. TestIssues []*TestIssue `json:"testIssues,omitempty"`
  2283. // TestSuiteOverviews: List of test suite overview contents. This could
  2284. // be parsed from xUnit XML log by server, or uploaded directly by user.
  2285. // This references should only be called when test suites are fully
  2286. // parsed or uploaded.
  2287. //
  2288. // The maximum allowed number of test suite overviews per step is
  2289. // 1000.
  2290. //
  2291. // - In response: always set - In create request: optional - In update
  2292. // request: never (use publishXunitXmlFiles custom method instead)
  2293. TestSuiteOverviews []*TestSuiteOverview `json:"testSuiteOverviews,omitempty"`
  2294. // TestTiming: The timing break down of the test execution.
  2295. //
  2296. // - In response: present if set by create or update - In create/update
  2297. // request: optional
  2298. TestTiming *TestTiming `json:"testTiming,omitempty"`
  2299. // ToolExecution: Represents the execution of the test runner.
  2300. //
  2301. // The exit code of this tool will be used to determine if the test
  2302. // passed.
  2303. //
  2304. // - In response: always set - In create/update request: optional
  2305. ToolExecution *ToolExecution `json:"toolExecution,omitempty"`
  2306. // ForceSendFields is a list of field names (e.g. "TestIssues") to
  2307. // unconditionally include in API requests. By default, fields with
  2308. // empty values are omitted from API requests. However, any non-pointer,
  2309. // non-interface field appearing in ForceSendFields will be sent to the
  2310. // server regardless of whether the field is empty or not. This may be
  2311. // used to include empty fields in Patch requests.
  2312. ForceSendFields []string `json:"-"`
  2313. // NullFields is a list of field names (e.g. "TestIssues") to include in
  2314. // API requests with the JSON null value. By default, fields with empty
  2315. // values are omitted from API requests. However, any field with an
  2316. // empty value appearing in NullFields will be sent to the server as
  2317. // null. It is an error if a field in this list has a non-empty value.
  2318. // This may be used to include null fields in Patch requests.
  2319. NullFields []string `json:"-"`
  2320. }
  2321. func (s *TestExecutionStep) MarshalJSON() ([]byte, error) {
  2322. type NoMethod TestExecutionStep
  2323. raw := NoMethod(*s)
  2324. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2325. }
  2326. // TestIssue: An issue detected occurring during a test execution.
  2327. type TestIssue struct {
  2328. // Category: Category of issue. Required.
  2329. //
  2330. // Possible values:
  2331. // "common"
  2332. // "robo"
  2333. // "unspecifiedCategory"
  2334. Category string `json:"category,omitempty"`
  2335. // ErrorMessage: A brief human-readable message describing the issue.
  2336. // Required.
  2337. ErrorMessage string `json:"errorMessage,omitempty"`
  2338. // Severity: Severity of issue. Required.
  2339. //
  2340. // Possible values:
  2341. // "info"
  2342. // "severe"
  2343. // "suggestion"
  2344. // "unspecifiedSeverity"
  2345. // "warning"
  2346. Severity string `json:"severity,omitempty"`
  2347. // StackTrace: Deprecated in favor of stack trace fields inside specific
  2348. // warnings.
  2349. StackTrace *StackTrace `json:"stackTrace,omitempty"`
  2350. // Type: Type of issue. Required.
  2351. //
  2352. // Possible values:
  2353. // "anr"
  2354. // "availableDeepLinks"
  2355. // "compatibleWithOrchestrator"
  2356. // "completeRoboScriptExecution"
  2357. // "encounteredLoginScreen"
  2358. // "encounteredNonAndroidUiWidgetScreen"
  2359. // "failedToInstall"
  2360. // "fatalException"
  2361. // "inAppPurchases"
  2362. // "incompleteRoboScriptExecution"
  2363. // "insufficientCoverage"
  2364. // "iosCrash"
  2365. // "iosException"
  2366. // "launcherActivityNotFound"
  2367. // "nativeCrash"
  2368. // "nonSdkApiUsageViolation"
  2369. // "performedGoogleLogin"
  2370. // "performedMonkeyActions"
  2371. // "startActivityNotFound"
  2372. // "unspecifiedType"
  2373. // "unusedRoboDirective"
  2374. // "usedRoboDirective"
  2375. // "usedRoboIgnoreDirective"
  2376. Type string `json:"type,omitempty"`
  2377. // Warning: Warning message with additional details of the issue. Should
  2378. // always be a message from com.google.devtools.toolresults.v1.warnings
  2379. Warning *Any `json:"warning,omitempty"`
  2380. // ForceSendFields is a list of field names (e.g. "Category") to
  2381. // unconditionally include in API requests. By default, fields with
  2382. // empty values are omitted from API requests. However, any non-pointer,
  2383. // non-interface field appearing in ForceSendFields will be sent to the
  2384. // server regardless of whether the field is empty or not. This may be
  2385. // used to include empty fields in Patch requests.
  2386. ForceSendFields []string `json:"-"`
  2387. // NullFields is a list of field names (e.g. "Category") to include in
  2388. // API requests with the JSON null value. By default, fields with empty
  2389. // values are omitted from API requests. However, any field with an
  2390. // empty value appearing in NullFields will be sent to the server as
  2391. // null. It is an error if a field in this list has a non-empty value.
  2392. // This may be used to include null fields in Patch requests.
  2393. NullFields []string `json:"-"`
  2394. }
  2395. func (s *TestIssue) MarshalJSON() ([]byte, error) {
  2396. type NoMethod TestIssue
  2397. raw := NoMethod(*s)
  2398. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2399. }
  2400. // TestSuiteOverview: A summary of a test suite result either parsed
  2401. // from XML or uploaded directly by a user.
  2402. //
  2403. // Note: the API related comments are for StepService only. This message
  2404. // is also being used in ExecutionService in a read only mode for the
  2405. // corresponding step.
  2406. type TestSuiteOverview struct {
  2407. // ErrorCount: Number of test cases in error, typically set by the
  2408. // service by parsing the xml_source.
  2409. //
  2410. // - In create/response: always set - In update request: never
  2411. ErrorCount int64 `json:"errorCount,omitempty"`
  2412. // FailureCount: Number of failed test cases, typically set by the
  2413. // service by parsing the xml_source. May also be set by the user.
  2414. //
  2415. // - In create/response: always set - In update request: never
  2416. FailureCount int64 `json:"failureCount,omitempty"`
  2417. // Name: The name of the test suite.
  2418. //
  2419. // - In create/response: always set - In update request: never
  2420. Name string `json:"name,omitempty"`
  2421. // SkippedCount: Number of test cases not run, typically set by the
  2422. // service by parsing the xml_source.
  2423. //
  2424. // - In create/response: always set - In update request: never
  2425. SkippedCount int64 `json:"skippedCount,omitempty"`
  2426. // TotalCount: Number of test cases, typically set by the service by
  2427. // parsing the xml_source.
  2428. //
  2429. // - In create/response: always set - In update request: never
  2430. TotalCount int64 `json:"totalCount,omitempty"`
  2431. // XmlSource: If this test suite was parsed from XML, this is the URI
  2432. // where the original XML file is stored.
  2433. //
  2434. // Note: Multiple test suites can share the same xml_source
  2435. //
  2436. // Returns INVALID_ARGUMENT if the uri format is not supported.
  2437. //
  2438. // - In create/response: optional - In update request: never
  2439. XmlSource *FileReference `json:"xmlSource,omitempty"`
  2440. // ForceSendFields is a list of field names (e.g. "ErrorCount") to
  2441. // unconditionally include in API requests. By default, fields with
  2442. // empty values are omitted from API requests. However, any non-pointer,
  2443. // non-interface field appearing in ForceSendFields will be sent to the
  2444. // server regardless of whether the field is empty or not. This may be
  2445. // used to include empty fields in Patch requests.
  2446. ForceSendFields []string `json:"-"`
  2447. // NullFields is a list of field names (e.g. "ErrorCount") to include in
  2448. // API requests with the JSON null value. By default, fields with empty
  2449. // values are omitted from API requests. However, any field with an
  2450. // empty value appearing in NullFields will be sent to the server as
  2451. // null. It is an error if a field in this list has a non-empty value.
  2452. // This may be used to include null fields in Patch requests.
  2453. NullFields []string `json:"-"`
  2454. }
  2455. func (s *TestSuiteOverview) MarshalJSON() ([]byte, error) {
  2456. type NoMethod TestSuiteOverview
  2457. raw := NoMethod(*s)
  2458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2459. }
  2460. // TestTiming: Testing timing break down to know phases.
  2461. type TestTiming struct {
  2462. // TestProcessDuration: How long it took to run the test process.
  2463. //
  2464. // - In response: present if previously set. - In create/update request:
  2465. // optional
  2466. TestProcessDuration *Duration `json:"testProcessDuration,omitempty"`
  2467. // ForceSendFields is a list of field names (e.g. "TestProcessDuration")
  2468. // to unconditionally include in API requests. By default, fields with
  2469. // empty values are omitted from API requests. However, any non-pointer,
  2470. // non-interface field appearing in ForceSendFields will be sent to the
  2471. // server regardless of whether the field is empty or not. This may be
  2472. // used to include empty fields in Patch requests.
  2473. ForceSendFields []string `json:"-"`
  2474. // NullFields is a list of field names (e.g. "TestProcessDuration") to
  2475. // include in API requests with the JSON null value. By default, fields
  2476. // with empty values are omitted from API requests. However, any field
  2477. // with an empty value appearing in NullFields will be sent to the
  2478. // server as null. It is an error if a field in this list has a
  2479. // non-empty value. This may be used to include null fields in Patch
  2480. // requests.
  2481. NullFields []string `json:"-"`
  2482. }
  2483. func (s *TestTiming) MarshalJSON() ([]byte, error) {
  2484. type NoMethod TestTiming
  2485. raw := NoMethod(*s)
  2486. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2487. }
  2488. // Thumbnail: A single thumbnail, with its size and format.
  2489. type Thumbnail struct {
  2490. // ContentType: The thumbnail's content type, i.e. "image/png".
  2491. //
  2492. // Always set.
  2493. ContentType string `json:"contentType,omitempty"`
  2494. // Data: The thumbnail file itself.
  2495. //
  2496. // That is, the bytes here are precisely the bytes that make up the
  2497. // thumbnail file; they can be served as an image as-is (with the
  2498. // appropriate content type.)
  2499. //
  2500. // Always set.
  2501. Data string `json:"data,omitempty"`
  2502. // HeightPx: The height of the thumbnail, in pixels.
  2503. //
  2504. // Always set.
  2505. HeightPx int64 `json:"heightPx,omitempty"`
  2506. // WidthPx: The width of the thumbnail, in pixels.
  2507. //
  2508. // Always set.
  2509. WidthPx int64 `json:"widthPx,omitempty"`
  2510. // ForceSendFields is a list of field names (e.g. "ContentType") to
  2511. // unconditionally include in API requests. By default, fields with
  2512. // empty values are omitted from API requests. However, any non-pointer,
  2513. // non-interface field appearing in ForceSendFields will be sent to the
  2514. // server regardless of whether the field is empty or not. This may be
  2515. // used to include empty fields in Patch requests.
  2516. ForceSendFields []string `json:"-"`
  2517. // NullFields is a list of field names (e.g. "ContentType") to include
  2518. // in API requests with the JSON null value. By default, fields with
  2519. // empty values are omitted from API requests. However, any field with
  2520. // an empty value appearing in NullFields will be sent to the server as
  2521. // null. It is an error if a field in this list has a non-empty value.
  2522. // This may be used to include null fields in Patch requests.
  2523. NullFields []string `json:"-"`
  2524. }
  2525. func (s *Thumbnail) MarshalJSON() ([]byte, error) {
  2526. type NoMethod Thumbnail
  2527. raw := NoMethod(*s)
  2528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2529. }
  2530. // Timestamp: A Timestamp represents a point in time independent of any
  2531. // time zone or local calendar, encoded as a count of seconds and
  2532. // fractions of seconds at nanosecond resolution. The count is relative
  2533. // to an epoch at UTC midnight on January 1, 1970, in the proleptic
  2534. // Gregorian calendar which extends the Gregorian calendar backwards to
  2535. // year one.
  2536. //
  2537. // All minutes are 60 seconds long. Leap seconds are "smeared" so that
  2538. // no leap second table is needed for interpretation, using a [24-hour
  2539. // linear smear](https://developers.google.com/time/smear).
  2540. //
  2541. // The range is from 0001-01-01T00:00:00Z to
  2542. // 9999-12-31T23:59:59.999999999Z. By restricting to that range, we
  2543. // ensure that we can convert to and from [RFC
  2544. // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
  2545. //
  2546. // # Examples
  2547. //
  2548. // Example 1: Compute Timestamp from POSIX `time()`.
  2549. //
  2550. // Timestamp timestamp; timestamp.set_seconds(time(NULL));
  2551. // timestamp.set_nanos(0);
  2552. //
  2553. // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
  2554. //
  2555. // struct timeval tv; gettimeofday(&tv, NULL);
  2556. //
  2557. // Timestamp timestamp; timestamp.set_seconds(tv.tv_sec);
  2558. // timestamp.set_nanos(tv.tv_usec * 1000);
  2559. //
  2560. // Example 3: Compute Timestamp from Win32
  2561. // `GetSystemTimeAsFileTime()`.
  2562. //
  2563. // FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks =
  2564. // (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
  2565. //
  2566. // // A Windows tick is 100 nanoseconds. Windows epoch
  2567. // 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch
  2568. // 1970-01-01T00:00:00Z. Timestamp timestamp;
  2569. // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
  2570. // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
  2571. //
  2572. // Example 4: Compute Timestamp from Java
  2573. // `System.currentTimeMillis()`.
  2574. //
  2575. // long millis = System.currentTimeMillis();
  2576. //
  2577. // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis /
  2578. // 1000) .setNanos((int) ((millis % 1000) *
  2579. // 1000000)).build();
  2580. //
  2581. //
  2582. //
  2583. // Example 5: Compute Timestamp from current time in Python.
  2584. //
  2585. // timestamp = Timestamp() timestamp.GetCurrentTime()
  2586. //
  2587. // # JSON Mapping
  2588. //
  2589. // In JSON format, the Timestamp type is encoded as a string in the [RFC
  2590. // 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
  2591. // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
  2592. // where {year} is always expressed using four digits while {month},
  2593. // {day}, {hour}, {min}, and {sec} are zero-padded to two digits each.
  2594. // The fractional seconds, which can go up to 9 digits (i.e. up to 1
  2595. // nanosecond resolution), are optional. The "Z" suffix indicates the
  2596. // timezone ("UTC"); the timezone is required. A proto3 JSON serializer
  2597. // should always use UTC (as indicated by "Z") when printing the
  2598. // Timestamp type and a proto3 JSON parser should be able to accept both
  2599. // UTC and other timezones (as indicated by an offset).
  2600. //
  2601. // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
  2602. // 01:30 UTC on January 15, 2017.
  2603. //
  2604. // In JavaScript, one can convert a Date object to this format using the
  2605. // standard
  2606. // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScrip
  2607. // t/Reference/Global_Objects/Date/toISOString) method. In Python, a
  2608. // standard `datetime.datetime` object can be converted to this format
  2609. // using
  2610. // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime
  2611. // ) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in
  2612. // Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
  2613. // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D ) to obtain a formatter capable of generating timestamps in this
  2614. // format.
  2615. type Timestamp struct {
  2616. // Nanos: Non-negative fractions of a second at nanosecond resolution.
  2617. // Negative second values with fractions must still have non-negative
  2618. // nanos values that count forward in time. Must be from 0 to
  2619. // 999,999,999 inclusive.
  2620. Nanos int64 `json:"nanos,omitempty"`
  2621. // Seconds: Represents seconds of UTC time since Unix epoch
  2622. // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
  2623. // 9999-12-31T23:59:59Z inclusive.
  2624. Seconds int64 `json:"seconds,omitempty,string"`
  2625. // ForceSendFields is a list of field names (e.g. "Nanos") to
  2626. // unconditionally include in API requests. By default, fields with
  2627. // empty values are omitted from API requests. However, any non-pointer,
  2628. // non-interface field appearing in ForceSendFields will be sent to the
  2629. // server regardless of whether the field is empty or not. This may be
  2630. // used to include empty fields in Patch requests.
  2631. ForceSendFields []string `json:"-"`
  2632. // NullFields is a list of field names (e.g. "Nanos") to include in API
  2633. // requests with the JSON null value. By default, fields with empty
  2634. // values are omitted from API requests. However, any field with an
  2635. // empty value appearing in NullFields will be sent to the server as
  2636. // null. It is an error if a field in this list has a non-empty value.
  2637. // This may be used to include null fields in Patch requests.
  2638. NullFields []string `json:"-"`
  2639. }
  2640. func (s *Timestamp) MarshalJSON() ([]byte, error) {
  2641. type NoMethod Timestamp
  2642. raw := NoMethod(*s)
  2643. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2644. }
  2645. // ToolExecution: An execution of an arbitrary tool. It could be a test
  2646. // runner or a tool copying artifacts or deploying code.
  2647. type ToolExecution struct {
  2648. // CommandLineArguments: The full tokenized command line including the
  2649. // program name (equivalent to argv in a C program).
  2650. //
  2651. // - In response: present if set by create request - In create request:
  2652. // optional - In update request: never set
  2653. CommandLineArguments []string `json:"commandLineArguments,omitempty"`
  2654. // ExitCode: Tool execution exit code. This field will be set once the
  2655. // tool has exited.
  2656. //
  2657. // - In response: present if set by create/update request - In create
  2658. // request: optional - In update request: optional, a
  2659. // FAILED_PRECONDITION error will be returned if an exit_code is already
  2660. // set.
  2661. ExitCode *ToolExitCode `json:"exitCode,omitempty"`
  2662. // ToolLogs: References to any plain text logs output the tool
  2663. // execution.
  2664. //
  2665. // This field can be set before the tool has exited in order to be able
  2666. // to have access to a live view of the logs while the tool is
  2667. // running.
  2668. //
  2669. // The maximum allowed number of tool logs per step is 1000.
  2670. //
  2671. // - In response: present if set by create/update request - In create
  2672. // request: optional - In update request: optional, any value provided
  2673. // will be appended to the existing list
  2674. ToolLogs []*FileReference `json:"toolLogs,omitempty"`
  2675. // ToolOutputs: References to opaque files of any format output by the
  2676. // tool execution.
  2677. //
  2678. // The maximum allowed number of tool outputs per step is 1000.
  2679. //
  2680. // - In response: present if set by create/update request - In create
  2681. // request: optional - In update request: optional, any value provided
  2682. // will be appended to the existing list
  2683. ToolOutputs []*ToolOutputReference `json:"toolOutputs,omitempty"`
  2684. // ForceSendFields is a list of field names (e.g.
  2685. // "CommandLineArguments") to unconditionally include in API requests.
  2686. // By default, fields with empty values are omitted from API requests.
  2687. // However, any non-pointer, non-interface field appearing in
  2688. // ForceSendFields will be sent to the server regardless of whether the
  2689. // field is empty or not. This may be used to include empty fields in
  2690. // Patch requests.
  2691. ForceSendFields []string `json:"-"`
  2692. // NullFields is a list of field names (e.g. "CommandLineArguments") to
  2693. // include in API requests with the JSON null value. By default, fields
  2694. // with empty values are omitted from API requests. However, any field
  2695. // with an empty value appearing in NullFields will be sent to the
  2696. // server as null. It is an error if a field in this list has a
  2697. // non-empty value. This may be used to include null fields in Patch
  2698. // requests.
  2699. NullFields []string `json:"-"`
  2700. }
  2701. func (s *ToolExecution) MarshalJSON() ([]byte, error) {
  2702. type NoMethod ToolExecution
  2703. raw := NoMethod(*s)
  2704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2705. }
  2706. // ToolExecutionStep: Generic tool step to be used for binaries we do
  2707. // not explicitly support. For example: running cp to copy artifacts
  2708. // from one location to another.
  2709. type ToolExecutionStep struct {
  2710. // ToolExecution: A Tool execution.
  2711. //
  2712. // - In response: present if set by create/update request - In
  2713. // create/update request: optional
  2714. ToolExecution *ToolExecution `json:"toolExecution,omitempty"`
  2715. // ForceSendFields is a list of field names (e.g. "ToolExecution") to
  2716. // unconditionally include in API requests. By default, fields with
  2717. // empty values are omitted from API requests. However, any non-pointer,
  2718. // non-interface field appearing in ForceSendFields will be sent to the
  2719. // server regardless of whether the field is empty or not. This may be
  2720. // used to include empty fields in Patch requests.
  2721. ForceSendFields []string `json:"-"`
  2722. // NullFields is a list of field names (e.g. "ToolExecution") to include
  2723. // in API requests with the JSON null value. By default, fields with
  2724. // empty values are omitted from API requests. However, any field with
  2725. // an empty value appearing in NullFields will be sent to the server as
  2726. // null. It is an error if a field in this list has a non-empty value.
  2727. // This may be used to include null fields in Patch requests.
  2728. NullFields []string `json:"-"`
  2729. }
  2730. func (s *ToolExecutionStep) MarshalJSON() ([]byte, error) {
  2731. type NoMethod ToolExecutionStep
  2732. raw := NoMethod(*s)
  2733. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2734. }
  2735. // ToolExitCode: Exit code from a tool execution.
  2736. type ToolExitCode struct {
  2737. // Number: Tool execution exit code. A value of 0 means that the
  2738. // execution was successful.
  2739. //
  2740. // - In response: always set - In create/update request: always set
  2741. Number int64 `json:"number,omitempty"`
  2742. // ForceSendFields is a list of field names (e.g. "Number") to
  2743. // unconditionally include in API requests. By default, fields with
  2744. // empty values are omitted from API requests. However, any non-pointer,
  2745. // non-interface field appearing in ForceSendFields will be sent to the
  2746. // server regardless of whether the field is empty or not. This may be
  2747. // used to include empty fields in Patch requests.
  2748. ForceSendFields []string `json:"-"`
  2749. // NullFields is a list of field names (e.g. "Number") to include in API
  2750. // requests with the JSON null value. By default, fields with empty
  2751. // values are omitted from API requests. However, any field with an
  2752. // empty value appearing in NullFields will be sent to the server as
  2753. // null. It is an error if a field in this list has a non-empty value.
  2754. // This may be used to include null fields in Patch requests.
  2755. NullFields []string `json:"-"`
  2756. }
  2757. func (s *ToolExitCode) MarshalJSON() ([]byte, error) {
  2758. type NoMethod ToolExitCode
  2759. raw := NoMethod(*s)
  2760. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2761. }
  2762. // ToolOutputReference: A reference to a ToolExecution output file.
  2763. type ToolOutputReference struct {
  2764. // CreationTime: The creation time of the file.
  2765. //
  2766. // - In response: present if set by create/update request - In
  2767. // create/update request: optional
  2768. CreationTime *Timestamp `json:"creationTime,omitempty"`
  2769. // Output: A FileReference to an output file.
  2770. //
  2771. // - In response: always set - In create/update request: always set
  2772. Output *FileReference `json:"output,omitempty"`
  2773. // TestCase: The test case to which this output file belongs.
  2774. //
  2775. // - In response: present if set by create/update request - In
  2776. // create/update request: optional
  2777. TestCase *TestCaseReference `json:"testCase,omitempty"`
  2778. // ForceSendFields is a list of field names (e.g. "CreationTime") to
  2779. // unconditionally include in API requests. By default, fields with
  2780. // empty values are omitted from API requests. However, any non-pointer,
  2781. // non-interface field appearing in ForceSendFields will be sent to the
  2782. // server regardless of whether the field is empty or not. This may be
  2783. // used to include empty fields in Patch requests.
  2784. ForceSendFields []string `json:"-"`
  2785. // NullFields is a list of field names (e.g. "CreationTime") to include
  2786. // in API requests with the JSON null value. By default, fields with
  2787. // empty values are omitted from API requests. However, any field with
  2788. // an empty value appearing in NullFields will be sent to the server as
  2789. // null. It is an error if a field in this list has a non-empty value.
  2790. // This may be used to include null fields in Patch requests.
  2791. NullFields []string `json:"-"`
  2792. }
  2793. func (s *ToolOutputReference) MarshalJSON() ([]byte, error) {
  2794. type NoMethod ToolOutputReference
  2795. raw := NoMethod(*s)
  2796. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2797. }
  2798. // method id "toolresults.projects.getSettings":
  2799. type ProjectsGetSettingsCall struct {
  2800. s *Service
  2801. projectId string
  2802. urlParams_ gensupport.URLParams
  2803. ifNoneMatch_ string
  2804. ctx_ context.Context
  2805. header_ http.Header
  2806. }
  2807. // GetSettings: Gets the Tool Results settings for a project.
  2808. //
  2809. // May return any of the following canonical error codes:
  2810. //
  2811. // - PERMISSION_DENIED - if the user is not authorized to read from
  2812. // project
  2813. func (r *ProjectsService) GetSettings(projectId string) *ProjectsGetSettingsCall {
  2814. c := &ProjectsGetSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2815. c.projectId = projectId
  2816. return c
  2817. }
  2818. // Fields allows partial responses to be retrieved. See
  2819. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2820. // for more information.
  2821. func (c *ProjectsGetSettingsCall) Fields(s ...googleapi.Field) *ProjectsGetSettingsCall {
  2822. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2823. return c
  2824. }
  2825. // IfNoneMatch sets the optional parameter which makes the operation
  2826. // fail if the object's ETag matches the given value. This is useful for
  2827. // getting updates only after the object has changed since the last
  2828. // request. Use googleapi.IsNotModified to check whether the response
  2829. // error from Do is the result of In-None-Match.
  2830. func (c *ProjectsGetSettingsCall) IfNoneMatch(entityTag string) *ProjectsGetSettingsCall {
  2831. c.ifNoneMatch_ = entityTag
  2832. return c
  2833. }
  2834. // Context sets the context to be used in this call's Do method. Any
  2835. // pending HTTP request will be aborted if the provided context is
  2836. // canceled.
  2837. func (c *ProjectsGetSettingsCall) Context(ctx context.Context) *ProjectsGetSettingsCall {
  2838. c.ctx_ = ctx
  2839. return c
  2840. }
  2841. // Header returns an http.Header that can be modified by the caller to
  2842. // add HTTP headers to the request.
  2843. func (c *ProjectsGetSettingsCall) Header() http.Header {
  2844. if c.header_ == nil {
  2845. c.header_ = make(http.Header)
  2846. }
  2847. return c.header_
  2848. }
  2849. func (c *ProjectsGetSettingsCall) doRequest(alt string) (*http.Response, error) {
  2850. reqHeaders := make(http.Header)
  2851. for k, v := range c.header_ {
  2852. reqHeaders[k] = v
  2853. }
  2854. reqHeaders.Set("User-Agent", c.s.userAgent())
  2855. if c.ifNoneMatch_ != "" {
  2856. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2857. }
  2858. var body io.Reader = nil
  2859. c.urlParams_.Set("alt", alt)
  2860. c.urlParams_.Set("prettyPrint", "false")
  2861. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/settings")
  2862. urls += "?" + c.urlParams_.Encode()
  2863. req, err := http.NewRequest("GET", urls, body)
  2864. if err != nil {
  2865. return nil, err
  2866. }
  2867. req.Header = reqHeaders
  2868. googleapi.Expand(req.URL, map[string]string{
  2869. "projectId": c.projectId,
  2870. })
  2871. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2872. }
  2873. // Do executes the "toolresults.projects.getSettings" call.
  2874. // Exactly one of *ProjectSettings or error will be non-nil. Any non-2xx
  2875. // status code is an error. Response headers are in either
  2876. // *ProjectSettings.ServerResponse.Header or (if a response was returned
  2877. // at all) in error.(*googleapi.Error).Header. Use
  2878. // googleapi.IsNotModified to check whether the returned error was
  2879. // because http.StatusNotModified was returned.
  2880. func (c *ProjectsGetSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, error) {
  2881. gensupport.SetOptions(c.urlParams_, opts...)
  2882. res, err := c.doRequest("json")
  2883. if res != nil && res.StatusCode == http.StatusNotModified {
  2884. if res.Body != nil {
  2885. res.Body.Close()
  2886. }
  2887. return nil, &googleapi.Error{
  2888. Code: res.StatusCode,
  2889. Header: res.Header,
  2890. }
  2891. }
  2892. if err != nil {
  2893. return nil, err
  2894. }
  2895. defer googleapi.CloseBody(res)
  2896. if err := googleapi.CheckResponse(res); err != nil {
  2897. return nil, err
  2898. }
  2899. ret := &ProjectSettings{
  2900. ServerResponse: googleapi.ServerResponse{
  2901. Header: res.Header,
  2902. HTTPStatusCode: res.StatusCode,
  2903. },
  2904. }
  2905. target := &ret
  2906. if err := gensupport.DecodeResponse(target, res); err != nil {
  2907. return nil, err
  2908. }
  2909. return ret, nil
  2910. // {
  2911. // "description": "Gets the Tool Results settings for a project.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read from project",
  2912. // "httpMethod": "GET",
  2913. // "id": "toolresults.projects.getSettings",
  2914. // "parameterOrder": [
  2915. // "projectId"
  2916. // ],
  2917. // "parameters": {
  2918. // "projectId": {
  2919. // "description": "A Project id.\n\nRequired.",
  2920. // "location": "path",
  2921. // "required": true,
  2922. // "type": "string"
  2923. // }
  2924. // },
  2925. // "path": "{projectId}/settings",
  2926. // "response": {
  2927. // "$ref": "ProjectSettings"
  2928. // },
  2929. // "scopes": [
  2930. // "https://www.googleapis.com/auth/cloud-platform"
  2931. // ]
  2932. // }
  2933. }
  2934. // method id "toolresults.projects.initializeSettings":
  2935. type ProjectsInitializeSettingsCall struct {
  2936. s *Service
  2937. projectId string
  2938. urlParams_ gensupport.URLParams
  2939. ctx_ context.Context
  2940. header_ http.Header
  2941. }
  2942. // InitializeSettings: Creates resources for settings which have not yet
  2943. // been set.
  2944. //
  2945. // Currently, this creates a single resource: a Google Cloud Storage
  2946. // bucket, to be used as the default bucket for this project. The bucket
  2947. // is created in an FTL-own storage project. Except for in rare cases,
  2948. // calling this method in parallel from multiple clients will only
  2949. // create a single bucket. In order to avoid unnecessary storage
  2950. // charges, the bucket is configured to automatically delete objects
  2951. // older than 90 days.
  2952. //
  2953. // The bucket is created with the following permissions: - Owner access
  2954. // for owners of central storage project (FTL-owned) - Writer access for
  2955. // owners/editors of customer project - Reader access for viewers of
  2956. // customer project The default ACL on objects created in the bucket is:
  2957. // - Owner access for owners of central storage project - Reader access
  2958. // for owners/editors/viewers of customer project See Google Cloud
  2959. // Storage documentation for more details.
  2960. //
  2961. // If there is already a default bucket set and the project can access
  2962. // the bucket, this call does nothing. However, if the project doesn't
  2963. // have the permission to access the bucket or the bucket is deleted, a
  2964. // new bucket will be created.
  2965. //
  2966. // May return any canonical error codes, including the following:
  2967. //
  2968. // - PERMISSION_DENIED - if the user is not authorized to write to
  2969. // project - Any error code raised by Google Cloud Storage
  2970. func (r *ProjectsService) InitializeSettings(projectId string) *ProjectsInitializeSettingsCall {
  2971. c := &ProjectsInitializeSettingsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2972. c.projectId = projectId
  2973. return c
  2974. }
  2975. // Fields allows partial responses to be retrieved. See
  2976. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2977. // for more information.
  2978. func (c *ProjectsInitializeSettingsCall) Fields(s ...googleapi.Field) *ProjectsInitializeSettingsCall {
  2979. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2980. return c
  2981. }
  2982. // Context sets the context to be used in this call's Do method. Any
  2983. // pending HTTP request will be aborted if the provided context is
  2984. // canceled.
  2985. func (c *ProjectsInitializeSettingsCall) Context(ctx context.Context) *ProjectsInitializeSettingsCall {
  2986. c.ctx_ = ctx
  2987. return c
  2988. }
  2989. // Header returns an http.Header that can be modified by the caller to
  2990. // add HTTP headers to the request.
  2991. func (c *ProjectsInitializeSettingsCall) Header() http.Header {
  2992. if c.header_ == nil {
  2993. c.header_ = make(http.Header)
  2994. }
  2995. return c.header_
  2996. }
  2997. func (c *ProjectsInitializeSettingsCall) doRequest(alt string) (*http.Response, error) {
  2998. reqHeaders := make(http.Header)
  2999. for k, v := range c.header_ {
  3000. reqHeaders[k] = v
  3001. }
  3002. reqHeaders.Set("User-Agent", c.s.userAgent())
  3003. var body io.Reader = nil
  3004. c.urlParams_.Set("alt", alt)
  3005. c.urlParams_.Set("prettyPrint", "false")
  3006. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}:initializeSettings")
  3007. urls += "?" + c.urlParams_.Encode()
  3008. req, err := http.NewRequest("POST", urls, body)
  3009. if err != nil {
  3010. return nil, err
  3011. }
  3012. req.Header = reqHeaders
  3013. googleapi.Expand(req.URL, map[string]string{
  3014. "projectId": c.projectId,
  3015. })
  3016. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3017. }
  3018. // Do executes the "toolresults.projects.initializeSettings" call.
  3019. // Exactly one of *ProjectSettings or error will be non-nil. Any non-2xx
  3020. // status code is an error. Response headers are in either
  3021. // *ProjectSettings.ServerResponse.Header or (if a response was returned
  3022. // at all) in error.(*googleapi.Error).Header. Use
  3023. // googleapi.IsNotModified to check whether the returned error was
  3024. // because http.StatusNotModified was returned.
  3025. func (c *ProjectsInitializeSettingsCall) Do(opts ...googleapi.CallOption) (*ProjectSettings, error) {
  3026. gensupport.SetOptions(c.urlParams_, opts...)
  3027. res, err := c.doRequest("json")
  3028. if res != nil && res.StatusCode == http.StatusNotModified {
  3029. if res.Body != nil {
  3030. res.Body.Close()
  3031. }
  3032. return nil, &googleapi.Error{
  3033. Code: res.StatusCode,
  3034. Header: res.Header,
  3035. }
  3036. }
  3037. if err != nil {
  3038. return nil, err
  3039. }
  3040. defer googleapi.CloseBody(res)
  3041. if err := googleapi.CheckResponse(res); err != nil {
  3042. return nil, err
  3043. }
  3044. ret := &ProjectSettings{
  3045. ServerResponse: googleapi.ServerResponse{
  3046. Header: res.Header,
  3047. HTTPStatusCode: res.StatusCode,
  3048. },
  3049. }
  3050. target := &ret
  3051. if err := gensupport.DecodeResponse(target, res); err != nil {
  3052. return nil, err
  3053. }
  3054. return ret, nil
  3055. // {
  3056. // "description": "Creates resources for settings which have not yet been set.\n\nCurrently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in an FTL-own storage project. Except for in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days.\n\nThe bucket is created with the following permissions: - Owner access for owners of central storage project (FTL-owned) - Writer access for owners/editors of customer project - Reader access for viewers of customer project The default ACL on objects created in the bucket is: - Owner access for owners of central storage project - Reader access for owners/editors/viewers of customer project See Google Cloud Storage documentation for more details.\n\nIf there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deleted, a new bucket will be created.\n\nMay return any canonical error codes, including the following:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage",
  3057. // "httpMethod": "POST",
  3058. // "id": "toolresults.projects.initializeSettings",
  3059. // "parameterOrder": [
  3060. // "projectId"
  3061. // ],
  3062. // "parameters": {
  3063. // "projectId": {
  3064. // "description": "A Project id.\n\nRequired.",
  3065. // "location": "path",
  3066. // "required": true,
  3067. // "type": "string"
  3068. // }
  3069. // },
  3070. // "path": "{projectId}:initializeSettings",
  3071. // "response": {
  3072. // "$ref": "ProjectSettings"
  3073. // },
  3074. // "scopes": [
  3075. // "https://www.googleapis.com/auth/cloud-platform"
  3076. // ]
  3077. // }
  3078. }
  3079. // method id "toolresults.projects.histories.create":
  3080. type ProjectsHistoriesCreateCall struct {
  3081. s *Service
  3082. projectId string
  3083. history *History
  3084. urlParams_ gensupport.URLParams
  3085. ctx_ context.Context
  3086. header_ http.Header
  3087. }
  3088. // Create: Creates a History.
  3089. //
  3090. // The returned History will have the id set.
  3091. //
  3092. // May return any of the following canonical error codes:
  3093. //
  3094. // - PERMISSION_DENIED - if the user is not authorized to write to
  3095. // project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND
  3096. // - if the containing project does not exist
  3097. func (r *ProjectsHistoriesService) Create(projectId string, history *History) *ProjectsHistoriesCreateCall {
  3098. c := &ProjectsHistoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3099. c.projectId = projectId
  3100. c.history = history
  3101. return c
  3102. }
  3103. // RequestId sets the optional parameter "requestId": A unique request
  3104. // ID for server to detect duplicated requests. For example, a
  3105. // UUID.
  3106. //
  3107. // Optional, but strongly recommended.
  3108. func (c *ProjectsHistoriesCreateCall) RequestId(requestId string) *ProjectsHistoriesCreateCall {
  3109. c.urlParams_.Set("requestId", requestId)
  3110. return c
  3111. }
  3112. // Fields allows partial responses to be retrieved. See
  3113. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3114. // for more information.
  3115. func (c *ProjectsHistoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesCreateCall {
  3116. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3117. return c
  3118. }
  3119. // Context sets the context to be used in this call's Do method. Any
  3120. // pending HTTP request will be aborted if the provided context is
  3121. // canceled.
  3122. func (c *ProjectsHistoriesCreateCall) Context(ctx context.Context) *ProjectsHistoriesCreateCall {
  3123. c.ctx_ = ctx
  3124. return c
  3125. }
  3126. // Header returns an http.Header that can be modified by the caller to
  3127. // add HTTP headers to the request.
  3128. func (c *ProjectsHistoriesCreateCall) Header() http.Header {
  3129. if c.header_ == nil {
  3130. c.header_ = make(http.Header)
  3131. }
  3132. return c.header_
  3133. }
  3134. func (c *ProjectsHistoriesCreateCall) doRequest(alt string) (*http.Response, error) {
  3135. reqHeaders := make(http.Header)
  3136. for k, v := range c.header_ {
  3137. reqHeaders[k] = v
  3138. }
  3139. reqHeaders.Set("User-Agent", c.s.userAgent())
  3140. var body io.Reader = nil
  3141. body, err := googleapi.WithoutDataWrapper.JSONReader(c.history)
  3142. if err != nil {
  3143. return nil, err
  3144. }
  3145. reqHeaders.Set("Content-Type", "application/json")
  3146. c.urlParams_.Set("alt", alt)
  3147. c.urlParams_.Set("prettyPrint", "false")
  3148. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories")
  3149. urls += "?" + c.urlParams_.Encode()
  3150. req, err := http.NewRequest("POST", urls, body)
  3151. if err != nil {
  3152. return nil, err
  3153. }
  3154. req.Header = reqHeaders
  3155. googleapi.Expand(req.URL, map[string]string{
  3156. "projectId": c.projectId,
  3157. })
  3158. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3159. }
  3160. // Do executes the "toolresults.projects.histories.create" call.
  3161. // Exactly one of *History or error will be non-nil. Any non-2xx status
  3162. // code is an error. Response headers are in either
  3163. // *History.ServerResponse.Header or (if a response was returned at all)
  3164. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3165. // check whether the returned error was because http.StatusNotModified
  3166. // was returned.
  3167. func (c *ProjectsHistoriesCreateCall) Do(opts ...googleapi.CallOption) (*History, error) {
  3168. gensupport.SetOptions(c.urlParams_, opts...)
  3169. res, err := c.doRequest("json")
  3170. if res != nil && res.StatusCode == http.StatusNotModified {
  3171. if res.Body != nil {
  3172. res.Body.Close()
  3173. }
  3174. return nil, &googleapi.Error{
  3175. Code: res.StatusCode,
  3176. Header: res.Header,
  3177. }
  3178. }
  3179. if err != nil {
  3180. return nil, err
  3181. }
  3182. defer googleapi.CloseBody(res)
  3183. if err := googleapi.CheckResponse(res); err != nil {
  3184. return nil, err
  3185. }
  3186. ret := &History{
  3187. ServerResponse: googleapi.ServerResponse{
  3188. Header: res.Header,
  3189. HTTPStatusCode: res.StatusCode,
  3190. },
  3191. }
  3192. target := &ret
  3193. if err := gensupport.DecodeResponse(target, res); err != nil {
  3194. return nil, err
  3195. }
  3196. return ret, nil
  3197. // {
  3198. // "description": "Creates a History.\n\nThe returned History will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist",
  3199. // "httpMethod": "POST",
  3200. // "id": "toolresults.projects.histories.create",
  3201. // "parameterOrder": [
  3202. // "projectId"
  3203. // ],
  3204. // "parameters": {
  3205. // "projectId": {
  3206. // "description": "A Project id.\n\nRequired.",
  3207. // "location": "path",
  3208. // "required": true,
  3209. // "type": "string"
  3210. // },
  3211. // "requestId": {
  3212. // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.",
  3213. // "location": "query",
  3214. // "type": "string"
  3215. // }
  3216. // },
  3217. // "path": "{projectId}/histories",
  3218. // "request": {
  3219. // "$ref": "History"
  3220. // },
  3221. // "response": {
  3222. // "$ref": "History"
  3223. // },
  3224. // "scopes": [
  3225. // "https://www.googleapis.com/auth/cloud-platform"
  3226. // ]
  3227. // }
  3228. }
  3229. // method id "toolresults.projects.histories.get":
  3230. type ProjectsHistoriesGetCall struct {
  3231. s *Service
  3232. projectId string
  3233. historyId string
  3234. urlParams_ gensupport.URLParams
  3235. ifNoneMatch_ string
  3236. ctx_ context.Context
  3237. header_ http.Header
  3238. }
  3239. // Get: Gets a History.
  3240. //
  3241. // May return any of the following canonical error codes:
  3242. //
  3243. // - PERMISSION_DENIED - if the user is not authorized to read project -
  3244. // INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
  3245. // History does not exist
  3246. func (r *ProjectsHistoriesService) Get(projectId string, historyId string) *ProjectsHistoriesGetCall {
  3247. c := &ProjectsHistoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3248. c.projectId = projectId
  3249. c.historyId = historyId
  3250. return c
  3251. }
  3252. // Fields allows partial responses to be retrieved. See
  3253. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3254. // for more information.
  3255. func (c *ProjectsHistoriesGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesGetCall {
  3256. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3257. return c
  3258. }
  3259. // IfNoneMatch sets the optional parameter which makes the operation
  3260. // fail if the object's ETag matches the given value. This is useful for
  3261. // getting updates only after the object has changed since the last
  3262. // request. Use googleapi.IsNotModified to check whether the response
  3263. // error from Do is the result of In-None-Match.
  3264. func (c *ProjectsHistoriesGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesGetCall {
  3265. c.ifNoneMatch_ = entityTag
  3266. return c
  3267. }
  3268. // Context sets the context to be used in this call's Do method. Any
  3269. // pending HTTP request will be aborted if the provided context is
  3270. // canceled.
  3271. func (c *ProjectsHistoriesGetCall) Context(ctx context.Context) *ProjectsHistoriesGetCall {
  3272. c.ctx_ = ctx
  3273. return c
  3274. }
  3275. // Header returns an http.Header that can be modified by the caller to
  3276. // add HTTP headers to the request.
  3277. func (c *ProjectsHistoriesGetCall) Header() http.Header {
  3278. if c.header_ == nil {
  3279. c.header_ = make(http.Header)
  3280. }
  3281. return c.header_
  3282. }
  3283. func (c *ProjectsHistoriesGetCall) doRequest(alt string) (*http.Response, error) {
  3284. reqHeaders := make(http.Header)
  3285. for k, v := range c.header_ {
  3286. reqHeaders[k] = v
  3287. }
  3288. reqHeaders.Set("User-Agent", c.s.userAgent())
  3289. if c.ifNoneMatch_ != "" {
  3290. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3291. }
  3292. var body io.Reader = nil
  3293. c.urlParams_.Set("alt", alt)
  3294. c.urlParams_.Set("prettyPrint", "false")
  3295. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}")
  3296. urls += "?" + c.urlParams_.Encode()
  3297. req, err := http.NewRequest("GET", urls, body)
  3298. if err != nil {
  3299. return nil, err
  3300. }
  3301. req.Header = reqHeaders
  3302. googleapi.Expand(req.URL, map[string]string{
  3303. "projectId": c.projectId,
  3304. "historyId": c.historyId,
  3305. })
  3306. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3307. }
  3308. // Do executes the "toolresults.projects.histories.get" call.
  3309. // Exactly one of *History or error will be non-nil. Any non-2xx status
  3310. // code is an error. Response headers are in either
  3311. // *History.ServerResponse.Header or (if a response was returned at all)
  3312. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3313. // check whether the returned error was because http.StatusNotModified
  3314. // was returned.
  3315. func (c *ProjectsHistoriesGetCall) Do(opts ...googleapi.CallOption) (*History, error) {
  3316. gensupport.SetOptions(c.urlParams_, opts...)
  3317. res, err := c.doRequest("json")
  3318. if res != nil && res.StatusCode == http.StatusNotModified {
  3319. if res.Body != nil {
  3320. res.Body.Close()
  3321. }
  3322. return nil, &googleapi.Error{
  3323. Code: res.StatusCode,
  3324. Header: res.Header,
  3325. }
  3326. }
  3327. if err != nil {
  3328. return nil, err
  3329. }
  3330. defer googleapi.CloseBody(res)
  3331. if err := googleapi.CheckResponse(res); err != nil {
  3332. return nil, err
  3333. }
  3334. ret := &History{
  3335. ServerResponse: googleapi.ServerResponse{
  3336. Header: res.Header,
  3337. HTTPStatusCode: res.StatusCode,
  3338. },
  3339. }
  3340. target := &ret
  3341. if err := gensupport.DecodeResponse(target, res); err != nil {
  3342. return nil, err
  3343. }
  3344. return ret, nil
  3345. // {
  3346. // "description": "Gets a History.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist",
  3347. // "httpMethod": "GET",
  3348. // "id": "toolresults.projects.histories.get",
  3349. // "parameterOrder": [
  3350. // "projectId",
  3351. // "historyId"
  3352. // ],
  3353. // "parameters": {
  3354. // "historyId": {
  3355. // "description": "A History id.\n\nRequired.",
  3356. // "location": "path",
  3357. // "required": true,
  3358. // "type": "string"
  3359. // },
  3360. // "projectId": {
  3361. // "description": "A Project id.\n\nRequired.",
  3362. // "location": "path",
  3363. // "required": true,
  3364. // "type": "string"
  3365. // }
  3366. // },
  3367. // "path": "{projectId}/histories/{historyId}",
  3368. // "response": {
  3369. // "$ref": "History"
  3370. // },
  3371. // "scopes": [
  3372. // "https://www.googleapis.com/auth/cloud-platform"
  3373. // ]
  3374. // }
  3375. }
  3376. // method id "toolresults.projects.histories.list":
  3377. type ProjectsHistoriesListCall struct {
  3378. s *Service
  3379. projectId string
  3380. urlParams_ gensupport.URLParams
  3381. ifNoneMatch_ string
  3382. ctx_ context.Context
  3383. header_ http.Header
  3384. }
  3385. // List: Lists Histories for a given Project.
  3386. //
  3387. // The histories are sorted by modification time in descending order.
  3388. // The history_id key will be used to order the history with the same
  3389. // modification time.
  3390. //
  3391. // May return any of the following canonical error codes:
  3392. //
  3393. // - PERMISSION_DENIED - if the user is not authorized to read project -
  3394. // INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
  3395. // History does not exist
  3396. func (r *ProjectsHistoriesService) List(projectId string) *ProjectsHistoriesListCall {
  3397. c := &ProjectsHistoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3398. c.projectId = projectId
  3399. return c
  3400. }
  3401. // FilterByName sets the optional parameter "filterByName": If set, only
  3402. // return histories with the given name.
  3403. func (c *ProjectsHistoriesListCall) FilterByName(filterByName string) *ProjectsHistoriesListCall {
  3404. c.urlParams_.Set("filterByName", filterByName)
  3405. return c
  3406. }
  3407. // PageSize sets the optional parameter "pageSize": The maximum number
  3408. // of Histories to fetch.
  3409. //
  3410. // Default value: 20. The server will use this default if the field is
  3411. // not set or has a value of 0. Any value greater than 100 will be
  3412. // treated as 100.
  3413. func (c *ProjectsHistoriesListCall) PageSize(pageSize int64) *ProjectsHistoriesListCall {
  3414. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3415. return c
  3416. }
  3417. // PageToken sets the optional parameter "pageToken": A continuation
  3418. // token to resume the query at the next item.
  3419. func (c *ProjectsHistoriesListCall) PageToken(pageToken string) *ProjectsHistoriesListCall {
  3420. c.urlParams_.Set("pageToken", pageToken)
  3421. return c
  3422. }
  3423. // Fields allows partial responses to be retrieved. See
  3424. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3425. // for more information.
  3426. func (c *ProjectsHistoriesListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesListCall {
  3427. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3428. return c
  3429. }
  3430. // IfNoneMatch sets the optional parameter which makes the operation
  3431. // fail if the object's ETag matches the given value. This is useful for
  3432. // getting updates only after the object has changed since the last
  3433. // request. Use googleapi.IsNotModified to check whether the response
  3434. // error from Do is the result of In-None-Match.
  3435. func (c *ProjectsHistoriesListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesListCall {
  3436. c.ifNoneMatch_ = entityTag
  3437. return c
  3438. }
  3439. // Context sets the context to be used in this call's Do method. Any
  3440. // pending HTTP request will be aborted if the provided context is
  3441. // canceled.
  3442. func (c *ProjectsHistoriesListCall) Context(ctx context.Context) *ProjectsHistoriesListCall {
  3443. c.ctx_ = ctx
  3444. return c
  3445. }
  3446. // Header returns an http.Header that can be modified by the caller to
  3447. // add HTTP headers to the request.
  3448. func (c *ProjectsHistoriesListCall) Header() http.Header {
  3449. if c.header_ == nil {
  3450. c.header_ = make(http.Header)
  3451. }
  3452. return c.header_
  3453. }
  3454. func (c *ProjectsHistoriesListCall) doRequest(alt string) (*http.Response, error) {
  3455. reqHeaders := make(http.Header)
  3456. for k, v := range c.header_ {
  3457. reqHeaders[k] = v
  3458. }
  3459. reqHeaders.Set("User-Agent", c.s.userAgent())
  3460. if c.ifNoneMatch_ != "" {
  3461. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3462. }
  3463. var body io.Reader = nil
  3464. c.urlParams_.Set("alt", alt)
  3465. c.urlParams_.Set("prettyPrint", "false")
  3466. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories")
  3467. urls += "?" + c.urlParams_.Encode()
  3468. req, err := http.NewRequest("GET", urls, body)
  3469. if err != nil {
  3470. return nil, err
  3471. }
  3472. req.Header = reqHeaders
  3473. googleapi.Expand(req.URL, map[string]string{
  3474. "projectId": c.projectId,
  3475. })
  3476. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3477. }
  3478. // Do executes the "toolresults.projects.histories.list" call.
  3479. // Exactly one of *ListHistoriesResponse or error will be non-nil. Any
  3480. // non-2xx status code is an error. Response headers are in either
  3481. // *ListHistoriesResponse.ServerResponse.Header or (if a response was
  3482. // returned at all) in error.(*googleapi.Error).Header. Use
  3483. // googleapi.IsNotModified to check whether the returned error was
  3484. // because http.StatusNotModified was returned.
  3485. func (c *ProjectsHistoriesListCall) Do(opts ...googleapi.CallOption) (*ListHistoriesResponse, error) {
  3486. gensupport.SetOptions(c.urlParams_, opts...)
  3487. res, err := c.doRequest("json")
  3488. if res != nil && res.StatusCode == http.StatusNotModified {
  3489. if res.Body != nil {
  3490. res.Body.Close()
  3491. }
  3492. return nil, &googleapi.Error{
  3493. Code: res.StatusCode,
  3494. Header: res.Header,
  3495. }
  3496. }
  3497. if err != nil {
  3498. return nil, err
  3499. }
  3500. defer googleapi.CloseBody(res)
  3501. if err := googleapi.CheckResponse(res); err != nil {
  3502. return nil, err
  3503. }
  3504. ret := &ListHistoriesResponse{
  3505. ServerResponse: googleapi.ServerResponse{
  3506. Header: res.Header,
  3507. HTTPStatusCode: res.StatusCode,
  3508. },
  3509. }
  3510. target := &ret
  3511. if err := gensupport.DecodeResponse(target, res); err != nil {
  3512. return nil, err
  3513. }
  3514. return ret, nil
  3515. // {
  3516. // "description": "Lists Histories for a given Project.\n\nThe histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist",
  3517. // "httpMethod": "GET",
  3518. // "id": "toolresults.projects.histories.list",
  3519. // "parameterOrder": [
  3520. // "projectId"
  3521. // ],
  3522. // "parameters": {
  3523. // "filterByName": {
  3524. // "description": "If set, only return histories with the given name.\n\nOptional.",
  3525. // "location": "query",
  3526. // "type": "string"
  3527. // },
  3528. // "pageSize": {
  3529. // "description": "The maximum number of Histories to fetch.\n\nDefault value: 20. The server will use this default if the field is not set or has a value of 0. Any value greater than 100 will be treated as 100.\n\nOptional.",
  3530. // "format": "int32",
  3531. // "location": "query",
  3532. // "type": "integer"
  3533. // },
  3534. // "pageToken": {
  3535. // "description": "A continuation token to resume the query at the next item.\n\nOptional.",
  3536. // "location": "query",
  3537. // "type": "string"
  3538. // },
  3539. // "projectId": {
  3540. // "description": "A Project id.\n\nRequired.",
  3541. // "location": "path",
  3542. // "required": true,
  3543. // "type": "string"
  3544. // }
  3545. // },
  3546. // "path": "{projectId}/histories",
  3547. // "response": {
  3548. // "$ref": "ListHistoriesResponse"
  3549. // },
  3550. // "scopes": [
  3551. // "https://www.googleapis.com/auth/cloud-platform"
  3552. // ]
  3553. // }
  3554. }
  3555. // Pages invokes f for each page of results.
  3556. // A non-nil error returned from f will halt the iteration.
  3557. // The provided context supersedes any context provided to the Context method.
  3558. func (c *ProjectsHistoriesListCall) Pages(ctx context.Context, f func(*ListHistoriesResponse) error) error {
  3559. c.ctx_ = ctx
  3560. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3561. for {
  3562. x, err := c.Do()
  3563. if err != nil {
  3564. return err
  3565. }
  3566. if err := f(x); err != nil {
  3567. return err
  3568. }
  3569. if x.NextPageToken == "" {
  3570. return nil
  3571. }
  3572. c.PageToken(x.NextPageToken)
  3573. }
  3574. }
  3575. // method id "toolresults.projects.histories.executions.create":
  3576. type ProjectsHistoriesExecutionsCreateCall struct {
  3577. s *Service
  3578. projectId string
  3579. historyId string
  3580. execution *Execution
  3581. urlParams_ gensupport.URLParams
  3582. ctx_ context.Context
  3583. header_ http.Header
  3584. }
  3585. // Create: Creates an Execution.
  3586. //
  3587. // The returned Execution will have the id set.
  3588. //
  3589. // May return any of the following canonical error codes:
  3590. //
  3591. // - PERMISSION_DENIED - if the user is not authorized to write to
  3592. // project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND
  3593. // - if the containing History does not exist
  3594. func (r *ProjectsHistoriesExecutionsService) Create(projectId string, historyId string, execution *Execution) *ProjectsHistoriesExecutionsCreateCall {
  3595. c := &ProjectsHistoriesExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3596. c.projectId = projectId
  3597. c.historyId = historyId
  3598. c.execution = execution
  3599. return c
  3600. }
  3601. // RequestId sets the optional parameter "requestId": A unique request
  3602. // ID for server to detect duplicated requests. For example, a
  3603. // UUID.
  3604. //
  3605. // Optional, but strongly recommended.
  3606. func (c *ProjectsHistoriesExecutionsCreateCall) RequestId(requestId string) *ProjectsHistoriesExecutionsCreateCall {
  3607. c.urlParams_.Set("requestId", requestId)
  3608. return c
  3609. }
  3610. // Fields allows partial responses to be retrieved. See
  3611. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3612. // for more information.
  3613. func (c *ProjectsHistoriesExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsCreateCall {
  3614. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3615. return c
  3616. }
  3617. // Context sets the context to be used in this call's Do method. Any
  3618. // pending HTTP request will be aborted if the provided context is
  3619. // canceled.
  3620. func (c *ProjectsHistoriesExecutionsCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsCreateCall {
  3621. c.ctx_ = ctx
  3622. return c
  3623. }
  3624. // Header returns an http.Header that can be modified by the caller to
  3625. // add HTTP headers to the request.
  3626. func (c *ProjectsHistoriesExecutionsCreateCall) Header() http.Header {
  3627. if c.header_ == nil {
  3628. c.header_ = make(http.Header)
  3629. }
  3630. return c.header_
  3631. }
  3632. func (c *ProjectsHistoriesExecutionsCreateCall) doRequest(alt string) (*http.Response, error) {
  3633. reqHeaders := make(http.Header)
  3634. for k, v := range c.header_ {
  3635. reqHeaders[k] = v
  3636. }
  3637. reqHeaders.Set("User-Agent", c.s.userAgent())
  3638. var body io.Reader = nil
  3639. body, err := googleapi.WithoutDataWrapper.JSONReader(c.execution)
  3640. if err != nil {
  3641. return nil, err
  3642. }
  3643. reqHeaders.Set("Content-Type", "application/json")
  3644. c.urlParams_.Set("alt", alt)
  3645. c.urlParams_.Set("prettyPrint", "false")
  3646. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions")
  3647. urls += "?" + c.urlParams_.Encode()
  3648. req, err := http.NewRequest("POST", urls, body)
  3649. if err != nil {
  3650. return nil, err
  3651. }
  3652. req.Header = reqHeaders
  3653. googleapi.Expand(req.URL, map[string]string{
  3654. "projectId": c.projectId,
  3655. "historyId": c.historyId,
  3656. })
  3657. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3658. }
  3659. // Do executes the "toolresults.projects.histories.executions.create" call.
  3660. // Exactly one of *Execution or error will be non-nil. Any non-2xx
  3661. // status code is an error. Response headers are in either
  3662. // *Execution.ServerResponse.Header or (if a response was returned at
  3663. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3664. // to check whether the returned error was because
  3665. // http.StatusNotModified was returned.
  3666. func (c *ProjectsHistoriesExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
  3667. gensupport.SetOptions(c.urlParams_, opts...)
  3668. res, err := c.doRequest("json")
  3669. if res != nil && res.StatusCode == http.StatusNotModified {
  3670. if res.Body != nil {
  3671. res.Body.Close()
  3672. }
  3673. return nil, &googleapi.Error{
  3674. Code: res.StatusCode,
  3675. Header: res.Header,
  3676. }
  3677. }
  3678. if err != nil {
  3679. return nil, err
  3680. }
  3681. defer googleapi.CloseBody(res)
  3682. if err := googleapi.CheckResponse(res); err != nil {
  3683. return nil, err
  3684. }
  3685. ret := &Execution{
  3686. ServerResponse: googleapi.ServerResponse{
  3687. Header: res.Header,
  3688. HTTPStatusCode: res.StatusCode,
  3689. },
  3690. }
  3691. target := &ret
  3692. if err := gensupport.DecodeResponse(target, res); err != nil {
  3693. return nil, err
  3694. }
  3695. return ret, nil
  3696. // {
  3697. // "description": "Creates an Execution.\n\nThe returned Execution will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist",
  3698. // "httpMethod": "POST",
  3699. // "id": "toolresults.projects.histories.executions.create",
  3700. // "parameterOrder": [
  3701. // "projectId",
  3702. // "historyId"
  3703. // ],
  3704. // "parameters": {
  3705. // "historyId": {
  3706. // "description": "A History id.\n\nRequired.",
  3707. // "location": "path",
  3708. // "required": true,
  3709. // "type": "string"
  3710. // },
  3711. // "projectId": {
  3712. // "description": "A Project id.\n\nRequired.",
  3713. // "location": "path",
  3714. // "required": true,
  3715. // "type": "string"
  3716. // },
  3717. // "requestId": {
  3718. // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.",
  3719. // "location": "query",
  3720. // "type": "string"
  3721. // }
  3722. // },
  3723. // "path": "{projectId}/histories/{historyId}/executions",
  3724. // "request": {
  3725. // "$ref": "Execution"
  3726. // },
  3727. // "response": {
  3728. // "$ref": "Execution"
  3729. // },
  3730. // "scopes": [
  3731. // "https://www.googleapis.com/auth/cloud-platform"
  3732. // ]
  3733. // }
  3734. }
  3735. // method id "toolresults.projects.histories.executions.get":
  3736. type ProjectsHistoriesExecutionsGetCall struct {
  3737. s *Service
  3738. projectId string
  3739. historyId string
  3740. executionId string
  3741. urlParams_ gensupport.URLParams
  3742. ifNoneMatch_ string
  3743. ctx_ context.Context
  3744. header_ http.Header
  3745. }
  3746. // Get: Gets an Execution.
  3747. //
  3748. // May return any of the following canonical error codes:
  3749. //
  3750. // - PERMISSION_DENIED - if the user is not authorized to write to
  3751. // project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND
  3752. // - if the Execution does not exist
  3753. func (r *ProjectsHistoriesExecutionsService) Get(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsGetCall {
  3754. c := &ProjectsHistoriesExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3755. c.projectId = projectId
  3756. c.historyId = historyId
  3757. c.executionId = executionId
  3758. return c
  3759. }
  3760. // Fields allows partial responses to be retrieved. See
  3761. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3762. // for more information.
  3763. func (c *ProjectsHistoriesExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsGetCall {
  3764. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3765. return c
  3766. }
  3767. // IfNoneMatch sets the optional parameter which makes the operation
  3768. // fail if the object's ETag matches the given value. This is useful for
  3769. // getting updates only after the object has changed since the last
  3770. // request. Use googleapi.IsNotModified to check whether the response
  3771. // error from Do is the result of In-None-Match.
  3772. func (c *ProjectsHistoriesExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsGetCall {
  3773. c.ifNoneMatch_ = entityTag
  3774. return c
  3775. }
  3776. // Context sets the context to be used in this call's Do method. Any
  3777. // pending HTTP request will be aborted if the provided context is
  3778. // canceled.
  3779. func (c *ProjectsHistoriesExecutionsGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsGetCall {
  3780. c.ctx_ = ctx
  3781. return c
  3782. }
  3783. // Header returns an http.Header that can be modified by the caller to
  3784. // add HTTP headers to the request.
  3785. func (c *ProjectsHistoriesExecutionsGetCall) Header() http.Header {
  3786. if c.header_ == nil {
  3787. c.header_ = make(http.Header)
  3788. }
  3789. return c.header_
  3790. }
  3791. func (c *ProjectsHistoriesExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
  3792. reqHeaders := make(http.Header)
  3793. for k, v := range c.header_ {
  3794. reqHeaders[k] = v
  3795. }
  3796. reqHeaders.Set("User-Agent", c.s.userAgent())
  3797. if c.ifNoneMatch_ != "" {
  3798. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3799. }
  3800. var body io.Reader = nil
  3801. c.urlParams_.Set("alt", alt)
  3802. c.urlParams_.Set("prettyPrint", "false")
  3803. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}")
  3804. urls += "?" + c.urlParams_.Encode()
  3805. req, err := http.NewRequest("GET", urls, body)
  3806. if err != nil {
  3807. return nil, err
  3808. }
  3809. req.Header = reqHeaders
  3810. googleapi.Expand(req.URL, map[string]string{
  3811. "projectId": c.projectId,
  3812. "historyId": c.historyId,
  3813. "executionId": c.executionId,
  3814. })
  3815. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3816. }
  3817. // Do executes the "toolresults.projects.histories.executions.get" call.
  3818. // Exactly one of *Execution or error will be non-nil. Any non-2xx
  3819. // status code is an error. Response headers are in either
  3820. // *Execution.ServerResponse.Header or (if a response was returned at
  3821. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3822. // to check whether the returned error was because
  3823. // http.StatusNotModified was returned.
  3824. func (c *ProjectsHistoriesExecutionsGetCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
  3825. gensupport.SetOptions(c.urlParams_, opts...)
  3826. res, err := c.doRequest("json")
  3827. if res != nil && res.StatusCode == http.StatusNotModified {
  3828. if res.Body != nil {
  3829. res.Body.Close()
  3830. }
  3831. return nil, &googleapi.Error{
  3832. Code: res.StatusCode,
  3833. Header: res.Header,
  3834. }
  3835. }
  3836. if err != nil {
  3837. return nil, err
  3838. }
  3839. defer googleapi.CloseBody(res)
  3840. if err := googleapi.CheckResponse(res); err != nil {
  3841. return nil, err
  3842. }
  3843. ret := &Execution{
  3844. ServerResponse: googleapi.ServerResponse{
  3845. Header: res.Header,
  3846. HTTPStatusCode: res.StatusCode,
  3847. },
  3848. }
  3849. target := &ret
  3850. if err := gensupport.DecodeResponse(target, res); err != nil {
  3851. return nil, err
  3852. }
  3853. return ret, nil
  3854. // {
  3855. // "description": "Gets an Execution.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist",
  3856. // "httpMethod": "GET",
  3857. // "id": "toolresults.projects.histories.executions.get",
  3858. // "parameterOrder": [
  3859. // "projectId",
  3860. // "historyId",
  3861. // "executionId"
  3862. // ],
  3863. // "parameters": {
  3864. // "executionId": {
  3865. // "description": "An Execution id.\n\nRequired.",
  3866. // "location": "path",
  3867. // "required": true,
  3868. // "type": "string"
  3869. // },
  3870. // "historyId": {
  3871. // "description": "A History id.\n\nRequired.",
  3872. // "location": "path",
  3873. // "required": true,
  3874. // "type": "string"
  3875. // },
  3876. // "projectId": {
  3877. // "description": "A Project id.\n\nRequired.",
  3878. // "location": "path",
  3879. // "required": true,
  3880. // "type": "string"
  3881. // }
  3882. // },
  3883. // "path": "{projectId}/histories/{historyId}/executions/{executionId}",
  3884. // "response": {
  3885. // "$ref": "Execution"
  3886. // },
  3887. // "scopes": [
  3888. // "https://www.googleapis.com/auth/cloud-platform"
  3889. // ]
  3890. // }
  3891. }
  3892. // method id "toolresults.projects.histories.executions.list":
  3893. type ProjectsHistoriesExecutionsListCall struct {
  3894. s *Service
  3895. projectId string
  3896. historyId string
  3897. urlParams_ gensupport.URLParams
  3898. ifNoneMatch_ string
  3899. ctx_ context.Context
  3900. header_ http.Header
  3901. }
  3902. // List: Lists Executions for a given History.
  3903. //
  3904. // The executions are sorted by creation_time in descending order. The
  3905. // execution_id key will be used to order the executions with the same
  3906. // creation_time.
  3907. //
  3908. // May return any of the following canonical error codes:
  3909. //
  3910. // - PERMISSION_DENIED - if the user is not authorized to read project -
  3911. // INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
  3912. // containing History does not exist
  3913. func (r *ProjectsHistoriesExecutionsService) List(projectId string, historyId string) *ProjectsHistoriesExecutionsListCall {
  3914. c := &ProjectsHistoriesExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3915. c.projectId = projectId
  3916. c.historyId = historyId
  3917. return c
  3918. }
  3919. // PageSize sets the optional parameter "pageSize": The maximum number
  3920. // of Executions to fetch.
  3921. //
  3922. // Default value: 25. The server will use this default if the field is
  3923. // not set or has a value of 0.
  3924. func (c *ProjectsHistoriesExecutionsListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsListCall {
  3925. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3926. return c
  3927. }
  3928. // PageToken sets the optional parameter "pageToken": A continuation
  3929. // token to resume the query at the next item.
  3930. func (c *ProjectsHistoriesExecutionsListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsListCall {
  3931. c.urlParams_.Set("pageToken", pageToken)
  3932. return c
  3933. }
  3934. // Fields allows partial responses to be retrieved. See
  3935. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3936. // for more information.
  3937. func (c *ProjectsHistoriesExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsListCall {
  3938. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3939. return c
  3940. }
  3941. // IfNoneMatch sets the optional parameter which makes the operation
  3942. // fail if the object's ETag matches the given value. This is useful for
  3943. // getting updates only after the object has changed since the last
  3944. // request. Use googleapi.IsNotModified to check whether the response
  3945. // error from Do is the result of In-None-Match.
  3946. func (c *ProjectsHistoriesExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsListCall {
  3947. c.ifNoneMatch_ = entityTag
  3948. return c
  3949. }
  3950. // Context sets the context to be used in this call's Do method. Any
  3951. // pending HTTP request will be aborted if the provided context is
  3952. // canceled.
  3953. func (c *ProjectsHistoriesExecutionsListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsListCall {
  3954. c.ctx_ = ctx
  3955. return c
  3956. }
  3957. // Header returns an http.Header that can be modified by the caller to
  3958. // add HTTP headers to the request.
  3959. func (c *ProjectsHistoriesExecutionsListCall) Header() http.Header {
  3960. if c.header_ == nil {
  3961. c.header_ = make(http.Header)
  3962. }
  3963. return c.header_
  3964. }
  3965. func (c *ProjectsHistoriesExecutionsListCall) doRequest(alt string) (*http.Response, error) {
  3966. reqHeaders := make(http.Header)
  3967. for k, v := range c.header_ {
  3968. reqHeaders[k] = v
  3969. }
  3970. reqHeaders.Set("User-Agent", c.s.userAgent())
  3971. if c.ifNoneMatch_ != "" {
  3972. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3973. }
  3974. var body io.Reader = nil
  3975. c.urlParams_.Set("alt", alt)
  3976. c.urlParams_.Set("prettyPrint", "false")
  3977. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions")
  3978. urls += "?" + c.urlParams_.Encode()
  3979. req, err := http.NewRequest("GET", urls, body)
  3980. if err != nil {
  3981. return nil, err
  3982. }
  3983. req.Header = reqHeaders
  3984. googleapi.Expand(req.URL, map[string]string{
  3985. "projectId": c.projectId,
  3986. "historyId": c.historyId,
  3987. })
  3988. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3989. }
  3990. // Do executes the "toolresults.projects.histories.executions.list" call.
  3991. // Exactly one of *ListExecutionsResponse or error will be non-nil. Any
  3992. // non-2xx status code is an error. Response headers are in either
  3993. // *ListExecutionsResponse.ServerResponse.Header or (if a response was
  3994. // returned at all) in error.(*googleapi.Error).Header. Use
  3995. // googleapi.IsNotModified to check whether the returned error was
  3996. // because http.StatusNotModified was returned.
  3997. func (c *ProjectsHistoriesExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListExecutionsResponse, error) {
  3998. gensupport.SetOptions(c.urlParams_, opts...)
  3999. res, err := c.doRequest("json")
  4000. if res != nil && res.StatusCode == http.StatusNotModified {
  4001. if res.Body != nil {
  4002. res.Body.Close()
  4003. }
  4004. return nil, &googleapi.Error{
  4005. Code: res.StatusCode,
  4006. Header: res.Header,
  4007. }
  4008. }
  4009. if err != nil {
  4010. return nil, err
  4011. }
  4012. defer googleapi.CloseBody(res)
  4013. if err := googleapi.CheckResponse(res); err != nil {
  4014. return nil, err
  4015. }
  4016. ret := &ListExecutionsResponse{
  4017. ServerResponse: googleapi.ServerResponse{
  4018. Header: res.Header,
  4019. HTTPStatusCode: res.StatusCode,
  4020. },
  4021. }
  4022. target := &ret
  4023. if err := gensupport.DecodeResponse(target, res); err != nil {
  4024. return nil, err
  4025. }
  4026. return ret, nil
  4027. // {
  4028. // "description": "Lists Executions for a given History.\n\nThe executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist",
  4029. // "httpMethod": "GET",
  4030. // "id": "toolresults.projects.histories.executions.list",
  4031. // "parameterOrder": [
  4032. // "projectId",
  4033. // "historyId"
  4034. // ],
  4035. // "parameters": {
  4036. // "historyId": {
  4037. // "description": "A History id.\n\nRequired.",
  4038. // "location": "path",
  4039. // "required": true,
  4040. // "type": "string"
  4041. // },
  4042. // "pageSize": {
  4043. // "description": "The maximum number of Executions to fetch.\n\nDefault value: 25. The server will use this default if the field is not set or has a value of 0.\n\nOptional.",
  4044. // "format": "int32",
  4045. // "location": "query",
  4046. // "type": "integer"
  4047. // },
  4048. // "pageToken": {
  4049. // "description": "A continuation token to resume the query at the next item.\n\nOptional.",
  4050. // "location": "query",
  4051. // "type": "string"
  4052. // },
  4053. // "projectId": {
  4054. // "description": "A Project id.\n\nRequired.",
  4055. // "location": "path",
  4056. // "required": true,
  4057. // "type": "string"
  4058. // }
  4059. // },
  4060. // "path": "{projectId}/histories/{historyId}/executions",
  4061. // "response": {
  4062. // "$ref": "ListExecutionsResponse"
  4063. // },
  4064. // "scopes": [
  4065. // "https://www.googleapis.com/auth/cloud-platform"
  4066. // ]
  4067. // }
  4068. }
  4069. // Pages invokes f for each page of results.
  4070. // A non-nil error returned from f will halt the iteration.
  4071. // The provided context supersedes any context provided to the Context method.
  4072. func (c *ProjectsHistoriesExecutionsListCall) Pages(ctx context.Context, f func(*ListExecutionsResponse) error) error {
  4073. c.ctx_ = ctx
  4074. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  4075. for {
  4076. x, err := c.Do()
  4077. if err != nil {
  4078. return err
  4079. }
  4080. if err := f(x); err != nil {
  4081. return err
  4082. }
  4083. if x.NextPageToken == "" {
  4084. return nil
  4085. }
  4086. c.PageToken(x.NextPageToken)
  4087. }
  4088. }
  4089. // method id "toolresults.projects.histories.executions.patch":
  4090. type ProjectsHistoriesExecutionsPatchCall struct {
  4091. s *Service
  4092. projectId string
  4093. historyId string
  4094. executionId string
  4095. execution *Execution
  4096. urlParams_ gensupport.URLParams
  4097. ctx_ context.Context
  4098. header_ http.Header
  4099. }
  4100. // Patch: Updates an existing Execution with the supplied partial
  4101. // entity.
  4102. //
  4103. // May return any of the following canonical error codes:
  4104. //
  4105. // - PERMISSION_DENIED - if the user is not authorized to write to
  4106. // project - INVALID_ARGUMENT - if the request is malformed -
  4107. // FAILED_PRECONDITION - if the requested state transition is illegal -
  4108. // NOT_FOUND - if the containing History does not exist
  4109. func (r *ProjectsHistoriesExecutionsService) Patch(projectId string, historyId string, executionId string, execution *Execution) *ProjectsHistoriesExecutionsPatchCall {
  4110. c := &ProjectsHistoriesExecutionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4111. c.projectId = projectId
  4112. c.historyId = historyId
  4113. c.executionId = executionId
  4114. c.execution = execution
  4115. return c
  4116. }
  4117. // RequestId sets the optional parameter "requestId": A unique request
  4118. // ID for server to detect duplicated requests. For example, a
  4119. // UUID.
  4120. //
  4121. // Optional, but strongly recommended.
  4122. func (c *ProjectsHistoriesExecutionsPatchCall) RequestId(requestId string) *ProjectsHistoriesExecutionsPatchCall {
  4123. c.urlParams_.Set("requestId", requestId)
  4124. return c
  4125. }
  4126. // Fields allows partial responses to be retrieved. See
  4127. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4128. // for more information.
  4129. func (c *ProjectsHistoriesExecutionsPatchCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsPatchCall {
  4130. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4131. return c
  4132. }
  4133. // Context sets the context to be used in this call's Do method. Any
  4134. // pending HTTP request will be aborted if the provided context is
  4135. // canceled.
  4136. func (c *ProjectsHistoriesExecutionsPatchCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsPatchCall {
  4137. c.ctx_ = ctx
  4138. return c
  4139. }
  4140. // Header returns an http.Header that can be modified by the caller to
  4141. // add HTTP headers to the request.
  4142. func (c *ProjectsHistoriesExecutionsPatchCall) Header() http.Header {
  4143. if c.header_ == nil {
  4144. c.header_ = make(http.Header)
  4145. }
  4146. return c.header_
  4147. }
  4148. func (c *ProjectsHistoriesExecutionsPatchCall) doRequest(alt string) (*http.Response, error) {
  4149. reqHeaders := make(http.Header)
  4150. for k, v := range c.header_ {
  4151. reqHeaders[k] = v
  4152. }
  4153. reqHeaders.Set("User-Agent", c.s.userAgent())
  4154. var body io.Reader = nil
  4155. body, err := googleapi.WithoutDataWrapper.JSONReader(c.execution)
  4156. if err != nil {
  4157. return nil, err
  4158. }
  4159. reqHeaders.Set("Content-Type", "application/json")
  4160. c.urlParams_.Set("alt", alt)
  4161. c.urlParams_.Set("prettyPrint", "false")
  4162. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}")
  4163. urls += "?" + c.urlParams_.Encode()
  4164. req, err := http.NewRequest("PATCH", urls, body)
  4165. if err != nil {
  4166. return nil, err
  4167. }
  4168. req.Header = reqHeaders
  4169. googleapi.Expand(req.URL, map[string]string{
  4170. "projectId": c.projectId,
  4171. "historyId": c.historyId,
  4172. "executionId": c.executionId,
  4173. })
  4174. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4175. }
  4176. // Do executes the "toolresults.projects.histories.executions.patch" call.
  4177. // Exactly one of *Execution or error will be non-nil. Any non-2xx
  4178. // status code is an error. Response headers are in either
  4179. // *Execution.ServerResponse.Header or (if a response was returned at
  4180. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4181. // to check whether the returned error was because
  4182. // http.StatusNotModified was returned.
  4183. func (c *ProjectsHistoriesExecutionsPatchCall) Do(opts ...googleapi.CallOption) (*Execution, error) {
  4184. gensupport.SetOptions(c.urlParams_, opts...)
  4185. res, err := c.doRequest("json")
  4186. if res != nil && res.StatusCode == http.StatusNotModified {
  4187. if res.Body != nil {
  4188. res.Body.Close()
  4189. }
  4190. return nil, &googleapi.Error{
  4191. Code: res.StatusCode,
  4192. Header: res.Header,
  4193. }
  4194. }
  4195. if err != nil {
  4196. return nil, err
  4197. }
  4198. defer googleapi.CloseBody(res)
  4199. if err := googleapi.CheckResponse(res); err != nil {
  4200. return nil, err
  4201. }
  4202. ret := &Execution{
  4203. ServerResponse: googleapi.ServerResponse{
  4204. Header: res.Header,
  4205. HTTPStatusCode: res.StatusCode,
  4206. },
  4207. }
  4208. target := &ret
  4209. if err := gensupport.DecodeResponse(target, res); err != nil {
  4210. return nil, err
  4211. }
  4212. return ret, nil
  4213. // {
  4214. // "description": "Updates an existing Execution with the supplied partial entity.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist",
  4215. // "httpMethod": "PATCH",
  4216. // "id": "toolresults.projects.histories.executions.patch",
  4217. // "parameterOrder": [
  4218. // "projectId",
  4219. // "historyId",
  4220. // "executionId"
  4221. // ],
  4222. // "parameters": {
  4223. // "executionId": {
  4224. // "description": "Required.",
  4225. // "location": "path",
  4226. // "required": true,
  4227. // "type": "string"
  4228. // },
  4229. // "historyId": {
  4230. // "description": "Required.",
  4231. // "location": "path",
  4232. // "required": true,
  4233. // "type": "string"
  4234. // },
  4235. // "projectId": {
  4236. // "description": "A Project id. Required.",
  4237. // "location": "path",
  4238. // "required": true,
  4239. // "type": "string"
  4240. // },
  4241. // "requestId": {
  4242. // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.",
  4243. // "location": "query",
  4244. // "type": "string"
  4245. // }
  4246. // },
  4247. // "path": "{projectId}/histories/{historyId}/executions/{executionId}",
  4248. // "request": {
  4249. // "$ref": "Execution"
  4250. // },
  4251. // "response": {
  4252. // "$ref": "Execution"
  4253. // },
  4254. // "scopes": [
  4255. // "https://www.googleapis.com/auth/cloud-platform"
  4256. // ]
  4257. // }
  4258. }
  4259. // method id "toolresults.projects.histories.executions.clusters.get":
  4260. type ProjectsHistoriesExecutionsClustersGetCall struct {
  4261. s *Service
  4262. projectId string
  4263. historyId string
  4264. executionId string
  4265. clusterId string
  4266. urlParams_ gensupport.URLParams
  4267. ifNoneMatch_ string
  4268. ctx_ context.Context
  4269. header_ http.Header
  4270. }
  4271. // Get: Retrieves a single screenshot cluster by its ID
  4272. func (r *ProjectsHistoriesExecutionsClustersService) Get(projectId string, historyId string, executionId string, clusterId string) *ProjectsHistoriesExecutionsClustersGetCall {
  4273. c := &ProjectsHistoriesExecutionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4274. c.projectId = projectId
  4275. c.historyId = historyId
  4276. c.executionId = executionId
  4277. c.clusterId = clusterId
  4278. return c
  4279. }
  4280. // Fields allows partial responses to be retrieved. See
  4281. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4282. // for more information.
  4283. func (c *ProjectsHistoriesExecutionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersGetCall {
  4284. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4285. return c
  4286. }
  4287. // IfNoneMatch sets the optional parameter which makes the operation
  4288. // fail if the object's ETag matches the given value. This is useful for
  4289. // getting updates only after the object has changed since the last
  4290. // request. Use googleapi.IsNotModified to check whether the response
  4291. // error from Do is the result of In-None-Match.
  4292. func (c *ProjectsHistoriesExecutionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersGetCall {
  4293. c.ifNoneMatch_ = entityTag
  4294. return c
  4295. }
  4296. // Context sets the context to be used in this call's Do method. Any
  4297. // pending HTTP request will be aborted if the provided context is
  4298. // canceled.
  4299. func (c *ProjectsHistoriesExecutionsClustersGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersGetCall {
  4300. c.ctx_ = ctx
  4301. return c
  4302. }
  4303. // Header returns an http.Header that can be modified by the caller to
  4304. // add HTTP headers to the request.
  4305. func (c *ProjectsHistoriesExecutionsClustersGetCall) Header() http.Header {
  4306. if c.header_ == nil {
  4307. c.header_ = make(http.Header)
  4308. }
  4309. return c.header_
  4310. }
  4311. func (c *ProjectsHistoriesExecutionsClustersGetCall) doRequest(alt string) (*http.Response, error) {
  4312. reqHeaders := make(http.Header)
  4313. for k, v := range c.header_ {
  4314. reqHeaders[k] = v
  4315. }
  4316. reqHeaders.Set("User-Agent", c.s.userAgent())
  4317. if c.ifNoneMatch_ != "" {
  4318. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4319. }
  4320. var body io.Reader = nil
  4321. c.urlParams_.Set("alt", alt)
  4322. c.urlParams_.Set("prettyPrint", "false")
  4323. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}")
  4324. urls += "?" + c.urlParams_.Encode()
  4325. req, err := http.NewRequest("GET", urls, body)
  4326. if err != nil {
  4327. return nil, err
  4328. }
  4329. req.Header = reqHeaders
  4330. googleapi.Expand(req.URL, map[string]string{
  4331. "projectId": c.projectId,
  4332. "historyId": c.historyId,
  4333. "executionId": c.executionId,
  4334. "clusterId": c.clusterId,
  4335. })
  4336. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4337. }
  4338. // Do executes the "toolresults.projects.histories.executions.clusters.get" call.
  4339. // Exactly one of *ScreenshotCluster or error will be non-nil. Any
  4340. // non-2xx status code is an error. Response headers are in either
  4341. // *ScreenshotCluster.ServerResponse.Header or (if a response was
  4342. // returned at all) in error.(*googleapi.Error).Header. Use
  4343. // googleapi.IsNotModified to check whether the returned error was
  4344. // because http.StatusNotModified was returned.
  4345. func (c *ProjectsHistoriesExecutionsClustersGetCall) Do(opts ...googleapi.CallOption) (*ScreenshotCluster, error) {
  4346. gensupport.SetOptions(c.urlParams_, opts...)
  4347. res, err := c.doRequest("json")
  4348. if res != nil && res.StatusCode == http.StatusNotModified {
  4349. if res.Body != nil {
  4350. res.Body.Close()
  4351. }
  4352. return nil, &googleapi.Error{
  4353. Code: res.StatusCode,
  4354. Header: res.Header,
  4355. }
  4356. }
  4357. if err != nil {
  4358. return nil, err
  4359. }
  4360. defer googleapi.CloseBody(res)
  4361. if err := googleapi.CheckResponse(res); err != nil {
  4362. return nil, err
  4363. }
  4364. ret := &ScreenshotCluster{
  4365. ServerResponse: googleapi.ServerResponse{
  4366. Header: res.Header,
  4367. HTTPStatusCode: res.StatusCode,
  4368. },
  4369. }
  4370. target := &ret
  4371. if err := gensupport.DecodeResponse(target, res); err != nil {
  4372. return nil, err
  4373. }
  4374. return ret, nil
  4375. // {
  4376. // "description": "Retrieves a single screenshot cluster by its ID",
  4377. // "httpMethod": "GET",
  4378. // "id": "toolresults.projects.histories.executions.clusters.get",
  4379. // "parameterOrder": [
  4380. // "projectId",
  4381. // "historyId",
  4382. // "executionId",
  4383. // "clusterId"
  4384. // ],
  4385. // "parameters": {
  4386. // "clusterId": {
  4387. // "description": "A Cluster id\n\nRequired.",
  4388. // "location": "path",
  4389. // "required": true,
  4390. // "type": "string"
  4391. // },
  4392. // "executionId": {
  4393. // "description": "An Execution id.\n\nRequired.",
  4394. // "location": "path",
  4395. // "required": true,
  4396. // "type": "string"
  4397. // },
  4398. // "historyId": {
  4399. // "description": "A History id.\n\nRequired.",
  4400. // "location": "path",
  4401. // "required": true,
  4402. // "type": "string"
  4403. // },
  4404. // "projectId": {
  4405. // "description": "A Project id.\n\nRequired.",
  4406. // "location": "path",
  4407. // "required": true,
  4408. // "type": "string"
  4409. // }
  4410. // },
  4411. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}",
  4412. // "response": {
  4413. // "$ref": "ScreenshotCluster"
  4414. // }
  4415. // }
  4416. }
  4417. // method id "toolresults.projects.histories.executions.clusters.list":
  4418. type ProjectsHistoriesExecutionsClustersListCall struct {
  4419. s *Service
  4420. projectId string
  4421. historyId string
  4422. executionId string
  4423. urlParams_ gensupport.URLParams
  4424. ifNoneMatch_ string
  4425. ctx_ context.Context
  4426. header_ http.Header
  4427. }
  4428. // List: Lists Screenshot Clusters
  4429. //
  4430. // Returns the list of screenshot clusters corresponding to an
  4431. // execution. Screenshot clusters are created after the execution is
  4432. // finished. Clusters are created from a set of screenshots. Between any
  4433. // two screenshots, a matching score is calculated based off their
  4434. // metadata that determines how similar they are. Screenshots are placed
  4435. // in the cluster that has screens which have the highest matching
  4436. // scores.
  4437. func (r *ProjectsHistoriesExecutionsClustersService) List(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsClustersListCall {
  4438. c := &ProjectsHistoriesExecutionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4439. c.projectId = projectId
  4440. c.historyId = historyId
  4441. c.executionId = executionId
  4442. return c
  4443. }
  4444. // Fields allows partial responses to be retrieved. See
  4445. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4446. // for more information.
  4447. func (c *ProjectsHistoriesExecutionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsClustersListCall {
  4448. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4449. return c
  4450. }
  4451. // IfNoneMatch sets the optional parameter which makes the operation
  4452. // fail if the object's ETag matches the given value. This is useful for
  4453. // getting updates only after the object has changed since the last
  4454. // request. Use googleapi.IsNotModified to check whether the response
  4455. // error from Do is the result of In-None-Match.
  4456. func (c *ProjectsHistoriesExecutionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsClustersListCall {
  4457. c.ifNoneMatch_ = entityTag
  4458. return c
  4459. }
  4460. // Context sets the context to be used in this call's Do method. Any
  4461. // pending HTTP request will be aborted if the provided context is
  4462. // canceled.
  4463. func (c *ProjectsHistoriesExecutionsClustersListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsClustersListCall {
  4464. c.ctx_ = ctx
  4465. return c
  4466. }
  4467. // Header returns an http.Header that can be modified by the caller to
  4468. // add HTTP headers to the request.
  4469. func (c *ProjectsHistoriesExecutionsClustersListCall) Header() http.Header {
  4470. if c.header_ == nil {
  4471. c.header_ = make(http.Header)
  4472. }
  4473. return c.header_
  4474. }
  4475. func (c *ProjectsHistoriesExecutionsClustersListCall) doRequest(alt string) (*http.Response, error) {
  4476. reqHeaders := make(http.Header)
  4477. for k, v := range c.header_ {
  4478. reqHeaders[k] = v
  4479. }
  4480. reqHeaders.Set("User-Agent", c.s.userAgent())
  4481. if c.ifNoneMatch_ != "" {
  4482. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4483. }
  4484. var body io.Reader = nil
  4485. c.urlParams_.Set("alt", alt)
  4486. c.urlParams_.Set("prettyPrint", "false")
  4487. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/clusters")
  4488. urls += "?" + c.urlParams_.Encode()
  4489. req, err := http.NewRequest("GET", urls, body)
  4490. if err != nil {
  4491. return nil, err
  4492. }
  4493. req.Header = reqHeaders
  4494. googleapi.Expand(req.URL, map[string]string{
  4495. "projectId": c.projectId,
  4496. "historyId": c.historyId,
  4497. "executionId": c.executionId,
  4498. })
  4499. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4500. }
  4501. // Do executes the "toolresults.projects.histories.executions.clusters.list" call.
  4502. // Exactly one of *ListScreenshotClustersResponse or error will be
  4503. // non-nil. Any non-2xx status code is an error. Response headers are in
  4504. // either *ListScreenshotClustersResponse.ServerResponse.Header or (if a
  4505. // response was returned at all) in error.(*googleapi.Error).Header. Use
  4506. // googleapi.IsNotModified to check whether the returned error was
  4507. // because http.StatusNotModified was returned.
  4508. func (c *ProjectsHistoriesExecutionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListScreenshotClustersResponse, error) {
  4509. gensupport.SetOptions(c.urlParams_, opts...)
  4510. res, err := c.doRequest("json")
  4511. if res != nil && res.StatusCode == http.StatusNotModified {
  4512. if res.Body != nil {
  4513. res.Body.Close()
  4514. }
  4515. return nil, &googleapi.Error{
  4516. Code: res.StatusCode,
  4517. Header: res.Header,
  4518. }
  4519. }
  4520. if err != nil {
  4521. return nil, err
  4522. }
  4523. defer googleapi.CloseBody(res)
  4524. if err := googleapi.CheckResponse(res); err != nil {
  4525. return nil, err
  4526. }
  4527. ret := &ListScreenshotClustersResponse{
  4528. ServerResponse: googleapi.ServerResponse{
  4529. Header: res.Header,
  4530. HTTPStatusCode: res.StatusCode,
  4531. },
  4532. }
  4533. target := &ret
  4534. if err := gensupport.DecodeResponse(target, res); err != nil {
  4535. return nil, err
  4536. }
  4537. return ret, nil
  4538. // {
  4539. // "description": "Lists Screenshot Clusters\n\nReturns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.",
  4540. // "httpMethod": "GET",
  4541. // "id": "toolresults.projects.histories.executions.clusters.list",
  4542. // "parameterOrder": [
  4543. // "projectId",
  4544. // "historyId",
  4545. // "executionId"
  4546. // ],
  4547. // "parameters": {
  4548. // "executionId": {
  4549. // "description": "An Execution id.\n\nRequired.",
  4550. // "location": "path",
  4551. // "required": true,
  4552. // "type": "string"
  4553. // },
  4554. // "historyId": {
  4555. // "description": "A History id.\n\nRequired.",
  4556. // "location": "path",
  4557. // "required": true,
  4558. // "type": "string"
  4559. // },
  4560. // "projectId": {
  4561. // "description": "A Project id.\n\nRequired.",
  4562. // "location": "path",
  4563. // "required": true,
  4564. // "type": "string"
  4565. // }
  4566. // },
  4567. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/clusters",
  4568. // "response": {
  4569. // "$ref": "ListScreenshotClustersResponse"
  4570. // }
  4571. // }
  4572. }
  4573. // method id "toolresults.projects.histories.executions.steps.create":
  4574. type ProjectsHistoriesExecutionsStepsCreateCall struct {
  4575. s *Service
  4576. projectId string
  4577. historyId string
  4578. executionId string
  4579. step *Step
  4580. urlParams_ gensupport.URLParams
  4581. ctx_ context.Context
  4582. header_ http.Header
  4583. }
  4584. // Create: Creates a Step.
  4585. //
  4586. // The returned Step will have the id set.
  4587. //
  4588. // May return any of the following canonical error codes:
  4589. //
  4590. // - PERMISSION_DENIED - if the user is not authorized to write to
  4591. // project - INVALID_ARGUMENT - if the request is malformed -
  4592. // FAILED_PRECONDITION - if the step is too large (more than 10Mib) -
  4593. // NOT_FOUND - if the containing Execution does not exist
  4594. func (r *ProjectsHistoriesExecutionsStepsService) Create(projectId string, historyId string, executionId string, step *Step) *ProjectsHistoriesExecutionsStepsCreateCall {
  4595. c := &ProjectsHistoriesExecutionsStepsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4596. c.projectId = projectId
  4597. c.historyId = historyId
  4598. c.executionId = executionId
  4599. c.step = step
  4600. return c
  4601. }
  4602. // RequestId sets the optional parameter "requestId": A unique request
  4603. // ID for server to detect duplicated requests. For example, a
  4604. // UUID.
  4605. //
  4606. // Optional, but strongly recommended.
  4607. func (c *ProjectsHistoriesExecutionsStepsCreateCall) RequestId(requestId string) *ProjectsHistoriesExecutionsStepsCreateCall {
  4608. c.urlParams_.Set("requestId", requestId)
  4609. return c
  4610. }
  4611. // Fields allows partial responses to be retrieved. See
  4612. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4613. // for more information.
  4614. func (c *ProjectsHistoriesExecutionsStepsCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsCreateCall {
  4615. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4616. return c
  4617. }
  4618. // Context sets the context to be used in this call's Do method. Any
  4619. // pending HTTP request will be aborted if the provided context is
  4620. // canceled.
  4621. func (c *ProjectsHistoriesExecutionsStepsCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsCreateCall {
  4622. c.ctx_ = ctx
  4623. return c
  4624. }
  4625. // Header returns an http.Header that can be modified by the caller to
  4626. // add HTTP headers to the request.
  4627. func (c *ProjectsHistoriesExecutionsStepsCreateCall) Header() http.Header {
  4628. if c.header_ == nil {
  4629. c.header_ = make(http.Header)
  4630. }
  4631. return c.header_
  4632. }
  4633. func (c *ProjectsHistoriesExecutionsStepsCreateCall) doRequest(alt string) (*http.Response, error) {
  4634. reqHeaders := make(http.Header)
  4635. for k, v := range c.header_ {
  4636. reqHeaders[k] = v
  4637. }
  4638. reqHeaders.Set("User-Agent", c.s.userAgent())
  4639. var body io.Reader = nil
  4640. body, err := googleapi.WithoutDataWrapper.JSONReader(c.step)
  4641. if err != nil {
  4642. return nil, err
  4643. }
  4644. reqHeaders.Set("Content-Type", "application/json")
  4645. c.urlParams_.Set("alt", alt)
  4646. c.urlParams_.Set("prettyPrint", "false")
  4647. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps")
  4648. urls += "?" + c.urlParams_.Encode()
  4649. req, err := http.NewRequest("POST", urls, body)
  4650. if err != nil {
  4651. return nil, err
  4652. }
  4653. req.Header = reqHeaders
  4654. googleapi.Expand(req.URL, map[string]string{
  4655. "projectId": c.projectId,
  4656. "historyId": c.historyId,
  4657. "executionId": c.executionId,
  4658. })
  4659. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4660. }
  4661. // Do executes the "toolresults.projects.histories.executions.steps.create" call.
  4662. // Exactly one of *Step or error will be non-nil. Any non-2xx status
  4663. // code is an error. Response headers are in either
  4664. // *Step.ServerResponse.Header or (if a response was returned at all) in
  4665. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4666. // whether the returned error was because http.StatusNotModified was
  4667. // returned.
  4668. func (c *ProjectsHistoriesExecutionsStepsCreateCall) Do(opts ...googleapi.CallOption) (*Step, error) {
  4669. gensupport.SetOptions(c.urlParams_, opts...)
  4670. res, err := c.doRequest("json")
  4671. if res != nil && res.StatusCode == http.StatusNotModified {
  4672. if res.Body != nil {
  4673. res.Body.Close()
  4674. }
  4675. return nil, &googleapi.Error{
  4676. Code: res.StatusCode,
  4677. Header: res.Header,
  4678. }
  4679. }
  4680. if err != nil {
  4681. return nil, err
  4682. }
  4683. defer googleapi.CloseBody(res)
  4684. if err := googleapi.CheckResponse(res); err != nil {
  4685. return nil, err
  4686. }
  4687. ret := &Step{
  4688. ServerResponse: googleapi.ServerResponse{
  4689. Header: res.Header,
  4690. HTTPStatusCode: res.StatusCode,
  4691. },
  4692. }
  4693. target := &ret
  4694. if err := gensupport.DecodeResponse(target, res); err != nil {
  4695. return nil, err
  4696. }
  4697. return ret, nil
  4698. // {
  4699. // "description": "Creates a Step.\n\nThe returned Step will have the id set.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist",
  4700. // "httpMethod": "POST",
  4701. // "id": "toolresults.projects.histories.executions.steps.create",
  4702. // "parameterOrder": [
  4703. // "projectId",
  4704. // "historyId",
  4705. // "executionId"
  4706. // ],
  4707. // "parameters": {
  4708. // "executionId": {
  4709. // "description": "A Execution id.\n\nRequired.",
  4710. // "location": "path",
  4711. // "required": true,
  4712. // "type": "string"
  4713. // },
  4714. // "historyId": {
  4715. // "description": "A History id.\n\nRequired.",
  4716. // "location": "path",
  4717. // "required": true,
  4718. // "type": "string"
  4719. // },
  4720. // "projectId": {
  4721. // "description": "A Project id.\n\nRequired.",
  4722. // "location": "path",
  4723. // "required": true,
  4724. // "type": "string"
  4725. // },
  4726. // "requestId": {
  4727. // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.",
  4728. // "location": "query",
  4729. // "type": "string"
  4730. // }
  4731. // },
  4732. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps",
  4733. // "request": {
  4734. // "$ref": "Step"
  4735. // },
  4736. // "response": {
  4737. // "$ref": "Step"
  4738. // },
  4739. // "scopes": [
  4740. // "https://www.googleapis.com/auth/cloud-platform"
  4741. // ]
  4742. // }
  4743. }
  4744. // method id "toolresults.projects.histories.executions.steps.get":
  4745. type ProjectsHistoriesExecutionsStepsGetCall struct {
  4746. s *Service
  4747. projectId string
  4748. historyId string
  4749. executionId string
  4750. stepId string
  4751. urlParams_ gensupport.URLParams
  4752. ifNoneMatch_ string
  4753. ctx_ context.Context
  4754. header_ http.Header
  4755. }
  4756. // Get: Gets a Step.
  4757. //
  4758. // May return any of the following canonical error codes:
  4759. //
  4760. // - PERMISSION_DENIED - if the user is not authorized to read project -
  4761. // INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the
  4762. // Step does not exist
  4763. func (r *ProjectsHistoriesExecutionsStepsService) Get(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsGetCall {
  4764. c := &ProjectsHistoriesExecutionsStepsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4765. c.projectId = projectId
  4766. c.historyId = historyId
  4767. c.executionId = executionId
  4768. c.stepId = stepId
  4769. return c
  4770. }
  4771. // Fields allows partial responses to be retrieved. See
  4772. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4773. // for more information.
  4774. func (c *ProjectsHistoriesExecutionsStepsGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsGetCall {
  4775. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4776. return c
  4777. }
  4778. // IfNoneMatch sets the optional parameter which makes the operation
  4779. // fail if the object's ETag matches the given value. This is useful for
  4780. // getting updates only after the object has changed since the last
  4781. // request. Use googleapi.IsNotModified to check whether the response
  4782. // error from Do is the result of In-None-Match.
  4783. func (c *ProjectsHistoriesExecutionsStepsGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsGetCall {
  4784. c.ifNoneMatch_ = entityTag
  4785. return c
  4786. }
  4787. // Context sets the context to be used in this call's Do method. Any
  4788. // pending HTTP request will be aborted if the provided context is
  4789. // canceled.
  4790. func (c *ProjectsHistoriesExecutionsStepsGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsGetCall {
  4791. c.ctx_ = ctx
  4792. return c
  4793. }
  4794. // Header returns an http.Header that can be modified by the caller to
  4795. // add HTTP headers to the request.
  4796. func (c *ProjectsHistoriesExecutionsStepsGetCall) Header() http.Header {
  4797. if c.header_ == nil {
  4798. c.header_ = make(http.Header)
  4799. }
  4800. return c.header_
  4801. }
  4802. func (c *ProjectsHistoriesExecutionsStepsGetCall) doRequest(alt string) (*http.Response, error) {
  4803. reqHeaders := make(http.Header)
  4804. for k, v := range c.header_ {
  4805. reqHeaders[k] = v
  4806. }
  4807. reqHeaders.Set("User-Agent", c.s.userAgent())
  4808. if c.ifNoneMatch_ != "" {
  4809. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4810. }
  4811. var body io.Reader = nil
  4812. c.urlParams_.Set("alt", alt)
  4813. c.urlParams_.Set("prettyPrint", "false")
  4814. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}")
  4815. urls += "?" + c.urlParams_.Encode()
  4816. req, err := http.NewRequest("GET", urls, body)
  4817. if err != nil {
  4818. return nil, err
  4819. }
  4820. req.Header = reqHeaders
  4821. googleapi.Expand(req.URL, map[string]string{
  4822. "projectId": c.projectId,
  4823. "historyId": c.historyId,
  4824. "executionId": c.executionId,
  4825. "stepId": c.stepId,
  4826. })
  4827. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4828. }
  4829. // Do executes the "toolresults.projects.histories.executions.steps.get" call.
  4830. // Exactly one of *Step or error will be non-nil. Any non-2xx status
  4831. // code is an error. Response headers are in either
  4832. // *Step.ServerResponse.Header or (if a response was returned at all) in
  4833. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4834. // whether the returned error was because http.StatusNotModified was
  4835. // returned.
  4836. func (c *ProjectsHistoriesExecutionsStepsGetCall) Do(opts ...googleapi.CallOption) (*Step, error) {
  4837. gensupport.SetOptions(c.urlParams_, opts...)
  4838. res, err := c.doRequest("json")
  4839. if res != nil && res.StatusCode == http.StatusNotModified {
  4840. if res.Body != nil {
  4841. res.Body.Close()
  4842. }
  4843. return nil, &googleapi.Error{
  4844. Code: res.StatusCode,
  4845. Header: res.Header,
  4846. }
  4847. }
  4848. if err != nil {
  4849. return nil, err
  4850. }
  4851. defer googleapi.CloseBody(res)
  4852. if err := googleapi.CheckResponse(res); err != nil {
  4853. return nil, err
  4854. }
  4855. ret := &Step{
  4856. ServerResponse: googleapi.ServerResponse{
  4857. Header: res.Header,
  4858. HTTPStatusCode: res.StatusCode,
  4859. },
  4860. }
  4861. target := &ret
  4862. if err := gensupport.DecodeResponse(target, res); err != nil {
  4863. return nil, err
  4864. }
  4865. return ret, nil
  4866. // {
  4867. // "description": "Gets a Step.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist",
  4868. // "httpMethod": "GET",
  4869. // "id": "toolresults.projects.histories.executions.steps.get",
  4870. // "parameterOrder": [
  4871. // "projectId",
  4872. // "historyId",
  4873. // "executionId",
  4874. // "stepId"
  4875. // ],
  4876. // "parameters": {
  4877. // "executionId": {
  4878. // "description": "A Execution id.\n\nRequired.",
  4879. // "location": "path",
  4880. // "required": true,
  4881. // "type": "string"
  4882. // },
  4883. // "historyId": {
  4884. // "description": "A History id.\n\nRequired.",
  4885. // "location": "path",
  4886. // "required": true,
  4887. // "type": "string"
  4888. // },
  4889. // "projectId": {
  4890. // "description": "A Project id.\n\nRequired.",
  4891. // "location": "path",
  4892. // "required": true,
  4893. // "type": "string"
  4894. // },
  4895. // "stepId": {
  4896. // "description": "A Step id.\n\nRequired.",
  4897. // "location": "path",
  4898. // "required": true,
  4899. // "type": "string"
  4900. // }
  4901. // },
  4902. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}",
  4903. // "response": {
  4904. // "$ref": "Step"
  4905. // },
  4906. // "scopes": [
  4907. // "https://www.googleapis.com/auth/cloud-platform"
  4908. // ]
  4909. // }
  4910. }
  4911. // method id "toolresults.projects.histories.executions.steps.getPerfMetricsSummary":
  4912. type ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall struct {
  4913. s *Service
  4914. projectId string
  4915. historyId string
  4916. executionId string
  4917. stepId string
  4918. urlParams_ gensupport.URLParams
  4919. ifNoneMatch_ string
  4920. ctx_ context.Context
  4921. header_ http.Header
  4922. }
  4923. // GetPerfMetricsSummary: Retrieves a PerfMetricsSummary.
  4924. //
  4925. // May return any of the following error code(s): - NOT_FOUND - The
  4926. // specified PerfMetricsSummary does not exist
  4927. func (r *ProjectsHistoriesExecutionsStepsService) GetPerfMetricsSummary(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall {
  4928. c := &ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4929. c.projectId = projectId
  4930. c.historyId = historyId
  4931. c.executionId = executionId
  4932. c.stepId = stepId
  4933. return c
  4934. }
  4935. // Fields allows partial responses to be retrieved. See
  4936. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4937. // for more information.
  4938. func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall {
  4939. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4940. return c
  4941. }
  4942. // IfNoneMatch sets the optional parameter which makes the operation
  4943. // fail if the object's ETag matches the given value. This is useful for
  4944. // getting updates only after the object has changed since the last
  4945. // request. Use googleapi.IsNotModified to check whether the response
  4946. // error from Do is the result of In-None-Match.
  4947. func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall {
  4948. c.ifNoneMatch_ = entityTag
  4949. return c
  4950. }
  4951. // Context sets the context to be used in this call's Do method. Any
  4952. // pending HTTP request will be aborted if the provided context is
  4953. // canceled.
  4954. func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall {
  4955. c.ctx_ = ctx
  4956. return c
  4957. }
  4958. // Header returns an http.Header that can be modified by the caller to
  4959. // add HTTP headers to the request.
  4960. func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Header() http.Header {
  4961. if c.header_ == nil {
  4962. c.header_ = make(http.Header)
  4963. }
  4964. return c.header_
  4965. }
  4966. func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) doRequest(alt string) (*http.Response, error) {
  4967. reqHeaders := make(http.Header)
  4968. for k, v := range c.header_ {
  4969. reqHeaders[k] = v
  4970. }
  4971. reqHeaders.Set("User-Agent", c.s.userAgent())
  4972. if c.ifNoneMatch_ != "" {
  4973. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4974. }
  4975. var body io.Reader = nil
  4976. c.urlParams_.Set("alt", alt)
  4977. c.urlParams_.Set("prettyPrint", "false")
  4978. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary")
  4979. urls += "?" + c.urlParams_.Encode()
  4980. req, err := http.NewRequest("GET", urls, body)
  4981. if err != nil {
  4982. return nil, err
  4983. }
  4984. req.Header = reqHeaders
  4985. googleapi.Expand(req.URL, map[string]string{
  4986. "projectId": c.projectId,
  4987. "historyId": c.historyId,
  4988. "executionId": c.executionId,
  4989. "stepId": c.stepId,
  4990. })
  4991. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4992. }
  4993. // Do executes the "toolresults.projects.histories.executions.steps.getPerfMetricsSummary" call.
  4994. // Exactly one of *PerfMetricsSummary or error will be non-nil. Any
  4995. // non-2xx status code is an error. Response headers are in either
  4996. // *PerfMetricsSummary.ServerResponse.Header or (if a response was
  4997. // returned at all) in error.(*googleapi.Error).Header. Use
  4998. // googleapi.IsNotModified to check whether the returned error was
  4999. // because http.StatusNotModified was returned.
  5000. func (c *ProjectsHistoriesExecutionsStepsGetPerfMetricsSummaryCall) Do(opts ...googleapi.CallOption) (*PerfMetricsSummary, error) {
  5001. gensupport.SetOptions(c.urlParams_, opts...)
  5002. res, err := c.doRequest("json")
  5003. if res != nil && res.StatusCode == http.StatusNotModified {
  5004. if res.Body != nil {
  5005. res.Body.Close()
  5006. }
  5007. return nil, &googleapi.Error{
  5008. Code: res.StatusCode,
  5009. Header: res.Header,
  5010. }
  5011. }
  5012. if err != nil {
  5013. return nil, err
  5014. }
  5015. defer googleapi.CloseBody(res)
  5016. if err := googleapi.CheckResponse(res); err != nil {
  5017. return nil, err
  5018. }
  5019. ret := &PerfMetricsSummary{
  5020. ServerResponse: googleapi.ServerResponse{
  5021. Header: res.Header,
  5022. HTTPStatusCode: res.StatusCode,
  5023. },
  5024. }
  5025. target := &ret
  5026. if err := gensupport.DecodeResponse(target, res); err != nil {
  5027. return nil, err
  5028. }
  5029. return ret, nil
  5030. // {
  5031. // "description": "Retrieves a PerfMetricsSummary.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist",
  5032. // "httpMethod": "GET",
  5033. // "id": "toolresults.projects.histories.executions.steps.getPerfMetricsSummary",
  5034. // "parameterOrder": [
  5035. // "projectId",
  5036. // "historyId",
  5037. // "executionId",
  5038. // "stepId"
  5039. // ],
  5040. // "parameters": {
  5041. // "executionId": {
  5042. // "description": "A tool results execution ID.",
  5043. // "location": "path",
  5044. // "required": true,
  5045. // "type": "string"
  5046. // },
  5047. // "historyId": {
  5048. // "description": "A tool results history ID.",
  5049. // "location": "path",
  5050. // "required": true,
  5051. // "type": "string"
  5052. // },
  5053. // "projectId": {
  5054. // "description": "The cloud project",
  5055. // "location": "path",
  5056. // "required": true,
  5057. // "type": "string"
  5058. // },
  5059. // "stepId": {
  5060. // "description": "A tool results step ID.",
  5061. // "location": "path",
  5062. // "required": true,
  5063. // "type": "string"
  5064. // }
  5065. // },
  5066. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary",
  5067. // "response": {
  5068. // "$ref": "PerfMetricsSummary"
  5069. // },
  5070. // "scopes": [
  5071. // "https://www.googleapis.com/auth/cloud-platform"
  5072. // ]
  5073. // }
  5074. }
  5075. // method id "toolresults.projects.histories.executions.steps.list":
  5076. type ProjectsHistoriesExecutionsStepsListCall struct {
  5077. s *Service
  5078. projectId string
  5079. historyId string
  5080. executionId string
  5081. urlParams_ gensupport.URLParams
  5082. ifNoneMatch_ string
  5083. ctx_ context.Context
  5084. header_ http.Header
  5085. }
  5086. // List: Lists Steps for a given Execution.
  5087. //
  5088. // The steps are sorted by creation_time in descending order. The
  5089. // step_id key will be used to order the steps with the same
  5090. // creation_time.
  5091. //
  5092. // May return any of the following canonical error codes:
  5093. //
  5094. // - PERMISSION_DENIED - if the user is not authorized to read project -
  5095. // INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION
  5096. // - if an argument in the request happens to be invalid; e.g. if an
  5097. // attempt is made to list the children of a nonexistent Step -
  5098. // NOT_FOUND - if the containing Execution does not exist
  5099. func (r *ProjectsHistoriesExecutionsStepsService) List(projectId string, historyId string, executionId string) *ProjectsHistoriesExecutionsStepsListCall {
  5100. c := &ProjectsHistoriesExecutionsStepsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5101. c.projectId = projectId
  5102. c.historyId = historyId
  5103. c.executionId = executionId
  5104. return c
  5105. }
  5106. // PageSize sets the optional parameter "pageSize": The maximum number
  5107. // of Steps to fetch.
  5108. //
  5109. // Default value: 25. The server will use this default if the field is
  5110. // not set or has a value of 0.
  5111. func (c *ProjectsHistoriesExecutionsStepsListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsStepsListCall {
  5112. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5113. return c
  5114. }
  5115. // PageToken sets the optional parameter "pageToken": A continuation
  5116. // token to resume the query at the next item.
  5117. func (c *ProjectsHistoriesExecutionsStepsListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsStepsListCall {
  5118. c.urlParams_.Set("pageToken", pageToken)
  5119. return c
  5120. }
  5121. // Fields allows partial responses to be retrieved. See
  5122. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5123. // for more information.
  5124. func (c *ProjectsHistoriesExecutionsStepsListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsListCall {
  5125. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5126. return c
  5127. }
  5128. // IfNoneMatch sets the optional parameter which makes the operation
  5129. // fail if the object's ETag matches the given value. This is useful for
  5130. // getting updates only after the object has changed since the last
  5131. // request. Use googleapi.IsNotModified to check whether the response
  5132. // error from Do is the result of In-None-Match.
  5133. func (c *ProjectsHistoriesExecutionsStepsListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsListCall {
  5134. c.ifNoneMatch_ = entityTag
  5135. return c
  5136. }
  5137. // Context sets the context to be used in this call's Do method. Any
  5138. // pending HTTP request will be aborted if the provided context is
  5139. // canceled.
  5140. func (c *ProjectsHistoriesExecutionsStepsListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsListCall {
  5141. c.ctx_ = ctx
  5142. return c
  5143. }
  5144. // Header returns an http.Header that can be modified by the caller to
  5145. // add HTTP headers to the request.
  5146. func (c *ProjectsHistoriesExecutionsStepsListCall) Header() http.Header {
  5147. if c.header_ == nil {
  5148. c.header_ = make(http.Header)
  5149. }
  5150. return c.header_
  5151. }
  5152. func (c *ProjectsHistoriesExecutionsStepsListCall) doRequest(alt string) (*http.Response, error) {
  5153. reqHeaders := make(http.Header)
  5154. for k, v := range c.header_ {
  5155. reqHeaders[k] = v
  5156. }
  5157. reqHeaders.Set("User-Agent", c.s.userAgent())
  5158. if c.ifNoneMatch_ != "" {
  5159. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5160. }
  5161. var body io.Reader = nil
  5162. c.urlParams_.Set("alt", alt)
  5163. c.urlParams_.Set("prettyPrint", "false")
  5164. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps")
  5165. urls += "?" + c.urlParams_.Encode()
  5166. req, err := http.NewRequest("GET", urls, body)
  5167. if err != nil {
  5168. return nil, err
  5169. }
  5170. req.Header = reqHeaders
  5171. googleapi.Expand(req.URL, map[string]string{
  5172. "projectId": c.projectId,
  5173. "historyId": c.historyId,
  5174. "executionId": c.executionId,
  5175. })
  5176. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5177. }
  5178. // Do executes the "toolresults.projects.histories.executions.steps.list" call.
  5179. // Exactly one of *ListStepsResponse or error will be non-nil. Any
  5180. // non-2xx status code is an error. Response headers are in either
  5181. // *ListStepsResponse.ServerResponse.Header or (if a response was
  5182. // returned at all) in error.(*googleapi.Error).Header. Use
  5183. // googleapi.IsNotModified to check whether the returned error was
  5184. // because http.StatusNotModified was returned.
  5185. func (c *ProjectsHistoriesExecutionsStepsListCall) Do(opts ...googleapi.CallOption) (*ListStepsResponse, error) {
  5186. gensupport.SetOptions(c.urlParams_, opts...)
  5187. res, err := c.doRequest("json")
  5188. if res != nil && res.StatusCode == http.StatusNotModified {
  5189. if res.Body != nil {
  5190. res.Body.Close()
  5191. }
  5192. return nil, &googleapi.Error{
  5193. Code: res.StatusCode,
  5194. Header: res.Header,
  5195. }
  5196. }
  5197. if err != nil {
  5198. return nil, err
  5199. }
  5200. defer googleapi.CloseBody(res)
  5201. if err := googleapi.CheckResponse(res); err != nil {
  5202. return nil, err
  5203. }
  5204. ret := &ListStepsResponse{
  5205. ServerResponse: googleapi.ServerResponse{
  5206. Header: res.Header,
  5207. HTTPStatusCode: res.StatusCode,
  5208. },
  5209. }
  5210. target := &ret
  5211. if err := gensupport.DecodeResponse(target, res); err != nil {
  5212. return nil, err
  5213. }
  5214. return ret, nil
  5215. // {
  5216. // "description": "Lists Steps for a given Execution.\n\nThe steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist",
  5217. // "httpMethod": "GET",
  5218. // "id": "toolresults.projects.histories.executions.steps.list",
  5219. // "parameterOrder": [
  5220. // "projectId",
  5221. // "historyId",
  5222. // "executionId"
  5223. // ],
  5224. // "parameters": {
  5225. // "executionId": {
  5226. // "description": "A Execution id.\n\nRequired.",
  5227. // "location": "path",
  5228. // "required": true,
  5229. // "type": "string"
  5230. // },
  5231. // "historyId": {
  5232. // "description": "A History id.\n\nRequired.",
  5233. // "location": "path",
  5234. // "required": true,
  5235. // "type": "string"
  5236. // },
  5237. // "pageSize": {
  5238. // "description": "The maximum number of Steps to fetch.\n\nDefault value: 25. The server will use this default if the field is not set or has a value of 0.\n\nOptional.",
  5239. // "format": "int32",
  5240. // "location": "query",
  5241. // "type": "integer"
  5242. // },
  5243. // "pageToken": {
  5244. // "description": "A continuation token to resume the query at the next item.\n\nOptional.",
  5245. // "location": "query",
  5246. // "type": "string"
  5247. // },
  5248. // "projectId": {
  5249. // "description": "A Project id.\n\nRequired.",
  5250. // "location": "path",
  5251. // "required": true,
  5252. // "type": "string"
  5253. // }
  5254. // },
  5255. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps",
  5256. // "response": {
  5257. // "$ref": "ListStepsResponse"
  5258. // },
  5259. // "scopes": [
  5260. // "https://www.googleapis.com/auth/cloud-platform"
  5261. // ]
  5262. // }
  5263. }
  5264. // Pages invokes f for each page of results.
  5265. // A non-nil error returned from f will halt the iteration.
  5266. // The provided context supersedes any context provided to the Context method.
  5267. func (c *ProjectsHistoriesExecutionsStepsListCall) Pages(ctx context.Context, f func(*ListStepsResponse) error) error {
  5268. c.ctx_ = ctx
  5269. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  5270. for {
  5271. x, err := c.Do()
  5272. if err != nil {
  5273. return err
  5274. }
  5275. if err := f(x); err != nil {
  5276. return err
  5277. }
  5278. if x.NextPageToken == "" {
  5279. return nil
  5280. }
  5281. c.PageToken(x.NextPageToken)
  5282. }
  5283. }
  5284. // method id "toolresults.projects.histories.executions.steps.patch":
  5285. type ProjectsHistoriesExecutionsStepsPatchCall struct {
  5286. s *Service
  5287. projectId string
  5288. historyId string
  5289. executionId string
  5290. stepId string
  5291. step *Step
  5292. urlParams_ gensupport.URLParams
  5293. ctx_ context.Context
  5294. header_ http.Header
  5295. }
  5296. // Patch: Updates an existing Step with the supplied partial
  5297. // entity.
  5298. //
  5299. // May return any of the following canonical error codes:
  5300. //
  5301. // - PERMISSION_DENIED - if the user is not authorized to write project
  5302. // - INVALID_ARGUMENT - if the request is malformed -
  5303. // FAILED_PRECONDITION - if the requested state transition is illegal
  5304. // (e.g try to upload a duplicate xml file), if the updated step is too
  5305. // large (more than 10Mib) - NOT_FOUND - if the containing Execution
  5306. // does not exist
  5307. func (r *ProjectsHistoriesExecutionsStepsService) Patch(projectId string, historyId string, executionId string, stepId string, step *Step) *ProjectsHistoriesExecutionsStepsPatchCall {
  5308. c := &ProjectsHistoriesExecutionsStepsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5309. c.projectId = projectId
  5310. c.historyId = historyId
  5311. c.executionId = executionId
  5312. c.stepId = stepId
  5313. c.step = step
  5314. return c
  5315. }
  5316. // RequestId sets the optional parameter "requestId": A unique request
  5317. // ID for server to detect duplicated requests. For example, a
  5318. // UUID.
  5319. //
  5320. // Optional, but strongly recommended.
  5321. func (c *ProjectsHistoriesExecutionsStepsPatchCall) RequestId(requestId string) *ProjectsHistoriesExecutionsStepsPatchCall {
  5322. c.urlParams_.Set("requestId", requestId)
  5323. return c
  5324. }
  5325. // Fields allows partial responses to be retrieved. See
  5326. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5327. // for more information.
  5328. func (c *ProjectsHistoriesExecutionsStepsPatchCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPatchCall {
  5329. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5330. return c
  5331. }
  5332. // Context sets the context to be used in this call's Do method. Any
  5333. // pending HTTP request will be aborted if the provided context is
  5334. // canceled.
  5335. func (c *ProjectsHistoriesExecutionsStepsPatchCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPatchCall {
  5336. c.ctx_ = ctx
  5337. return c
  5338. }
  5339. // Header returns an http.Header that can be modified by the caller to
  5340. // add HTTP headers to the request.
  5341. func (c *ProjectsHistoriesExecutionsStepsPatchCall) Header() http.Header {
  5342. if c.header_ == nil {
  5343. c.header_ = make(http.Header)
  5344. }
  5345. return c.header_
  5346. }
  5347. func (c *ProjectsHistoriesExecutionsStepsPatchCall) doRequest(alt string) (*http.Response, error) {
  5348. reqHeaders := make(http.Header)
  5349. for k, v := range c.header_ {
  5350. reqHeaders[k] = v
  5351. }
  5352. reqHeaders.Set("User-Agent", c.s.userAgent())
  5353. var body io.Reader = nil
  5354. body, err := googleapi.WithoutDataWrapper.JSONReader(c.step)
  5355. if err != nil {
  5356. return nil, err
  5357. }
  5358. reqHeaders.Set("Content-Type", "application/json")
  5359. c.urlParams_.Set("alt", alt)
  5360. c.urlParams_.Set("prettyPrint", "false")
  5361. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}")
  5362. urls += "?" + c.urlParams_.Encode()
  5363. req, err := http.NewRequest("PATCH", urls, body)
  5364. if err != nil {
  5365. return nil, err
  5366. }
  5367. req.Header = reqHeaders
  5368. googleapi.Expand(req.URL, map[string]string{
  5369. "projectId": c.projectId,
  5370. "historyId": c.historyId,
  5371. "executionId": c.executionId,
  5372. "stepId": c.stepId,
  5373. })
  5374. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5375. }
  5376. // Do executes the "toolresults.projects.histories.executions.steps.patch" call.
  5377. // Exactly one of *Step or error will be non-nil. Any non-2xx status
  5378. // code is an error. Response headers are in either
  5379. // *Step.ServerResponse.Header or (if a response was returned at all) in
  5380. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5381. // whether the returned error was because http.StatusNotModified was
  5382. // returned.
  5383. func (c *ProjectsHistoriesExecutionsStepsPatchCall) Do(opts ...googleapi.CallOption) (*Step, error) {
  5384. gensupport.SetOptions(c.urlParams_, opts...)
  5385. res, err := c.doRequest("json")
  5386. if res != nil && res.StatusCode == http.StatusNotModified {
  5387. if res.Body != nil {
  5388. res.Body.Close()
  5389. }
  5390. return nil, &googleapi.Error{
  5391. Code: res.StatusCode,
  5392. Header: res.Header,
  5393. }
  5394. }
  5395. if err != nil {
  5396. return nil, err
  5397. }
  5398. defer googleapi.CloseBody(res)
  5399. if err := googleapi.CheckResponse(res); err != nil {
  5400. return nil, err
  5401. }
  5402. ret := &Step{
  5403. ServerResponse: googleapi.ServerResponse{
  5404. Header: res.Header,
  5405. HTTPStatusCode: res.StatusCode,
  5406. },
  5407. }
  5408. target := &ret
  5409. if err := gensupport.DecodeResponse(target, res); err != nil {
  5410. return nil, err
  5411. }
  5412. return ret, nil
  5413. // {
  5414. // "description": "Updates an existing Step with the supplied partial entity.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist",
  5415. // "httpMethod": "PATCH",
  5416. // "id": "toolresults.projects.histories.executions.steps.patch",
  5417. // "parameterOrder": [
  5418. // "projectId",
  5419. // "historyId",
  5420. // "executionId",
  5421. // "stepId"
  5422. // ],
  5423. // "parameters": {
  5424. // "executionId": {
  5425. // "description": "A Execution id.\n\nRequired.",
  5426. // "location": "path",
  5427. // "required": true,
  5428. // "type": "string"
  5429. // },
  5430. // "historyId": {
  5431. // "description": "A History id.\n\nRequired.",
  5432. // "location": "path",
  5433. // "required": true,
  5434. // "type": "string"
  5435. // },
  5436. // "projectId": {
  5437. // "description": "A Project id.\n\nRequired.",
  5438. // "location": "path",
  5439. // "required": true,
  5440. // "type": "string"
  5441. // },
  5442. // "requestId": {
  5443. // "description": "A unique request ID for server to detect duplicated requests. For example, a UUID.\n\nOptional, but strongly recommended.",
  5444. // "location": "query",
  5445. // "type": "string"
  5446. // },
  5447. // "stepId": {
  5448. // "description": "A Step id.\n\nRequired.",
  5449. // "location": "path",
  5450. // "required": true,
  5451. // "type": "string"
  5452. // }
  5453. // },
  5454. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}",
  5455. // "request": {
  5456. // "$ref": "Step"
  5457. // },
  5458. // "response": {
  5459. // "$ref": "Step"
  5460. // },
  5461. // "scopes": [
  5462. // "https://www.googleapis.com/auth/cloud-platform"
  5463. // ]
  5464. // }
  5465. }
  5466. // method id "toolresults.projects.histories.executions.steps.publishXunitXmlFiles":
  5467. type ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall struct {
  5468. s *Service
  5469. projectId string
  5470. historyId string
  5471. executionId string
  5472. stepId string
  5473. publishxunitxmlfilesrequest *PublishXunitXmlFilesRequest
  5474. urlParams_ gensupport.URLParams
  5475. ctx_ context.Context
  5476. header_ http.Header
  5477. }
  5478. // PublishXunitXmlFiles: Publish xml files to an existing Step.
  5479. //
  5480. // May return any of the following canonical error codes:
  5481. //
  5482. // - PERMISSION_DENIED - if the user is not authorized to write project
  5483. // - INVALID_ARGUMENT - if the request is malformed -
  5484. // FAILED_PRECONDITION - if the requested state transition is illegal,
  5485. // e.g try to upload a duplicate xml file or a file too large. -
  5486. // NOT_FOUND - if the containing Execution does not exist
  5487. func (r *ProjectsHistoriesExecutionsStepsService) PublishXunitXmlFiles(projectId string, historyId string, executionId string, stepId string, publishxunitxmlfilesrequest *PublishXunitXmlFilesRequest) *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall {
  5488. c := &ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5489. c.projectId = projectId
  5490. c.historyId = historyId
  5491. c.executionId = executionId
  5492. c.stepId = stepId
  5493. c.publishxunitxmlfilesrequest = publishxunitxmlfilesrequest
  5494. return c
  5495. }
  5496. // Fields allows partial responses to be retrieved. See
  5497. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5498. // for more information.
  5499. func (c *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall {
  5500. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5501. return c
  5502. }
  5503. // Context sets the context to be used in this call's Do method. Any
  5504. // pending HTTP request will be aborted if the provided context is
  5505. // canceled.
  5506. func (c *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall {
  5507. c.ctx_ = ctx
  5508. return c
  5509. }
  5510. // Header returns an http.Header that can be modified by the caller to
  5511. // add HTTP headers to the request.
  5512. func (c *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Header() http.Header {
  5513. if c.header_ == nil {
  5514. c.header_ = make(http.Header)
  5515. }
  5516. return c.header_
  5517. }
  5518. func (c *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) doRequest(alt string) (*http.Response, error) {
  5519. reqHeaders := make(http.Header)
  5520. for k, v := range c.header_ {
  5521. reqHeaders[k] = v
  5522. }
  5523. reqHeaders.Set("User-Agent", c.s.userAgent())
  5524. var body io.Reader = nil
  5525. body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishxunitxmlfilesrequest)
  5526. if err != nil {
  5527. return nil, err
  5528. }
  5529. reqHeaders.Set("Content-Type", "application/json")
  5530. c.urlParams_.Set("alt", alt)
  5531. c.urlParams_.Set("prettyPrint", "false")
  5532. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles")
  5533. urls += "?" + c.urlParams_.Encode()
  5534. req, err := http.NewRequest("POST", urls, body)
  5535. if err != nil {
  5536. return nil, err
  5537. }
  5538. req.Header = reqHeaders
  5539. googleapi.Expand(req.URL, map[string]string{
  5540. "projectId": c.projectId,
  5541. "historyId": c.historyId,
  5542. "executionId": c.executionId,
  5543. "stepId": c.stepId,
  5544. })
  5545. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5546. }
  5547. // Do executes the "toolresults.projects.histories.executions.steps.publishXunitXmlFiles" call.
  5548. // Exactly one of *Step or error will be non-nil. Any non-2xx status
  5549. // code is an error. Response headers are in either
  5550. // *Step.ServerResponse.Header or (if a response was returned at all) in
  5551. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5552. // whether the returned error was because http.StatusNotModified was
  5553. // returned.
  5554. func (c *ProjectsHistoriesExecutionsStepsPublishXunitXmlFilesCall) Do(opts ...googleapi.CallOption) (*Step, error) {
  5555. gensupport.SetOptions(c.urlParams_, opts...)
  5556. res, err := c.doRequest("json")
  5557. if res != nil && res.StatusCode == http.StatusNotModified {
  5558. if res.Body != nil {
  5559. res.Body.Close()
  5560. }
  5561. return nil, &googleapi.Error{
  5562. Code: res.StatusCode,
  5563. Header: res.Header,
  5564. }
  5565. }
  5566. if err != nil {
  5567. return nil, err
  5568. }
  5569. defer googleapi.CloseBody(res)
  5570. if err := googleapi.CheckResponse(res); err != nil {
  5571. return nil, err
  5572. }
  5573. ret := &Step{
  5574. ServerResponse: googleapi.ServerResponse{
  5575. Header: res.Header,
  5576. HTTPStatusCode: res.StatusCode,
  5577. },
  5578. }
  5579. target := &ret
  5580. if err := gensupport.DecodeResponse(target, res); err != nil {
  5581. return nil, err
  5582. }
  5583. return ret, nil
  5584. // {
  5585. // "description": "Publish xml files to an existing Step.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist",
  5586. // "httpMethod": "POST",
  5587. // "id": "toolresults.projects.histories.executions.steps.publishXunitXmlFiles",
  5588. // "parameterOrder": [
  5589. // "projectId",
  5590. // "historyId",
  5591. // "executionId",
  5592. // "stepId"
  5593. // ],
  5594. // "parameters": {
  5595. // "executionId": {
  5596. // "description": "A Execution id.\n\nRequired.",
  5597. // "location": "path",
  5598. // "required": true,
  5599. // "type": "string"
  5600. // },
  5601. // "historyId": {
  5602. // "description": "A History id.\n\nRequired.",
  5603. // "location": "path",
  5604. // "required": true,
  5605. // "type": "string"
  5606. // },
  5607. // "projectId": {
  5608. // "description": "A Project id.\n\nRequired.",
  5609. // "location": "path",
  5610. // "required": true,
  5611. // "type": "string"
  5612. // },
  5613. // "stepId": {
  5614. // "description": "A Step id. Note: This step must include a TestExecutionStep.\n\nRequired.",
  5615. // "location": "path",
  5616. // "required": true,
  5617. // "type": "string"
  5618. // }
  5619. // },
  5620. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles",
  5621. // "request": {
  5622. // "$ref": "PublishXunitXmlFilesRequest"
  5623. // },
  5624. // "response": {
  5625. // "$ref": "Step"
  5626. // },
  5627. // "scopes": [
  5628. // "https://www.googleapis.com/auth/cloud-platform"
  5629. // ]
  5630. // }
  5631. }
  5632. // method id "toolresults.projects.histories.executions.steps.perfMetricsSummary.create":
  5633. type ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall struct {
  5634. s *Service
  5635. projectId string
  5636. historyId string
  5637. executionId string
  5638. stepId string
  5639. perfmetricssummary *PerfMetricsSummary
  5640. urlParams_ gensupport.URLParams
  5641. ctx_ context.Context
  5642. header_ http.Header
  5643. }
  5644. // Create: Creates a PerfMetricsSummary resource. Returns the existing
  5645. // one if it has already been created.
  5646. //
  5647. // May return any of the following error code(s): - NOT_FOUND - The
  5648. // containing Step does not exist
  5649. func (r *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryService) Create(projectId string, historyId string, executionId string, stepId string, perfmetricssummary *PerfMetricsSummary) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall {
  5650. c := &ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5651. c.projectId = projectId
  5652. c.historyId = historyId
  5653. c.executionId = executionId
  5654. c.stepId = stepId
  5655. c.perfmetricssummary = perfmetricssummary
  5656. return c
  5657. }
  5658. // Fields allows partial responses to be retrieved. See
  5659. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5660. // for more information.
  5661. func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall {
  5662. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5663. return c
  5664. }
  5665. // Context sets the context to be used in this call's Do method. Any
  5666. // pending HTTP request will be aborted if the provided context is
  5667. // canceled.
  5668. func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall {
  5669. c.ctx_ = ctx
  5670. return c
  5671. }
  5672. // Header returns an http.Header that can be modified by the caller to
  5673. // add HTTP headers to the request.
  5674. func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Header() http.Header {
  5675. if c.header_ == nil {
  5676. c.header_ = make(http.Header)
  5677. }
  5678. return c.header_
  5679. }
  5680. func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) doRequest(alt string) (*http.Response, error) {
  5681. reqHeaders := make(http.Header)
  5682. for k, v := range c.header_ {
  5683. reqHeaders[k] = v
  5684. }
  5685. reqHeaders.Set("User-Agent", c.s.userAgent())
  5686. var body io.Reader = nil
  5687. body, err := googleapi.WithoutDataWrapper.JSONReader(c.perfmetricssummary)
  5688. if err != nil {
  5689. return nil, err
  5690. }
  5691. reqHeaders.Set("Content-Type", "application/json")
  5692. c.urlParams_.Set("alt", alt)
  5693. c.urlParams_.Set("prettyPrint", "false")
  5694. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary")
  5695. urls += "?" + c.urlParams_.Encode()
  5696. req, err := http.NewRequest("POST", urls, body)
  5697. if err != nil {
  5698. return nil, err
  5699. }
  5700. req.Header = reqHeaders
  5701. googleapi.Expand(req.URL, map[string]string{
  5702. "projectId": c.projectId,
  5703. "historyId": c.historyId,
  5704. "executionId": c.executionId,
  5705. "stepId": c.stepId,
  5706. })
  5707. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5708. }
  5709. // Do executes the "toolresults.projects.histories.executions.steps.perfMetricsSummary.create" call.
  5710. // Exactly one of *PerfMetricsSummary or error will be non-nil. Any
  5711. // non-2xx status code is an error. Response headers are in either
  5712. // *PerfMetricsSummary.ServerResponse.Header or (if a response was
  5713. // returned at all) in error.(*googleapi.Error).Header. Use
  5714. // googleapi.IsNotModified to check whether the returned error was
  5715. // because http.StatusNotModified was returned.
  5716. func (c *ProjectsHistoriesExecutionsStepsPerfMetricsSummaryCreateCall) Do(opts ...googleapi.CallOption) (*PerfMetricsSummary, error) {
  5717. gensupport.SetOptions(c.urlParams_, opts...)
  5718. res, err := c.doRequest("json")
  5719. if res != nil && res.StatusCode == http.StatusNotModified {
  5720. if res.Body != nil {
  5721. res.Body.Close()
  5722. }
  5723. return nil, &googleapi.Error{
  5724. Code: res.StatusCode,
  5725. Header: res.Header,
  5726. }
  5727. }
  5728. if err != nil {
  5729. return nil, err
  5730. }
  5731. defer googleapi.CloseBody(res)
  5732. if err := googleapi.CheckResponse(res); err != nil {
  5733. return nil, err
  5734. }
  5735. ret := &PerfMetricsSummary{
  5736. ServerResponse: googleapi.ServerResponse{
  5737. Header: res.Header,
  5738. HTTPStatusCode: res.StatusCode,
  5739. },
  5740. }
  5741. target := &ret
  5742. if err := gensupport.DecodeResponse(target, res); err != nil {
  5743. return nil, err
  5744. }
  5745. return ret, nil
  5746. // {
  5747. // "description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.\n\nMay return any of the following error code(s): - NOT_FOUND - The containing Step does not exist",
  5748. // "httpMethod": "POST",
  5749. // "id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create",
  5750. // "parameterOrder": [
  5751. // "projectId",
  5752. // "historyId",
  5753. // "executionId",
  5754. // "stepId"
  5755. // ],
  5756. // "parameters": {
  5757. // "executionId": {
  5758. // "description": "A tool results execution ID.",
  5759. // "location": "path",
  5760. // "required": true,
  5761. // "type": "string"
  5762. // },
  5763. // "historyId": {
  5764. // "description": "A tool results history ID.",
  5765. // "location": "path",
  5766. // "required": true,
  5767. // "type": "string"
  5768. // },
  5769. // "projectId": {
  5770. // "description": "The cloud project",
  5771. // "location": "path",
  5772. // "required": true,
  5773. // "type": "string"
  5774. // },
  5775. // "stepId": {
  5776. // "description": "A tool results step ID.",
  5777. // "location": "path",
  5778. // "required": true,
  5779. // "type": "string"
  5780. // }
  5781. // },
  5782. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary",
  5783. // "request": {
  5784. // "$ref": "PerfMetricsSummary"
  5785. // },
  5786. // "response": {
  5787. // "$ref": "PerfMetricsSummary"
  5788. // },
  5789. // "scopes": [
  5790. // "https://www.googleapis.com/auth/cloud-platform"
  5791. // ]
  5792. // }
  5793. }
  5794. // method id "toolresults.projects.histories.executions.steps.perfSampleSeries.create":
  5795. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall struct {
  5796. s *Service
  5797. projectId string
  5798. historyId string
  5799. executionId string
  5800. stepId string
  5801. perfsampleseries *PerfSampleSeries
  5802. urlParams_ gensupport.URLParams
  5803. ctx_ context.Context
  5804. header_ http.Header
  5805. }
  5806. // Create: Creates a PerfSampleSeries.
  5807. //
  5808. // May return any of the following error code(s): - ALREADY_EXISTS -
  5809. // PerfMetricSummary already exists for the given Step - NOT_FOUND - The
  5810. // containing Step does not exist
  5811. func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService) Create(projectId string, historyId string, executionId string, stepId string, perfsampleseries *PerfSampleSeries) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall {
  5812. c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5813. c.projectId = projectId
  5814. c.historyId = historyId
  5815. c.executionId = executionId
  5816. c.stepId = stepId
  5817. c.perfsampleseries = perfsampleseries
  5818. return c
  5819. }
  5820. // Fields allows partial responses to be retrieved. See
  5821. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5822. // for more information.
  5823. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall {
  5824. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5825. return c
  5826. }
  5827. // Context sets the context to be used in this call's Do method. Any
  5828. // pending HTTP request will be aborted if the provided context is
  5829. // canceled.
  5830. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall {
  5831. c.ctx_ = ctx
  5832. return c
  5833. }
  5834. // Header returns an http.Header that can be modified by the caller to
  5835. // add HTTP headers to the request.
  5836. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Header() http.Header {
  5837. if c.header_ == nil {
  5838. c.header_ = make(http.Header)
  5839. }
  5840. return c.header_
  5841. }
  5842. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) doRequest(alt string) (*http.Response, error) {
  5843. reqHeaders := make(http.Header)
  5844. for k, v := range c.header_ {
  5845. reqHeaders[k] = v
  5846. }
  5847. reqHeaders.Set("User-Agent", c.s.userAgent())
  5848. var body io.Reader = nil
  5849. body, err := googleapi.WithoutDataWrapper.JSONReader(c.perfsampleseries)
  5850. if err != nil {
  5851. return nil, err
  5852. }
  5853. reqHeaders.Set("Content-Type", "application/json")
  5854. c.urlParams_.Set("alt", alt)
  5855. c.urlParams_.Set("prettyPrint", "false")
  5856. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries")
  5857. urls += "?" + c.urlParams_.Encode()
  5858. req, err := http.NewRequest("POST", urls, body)
  5859. if err != nil {
  5860. return nil, err
  5861. }
  5862. req.Header = reqHeaders
  5863. googleapi.Expand(req.URL, map[string]string{
  5864. "projectId": c.projectId,
  5865. "historyId": c.historyId,
  5866. "executionId": c.executionId,
  5867. "stepId": c.stepId,
  5868. })
  5869. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5870. }
  5871. // Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.create" call.
  5872. // Exactly one of *PerfSampleSeries or error will be non-nil. Any
  5873. // non-2xx status code is an error. Response headers are in either
  5874. // *PerfSampleSeries.ServerResponse.Header or (if a response was
  5875. // returned at all) in error.(*googleapi.Error).Header. Use
  5876. // googleapi.IsNotModified to check whether the returned error was
  5877. // because http.StatusNotModified was returned.
  5878. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesCreateCall) Do(opts ...googleapi.CallOption) (*PerfSampleSeries, error) {
  5879. gensupport.SetOptions(c.urlParams_, opts...)
  5880. res, err := c.doRequest("json")
  5881. if res != nil && res.StatusCode == http.StatusNotModified {
  5882. if res.Body != nil {
  5883. res.Body.Close()
  5884. }
  5885. return nil, &googleapi.Error{
  5886. Code: res.StatusCode,
  5887. Header: res.Header,
  5888. }
  5889. }
  5890. if err != nil {
  5891. return nil, err
  5892. }
  5893. defer googleapi.CloseBody(res)
  5894. if err := googleapi.CheckResponse(res); err != nil {
  5895. return nil, err
  5896. }
  5897. ret := &PerfSampleSeries{
  5898. ServerResponse: googleapi.ServerResponse{
  5899. Header: res.Header,
  5900. HTTPStatusCode: res.StatusCode,
  5901. },
  5902. }
  5903. target := &ret
  5904. if err := gensupport.DecodeResponse(target, res); err != nil {
  5905. return nil, err
  5906. }
  5907. return ret, nil
  5908. // {
  5909. // "description": "Creates a PerfSampleSeries.\n\nMay return any of the following error code(s): - ALREADY_EXISTS - PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist",
  5910. // "httpMethod": "POST",
  5911. // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.create",
  5912. // "parameterOrder": [
  5913. // "projectId",
  5914. // "historyId",
  5915. // "executionId",
  5916. // "stepId"
  5917. // ],
  5918. // "parameters": {
  5919. // "executionId": {
  5920. // "description": "A tool results execution ID.",
  5921. // "location": "path",
  5922. // "required": true,
  5923. // "type": "string"
  5924. // },
  5925. // "historyId": {
  5926. // "description": "A tool results history ID.",
  5927. // "location": "path",
  5928. // "required": true,
  5929. // "type": "string"
  5930. // },
  5931. // "projectId": {
  5932. // "description": "The cloud project",
  5933. // "location": "path",
  5934. // "required": true,
  5935. // "type": "string"
  5936. // },
  5937. // "stepId": {
  5938. // "description": "A tool results step ID.",
  5939. // "location": "path",
  5940. // "required": true,
  5941. // "type": "string"
  5942. // }
  5943. // },
  5944. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries",
  5945. // "request": {
  5946. // "$ref": "PerfSampleSeries"
  5947. // },
  5948. // "response": {
  5949. // "$ref": "PerfSampleSeries"
  5950. // },
  5951. // "scopes": [
  5952. // "https://www.googleapis.com/auth/cloud-platform"
  5953. // ]
  5954. // }
  5955. }
  5956. // method id "toolresults.projects.histories.executions.steps.perfSampleSeries.get":
  5957. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall struct {
  5958. s *Service
  5959. projectId string
  5960. historyId string
  5961. executionId string
  5962. stepId string
  5963. sampleSeriesId string
  5964. urlParams_ gensupport.URLParams
  5965. ifNoneMatch_ string
  5966. ctx_ context.Context
  5967. header_ http.Header
  5968. }
  5969. // Get: Gets a PerfSampleSeries.
  5970. //
  5971. // May return any of the following error code(s): - NOT_FOUND - The
  5972. // specified PerfSampleSeries does not exist
  5973. func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService) Get(projectId string, historyId string, executionId string, stepId string, sampleSeriesId string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall {
  5974. c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5975. c.projectId = projectId
  5976. c.historyId = historyId
  5977. c.executionId = executionId
  5978. c.stepId = stepId
  5979. c.sampleSeriesId = sampleSeriesId
  5980. return c
  5981. }
  5982. // Fields allows partial responses to be retrieved. See
  5983. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5984. // for more information.
  5985. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall {
  5986. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5987. return c
  5988. }
  5989. // IfNoneMatch sets the optional parameter which makes the operation
  5990. // fail if the object's ETag matches the given value. This is useful for
  5991. // getting updates only after the object has changed since the last
  5992. // request. Use googleapi.IsNotModified to check whether the response
  5993. // error from Do is the result of In-None-Match.
  5994. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall {
  5995. c.ifNoneMatch_ = entityTag
  5996. return c
  5997. }
  5998. // Context sets the context to be used in this call's Do method. Any
  5999. // pending HTTP request will be aborted if the provided context is
  6000. // canceled.
  6001. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall {
  6002. c.ctx_ = ctx
  6003. return c
  6004. }
  6005. // Header returns an http.Header that can be modified by the caller to
  6006. // add HTTP headers to the request.
  6007. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Header() http.Header {
  6008. if c.header_ == nil {
  6009. c.header_ = make(http.Header)
  6010. }
  6011. return c.header_
  6012. }
  6013. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) doRequest(alt string) (*http.Response, error) {
  6014. reqHeaders := make(http.Header)
  6015. for k, v := range c.header_ {
  6016. reqHeaders[k] = v
  6017. }
  6018. reqHeaders.Set("User-Agent", c.s.userAgent())
  6019. if c.ifNoneMatch_ != "" {
  6020. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6021. }
  6022. var body io.Reader = nil
  6023. c.urlParams_.Set("alt", alt)
  6024. c.urlParams_.Set("prettyPrint", "false")
  6025. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}")
  6026. urls += "?" + c.urlParams_.Encode()
  6027. req, err := http.NewRequest("GET", urls, body)
  6028. if err != nil {
  6029. return nil, err
  6030. }
  6031. req.Header = reqHeaders
  6032. googleapi.Expand(req.URL, map[string]string{
  6033. "projectId": c.projectId,
  6034. "historyId": c.historyId,
  6035. "executionId": c.executionId,
  6036. "stepId": c.stepId,
  6037. "sampleSeriesId": c.sampleSeriesId,
  6038. })
  6039. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6040. }
  6041. // Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.get" call.
  6042. // Exactly one of *PerfSampleSeries or error will be non-nil. Any
  6043. // non-2xx status code is an error. Response headers are in either
  6044. // *PerfSampleSeries.ServerResponse.Header or (if a response was
  6045. // returned at all) in error.(*googleapi.Error).Header. Use
  6046. // googleapi.IsNotModified to check whether the returned error was
  6047. // because http.StatusNotModified was returned.
  6048. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesGetCall) Do(opts ...googleapi.CallOption) (*PerfSampleSeries, error) {
  6049. gensupport.SetOptions(c.urlParams_, opts...)
  6050. res, err := c.doRequest("json")
  6051. if res != nil && res.StatusCode == http.StatusNotModified {
  6052. if res.Body != nil {
  6053. res.Body.Close()
  6054. }
  6055. return nil, &googleapi.Error{
  6056. Code: res.StatusCode,
  6057. Header: res.Header,
  6058. }
  6059. }
  6060. if err != nil {
  6061. return nil, err
  6062. }
  6063. defer googleapi.CloseBody(res)
  6064. if err := googleapi.CheckResponse(res); err != nil {
  6065. return nil, err
  6066. }
  6067. ret := &PerfSampleSeries{
  6068. ServerResponse: googleapi.ServerResponse{
  6069. Header: res.Header,
  6070. HTTPStatusCode: res.StatusCode,
  6071. },
  6072. }
  6073. target := &ret
  6074. if err := gensupport.DecodeResponse(target, res); err != nil {
  6075. return nil, err
  6076. }
  6077. return ret, nil
  6078. // {
  6079. // "description": "Gets a PerfSampleSeries.\n\nMay return any of the following error code(s): - NOT_FOUND - The specified PerfSampleSeries does not exist",
  6080. // "httpMethod": "GET",
  6081. // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.get",
  6082. // "parameterOrder": [
  6083. // "projectId",
  6084. // "historyId",
  6085. // "executionId",
  6086. // "stepId",
  6087. // "sampleSeriesId"
  6088. // ],
  6089. // "parameters": {
  6090. // "executionId": {
  6091. // "description": "A tool results execution ID.",
  6092. // "location": "path",
  6093. // "required": true,
  6094. // "type": "string"
  6095. // },
  6096. // "historyId": {
  6097. // "description": "A tool results history ID.",
  6098. // "location": "path",
  6099. // "required": true,
  6100. // "type": "string"
  6101. // },
  6102. // "projectId": {
  6103. // "description": "The cloud project",
  6104. // "location": "path",
  6105. // "required": true,
  6106. // "type": "string"
  6107. // },
  6108. // "sampleSeriesId": {
  6109. // "description": "A sample series id",
  6110. // "location": "path",
  6111. // "required": true,
  6112. // "type": "string"
  6113. // },
  6114. // "stepId": {
  6115. // "description": "A tool results step ID.",
  6116. // "location": "path",
  6117. // "required": true,
  6118. // "type": "string"
  6119. // }
  6120. // },
  6121. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}",
  6122. // "response": {
  6123. // "$ref": "PerfSampleSeries"
  6124. // },
  6125. // "scopes": [
  6126. // "https://www.googleapis.com/auth/cloud-platform"
  6127. // ]
  6128. // }
  6129. }
  6130. // method id "toolresults.projects.histories.executions.steps.perfSampleSeries.list":
  6131. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall struct {
  6132. s *Service
  6133. projectId string
  6134. historyId string
  6135. executionId string
  6136. stepId string
  6137. urlParams_ gensupport.URLParams
  6138. ifNoneMatch_ string
  6139. ctx_ context.Context
  6140. header_ http.Header
  6141. }
  6142. // List: Lists PerfSampleSeries for a given Step.
  6143. //
  6144. // The request provides an optional filter which specifies one or more
  6145. // PerfMetricsType to include in the result; if none returns all. The
  6146. // resulting PerfSampleSeries are sorted by ids.
  6147. //
  6148. // May return any of the following canonical error codes: - NOT_FOUND -
  6149. // The containing Step does not exist
  6150. func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesService) List(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall {
  6151. c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6152. c.projectId = projectId
  6153. c.historyId = historyId
  6154. c.executionId = executionId
  6155. c.stepId = stepId
  6156. return c
  6157. }
  6158. // Filter sets the optional parameter "filter": Specify one or more
  6159. // PerfMetricType values such as CPU to filter the result
  6160. //
  6161. // Possible values:
  6162. // "cpu"
  6163. // "graphics"
  6164. // "memory"
  6165. // "network"
  6166. // "perfMetricTypeUnspecified"
  6167. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Filter(filter ...string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall {
  6168. c.urlParams_.SetMulti("filter", append([]string{}, filter...))
  6169. return c
  6170. }
  6171. // Fields allows partial responses to be retrieved. See
  6172. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6173. // for more information.
  6174. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall {
  6175. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6176. return c
  6177. }
  6178. // IfNoneMatch sets the optional parameter which makes the operation
  6179. // fail if the object's ETag matches the given value. This is useful for
  6180. // getting updates only after the object has changed since the last
  6181. // request. Use googleapi.IsNotModified to check whether the response
  6182. // error from Do is the result of In-None-Match.
  6183. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall {
  6184. c.ifNoneMatch_ = entityTag
  6185. return c
  6186. }
  6187. // Context sets the context to be used in this call's Do method. Any
  6188. // pending HTTP request will be aborted if the provided context is
  6189. // canceled.
  6190. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall {
  6191. c.ctx_ = ctx
  6192. return c
  6193. }
  6194. // Header returns an http.Header that can be modified by the caller to
  6195. // add HTTP headers to the request.
  6196. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Header() http.Header {
  6197. if c.header_ == nil {
  6198. c.header_ = make(http.Header)
  6199. }
  6200. return c.header_
  6201. }
  6202. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) doRequest(alt string) (*http.Response, error) {
  6203. reqHeaders := make(http.Header)
  6204. for k, v := range c.header_ {
  6205. reqHeaders[k] = v
  6206. }
  6207. reqHeaders.Set("User-Agent", c.s.userAgent())
  6208. if c.ifNoneMatch_ != "" {
  6209. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6210. }
  6211. var body io.Reader = nil
  6212. c.urlParams_.Set("alt", alt)
  6213. c.urlParams_.Set("prettyPrint", "false")
  6214. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries")
  6215. urls += "?" + c.urlParams_.Encode()
  6216. req, err := http.NewRequest("GET", urls, body)
  6217. if err != nil {
  6218. return nil, err
  6219. }
  6220. req.Header = reqHeaders
  6221. googleapi.Expand(req.URL, map[string]string{
  6222. "projectId": c.projectId,
  6223. "historyId": c.historyId,
  6224. "executionId": c.executionId,
  6225. "stepId": c.stepId,
  6226. })
  6227. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6228. }
  6229. // Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.list" call.
  6230. // Exactly one of *ListPerfSampleSeriesResponse or error will be
  6231. // non-nil. Any non-2xx status code is an error. Response headers are in
  6232. // either *ListPerfSampleSeriesResponse.ServerResponse.Header or (if a
  6233. // response was returned at all) in error.(*googleapi.Error).Header. Use
  6234. // googleapi.IsNotModified to check whether the returned error was
  6235. // because http.StatusNotModified was returned.
  6236. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesListCall) Do(opts ...googleapi.CallOption) (*ListPerfSampleSeriesResponse, error) {
  6237. gensupport.SetOptions(c.urlParams_, opts...)
  6238. res, err := c.doRequest("json")
  6239. if res != nil && res.StatusCode == http.StatusNotModified {
  6240. if res.Body != nil {
  6241. res.Body.Close()
  6242. }
  6243. return nil, &googleapi.Error{
  6244. Code: res.StatusCode,
  6245. Header: res.Header,
  6246. }
  6247. }
  6248. if err != nil {
  6249. return nil, err
  6250. }
  6251. defer googleapi.CloseBody(res)
  6252. if err := googleapi.CheckResponse(res); err != nil {
  6253. return nil, err
  6254. }
  6255. ret := &ListPerfSampleSeriesResponse{
  6256. ServerResponse: googleapi.ServerResponse{
  6257. Header: res.Header,
  6258. HTTPStatusCode: res.StatusCode,
  6259. },
  6260. }
  6261. target := &ret
  6262. if err := gensupport.DecodeResponse(target, res); err != nil {
  6263. return nil, err
  6264. }
  6265. return ret, nil
  6266. // {
  6267. // "description": "Lists PerfSampleSeries for a given Step.\n\nThe request provides an optional filter which specifies one or more PerfMetricsType to include in the result; if none returns all. The resulting PerfSampleSeries are sorted by ids.\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing Step does not exist",
  6268. // "httpMethod": "GET",
  6269. // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.list",
  6270. // "parameterOrder": [
  6271. // "projectId",
  6272. // "historyId",
  6273. // "executionId",
  6274. // "stepId"
  6275. // ],
  6276. // "parameters": {
  6277. // "executionId": {
  6278. // "description": "A tool results execution ID.",
  6279. // "location": "path",
  6280. // "required": true,
  6281. // "type": "string"
  6282. // },
  6283. // "filter": {
  6284. // "description": "Specify one or more PerfMetricType values such as CPU to filter the result",
  6285. // "enum": [
  6286. // "cpu",
  6287. // "graphics",
  6288. // "memory",
  6289. // "network",
  6290. // "perfMetricTypeUnspecified"
  6291. // ],
  6292. // "enumDescriptions": [
  6293. // "",
  6294. // "",
  6295. // "",
  6296. // "",
  6297. // ""
  6298. // ],
  6299. // "location": "query",
  6300. // "repeated": true,
  6301. // "type": "string"
  6302. // },
  6303. // "historyId": {
  6304. // "description": "A tool results history ID.",
  6305. // "location": "path",
  6306. // "required": true,
  6307. // "type": "string"
  6308. // },
  6309. // "projectId": {
  6310. // "description": "The cloud project",
  6311. // "location": "path",
  6312. // "required": true,
  6313. // "type": "string"
  6314. // },
  6315. // "stepId": {
  6316. // "description": "A tool results step ID.",
  6317. // "location": "path",
  6318. // "required": true,
  6319. // "type": "string"
  6320. // }
  6321. // },
  6322. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries",
  6323. // "response": {
  6324. // "$ref": "ListPerfSampleSeriesResponse"
  6325. // },
  6326. // "scopes": [
  6327. // "https://www.googleapis.com/auth/cloud-platform"
  6328. // ]
  6329. // }
  6330. }
  6331. // method id "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate":
  6332. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall struct {
  6333. s *Service
  6334. projectId string
  6335. historyId string
  6336. executionId string
  6337. stepId string
  6338. sampleSeriesId string
  6339. batchcreateperfsamplesrequest *BatchCreatePerfSamplesRequest
  6340. urlParams_ gensupport.URLParams
  6341. ctx_ context.Context
  6342. header_ http.Header
  6343. }
  6344. // BatchCreate: Creates a batch of PerfSamples - a client can submit
  6345. // multiple batches of Perf Samples through repeated calls to this
  6346. // method in order to split up a large request payload - duplicates and
  6347. // existing timestamp entries will be ignored. - the batch operation may
  6348. // partially succeed - the set of elements successfully inserted is
  6349. // returned in the response (omits items which already existed in the
  6350. // database).
  6351. //
  6352. // May return any of the following canonical error codes: - NOT_FOUND -
  6353. // The containing PerfSampleSeries does not exist
  6354. func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService) BatchCreate(projectId string, historyId string, executionId string, stepId string, sampleSeriesId string, batchcreateperfsamplesrequest *BatchCreatePerfSamplesRequest) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall {
  6355. c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6356. c.projectId = projectId
  6357. c.historyId = historyId
  6358. c.executionId = executionId
  6359. c.stepId = stepId
  6360. c.sampleSeriesId = sampleSeriesId
  6361. c.batchcreateperfsamplesrequest = batchcreateperfsamplesrequest
  6362. return c
  6363. }
  6364. // Fields allows partial responses to be retrieved. See
  6365. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6366. // for more information.
  6367. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall {
  6368. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6369. return c
  6370. }
  6371. // Context sets the context to be used in this call's Do method. Any
  6372. // pending HTTP request will be aborted if the provided context is
  6373. // canceled.
  6374. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall {
  6375. c.ctx_ = ctx
  6376. return c
  6377. }
  6378. // Header returns an http.Header that can be modified by the caller to
  6379. // add HTTP headers to the request.
  6380. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Header() http.Header {
  6381. if c.header_ == nil {
  6382. c.header_ = make(http.Header)
  6383. }
  6384. return c.header_
  6385. }
  6386. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) doRequest(alt string) (*http.Response, error) {
  6387. reqHeaders := make(http.Header)
  6388. for k, v := range c.header_ {
  6389. reqHeaders[k] = v
  6390. }
  6391. reqHeaders.Set("User-Agent", c.s.userAgent())
  6392. var body io.Reader = nil
  6393. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateperfsamplesrequest)
  6394. if err != nil {
  6395. return nil, err
  6396. }
  6397. reqHeaders.Set("Content-Type", "application/json")
  6398. c.urlParams_.Set("alt", alt)
  6399. c.urlParams_.Set("prettyPrint", "false")
  6400. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate")
  6401. urls += "?" + c.urlParams_.Encode()
  6402. req, err := http.NewRequest("POST", urls, body)
  6403. if err != nil {
  6404. return nil, err
  6405. }
  6406. req.Header = reqHeaders
  6407. googleapi.Expand(req.URL, map[string]string{
  6408. "projectId": c.projectId,
  6409. "historyId": c.historyId,
  6410. "executionId": c.executionId,
  6411. "stepId": c.stepId,
  6412. "sampleSeriesId": c.sampleSeriesId,
  6413. })
  6414. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6415. }
  6416. // Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate" call.
  6417. // Exactly one of *BatchCreatePerfSamplesResponse or error will be
  6418. // non-nil. Any non-2xx status code is an error. Response headers are in
  6419. // either *BatchCreatePerfSamplesResponse.ServerResponse.Header or (if a
  6420. // response was returned at all) in error.(*googleapi.Error).Header. Use
  6421. // googleapi.IsNotModified to check whether the returned error was
  6422. // because http.StatusNotModified was returned.
  6423. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreatePerfSamplesResponse, error) {
  6424. gensupport.SetOptions(c.urlParams_, opts...)
  6425. res, err := c.doRequest("json")
  6426. if res != nil && res.StatusCode == http.StatusNotModified {
  6427. if res.Body != nil {
  6428. res.Body.Close()
  6429. }
  6430. return nil, &googleapi.Error{
  6431. Code: res.StatusCode,
  6432. Header: res.Header,
  6433. }
  6434. }
  6435. if err != nil {
  6436. return nil, err
  6437. }
  6438. defer googleapi.CloseBody(res)
  6439. if err := googleapi.CheckResponse(res); err != nil {
  6440. return nil, err
  6441. }
  6442. ret := &BatchCreatePerfSamplesResponse{
  6443. ServerResponse: googleapi.ServerResponse{
  6444. Header: res.Header,
  6445. HTTPStatusCode: res.StatusCode,
  6446. },
  6447. }
  6448. target := &ret
  6449. if err := gensupport.DecodeResponse(target, res); err != nil {
  6450. return nil, err
  6451. }
  6452. return ret, nil
  6453. // {
  6454. // "description": "Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database).\n\nMay return any of the following canonical error codes: - NOT_FOUND - The containing PerfSampleSeries does not exist",
  6455. // "httpMethod": "POST",
  6456. // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate",
  6457. // "parameterOrder": [
  6458. // "projectId",
  6459. // "historyId",
  6460. // "executionId",
  6461. // "stepId",
  6462. // "sampleSeriesId"
  6463. // ],
  6464. // "parameters": {
  6465. // "executionId": {
  6466. // "description": "A tool results execution ID.",
  6467. // "location": "path",
  6468. // "required": true,
  6469. // "type": "string"
  6470. // },
  6471. // "historyId": {
  6472. // "description": "A tool results history ID.",
  6473. // "location": "path",
  6474. // "required": true,
  6475. // "type": "string"
  6476. // },
  6477. // "projectId": {
  6478. // "description": "The cloud project",
  6479. // "location": "path",
  6480. // "required": true,
  6481. // "type": "string"
  6482. // },
  6483. // "sampleSeriesId": {
  6484. // "description": "A sample series id",
  6485. // "location": "path",
  6486. // "required": true,
  6487. // "type": "string"
  6488. // },
  6489. // "stepId": {
  6490. // "description": "A tool results step ID.",
  6491. // "location": "path",
  6492. // "required": true,
  6493. // "type": "string"
  6494. // }
  6495. // },
  6496. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate",
  6497. // "request": {
  6498. // "$ref": "BatchCreatePerfSamplesRequest"
  6499. // },
  6500. // "response": {
  6501. // "$ref": "BatchCreatePerfSamplesResponse"
  6502. // },
  6503. // "scopes": [
  6504. // "https://www.googleapis.com/auth/cloud-platform"
  6505. // ]
  6506. // }
  6507. }
  6508. // method id "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list":
  6509. type ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall struct {
  6510. s *Service
  6511. projectId string
  6512. historyId string
  6513. executionId string
  6514. stepId string
  6515. sampleSeriesId string
  6516. urlParams_ gensupport.URLParams
  6517. ifNoneMatch_ string
  6518. ctx_ context.Context
  6519. header_ http.Header
  6520. }
  6521. // List: Lists the Performance Samples of a given Sample Series - The
  6522. // list results are sorted by timestamps ascending - The default page
  6523. // size is 500 samples; and maximum size allowed 5000 - The response
  6524. // token indicates the last returned PerfSample timestamp - When the
  6525. // results size exceeds the page size, submit a subsequent request
  6526. // including the page token to return the rest of the samples up to the
  6527. // page limit
  6528. //
  6529. // May return any of the following canonical error codes: - OUT_OF_RANGE
  6530. // - The specified request page_token is out of valid range - NOT_FOUND
  6531. // - The containing PerfSampleSeries does not exist
  6532. func (r *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesService) List(projectId string, historyId string, executionId string, stepId string, sampleSeriesId string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall {
  6533. c := &ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6534. c.projectId = projectId
  6535. c.historyId = historyId
  6536. c.executionId = executionId
  6537. c.stepId = stepId
  6538. c.sampleSeriesId = sampleSeriesId
  6539. return c
  6540. }
  6541. // PageSize sets the optional parameter "pageSize": The default page
  6542. // size is 500 samples, and the maximum size is 5000. If the page_size
  6543. // is greater than 5000, the effective page size will be 5000
  6544. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall {
  6545. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6546. return c
  6547. }
  6548. // PageToken sets the optional parameter "pageToken": Optional, the
  6549. // next_page_token returned in the previous response
  6550. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall {
  6551. c.urlParams_.Set("pageToken", pageToken)
  6552. return c
  6553. }
  6554. // Fields allows partial responses to be retrieved. See
  6555. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6556. // for more information.
  6557. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall {
  6558. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6559. return c
  6560. }
  6561. // IfNoneMatch sets the optional parameter which makes the operation
  6562. // fail if the object's ETag matches the given value. This is useful for
  6563. // getting updates only after the object has changed since the last
  6564. // request. Use googleapi.IsNotModified to check whether the response
  6565. // error from Do is the result of In-None-Match.
  6566. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall {
  6567. c.ifNoneMatch_ = entityTag
  6568. return c
  6569. }
  6570. // Context sets the context to be used in this call's Do method. Any
  6571. // pending HTTP request will be aborted if the provided context is
  6572. // canceled.
  6573. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall {
  6574. c.ctx_ = ctx
  6575. return c
  6576. }
  6577. // Header returns an http.Header that can be modified by the caller to
  6578. // add HTTP headers to the request.
  6579. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Header() http.Header {
  6580. if c.header_ == nil {
  6581. c.header_ = make(http.Header)
  6582. }
  6583. return c.header_
  6584. }
  6585. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) doRequest(alt string) (*http.Response, error) {
  6586. reqHeaders := make(http.Header)
  6587. for k, v := range c.header_ {
  6588. reqHeaders[k] = v
  6589. }
  6590. reqHeaders.Set("User-Agent", c.s.userAgent())
  6591. if c.ifNoneMatch_ != "" {
  6592. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6593. }
  6594. var body io.Reader = nil
  6595. c.urlParams_.Set("alt", alt)
  6596. c.urlParams_.Set("prettyPrint", "false")
  6597. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples")
  6598. urls += "?" + c.urlParams_.Encode()
  6599. req, err := http.NewRequest("GET", urls, body)
  6600. if err != nil {
  6601. return nil, err
  6602. }
  6603. req.Header = reqHeaders
  6604. googleapi.Expand(req.URL, map[string]string{
  6605. "projectId": c.projectId,
  6606. "historyId": c.historyId,
  6607. "executionId": c.executionId,
  6608. "stepId": c.stepId,
  6609. "sampleSeriesId": c.sampleSeriesId,
  6610. })
  6611. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6612. }
  6613. // Do executes the "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list" call.
  6614. // Exactly one of *ListPerfSamplesResponse or error will be non-nil. Any
  6615. // non-2xx status code is an error. Response headers are in either
  6616. // *ListPerfSamplesResponse.ServerResponse.Header or (if a response was
  6617. // returned at all) in error.(*googleapi.Error).Header. Use
  6618. // googleapi.IsNotModified to check whether the returned error was
  6619. // because http.StatusNotModified was returned.
  6620. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Do(opts ...googleapi.CallOption) (*ListPerfSamplesResponse, error) {
  6621. gensupport.SetOptions(c.urlParams_, opts...)
  6622. res, err := c.doRequest("json")
  6623. if res != nil && res.StatusCode == http.StatusNotModified {
  6624. if res.Body != nil {
  6625. res.Body.Close()
  6626. }
  6627. return nil, &googleapi.Error{
  6628. Code: res.StatusCode,
  6629. Header: res.Header,
  6630. }
  6631. }
  6632. if err != nil {
  6633. return nil, err
  6634. }
  6635. defer googleapi.CloseBody(res)
  6636. if err := googleapi.CheckResponse(res); err != nil {
  6637. return nil, err
  6638. }
  6639. ret := &ListPerfSamplesResponse{
  6640. ServerResponse: googleapi.ServerResponse{
  6641. Header: res.Header,
  6642. HTTPStatusCode: res.StatusCode,
  6643. },
  6644. }
  6645. target := &ret
  6646. if err := gensupport.DecodeResponse(target, res); err != nil {
  6647. return nil, err
  6648. }
  6649. return ret, nil
  6650. // {
  6651. // "description": "Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit\n\nMay return any of the following canonical error codes: - OUT_OF_RANGE - The specified request page_token is out of valid range - NOT_FOUND - The containing PerfSampleSeries does not exist",
  6652. // "httpMethod": "GET",
  6653. // "id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list",
  6654. // "parameterOrder": [
  6655. // "projectId",
  6656. // "historyId",
  6657. // "executionId",
  6658. // "stepId",
  6659. // "sampleSeriesId"
  6660. // ],
  6661. // "parameters": {
  6662. // "executionId": {
  6663. // "description": "A tool results execution ID.",
  6664. // "location": "path",
  6665. // "required": true,
  6666. // "type": "string"
  6667. // },
  6668. // "historyId": {
  6669. // "description": "A tool results history ID.",
  6670. // "location": "path",
  6671. // "required": true,
  6672. // "type": "string"
  6673. // },
  6674. // "pageSize": {
  6675. // "description": "The default page size is 500 samples, and the maximum size is 5000. If the page_size is greater than 5000, the effective page size will be 5000",
  6676. // "format": "int32",
  6677. // "location": "query",
  6678. // "type": "integer"
  6679. // },
  6680. // "pageToken": {
  6681. // "description": "Optional, the next_page_token returned in the previous response",
  6682. // "location": "query",
  6683. // "type": "string"
  6684. // },
  6685. // "projectId": {
  6686. // "description": "The cloud project",
  6687. // "location": "path",
  6688. // "required": true,
  6689. // "type": "string"
  6690. // },
  6691. // "sampleSeriesId": {
  6692. // "description": "A sample series id",
  6693. // "location": "path",
  6694. // "required": true,
  6695. // "type": "string"
  6696. // },
  6697. // "stepId": {
  6698. // "description": "A tool results step ID.",
  6699. // "location": "path",
  6700. // "required": true,
  6701. // "type": "string"
  6702. // }
  6703. // },
  6704. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples",
  6705. // "response": {
  6706. // "$ref": "ListPerfSamplesResponse"
  6707. // },
  6708. // "scopes": [
  6709. // "https://www.googleapis.com/auth/cloud-platform"
  6710. // ]
  6711. // }
  6712. }
  6713. // Pages invokes f for each page of results.
  6714. // A non-nil error returned from f will halt the iteration.
  6715. // The provided context supersedes any context provided to the Context method.
  6716. func (c *ProjectsHistoriesExecutionsStepsPerfSampleSeriesSamplesListCall) Pages(ctx context.Context, f func(*ListPerfSamplesResponse) error) error {
  6717. c.ctx_ = ctx
  6718. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6719. for {
  6720. x, err := c.Do()
  6721. if err != nil {
  6722. return err
  6723. }
  6724. if err := f(x); err != nil {
  6725. return err
  6726. }
  6727. if x.NextPageToken == "" {
  6728. return nil
  6729. }
  6730. c.PageToken(x.NextPageToken)
  6731. }
  6732. }
  6733. // method id "toolresults.projects.histories.executions.steps.thumbnails.list":
  6734. type ProjectsHistoriesExecutionsStepsThumbnailsListCall struct {
  6735. s *Service
  6736. projectId string
  6737. historyId string
  6738. executionId string
  6739. stepId string
  6740. urlParams_ gensupport.URLParams
  6741. ifNoneMatch_ string
  6742. ctx_ context.Context
  6743. header_ http.Header
  6744. }
  6745. // List: Lists thumbnails of images attached to a step.
  6746. //
  6747. // May return any of the following canonical error codes: -
  6748. // PERMISSION_DENIED - if the user is not authorized to read from the
  6749. // project, or from any of the images - INVALID_ARGUMENT - if the
  6750. // request is malformed - NOT_FOUND - if the step does not exist, or if
  6751. // any of the images do not exist
  6752. func (r *ProjectsHistoriesExecutionsStepsThumbnailsService) List(projectId string, historyId string, executionId string, stepId string) *ProjectsHistoriesExecutionsStepsThumbnailsListCall {
  6753. c := &ProjectsHistoriesExecutionsStepsThumbnailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6754. c.projectId = projectId
  6755. c.historyId = historyId
  6756. c.executionId = executionId
  6757. c.stepId = stepId
  6758. return c
  6759. }
  6760. // PageSize sets the optional parameter "pageSize": The maximum number
  6761. // of thumbnails to fetch.
  6762. //
  6763. // Default value: 50. The server will use this default if the field is
  6764. // not set or has a value of 0.
  6765. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) PageSize(pageSize int64) *ProjectsHistoriesExecutionsStepsThumbnailsListCall {
  6766. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6767. return c
  6768. }
  6769. // PageToken sets the optional parameter "pageToken": A continuation
  6770. // token to resume the query at the next item.
  6771. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) PageToken(pageToken string) *ProjectsHistoriesExecutionsStepsThumbnailsListCall {
  6772. c.urlParams_.Set("pageToken", pageToken)
  6773. return c
  6774. }
  6775. // Fields allows partial responses to be retrieved. See
  6776. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6777. // for more information.
  6778. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Fields(s ...googleapi.Field) *ProjectsHistoriesExecutionsStepsThumbnailsListCall {
  6779. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6780. return c
  6781. }
  6782. // IfNoneMatch sets the optional parameter which makes the operation
  6783. // fail if the object's ETag matches the given value. This is useful for
  6784. // getting updates only after the object has changed since the last
  6785. // request. Use googleapi.IsNotModified to check whether the response
  6786. // error from Do is the result of In-None-Match.
  6787. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) IfNoneMatch(entityTag string) *ProjectsHistoriesExecutionsStepsThumbnailsListCall {
  6788. c.ifNoneMatch_ = entityTag
  6789. return c
  6790. }
  6791. // Context sets the context to be used in this call's Do method. Any
  6792. // pending HTTP request will be aborted if the provided context is
  6793. // canceled.
  6794. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Context(ctx context.Context) *ProjectsHistoriesExecutionsStepsThumbnailsListCall {
  6795. c.ctx_ = ctx
  6796. return c
  6797. }
  6798. // Header returns an http.Header that can be modified by the caller to
  6799. // add HTTP headers to the request.
  6800. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Header() http.Header {
  6801. if c.header_ == nil {
  6802. c.header_ = make(http.Header)
  6803. }
  6804. return c.header_
  6805. }
  6806. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) doRequest(alt string) (*http.Response, error) {
  6807. reqHeaders := make(http.Header)
  6808. for k, v := range c.header_ {
  6809. reqHeaders[k] = v
  6810. }
  6811. reqHeaders.Set("User-Agent", c.s.userAgent())
  6812. if c.ifNoneMatch_ != "" {
  6813. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6814. }
  6815. var body io.Reader = nil
  6816. c.urlParams_.Set("alt", alt)
  6817. c.urlParams_.Set("prettyPrint", "false")
  6818. urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails")
  6819. urls += "?" + c.urlParams_.Encode()
  6820. req, err := http.NewRequest("GET", urls, body)
  6821. if err != nil {
  6822. return nil, err
  6823. }
  6824. req.Header = reqHeaders
  6825. googleapi.Expand(req.URL, map[string]string{
  6826. "projectId": c.projectId,
  6827. "historyId": c.historyId,
  6828. "executionId": c.executionId,
  6829. "stepId": c.stepId,
  6830. })
  6831. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6832. }
  6833. // Do executes the "toolresults.projects.histories.executions.steps.thumbnails.list" call.
  6834. // Exactly one of *ListStepThumbnailsResponse or error will be non-nil.
  6835. // Any non-2xx status code is an error. Response headers are in either
  6836. // *ListStepThumbnailsResponse.ServerResponse.Header or (if a response
  6837. // was returned at all) in error.(*googleapi.Error).Header. Use
  6838. // googleapi.IsNotModified to check whether the returned error was
  6839. // because http.StatusNotModified was returned.
  6840. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Do(opts ...googleapi.CallOption) (*ListStepThumbnailsResponse, error) {
  6841. gensupport.SetOptions(c.urlParams_, opts...)
  6842. res, err := c.doRequest("json")
  6843. if res != nil && res.StatusCode == http.StatusNotModified {
  6844. if res.Body != nil {
  6845. res.Body.Close()
  6846. }
  6847. return nil, &googleapi.Error{
  6848. Code: res.StatusCode,
  6849. Header: res.Header,
  6850. }
  6851. }
  6852. if err != nil {
  6853. return nil, err
  6854. }
  6855. defer googleapi.CloseBody(res)
  6856. if err := googleapi.CheckResponse(res); err != nil {
  6857. return nil, err
  6858. }
  6859. ret := &ListStepThumbnailsResponse{
  6860. ServerResponse: googleapi.ServerResponse{
  6861. Header: res.Header,
  6862. HTTPStatusCode: res.StatusCode,
  6863. },
  6864. }
  6865. target := &ret
  6866. if err := gensupport.DecodeResponse(target, res); err != nil {
  6867. return nil, err
  6868. }
  6869. return ret, nil
  6870. // {
  6871. // "description": "Lists thumbnails of images attached to a step.\n\nMay return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist",
  6872. // "httpMethod": "GET",
  6873. // "id": "toolresults.projects.histories.executions.steps.thumbnails.list",
  6874. // "parameterOrder": [
  6875. // "projectId",
  6876. // "historyId",
  6877. // "executionId",
  6878. // "stepId"
  6879. // ],
  6880. // "parameters": {
  6881. // "executionId": {
  6882. // "description": "An Execution id.\n\nRequired.",
  6883. // "location": "path",
  6884. // "required": true,
  6885. // "type": "string"
  6886. // },
  6887. // "historyId": {
  6888. // "description": "A History id.\n\nRequired.",
  6889. // "location": "path",
  6890. // "required": true,
  6891. // "type": "string"
  6892. // },
  6893. // "pageSize": {
  6894. // "description": "The maximum number of thumbnails to fetch.\n\nDefault value: 50. The server will use this default if the field is not set or has a value of 0.\n\nOptional.",
  6895. // "format": "int32",
  6896. // "location": "query",
  6897. // "type": "integer"
  6898. // },
  6899. // "pageToken": {
  6900. // "description": "A continuation token to resume the query at the next item.\n\nOptional.",
  6901. // "location": "query",
  6902. // "type": "string"
  6903. // },
  6904. // "projectId": {
  6905. // "description": "A Project id.\n\nRequired.",
  6906. // "location": "path",
  6907. // "required": true,
  6908. // "type": "string"
  6909. // },
  6910. // "stepId": {
  6911. // "description": "A Step id.\n\nRequired.",
  6912. // "location": "path",
  6913. // "required": true,
  6914. // "type": "string"
  6915. // }
  6916. // },
  6917. // "path": "{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails",
  6918. // "response": {
  6919. // "$ref": "ListStepThumbnailsResponse"
  6920. // },
  6921. // "scopes": [
  6922. // "https://www.googleapis.com/auth/cloud-platform"
  6923. // ]
  6924. // }
  6925. }
  6926. // Pages invokes f for each page of results.
  6927. // A non-nil error returned from f will halt the iteration.
  6928. // The provided context supersedes any context provided to the Context method.
  6929. func (c *ProjectsHistoriesExecutionsStepsThumbnailsListCall) Pages(ctx context.Context, f func(*ListStepThumbnailsResponse) error) error {
  6930. c.ctx_ = ctx
  6931. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  6932. for {
  6933. x, err := c.Do()
  6934. if err != nil {
  6935. return err
  6936. }
  6937. if err := f(x); err != nil {
  6938. return err
  6939. }
  6940. if x.NextPageToken == "" {
  6941. return nil
  6942. }
  6943. c.PageToken(x.NextPageToken)
  6944. }
  6945. }