You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

7312 lines
271 KiB

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