25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

7127 satır
264 KiB

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